


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Using data on automobile choice (taken from Stata website and used in Stata manual), we have the following data structure:
. use choice . list id car choice dealer sex income in 1/ +---------------------------------------------------+ | id car choice dealer sex income | |---------------------------------------------------|
Conditional (fixed-effects) logistic regression Number of obs = 885 LR chi2(7) = 146. Prob > chi2 = 0. Log likelihood = -250.7794 Pseudo R2 = 0.
choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- japan | -1.352189 .6911829 -1.96 0.050 -2.706882. europe | -2.355249 .8526681 -2.76 0.006 -4.026448 -. sexJapan | -.5346039 .3141564 -1.70 0.089 -1.150339. sexEurope | .5704111 .4540247 1.26 0.209 -.319461 1. incJapan | .0325318 .012824 2.54 0.011 .0073973. incEurope | .032042 .0138676 2.31 0.021 .004862. dealer | .0680938 .0344465 1.98 0.048 .00058.
I use the “group” option to group the data by some identifying variable. Remember, we’re assuming that the chooser can choose among any of the three choices. Thus, for every individual, there are 3 records of data. To interpret the model we could use odds ratios.
. clogit, or Conditional (fixed-effects) logistic regression Number of obs = 885 LR chi2(7) = 146. Prob > chi2 = 0. Log likelihood = -250.7794 Pseudo R2 = 0.
choice | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- japan | .2586735 .1787907 -1.96 0.050 .0667446 1. europe | .0948699 .0808925 -2.76 0.006 .0178376. sexJapan | .5859013 .1840647 -1.70 0.089 .3165294 1. sexEurope | 1.768994 .803167 1.26 0.209 .7265405 4. incJapan | 1.033067 .013248 2.54 0.011 1.007425 1. incEurope | 1.032561 .0143191 2.31 0.021 1.004874 1. dealer | 1.070466 .0368737 1.98 0.048 1.00058 1.
To “prove” a point from above, suppose we try and estimate the conditional logit model with w but without the interactions? . clogit choice japan europe sex income dealer, group(id) note: income omitted due to no within-group variance. note: sex omitted due to no within-group variance. Iteration 0: log likelihood = -286. Iteration 1: log likelihood = -258. Iteration 2: log likelihood = -258. Iteration 3: log likelihood = -258. Conditional (fixed-effects) logistic regression Number of obs = 885 LR chi2(3) = 130. Prob > chi2 = 0. Log likelihood = -258.62825 Pseudo R2 = 0.
choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] Prob > chi2 = 0. Log likelihood = -252.72012 Pseudo R2 = 0.
car | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- Japan | sex | -.4694799 .3114939 -1.51 0.132 -1.079997. income | .0276854 .0123666 2.24 0.025 .0034472. _cons | -1.962652 .6216803 -3.16 0.002 -3.181123 -. -------------+---------------------------------------------------------------- Europe | sex | .5388442 .4525278 1.19 0.234 -.3480941 1. income | .0273669 .013787 1.98 0.047 .000345. _cons | -3.180029 .7546837 -4.21 0.000 -4.659182 -1.
(Outcome car==American is the comparison group) You should verify the results are equivalent.