Dear Statalists,
I'm working on a multi-level model using data from cross-countries survey data for the 2016 year. But I am encountering a problem with stata command melogit and i hope you will help me to overcome it. It's the first time I work on the multilevel model.
You can see an extract of my data structure below:
countryID is the country's identification number,
id is ID number of respondent (which is so long),
health and pensions are the binary outcomes.
AGE1 (grand mean-centered) and SEX1 are individual predictors
Primary, Secondary and Tertiary are country-level variables which represent the proportion of immigrant with primary, secondary and tertiary education in a different country
I select only one country here 56 which Country ISO 3166 Code for Belgium.
clear
input float(countryID id health pensions AGE1) float SEX1 double(Primary Secondary Tertiary)
56 2.016056e+15 1 1 -7.302176 0 43.7 31.4 24.9
56 2.016056e+15 1 0 -7.302176 1 43.7 31.4 24.9
56 2.016056e+15 0 0 -8.3021755 0 43.7 31.4 24.9
56 2.016056e+15 1 1 -9.3021755 0 43.7 31.4 24.9
56 2.016056e+15 1 1 -14.302176 1 43.7 31.4 24.9
56 2.016056e+15 1 0 -8.3021755 1 43.7 31.4 24.9
56 2.016056e+15 1 1 -15.302176 0 43.7 31.4 24.9
56 2.016056e+15 0 0 -1.3021756 1 43.7 31.4 24.9
56 2.016056e+15 0 0 -10.302176 1 43.7 31.4 24.9
56 2.016056e+15 1 1 32.697823 0 43.7 31.4 24.9
56 2.016056e+15 1 0 -11.302176 1 43.7 31.4 24.9
56 2.016056e+15 0 0 -12.302176 1 43.7 31.4 24.9
56 2.016056e+15 0 0 -11.302176 0 43.7 31.4 24.9
56 2.016056e+15 1 0 -12.302176 0 43.7 31.4 24.9
56 2.016056e+15 0 0 26.697824 1 43.7 31.4 24.9
56 2.016056e+15 1 1 -5.302176 0 43.7 31.4 24.9
56 2.016056e+15 0 1 -13.302176 1 43.7 31.4 24.9
56 2.016056e+15 1 0 -14.302176 1 43.7 31.4 24.9
56 2.016056e+15 1 1 -25.302176 1 43.7 31.4 24.9
56 2.016056e+15 1 1 -13.302176 0 43.7 31.4 24.9
When I run melogit command, i obtain this result:
melogit health SEX1 AGE1 Primary Secondary Tertiary || id:
Fitting fixed-effects model:
Iteration 0: log likelihood = -13691.836
Iteration 1: log likelihood = -13670.184
Iteration 2: log likelihood = -13670.165
Iteration 3: log likelihood = -13670.165
Refining starting values:
Grid node 0: log likelihood = -13173.957
Fitting full model:
initial values not feasible
r(1400);
But if meqrlogit command, I obtain the following result:
meqrlogit health SEX1 AGE1 Primary Secondary Tertiary || id:
Refining starting values:
Iteration 0: log likelihood = -12500.998 (not concave)
Iteration 1: log likelihood = -12483.544
Iteration 2: log likelihood = -12451.561
Performing gradient-based optimization:
Iteration 0: log likelihood = -12451.561 (not concave)
Iteration 1: log likelihood = -12389.075 (not concave)
Iteration 2: log likelihood = -12364.939
Iteration 3: log likelihood = -12315.838 (not concave)
Iteration 4: log likelihood = -12309.971 (not concave)
Iteration 5: log likelihood = -12304.889 (not concave)
Iteration 6: log likelihood = -12304.14
Iteration 7: log likelihood = -12298.841 (not concave)
Iteration 8: log likelihood = -12298.209
Iteration 9: log likelihood = -12287.509 (not concave)
Iteration 10: log likelihood = -12287.477
Iteration 11: log likelihood = -12286.192 (not concave)
Iteration 12: log likelihood = -12285.969
Iteration 13: log likelihood = -12285.85 (not concave)
Iteration 14: log likelihood = -12285.831
Iteration 15: log likelihood = -12285.769
Iteration 16: log likelihood = -12285.768
Iteration 17: log likelihood = -12285.767
Mixed-effects logistic regression Number of obs = 25769
Group variable: id Number of groups = 13
Obs per group: min = 1002
avg = 1982.2
max = 3995
Integration points = 7 Wald chi2(5) = 567.30
Log likelihood = -12285.767 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
health | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
SEX1 | .103667 .0331526 3.13 0.002 .0386892 .1686449
AGE1 | -.0042459 .0009453 -4.49 0.000 -.0060987 -.0023932
Primary | -7.556424 1.069612 -7.06 0.000 -9.652826 -5.460023
Secondary | -7.528384 1.07176 -7.02 0.000 -9.628994 -5.427774
Tertiary | -7.262108 1.087128 -6.68 0.000 -9.392841 -5.131376
_cons | 748.3098 107.4985 6.96 0.000 537.6166 959.003
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
id: Identity |
var(_cons) | 4.869241 2.235363 1.980128 11.97373
------------------------------------------------------------------------------
LR test vs. logistic regression: chibar2(01) = 2768.79 Prob>=chibar2 = 0.0000
Questions:
What is the problem with the melogit ? and with what command can I fix it ?
What do you think about meqrlogit estimation result ? Is it better then the melogit one ?
If yes, Why ?
Many thanks
Cisse abs
0 Response to Resolving "Initial values not feasible" error after using melogit command and the choice between melogit and meqrlogit
Post a Comment