scieee AI-readable full text Open interactive document viewer

Reducing simulation bias in mixed logit model estimation

Bastin, Fabian,Cirillo, Cinzia

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Bastin, Fabian; Cirillo, Cinzia Article Reducing simulation bias in mixed logit model estimation Journal of Choice Modelling Provided in Cooperation with: Journal of Choice Modelling Suggested Citation: Bastin, Fabian; Cirillo, Cinzia (2010) : Reducing simulation bias in mixed logit model estimation, Journal of Choice Modelling, ISSN 1755-5345, University of Leeds, Institute for Transport Studies, Leeds, Vol. 3, Iss. 2, pp. 71-88 This Version is available at: https://hdl.handle.net/10419/66808 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by-nc/2.0/uk/ * Corresponding author, T: +1-5143436952, F: + 1-5143435834, [email protected]a † T: + 1-3014056864, F: + 1-3014052585, [email protected] Reducing simulation bias in mixed logit model estimation Fabian Bastin1,* Cinzia Cirillo2,† 1 Department of Computing Science and Operational Research, Université de Montréal, Canada 2 Department of Civil and Environmental Engineering, University of Maryland, USA Received 01 February 2009, revised version received 30 September 2009, accepted 12 January 2010 Abstract Maximum simulated likelihood (MSL) procedure is generally adopted in discrete choice analysis to solve complex models without closed mathematical formulation. This procedure differs from the maximum likelihood simply because simulated probabilities are inserted into the Log-Likelihood (LL) function. The LL function to be maximized is the sum of the logarithm of the expected choice probabilities; since the logarithmic operation is a nonlinear transformation bias is then introduced. The simulation bias depends on the number of draws that are used in the simulation and on the sample size. Although the asymptotic properties of the MSL estimator are well known, the question is how simulation bias affects parameters estimation and therefore the main outcomes of choice models (for instance value of travel time and market shares). In this paper, we estimate explicitly the simulation bias in mixed logit parameter estimation, using Taylor expansion and we correct the log-likelihood objective function during the maximization process. The method is developed in the context of Monte Carlo simulation. We report significant error reduction on the final objective value but also on the optimal parameters. The method could be extended to randomized quasi-Monte Carlo techniques as long as standard deviations of simulated choice probabilities are calculated. Computation costs can be neglected when using Monte Carlo draws and even when advanced strategies such as adaptive sampling methodology are in use. Keywords: Mixed logit, simulation bias, optimisation bias. Journal of Choice Modelling, 3(2), pp 71-88 www.jocm.org.uk Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 72 1 Introduction Simulation is used extensively for approximating some mathematical quantities whose computations would otherwise be intractable. Simulation methods have been traditionally used to study the properties of inference methods in finite samples, classical applications being the bias and the mean square error of an estimator or the level of power of a test (Gouriéroux and Monfort 1993). More recently, econometricians are using simulation methods to make statistical inference over observational data (Gouriéroux and Monfort 1993; Lerman and Manski 1981; McFadden 1989; Pakes and Pollard 1989; Hajivassiliou and McFadden 1989). In all these studies, the aim of the simulation technique is to approximate integrals appearing in the objective function used in the estimation method (Gouriéroux and Monfort 1993). In transportation demand analysis, simulation has been adopted for models with random coefficients, such as mixed logit (Train 2003). It is widely known that the maximum simulated likelihood estimator for these models is inconsistent for any fixed number of simulation draws and is consistent and asymptotically normal only if the number of draws rises with sample size at a sufficiently fast rate. The inconsistency arises because the log-likelihood function is a nonlinear transformation of the simulated probability, such that an unbiased probability simulator does not provide an unbiased simulator of the log-likelihood function. This problem occurs even if the integrals are replaced by unbiased estimators, produced for instance by (quasi-)Monte Carlo simulation. (see Bhat 2001 and 2003). Both MC and QMC simulations nevertheless introduce approximation errors that affect the value of the likelihood function at the optimum and the final estimates of the parameters. One can argue that simulated scores could be adopted to produce unbiased estimators or to compute the maximum likelihood estimators (McFadden 1989); but this theoretical advantage is obtained at the expense of strong computation difficulties. In particular, if the accept-reject method is used, the objective function is then discontinuous in the parameters, so that practical estimation cannot be performed using standard, out-of-the-box, nonlinear programming tools, which assume differentiable functions. Consequently log-likelihood maximization remains the most popular approach amongst researchers and practitioners. Gouriéroux and Monfort have studied the properties of the estimators in the context of simulated maximum likelihood models in 1993. In particular, the consistency and the asymptotic normality of the estimators were derived analytically when the number of observations goes to infinity and when the number of simulations is fixed or goes to infinity. Their study however remains quite theoretical. Bastin et al. (2006b) have independently explored the consistency issues in the context of discrete choice analysis, giving strong consistency results based on analogy to stochastic programming. Gouriéroux and Monfort as well as Bastin et al. propose an estimation of the bias of the simulated log-likelihood, based on a Taylor expansion. While the two formulations look quite different, it can be shown that they are in reality very similar (Bonneu 2007). The expression proposed by Bastin et al. and used here uses the unbiased variance estimator and is numerically tractable. This paper examines a procedure that has the potential to reduce the bias. In particular, the bias is a function that can be simulated and included directly in the objective function as a bias correction. This simulated bias is itself a nonlinear function of the simulated probability, and so it is also biased. As a result, the estimator with this correction remains biased, but potentially significantly less. Our Monte Carlo Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 73 results indicate that a significant error reduction is indeed obtained on the final objective value but also on the optimal parameters when the correction term is included. The proposed method could be extended to randomized quasi-Monte Carlo techniques (see for instance Bhat 2003), however at an increased price as standard deviations can then be computed by repeating the simulated log-likelihood evaluation, using different set of draws. The remaining of this paper is organized as follows. In Section 2 after a brief description of the econometric model we introduce the technique of bias reduction. Section 3.1 is devoted to testing the method on artificial case studies. The dimensions affecting the bias, i.e. the sampling and the population sizes, are varied to evaluate the bias in different modeling situations. Both cross sectional and panel data are considered. Similar analyses are conducted on a real dataset and the results are presented in Section 3.2. The effects of bias on parameters estimation, value of travel time and market shares are outlined in Section 4. Conclusions and perspectives for future research are finally given in Section 5. 2 Calculating Bias in Mixed Logit Models 2.1 The Mixed logit model Mixed logit belongs to the family of discrete choice models; under the usual assumptions we define population size I and iA the set of available alternatives for individual . For each individual i, each alternative , has an associated utility that depends on the individual characteristics and the relative attractiveness of the alternative. The utility is assumed to have the additive form: where is a function of the model parameters vector and of , the observed attributes of alternative , while is a random term reflecting the unobserved part of the utility. Assuming that individual i selects the alternative maximizing his/her utility, the probability that he/she chooses alternative is given by: If we assume that the random terms are identically and independently Gumbel distributed, with scale factor set to one, we obtain the closed form for choice probability of logit models: Iii ,....,1, iAjAj,....1, ijijij VU Vij Vij j,xij ij x j A ij j A Pij Pil ij Vij Vil ,AlA i . Lij eVij eVil l1 A i . Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 74 Mixed logit models relax the assumption that the parameters are the same for all individuals, by assuming instead that individual explanatory variables vectors , , are realisations of a random vector . We then assume that is itself derived from a random vector and a parameters vector . The choice probability is then given by: Pij E Lij ,Lij ,P d Lij ,f d , where P is the probability measure associated with and is its distribution function. The vector of parameters is then estimated by maximizing the loglikelihood function, i.e. by solving the program where is the alternative choice made by the individual i. Note that the normalization factor is often omitted, but we introduce it for consistency with the stochastic programming literature (see for instance Shapiro 2000). This allows us to make direct comparisons between different sample sizes. This involves the computation of for each individual, which is impractical since it requires the evaluation of one multidimensional integral per individual. The value of is therefore replaced by some approximation, obtained in the Monte Carlo setting by sampling over , and given by: where R is the number of random draws . As a result, is now computed as the solution of the simulated log-likelihood problem: We will denote by a solution of this last approximate problem (often called the Sample Average Approximation, or SAA), while will represent a solution of the true problem. A standard extension is the treatment of repeated choice observations. Typically, the tastes of a given decision-maker are assumed to stay constant across choice-situations for that respondent, such that tastes vary across individuals, but not across observations for the same individual. The probabilities of the individual choices are then replaced by the probabilities of the observed sequence of choices for each decision-maker. With jit giving the alternative chosen by decision-maker i in i i1,...,I ,: f max LL max 1 Iln Piji i1 I , i j 1/I i ij P i ij P SPij i R1 RLij iri, ri1 R , i r max SLL max 1 Iln SPij i i1 I . * R * Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 75 choice-situation t (t=1,…,Ti), the probability of the choices made by decision-maker n, conditional on βi, is given by: , with a corresponding unconditional probability: . This leads to a new version of the log-likelihood function, given by: , with a corresponding form for the simulated log-likelihood function. 2.2 Bias reduction Under reasonable assumptions, the second-order Taylor expansion of the simulated log-likelihood around the true log-likelihood value gives where iji is the standard deviation of Lij i, (see Bastin et al. 2006b, for the derivation under Monte Carlo sampling; the result directly extends to randomized quasi-Monte Carlo draws). The bias is thus in the order of O(1/R) for each choice probability (where R is the sample size per individual) and in the order of O(1) with respect to the population size I. The variance, on the other side, is in O(1/(RI)), and consequently vanishes as the population size grows to infinity. Note that this bias term can itself be simulated, by (i) using the simulated probability SP iji R in lieu of the true probability Piji , and (ii) estimating the variance of Lij i, . In the Monte Carlo setting, we therefore use the mean and variance of Lij i, over the R draws as estimators for Piji and iji 2 , respectively. The bias can therefore be estimated at a computation cost close to zero, and the only correction we have to make is to add this quantity to the log-likelihood in the estimation procedure. In other terms, we now have to solve the program max SLLRSBR, where SBR is the simulated bias. It is important to note that SBR is itself biased, since it is a nonlinear function of the simulated probability. The asymptotic Li TiPij it i,xij it t1 Ti LiLit Tif d LL 1 Iln Li i1 I BRE SLLRLL 1 2IR ij i 2 Pij i 20 i1 I . Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 76 properties of the estimator based on this new objective function are therefore formally the same as those for maximum simulated likelihood. However, it seems reasonable that the bias is reduced by the inclusion of the bias correction, even though the correction is itself biased. We could nevertheless surmise that the bias estimator addition will result in an increase of the objective function variance, as the estimator is itself random. The Monte Carlo analyses in the next section examine these issues. Focusing on the simulation bias means that one neglects another important source of error: the optimisation bias. This bias is well known in stochastic programming, and results from the inequality where is the SAA estimator of , a function that we want to minimize with respect to x but that depends on stochastic factors . In the case of the maximization of the log-likelihood function associated to the probability choices amongst the population, we have from the monotonic behaviour of the logarithm operator that: In other terms, the optimisation of the sample average approximation implies that we usually overestimate the optimal value, but it is difficult to predict the importance of this “over-optimisation”. We just know that usually, the more important the variance of the objective function, the more important this bias. We nevertheless observe that while the simulation bias is negative, the optimisation bias is positive, so that when both are present they could by chance annihilate themselves, and produce more accurate estimators. The main difficulty remains in that we never know when such a cancellation happens. Both biases are more important with small numbers of draws; but while we can quantify the decrease of the simulation bias, we have to date no information about the optimisation bias. We therefore consider that it is dangerous to take a risk on the magnitude of the bias effects, and we prefer to limit the sources of errors, as long as we can do it at a reasonable computation cost. The second level heading should be numbered with the section number, followed by a full stop, and then the subsection number, as in 2.1 or 3.5, etc. It should be in bold and use Times New Roman 13 point font. The heading is flush with the left margin, is preceded by one blank line, and the text of the section follows immediately under the heading. If there is a first-level heading immediately preceding the level 2 heading, then no blank line precedes the heading. All significant words should be capitalised, with the remainder of the letters in lower case. Emin ˆ g (x, ) min Eˆ g (x, ) min E g(x, ) , ˆ g g Emax ln ˆ g i(x, ) i1 I max ln Eˆ g i(x, i1 I max ln E gi(x, i1 I . Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 77 3 Numerical experiments 3.1 Simulated data In order to evaluate the magnitude of the bias in different experimental situations we first use synthetic data. In all the simulated cases, individuals are assumed to face five alternatives. The utilities are linear and include five explanatory variables drawn from normal distributions N(0.5,1.0) and five generic coefficients. Assumptions are made on coefficient distributional forms; they are all random and normally distributed with mean 0.5 and standard deviation 1.0. We generate cross-sectional and panel data-sets; the latter contains for each individual ten repeated observations. We test the population size effects on bias by generating samples of different sizes (I = 1,000, 2,000 and 4,000). Each simulated choice model was estimated ten times using different seeds and three different number of pseudo-random Monte Carlo draws (R = 500, 1,000 and 2,000) per individual. In total 180 models have been estimated; results obtained with classical maximum likelihood estimation are then compared with those obtained when correcting the bias. In order to quantify the bias we use two error measurements for each coefficient of index l (that is the component of the parameter vector ) that is bias and MSE, which are respectively: It should be noted that the true values are those estimated with a number of draws equal to 10,000. The MSE measure is necessary to capture the variance effect in coefficient estimates; too much variance could in fact make difficult the bias measurement. It also gives us the mean quadratic error of our estimator. We finally summarize these quantities by taking their 2-norm over all the parameters. Bias and MSE for cross sectional data are reported in Figures 1 and 2, while the same measures on panel data are depicted in Figure 3 and 4. The transparent grey surface represents the bias for the model estimated with classical log-likelihood estimation, the dark surface is the one obtained by correcting the log-likelihood with the procedure proposed in Section 2. In both Figures 1 and 3 the light grey surfaces, which represent biased estimates, are upper than the dark unbiased surface, corresponding to corrected estimates, as expected. In cross sectional data the bias ranges from 0.0184 obtained for the model with 2,000 individuals and 2,000 number of random draws to 0.094 which is the value of the bias found for the case with 1,000 individuals and 500 draws; the highest value of bias (0.297) is obtained with a model estimated on 4,000 simulated observations with 500 draws. This result confirms that analysts should worry about bias not only when the number of MC draws is low, but also when the size of the population used in model estimation increases. The adopted technique is able to correct the bias, with a reduction factor varying from 50 percent to about 90 percent. Bias in panel data is higher in values, ranging from 0.034 to 0.196; reduction in bias are less efficient than for the cross-sectional data ranging from 15 percent to 60 percent. lth BlE Xl l, MSE XlE Xl l 2Bl 2 l 2. Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 78 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 500 1000 2000 1000 2000 4000 MSE norm Number of draws Number of Individuals MSE norm vs estimates with R = 10000 not corrected corrected Figure 1. Bias on cross sectional data Figure 2. MSE on cross sectional data Figure 3. Bias on panel data Figure 4. MSE on panel data MSE values are low except in two cases: 1) coefficients estimated on cross-sectional data with 4,000 individuals and 500 MC draws and 2) coefficients estimated on panel data with 1,000 responses and 500 MC draws. For panel data with low number of responses (1,000) and low number of draws (500), bias correction seems to negatively 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 500 1000 2000 1000 2000 4000 Bias norm Number of draws Number of Individuals Bias norm vs estimates with R = 10000 not corrected corrected 0.0 0.1 0.2 0.3 500 1000 2000 1000 2000 4000 Bias norm Number of draws Number of Observations Bias norm vs estimates with R = 10000 not corrected corrected 0.0 0.1 0.2 0.3 0.4 0.5 500 1000 2000 1000 2000 4000 MSE norm Number of draws Number of Observations MSE norm vs estimates with R = 10000 not corrected corrected Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 85 Table 7. Value of travel time (GM/h) savings 2,000 observations 2,000 draws Quartile not corrected corrected 10,000 25% 6.43 4.67 1.31 50% 12.59 12.41 10.5 75% 19.78 22.31 23.45 A better fit can be observed also in the second case analysed, where the model has been estimated on 4,000 observations using 2,000 draws (see Figure 8 and Table 8). Figure 8. Travel time and travel cost coefficients – 4,000 observations 2,000 draws Table 8. Value of travel time (GM/h) 4,000 observations 2,000 draws Quartile not corrected corrected 10000 25% 3.93 1.74 2.32 50% 21.26 20.25 19.86 75% 45.91 46.32 44.63 Finally we apply the model calibrated on 2,000 observations to the remaining 2,000 observations available in the Mobidrive dataset in order to predict their market shares. Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 86 Results are shown in Table 9; again corrections are able to get results closer to the reference values obtained with 10,000 draws per individual. Table 9. Market share 2,000 observations 2,000 draws not corrected corrected 10,000 Car as driver 34.5 34.1 34.2 Car as passenger 13.4 13.1 12.6 Public transport 16.9 17.4 17.6 Walk 22.7 22.9 22.9 Bike 12.5 12.5 12.5 5 Conclusions In this paper, we have quantified simulation bias on the log-likelihood function in mixed logit models. Bias calculation is based on a second-order Taylor expansion; the formulation used is similar to the one proposed by Gouriéroux and Monfort (1993) but is computationally more tractable. We have also studied the effect of simulation bias on the parameters estimation. Both synthetic and real data have been used to explore the problem. Results from simulated experiments clearly show that the methodology is able to correct the bias and that the most significant corrections are obtained when a low number of draws is used to optimize the log-likelihood function. In this study, simulation bias dominates as the number of observations increases. Those results are consistent with what the theory predicts. The analysis has also been extended to real data: a panel data extracted from a six-week travel diary. Here the results are less clear; however the instability of the results can be explained by the presence of the optimisation bias, that depends on the variance of the simulated log-likelihood, while this variance is not affected by the bias correction. The optimisation bias is well known in stochastic programming, but unfortunately cannot be a priori quantified; we however know that it has positive sign, therefore opposite to the simulation bias, and increases with overall variance, and consequently is more important for small population sizes. We found that the bias correction has benefit effect on the parameter estimation and that significant reduction of bias can be obtained, especially when the population size increases. The use of common random numbers makes this correction virtually free, that does not significantly increase the log-likelihood variance, and it only suffers from a small bias. Analysis on the value of travel time and market shares also shows that beneficial effects are obtained by applying the simulation bias correction. In view of the negligible computation cost and direct implementation, we therefore suggest applying this correction when estimating mixed logit models. A natural follow up of this research work is the calculation of the simulation bias when quasi-random techniques are adopted to approximate the integration space. This is possible if the variance is somehow quantified during the optimisation process. We are currently exploring the extension of the adaptive sampling size strategy to randomized quasi-Monte Carlo methods. Randomized quasi-Monte Carlo techniques try to benefit from the best of the two worlds: better uniform coverage than standard Monte Carlo, and easy error estimation. In particular, the randomization implies that our theoretical analysis is still valid, with a different, hopefully smaller, standard deviation. The calculation of this last quantity at a particular step of the estimation process is however Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 87 computationally expensive, as we have to repeat the likelihood evaluation with different randomized draws set. The total cost can however remain significantly smaller. Additional numerical investigation is therefore required to correctly address the potential advantages in this case. ACKNOWLEDGEMENTS We would like to thank the four anonymous reviewers, whose comments helped to improve this paper. The first author acknowledges the support received by NSERC. 6 References Axhausen, K. W., Zimmermann, A., Schönfelder, S., Rindsfüser, G. and Haupt, T., 2002. Observing the rhythms of daily life: A six-week travel diary. Transportation, 29(2), 95-124. Bastin F., Cirillo, C. and Toint, Ph. L., 2006a. Application of an adaptive Monte Carlo algorithm to mixed logit estimation. Transportation Research, 40(7), 577–593. Bastin F., Cirillo, C. and Toint, Ph. L., 2006b Convergence theory for non-convex stochastic programming with an application to mixed logit. Mathematical Programming special issue on Monte-Carlo simulation techniques 108(2-3) 207- 234. Bhat, C. R., 2001. Quasi-random maximum simulated likelihood estimation of the mixed multinomial logit model. Transportation Research, 35 (7), 677-693. Bhat, C. R. 2003. Simulation Estimation of Mixed Discrete Choice Models Using Randomized and Scrambled Halton Sequences. Transportation Research, 37(9), 837-855. Bhat, C. R., Srinivasan, S. and Axhausen, K. W., 2005. An Analysis of Multiple Interepisode Durations Using a Unifying Multivariate Hazard Model. Transportation Research Part B, 39(9), 797-823. Bonneu, A., 2007. Amélioration d‟un algorithme adaptatif Monte Carlo en estimation de modèles de choix discrets. Working paper. Université de Montréal, Canada Cirillo, C. and Axhausen, K.W., 2006. Evidence on the distribution of values of travel time savings from a six-week travel diary. Transportation Research 40(6), 444- 457. Efron, B. and Tibrishani, R., 1993, An introduction to the bootstrap. Chapman & Hall/CRC, Boca Raton, FL, USA. Gouriéroux, C. and Monfort, A., 1993. Simulation-based inference: A survey with special reference to panel data models. Journal of Econometrics, Elsevier, 59(1-2), 5-33. Hajivassiliou V. A. and McFadden, D. L., 1998. The method of simulated scores for the estimation of LDV models. Econometrica, 66(4), 863–896. Kitamura R., Yamamoto, T., Susilo, Y. O. and Axhausen, K. W., 2006. How routine is a routine? An analysis of the day-to-day variability in prism vertex location. Transportation Research 40(3), 259-279. Lerman, S. and Manski, C., 1981. On the Use of Simulated Frequencies to Approximate Choice Probabilities. Manski, C., and McFadden, D. (eds), Structural Analysis of Discrete Data with Econometric Applications. 305-319, MIT Press. McFadden, D., 1989. A Method of Simulated Moments for Estimation of Discrete Response Models without Computation Integration. Econometrica, 57(5), 995- 1026. Bastin and Cirillo, Journal of Choice Modelling, 3(2), pp. 71-88 88 Pakes, A. and Pollard, D., 1989. Simulation and the Asymptotics of Optimization Estimators. Econometrica, 57(5), 1027-57. Shapiro, A., 2000. Stochastic programming by Monte Carlo simulation methods. Stochastic Programming E-Print Series. http://hera.rz.hu-berlin.de/speps/. Train, K., 2003. Discrete Choice Methods with Simulation. Cambridge University Press, New York, NY, USA.