Hello, I am trying to plot the estimated semielasticities from a fixed effects regression model. I use the command -aextlogit-, shown below, the command computes the proper APE for the fixed effects model but I'm not sure how to plot the estimated elasticities. Would I need to extract the coefficients and manually write a program to create the margins plot?
Code:
local contrls2 c.depressive_symptoms_Wave c.age_Wave i.education_Wave i.sr_health_Wave /// > i.smoked_marijuana_alt_Wave c.smoked_cigarettes_Wave i.alcohol_Wave /// > c.tract_poverty_wave c.tract_ppl_density_ths_wave i.uninsured_Wave . . aextlogit dental_Wave `contrls2' i.year, group(aid) betas note: multiple positive outcomes within groups encountered. note: 4,114 groups (11,610 obs) omitted because of all positive or all negative outcomes. Iteration 0: Log likelihood = -5142.9394 Iteration 1: Log likelihood = -5130.2191 Iteration 2: Log likelihood = -5130.2174 Iteration 3: Log likelihood = -5130.2174 Conditional fixed-effects logistic regression Number of obs = 14652 Group variable: aid Number of groups = 5033 Obs per group: min = 2 avg = 2.9 Log likelihood = -5130.2174 max = 3 ------------------------------------------------------------------------------------------------------------ dental_Wave | Coefficient Std. err. z P>|z| [95% conf. interval] -------------------------------------------+---------------------------------------------------------------- depressive_symptoms_Wave | -.0452353 .0107089 -4.22 0.000 -.0662243 -.0242463 age_Wave | -.0459047 .0343221 -1.34 0.181 -.1131748 .0213655 | education_Wave | 2.HS Graduate | -.1120294 .1045403 -1.07 0.284 -.3169246 .0928658 3.Some College/Vocational | -.0652555 .1104589 -0.59 0.555 -.2817508 .1512399 4.College Graduate | -.3054883 .1315792 -2.32 0.020 -.5633789 -.0475978 5.Post-Graduate | -.1539305 .1477663 -1.04 0.298 -.4435472 .1356862 | sr_health_Wave | 2.fair | .3061655 .1774414 1.73 0.084 -.0416133 .6539444 3.Good | .413048 .1731991 2.38 0.017 .0735839 .7525121 4.Very Good | .5339259 .1753594 3.04 0.002 .1902278 .8776241 5.Excellent | .5734349 .1804662 3.18 0.001 .2197276 .9271422 | smoked_marijuana_alt_Wave | 1.Did smoke marijuana in past 30 days | -.0389956 .0623094 -0.63 0.531 -.1611198 .0831286 smoked_cigarettes_Wave | -.0047952 .0023312 -2.06 0.040 -.0093643 -.0002262 | alcohol_Wave | 1. 1 or 2 days in the past 12 months | -.0764036 .0678074 -1.13 0.260 -.2093037 .0564966 2. once a month or less (3–12 times/year) | -.0104553 .0661405 -0.16 0.874 -.1400883 .1191777 3. 2 or 3 days a month | .0484203 .0678095 0.71 0.475 -.0844838 .1813244 4. 1 or 2 days a week | -.0798573 .0705057 -1.13 0.257 -.2180461 .0583314 5. 3 to 5 days a week | -.1660228 .0889926 -1.87 0.062 -.3404451 .0083996 6. every day or almost every day | -.1982744 .1291888 -1.53 0.125 -.4514797 .0549309 | tract_poverty_wave | -.6020104 .1996996 -3.01 0.003 -.9934144 -.2106064 tract_ppl_density_ths_wave | -.0135496 .0062436 -2.17 0.030 -.025787 -.0013123 | uninsured_Wave | 1.Insured | .9208175 .0611892 15.05 0.000 .8008889 1.040746 | year | 4 | .3279357 .2266605 1.45 0.148 -.1163107 .7721821 5 | 1.002958 .5345881 1.88 0.061 -.0448157 2.050731 ------------------------------------------------------------------------------------------------------------ Average (semi) elasticities of Pr(y=1|x,u) ------------------------------------------------------------------------------------------------------------ dental_Wave | Coefficient Std. err. z P>|z| [95% conf. interval] -------------------------------------------+---------------------------------------------------------------- depressive_symptoms_Wave | -.0176828 .0041884 -4.22 0.000 -.0258919 -.0094737 age_Wave | -.0179445 .0134175 -1.34 0.181 -.0442422 .0083533 | education_Wave | 2.HS Graduate | -.0437931 .0408669 -1.07 0.284 -.1238908 .0363046 3.Some College/Vocational | -.0255088 .0431796 -0.59 0.555 -.1101393 .0591216 4.College Graduate | -.1194175 .0514435 -2.32 0.020 -.2202449 -.0185902 5.Post-Graduate | -.0601725 .0577648 -1.04 0.298 -.1733893 .0530443 | sr_health_Wave | 2.fair | .1196823 .0693692 1.73 0.084 -.0162789 .2556434 3.Good | .1614634 .0677162 2.38 0.017 .0287421 .2941846 4.Very Good | .2087154 .0685681 3.04 0.002 .0743244 .3431063 5.Excellent | .2241597 .0705666 3.18 0.001 .0858516 .3624678 | smoked_marijuana_alt_Wave | 1.Did smoke marijuana in past 30 days | -.0152437 .0243575 -0.63 0.531 -.0629834 .0324961 smoked_cigarettes_Wave | -.0018745 .0009114 -2.06 0.040 -.0036608 -.0000882 | alcohol_Wave | 1. 1 or 2 days in the past 12 months | -.0298667 .0265074 -1.13 0.260 -.0818202 .0220869 2. once a month or less (3–12 times/year) | -.004087 .0258548 -0.16 0.874 -.0547615 .0465874 3. 2 or 3 days a month | .0189279 .0265076 0.71 0.475 -.0330261 .0708818 4. 1 or 2 days a week | -.0312168 .0275622 -1.13 0.257 -.0852378 .0228042 5. 3 to 5 days a week | -.0648995 .0347914 -1.87 0.062 -.1330894 .0032905 6. every day or almost every day | -.0775068 .0505043 -1.53 0.125 -.1764935 .0214798 | tract_poverty_wave | -.2353301 .078085 -3.01 0.003 -.3883739 -.0822863 tract_ppl_density_ths_wave | -.0052967 .002441 -2.17 0.030 -.010081 -.0005123 | uninsured_Wave | 1.Insured | .359954 .0240794 14.95 0.000 .3127592 .4071489 | year | 4 | .1281924 .0886087 1.45 0.148 -.0454774 .3018622 5 | .3920632 .208996 1.88 0.061 -.0175615 .8016879 ------------------------------------------------------------------------------------------------------------ Average of dental_Wave = .60909299 (Number of obs = 26262) .
Comment