Hello,
I am attempting to fit a fairly straightforward melogit model to examine the relationship between the dichotomous outcome of receiving a medical test and the binary predictor of year (2009 vs 2013), with clustering by hospital and a sample size of ~500,000. (This is a simplified version of my final model which has multiple covariates, but I receive the same error with this simplified model)
I am looking at two different dichotomous tests as outcomes, test1 and test2. When I run the same melogit model for test1 I receive a result but for the test2 I receive an "initial values not feasible error." There is no missing data for either test, receiving test2 is much more common, as shown below using frequency tables.
I have tried running a simple logit model to generate start values, as was suggested in a prior post (https://www.stata.com/statalist/arch.../msg00906.html) but this did not change the error.
Are there other strategies anyone would suggest for getting around the initial values not feasible error in this scenario?
Appreciate your help!
Tim
. tab test1 year
| Calendar year
test1 | 2009 2013 | Total
-----------+----------------------+----------
0 | 233,925 247,522 | 481,447
1 | 29,669 45,642 | 75,311
-----------+----------------------+----------
Total | 263,594 293,164 | 556,758
. tab test2 year
| Calendar year
test2 | 2009 2013 | Total
-----------+----------------------+----------
0 | 48,884 46,859 | 95,743
1 | 214,710 246,305 | 461,015
-----------+----------------------+----------
Total | 263,594 293,164 | 556,758
melogit test1 i.year || hospital_id:, or
Fitting fixed-effects model:
Iteration 0: log likelihood = -219971.48
Iteration 1: log likelihood = -219518.87
Iteration 2: log likelihood = -219517.63
Iteration 3: log likelihood = -219517.63
Refining starting values:
Grid node 0: log likelihood = -195609.94
Fitting full model:
Iteration 0: log likelihood = -195609.94
Iteration 1: log likelihood = -195490.36
Iteration 2: log likelihood = -195418.4
Iteration 3: log likelihood = -195331.55
Iteration 4: log likelihood = -195262.55
Iteration 5: log likelihood = -195243.63
Iteration 6: log likelihood = -195241.22
Iteration 7: log likelihood = -195241.19
Iteration 8: log likelihood = -195241.19
Mixed-effects logistic regression Number of obs = 556,758
Group variable: hospital_id Number of groups = 676
Obs per group:
min = 3
avg = 823.6
max = 6,786
Integration method: mvaghermite Integration pts. = 7
Wald chi2(1) = 2242.83
Log likelihood = -195241.19 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
test1 | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
|
year |
2013 | 1.496314 .0127331 47.36 0.000 1.471565 1.52148
|
_cons | .040664 .0025562 -50.94 0.000 .0359504 .0459957
-------------+----------------------------------------------------------------
hospital_id |
var(_cons)| 2.329856 .1600997 2.036279 2.665758
------------------------------------------------------------------------------
LR test vs. logistic model: chibar2(01) = 48552.88 Prob >= chibar2 = 0.0000
melogit test2 i.year || hospital_id:, or
Fitting fixed-effects model:
Iteration 0: log likelihood = -255276.2
Iteration 1: log likelihood = -255226.3
Iteration 2: log likelihood = -255226.29
Refining starting values:
Grid node 0: log likelihood = -224213.99
Fitting full model:
initial values not feasible
r(1400);
I am attempting to fit a fairly straightforward melogit model to examine the relationship between the dichotomous outcome of receiving a medical test and the binary predictor of year (2009 vs 2013), with clustering by hospital and a sample size of ~500,000. (This is a simplified version of my final model which has multiple covariates, but I receive the same error with this simplified model)
I am looking at two different dichotomous tests as outcomes, test1 and test2. When I run the same melogit model for test1 I receive a result but for the test2 I receive an "initial values not feasible error." There is no missing data for either test, receiving test2 is much more common, as shown below using frequency tables.
I have tried running a simple logit model to generate start values, as was suggested in a prior post (https://www.stata.com/statalist/arch.../msg00906.html) but this did not change the error.
Are there other strategies anyone would suggest for getting around the initial values not feasible error in this scenario?
Appreciate your help!
Tim
. tab test1 year
| Calendar year
test1 | 2009 2013 | Total
-----------+----------------------+----------
0 | 233,925 247,522 | 481,447
1 | 29,669 45,642 | 75,311
-----------+----------------------+----------
Total | 263,594 293,164 | 556,758
. tab test2 year
| Calendar year
test2 | 2009 2013 | Total
-----------+----------------------+----------
0 | 48,884 46,859 | 95,743
1 | 214,710 246,305 | 461,015
-----------+----------------------+----------
Total | 263,594 293,164 | 556,758
melogit test1 i.year || hospital_id:, or
Fitting fixed-effects model:
Iteration 0: log likelihood = -219971.48
Iteration 1: log likelihood = -219518.87
Iteration 2: log likelihood = -219517.63
Iteration 3: log likelihood = -219517.63
Refining starting values:
Grid node 0: log likelihood = -195609.94
Fitting full model:
Iteration 0: log likelihood = -195609.94
Iteration 1: log likelihood = -195490.36
Iteration 2: log likelihood = -195418.4
Iteration 3: log likelihood = -195331.55
Iteration 4: log likelihood = -195262.55
Iteration 5: log likelihood = -195243.63
Iteration 6: log likelihood = -195241.22
Iteration 7: log likelihood = -195241.19
Iteration 8: log likelihood = -195241.19
Mixed-effects logistic regression Number of obs = 556,758
Group variable: hospital_id Number of groups = 676
Obs per group:
min = 3
avg = 823.6
max = 6,786
Integration method: mvaghermite Integration pts. = 7
Wald chi2(1) = 2242.83
Log likelihood = -195241.19 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
test1 | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
|
year |
2013 | 1.496314 .0127331 47.36 0.000 1.471565 1.52148
|
_cons | .040664 .0025562 -50.94 0.000 .0359504 .0459957
-------------+----------------------------------------------------------------
hospital_id |
var(_cons)| 2.329856 .1600997 2.036279 2.665758
------------------------------------------------------------------------------
LR test vs. logistic model: chibar2(01) = 48552.88 Prob >= chibar2 = 0.0000
melogit test2 i.year || hospital_id:, or
Fitting fixed-effects model:
Iteration 0: log likelihood = -255276.2
Iteration 1: log likelihood = -255226.3
Iteration 2: log likelihood = -255226.29
Refining starting values:
Grid node 0: log likelihood = -224213.99
Fitting full model:
initial values not feasible
r(1400);
Comment