I'm experiencing a problem with -margins- after -melogit-. When I ask for -margins A#B-, Stata responds with the output appropriate for -margins A B-, that is, separate margins for A and B variables, but nothing for the combinations thereof.
This doesn't happen with -mixed-. I haven't tried any of the other -me- commands yet. It didn't used to happen with version 14.
My setup is:
I can't see that I'm doing anything wrong. Can others reproduce this problem on their installations?
Code:
. webuse nlswork, clear (National Longitudinal Survey. Young Women 14-26 years of age in 1968) . melogit union i.nev_mar##i.collgrad || idcode: Fitting fixed-effects model: Iteration 0: log likelihood = -10441.017 Iteration 1: log likelihood = -10422.908 Iteration 2: log likelihood = -10422.892 Iteration 3: log likelihood = -10422.892 Refining starting values: Grid node 0: log likelihood = -8696.0695 Fitting full model: Iteration 0: log likelihood = -8696.0695 Iteration 1: log likelihood = -8039.0834 Iteration 2: log likelihood = -7882.09 Iteration 3: log likelihood = -7858.7862 Iteration 4: log likelihood = -7858.2813 Iteration 5: log likelihood = -7858.2803 Iteration 6: log likelihood = -7858.2815 Iteration 7: log likelihood = -7858.2822 Mixed-effects logistic regression Number of obs = 19,227 Group variable: idcode Number of groups = 4,150 Obs per group: min = 1 avg = 4.6 max = 12 Integration method: mvaghermite Integration pts. = 7 Wald chi2(3) = 50.71 Log likelihood = -7858.2822 Prob > chi2 = 0.0000 ---------------------------------------------------------------------------------- union | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- 1.nev_mar | .1612591 .1059014 1.52 0.128 -.0463039 .368822 1.collgrad | .9411026 .1342232 7.01 0.000 .67803 1.204175 | nev_mar#collgrad | 1 1 | -.3990216 .2271745 -1.76 0.079 -.8442754 .0462322 | _cons | -2.804856 .0815507 -34.39 0.000 -2.964692 -2.645019 -----------------+---------------------------------------------------------------- idcode | var(_cons)| 8.429619 .5000171 7.504426 9.468875 ---------------------------------------------------------------------------------- LR test vs. logistic model: chibar2(01) = 5129.22 Prob >= chibar2 = 0.0000 . margins nev_mar#collgrad Predictive margins Number of obs = 19,227 Model VCE : OIM Expression : Marginal predicted mean, predict() ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- nev_mar | 0 | .2251414 .0046998 47.90 0.000 .2159299 .2343529 1 | .2316429 .0076755 30.18 0.000 .2165991 .2466866 | collgrad | 0 | .2120307 .0049563 42.78 0.000 .2023166 .2217448 1 | .2855803 .0098943 28.86 0.000 .2661878 .3049727 ------------------------------------------------------------------------------ .
My setup is:
Code:
. about Stata/MP 15.0 for Windows (64-bit x86-64) Revision 29 Jun 2017 Copyright 1985-2017 StataCorp LLC Total physical memory: 8269900 KB Available physical memory: 5062552 KB Single-user 2-core Stata perpetual license: Serial number: REDACTED Licensed to: Clyde Schechter Albert Einstein College of Medicine . update query (contacting http://www.stata.com) Update status Last check for updates: 07 Jul 2017 New update available: none (as of 07 Jul 2017) Current update level: 29 Jun 2017 (what's new) Possible actions Do nothing; all files are up to date.
Comment