1 / 48

Chapter 16

ECON 6002 Econometrics Memorial University of Newfoundland. Qualitative and Limited Dependent Variable Models. Chapter 16. Adapted from Vera Tabakova’s notes . Chapter 16: Qualitative and Limited Dependent Variable Models. Nested Logit Mixed Logit AKA Random Parameters Logit

masato
Download Presentation

Chapter 16

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECON 6002 Econometrics Memorial University of Newfoundland Qualitative and Limited Dependent Variable Models Chapter 16 Adapted from Vera Tabakova’s notes

  2. Chapter 16: Qualitative and Limited Dependent Variable Models • Nested Logit • Mixed Logit AKA Random Parameters Logit • Generalized Multinomial Logit Principles of Econometrics, 3rd Edition

  3. IIA assumption Principles of Econometrics, 3rd Edition Slide16-3 There is the implicit assumption in logit models that the odds between any pair of alternatives is independent of irrelevant alternatives (IIA) One way to state the assumption If choice A is preferred to choice B out of the choice set {A,B}, then introducing a third alternative X, thus expanding that choice set to {A,B,X}, must not make B preferable to A. which kind of makes sense 

  4. IIA assumption Principles of Econometrics, 3rd Edition Slide16-4 There is the implicit assumption in logit models that the odds between any pair of alternatives is independent of irrelevant alternatives (IIA) In the case of the multinomial logit model, the IIA implies that adding another alternative or changing the characteristics of a third alternative must not affect the relative odds between the two alternatives considered. This is not realistic for many real life applications involving similar (substitute) alternatives.

  5. IIA assumption Principles of Econometrics, 3rd Edition Slide16-5 This is not realistic for many real life applications with similar (substitute) alternatives Examples: Beethoven/Debussy versus another of Beethoven’s Symphonies (Debreu 1960; Tversky 1972) Bicycle/Pony (Luce and Suppes 1965) Red Bus/Blue Bus (McFadden 1974). Black slacks, jeans, shorts versus blue slacks (Hoffman, 2004) Etc.

  6. IIA assumption Red Bus/Blue Bus (McFadden 1974). Imagine commuters first face a decision between two modes of transportation: car and red bus Suppose that a consumer chooses between these two options with equal probability, 0.5, so that the odds ratio equals 1. Now add a third mode, blue bus. Assuming bus commuters do not care about the color of the bus (they are perfect substitutes), consumers are expected to choose between bus and car still with equal probability, so the probability of car is still 0.5, while the probabilities of each of the two bus types should go down to 0.25 However, this violates IIA: for the odds ratio between car and red bus to be preserved, the new probabilities must be: car 0.33; red bus 0.33; blue bus 0.33 Te IIA axiom does not mix well with perfect substitutes 

  7. IIA assumption We can test this assumption with a Hausman-McFadden test which compares a logistic model with all the choices with one with restricted choices (mlogtest, hausmanbase in STATA, but check option detail too: mlogtest, hausman detail) However, see Cheng and Long (2007) Another test is Small and Hsiao’s (1985) STATA’s command is mlogtest, smhsiao(careful: the sample is randomly split every time, so you must set the seed if you want to replicate your results) See Long and Freese’s book for details and worked examples

  8. IIA assumption Extensions have arisen to deal with this issue The multinomial probit and the mixed logit are alternative models for nominal outcomes that relax IIA, by allowing correlation among the errors (to reflect similarity among options) but these models often have issues and assumptions themselves  IIA can also be relaxed by specifying a hierarchical model, ranking the choice alternatives. The most popular of these is called the McFadden’s nested logit model, which allows correlation among some errors, but not all (e.g. Heiss 2002) Generalized extreme value and multinomial probit models possess another property, the Invariant Proportion of Substitution (Steenburgh 2008), which itself also suggests similarly counterintuitive real-life individual choice behavior The multinomial probit has serious computational disadvantages too, since it involves calculating multiple (one less than the number of categories) integrals. With integration by simulation this problem is being ameliorated now…

  9. IIA assumption IIA can also be relaxed by specifying a hierarchical model, ranking the choice alternatives The most popular of these is called the McFadden’s nested logit model, which allows correlation among some errors, but not all (e.g. Heiss 2002)

  10. IIA assumption The nested logitis a partial relaxation of the IID and IIA assumptions of the MNL model It is relatively straightforward to estimate It also has a closed-form solution

  11. IIA assumption Most NL models have only two hierarchical levels, Very few NL models are estimated with three levels, and even fewer with four levels Note that the “tree structure” does not have an actual “sequential” interpretation of any sort It is only there to allow for differentials in the degree of correlation within and between “nests”

  12. Nested Logit By default, nowadaysStata’snlogituses a parameterization that is consistent with RUM Before Stata 10, a nonnormalized version of the nested logit model was used by Stata (and other packages) and you will see some papers pointing that out This can still be requested by specifying the nonnormalizedoption nonnormalized requests a nonnormalized parameterization of the model that does not scale the inclusive values by the degree of dissimilarity of the alternatives within each nest. Use this option to replicate results from older versions of Stata(Stata help)

  13. Nested Logit By default, NOW Stata’snlogituses a parameterization that is consistent with RUM Before Stata 10, a nonnormalized version of the nested logit model was used by Stata (and other packages) and you will see some papers pointing that out Both versions are valid, but only the RUM-consistent version is based on a sound model of consumer behavior (the normalization is about scaling the coefficients in the second level choice, dividing them by the dissimilarity parameters, so that the utilities can be meaningfully compared, see Heiss (2002) for details)

  14. Nested Logit Adapted from Stata’s help file, let us consider a model of restaurant choice use http://www.stata-press.com/data/r13/restaurant Or look it up (it is one of Stata’s example datasets) run describe

  15. Nested Logit “Fake” data on 300 families and their choice of seven local restaurants: Freebirdsand Mama’s Pizzasell fast food Cafe Eccell, Los Nortenos, and Wings ’N More are family restaurants Christopher’sand Mad Cows are fancy restaurants

  16. Nested Logit Model the decision of where to eat as a function of: household income Number of kids rating,of the restaurant (coded 0–5) average meal cost per person distancebetween the household and the restaurant

  17. Nested Logit Note that: incomeand kids are attributes of the family ratingis an attribute of the alternative (the restaurant) costand distance are attributes of the alternative as perceived by the families—that is, each family has its own cost and distance for each restaurant.

  18. Nested Logit Thus: income and kids are case-specific ratingis alternative-specific costand distance are both

  19. Nested Logit Why not only 300 obs.?

  20. Nested Logit Why not only 300 obs.?

  21. Nested Logit You could fit a conditional logit model to this data as arranged Since income and kids are case-specific, you would use asclogit instead of clogit* *asclogit is great…in the “old days” you would need to work a bit harder with dummies and interactions to e able to run a mixed model with the old clogit command. This is still a good exercise tough.

  22. Nested Logit You could fit a conditional logit model to this data as arranged However, the conditional logitmay be inappropriate, since it assumes that the random errors are independent, and as a result it forces the odds ratio of any two alternatives to be independent of the other alternatives, the IIA!!!

  23. Nested Logit This is the pure conditional logit!

  24. Nested Logit I could not estimate rating at the same time It did not converge  Could you run a Plain MNL With this dataset?

  25. Nested Logit Here we suspect that restaurants should be grouped by type (fast, family, or fancy) Why?

  26. Nested Logit Assuming that “unobserved stuff” affecting a decision about one alternative has no effect on the choice other alternatives may seem innocuous, but often this assumption is too restrictive Example: when a family was deciding which restaurant to visit, they were pressed for time because of plans to attend a movie later

  27. Nested Logit The unobserved shock (being in a hurry) would raise the likelihood that of going to either fast food restaurant (Freebirdsor Mama’s Pizza) Another family might be choosing a restaurant to celebrate a birthday and therefore be inclined to attend a fancy restaurant (Christopher’s or Mad Cows)

  28. Nested Logit With the nested logit,weare not assuming that families first choose whether to attend a fast, family, or fancy restaurant and then choose the particular restaurant We assume merely that they choose one of the seven restaurants

  29. Nested Logit We now must first create a variable that defines the structure of our “decision tree” nlogitgen type = restaurant(fast: Freebirds | MamasPizza, family: CafeEccell | LosNortenos| WingsNmore, fancy: Christophers | MadCows)

  30. Nested Logit We now must first create a variable that defines the structure of our “decision tree”

  31. Nested Logit Our new typevariable defines the three types of restaurants We can now see how the alternative-specific attributes (cost, rating, and distance) apply to the bottom alternative set (the seven restaurants) and how family-specific attributes (income and kid) apply to the alternative set at the first decision level (the three types of restaurants)

  32. Nested Logit nlogitchosen cost rating distance || type: income kids, base(family) || restaurant:, noconstant case(family_id)

  33. Nested Logit nlogitchosen cost rating distance || type: income kids, base(family) || restaurant:, noconstant case(family_id)

  34. Nested Logit nlogitchosen cost rating distance || type: income kids, base(family) || restaurant:, noconstant case(family_id) Option noconstant suppresses the constant terms for the bottom-level alternatives Needed for convergence in this example unless you simplify things a little: nlogit chosen distance || type: income , base(family) || restaurant:, case(family_id)

  35. Nested Logit The error correlation parameters are re-expressed as dissimilarity parameters In Stata notation nlogit estimates a tau, in this example for each “type” (upper level branch) with subcategories (lower level branches, twigs,…) In Cameron and Trivedi’s (MMA) notation, dissimilarity parameters are rhos and called scale parameters

  36. Nested Logit In the normalised version of the nlogit model the dissimilarity parameters are used to scale the logsums or inclusive values: In Cameron and Trivedi’s (MMA) notation: Inclusive value or logsum The inclusive value for the mth nest is the expected value of the maximum utility that Individual i can obtains from choosing an alternative within nest m

  37. Nested Logit Nlogit estimates a tau (dissimilarity parameter, which is the coefficient of the inclusive value/logsum) for each “type” (upper level branch) with subcategories (lower level branches, twigs,…) dissimilarity parameters (inversely) measure the degree of correlation (rho =1-tau2 or for the mthnest) of random shocks within each of the three types of restaurants If greater than one the model is inconsistent with RUM

  38. Nested Logit Dissimilarity parameters must fall between 0 and 1 If one of them (say the one for fast food) were less than zero, something that increased the likelihood of choosing Freebirds would decrease the likelihood of choosing a fast food restaurant, which simply does not make any sense If the dissimilarity parameter is zero, the changes in restaurant probabilities will not affect the choice of type of restaurant and the correct model is recursive (separated)

  39. Nested Logit The conditional logit model is a special case of nested logitwhere all the dissimilarity parameters equal one Our Likelihood-ratio test of this hypothesis here shows mixed evidence of the null hypothesis that all the dissimilarity parameters are equal to one IIA holds if and only if all dissimilarity parameters are equal to one

  40. Nested Logit In LIML (two-step or sequential estimation) it was often assumed for convenience that all of the dissimilarity parameters were equal This is a restriction you can impose on our stata code too

  41. Nested Logit You could estimate the NLOGIT in two steps using LIML but you would need some complex corrections of the standard errors in the second step Nowadays we have toys powerful enough to run NLOGIT all in one step using FIML The latter is preferable (nlogit in Stata uses FIML), since it is more efficient The LIML sequential estimation might still help to provide starting values, as the FIML log-likelihood is not globally concave

  42. Nested Logit Try: . nlogit chosen rating distance || type: income kids, base(family) || restaurant: cost, noconstant case(family_id) . nlogit chosen rating distance cost || type: kids, base(family) || restaurant: income, noconstant case(family_id)

  43. Nested Logit Issues: you can build your tree in different ways, some will work better than others Those choices in general will yield different results anyway No test to choose among trees

  44. Mixed Logit AKA Random Parameters Logit multinomial logitmodels with unobservedheterogeneity They allow the parameters to vary randomly across individuals See mixlogit command (Hole, A. R. Fitting mixed logit models by using maximum simulated likelihood StataJournal, 2007, 7, 388-401 ) (find C:/… traindata.dta)

  45. Mixed Logit AKA Random Parameters Logit multinomial logitmodels with unobservedheterogeneity The RPL allows for correlation across alternatives through an individual-specific random effect

  46. Keywords • binary choice models • censored data • conditional logit • count data models • feasible generalized least squares • Heckit • identification problem • independence of irrelevant alternatives (IIA) • index models • individual and alternative specific variables • individual specific variables • latent variables • likelihood function • limited dependent variables • linear probability model • logistic random variable • logit • log-likelihood function • marginal effect • maximum likelihood estimation • multinomial choice models • multinomial logit • odds ratio • ordered choice models • ordered probit • ordinal variables • Poisson random variable • Poisson regression model • probit • selection bias • tobit model • truncated data Principles of Econometrics, 3rd Edition

  47. References Cameron and Trivedi’s MMA and MUS Hensher, Rose, and Greene’s (2005) Applied Choice Analysis: A Primer, available (electronically too) at the QEII

  48. Next Ordered Choice Count data

More Related