Dear all,
This is my first post. I read the FAQ and I hope I am not breaking the rules.
Here are the relevant information:
Stata version: 14.2
Dataset: 276,961 observations with 5 variables
Regression type: Multilevel binary logistic regression (data has 2 levels: individual-level and country-level)
Dependent variable: "1" if surveyed person said yes
Independent variable: some individual questions + country variable (GDP PPP).
My 1. command: xtmelogit teayyopp i.knowent i.opport c.gdpppp || country:
Result:
------------------------------------------------------------------------------------------
Refining starting values:
Iteration 0: log likelihood = -64895.368 (not concave)
Iteration 1: log likelihood = -64874.887
Iteration 2: log likelihood = -64838.258
Performing gradient-based optimization:
Iteration 0: log likelihood = -64838.258
Iteration 1: log likelihood = -64836.383
Iteration 2: log likelihood = -64836.306
Iteration 3: log likelihood = -64836.305
Mixed-effects logistic regression Number of obs = 276,961
Group variable: country Number of groups = 40
Obs per group:
min = 1,597
avg = 6,924.0
max = 59,515
Integration points = 7 Wald chi2(3) = 10281.36
Log likelihood = -64836.305 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
teayyopp | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.knowent | 1.28444 .0159714 80.42 0.000 1.253137 1.315744
1.opport | .7833621 .0159377 49.15 0.000 .7521248 .8145995
gdpppp | -8.31e-06 3.63e-06 -2.29 0.022 -.0000154 -1.20e-06
_cons | -3.298117 .1416832 -23.28 0.000 -3.575811 -3.020423
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
country: Identity |
sd(_cons) | .3923647 .0450175 .313349 .4913054
------------------------------------------------------------------------------
LR test vs. logistic model: chibar2(01) = 3352.58 Prob >= chibar2 = 0.0000
--------------------------------------------------------------------------------------------------------------------------
My 2nd command: melogit teayyopp i.knowent i.opport c.gdpppp || country:
--------------------------------------------------------------------------------------------------------------------------
Fitting fixed-effects model:
Iteration 0: log likelihood = -72022.73
Iteration 1: log likelihood = -66570.714
Iteration 2: log likelihood = -66512.772
Iteration 3: log likelihood = -66512.595
Iteration 4: log likelihood = -66512.595
Refining starting values:
Grid node 0: log likelihood = -66712.026
Fitting full model:
Iteration 0: log likelihood = -66712.026 (not concave)
Iteration 1: log likelihood = -66708.837 (not concave)
Iteration 2: log likelihood = -66707.454 (backed up)
Iteration 3: log likelihood = -66706.215
Iteration 4: log likelihood = -66700.338
Iteration 5: log likelihood = -66700.313
Iteration 6: log likelihood = -66700.313
Mixed-effects logistic regression Number of obs = 276,961
Group variable: country Number of groups = 40
Obs per group:
min = 1,597
avg = 6,924.0
max = 59,515
Integration method: mvaghermite Integration pts. = 7
Wald chi2(3) = 12577.99
Log likelihood = -66700.313 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
teayyopp | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
|
1.knowent | 1.252758 .0157585 79.50 0.000 1.221872 1.283644
1.opport | .9134991 .0154966 58.95 0.000 .8831264 .9438718
gdpppp | -.0000143 5.19e-07 -27.61 0.000 -.0000154 -.0000133
_cons | -3.09413 .0219857 -140.73 0.000 -3.137221 -3.051039
-------------+----------------------------------------------------------------
country |
var(_cons)| .181636 .0816026 .0752986 .4381439
------------------------------------------------------------------------------
LR test vs. logistic model: chibar2(01) = 0.00 Prob >= chibar2 = 1.0000
------------------------------------------------------------------------------------------------------------------------
So from my understanding I should not use xtmelogit since this is an outdated command.
When I use melogit, you can see a test of whether the current mixed-effects model represents a significant improvement in fit relative to a standard binary logistic regression. (Prob >= chibar2 =1.0000). With xtmelogit I have 0.000***.
How is it possible that Stata shows such different results even though the difference between xtmelogit and melogit should not be that high? My coefficents are more or less also very similar.
I hope you can help me.
Best wishes,
Michael
0 Response to Different results xtmelogit vs. melogit
Post a Comment