Hi
Below are two outputs from mixed effects modelling using Stata's 'mixed' command (both models have a quadratic term for the time variable which is duration in months). The two models are identical in all respects (total N, number of observations, predictors controlled for etc). The only difference between the two models in the variable 'beta'; it is categorical in the first model but continuous in the second one (betax). Estimates for both fixed effects (all predictors) and random effects are pretty much the same in both models (except of course for the dka variable). The other difference in the constant. I'm unable to explain why there is such a large difference in the constant. The constant (89.4) in the first model (with categorical beta) is more realistic. The constant in the second model doesn't make any sense to me (too high). Can anyone help explain why there in a difference in the constants between the two models?
Below are two outputs from mixed effects modelling using Stata's 'mixed' command (both models have a quadratic term for the time variable which is duration in months). The two models are identical in all respects (total N, number of observations, predictors controlled for etc). The only difference between the two models in the variable 'beta'; it is categorical in the first model but continuous in the second one (betax). Estimates for both fixed effects (all predictors) and random effects are pretty much the same in both models (except of course for the dka variable). The other difference in the constant. I'm unable to explain why there is such a large difference in the constant. The constant (89.4) in the first model (with categorical beta) is more realistic. The constant in the second model doesn't make any sense to me (too high). Can anyone help explain why there in a difference in the constants between the two models?
Code:
mixed hba1cifcc2 durationm durationm2 ib3.beta sex1 diagage i.ethnicnew4|| id: durationm, cov(unstr) mle var
Code:
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log likelihood = -3262.4239
Iteration 1: log likelihood = -3262.3548
Iteration 2: log likelihood = -3262.3548
Computing standard errors:
Mixed-effects ML regression Number of obs = 777
Group variable: id Number of groups = 341
Obs per group: min = 1
avg = 2.3
max = 6
Wald chi2(9) = 617.58
Log likelihood = -3262.3548 Prob > chi2 = 0.0000
-----------------------------------------------------------------------------------
hba1cifcc2 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------------+----------------------------------------------------------------
durationm | -20.58428 .9159591 -22.47 0.000 -22.37953 -18.78903
durationm2 | 2.53228 .1469149 17.24 0.000 2.244332 2.820228
|
beta |
severe <7.1 | 5.582428 2.16643 2.58 0.010 1.336303 9.828553
moderate 7.1-7.3 | 4.491778 1.73957 2.58 0.010 1.082283 7.901273
|
sex1 | -.2651881 1.491139 -0.18 0.859 -3.187768 2.657392
diagage | .1718992 .1781936 0.96 0.335 -.1773538 .5211521
|
ethnicnew |
mixed | 6.418724 2.681912 2.39 0.017 1.162273 11.67518
Black | 4.660201 1.970876 2.36 0.018 .7973555 8.523047
asian-other | 8.262195 1.8134 4.56 0.000 4.707997 11.81639
|
_cons | 89.40784 3.413797 26.19 0.000 82.71692 96.09876
-----------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
id: Unstructured |
var(durati~m) | 19.04771 3.314386 13.54347 26.78895
var(_cons) | 304.2299 42.1261 231.9198 399.0856
cov(durati~m,_cons) | -61.08339 10.62844 -81.91474 -40.25203
-----------------------------+------------------------------------------------
var(Residual) | 119.1177 11.36452 98.80222 143.6104
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(3) = 122.30 Prob > chi2 = 0.0000
Note: LR test is conservative and provided only for reference.
Code:
mixed hba1cifcc2 durationm durationm2 betax sex1 diagage i.ethnicnew4|| id: durationm, cov(unstr) mle var
Code:
Performing EM optimization:
Performing gradient-based optimization:
Iteration 0: log likelihood = -3262.2805
Iteration 1: log likelihood = -3262.2142
Iteration 2: log likelihood = -3262.2142
Computing standard errors:
Mixed-effects ML regression Number of obs = 777
Group variable: id Number of groups = 341
Obs per group: min = 1
avg = 2.3
max = 6
Wald chi2(8) = 619.87
Log likelihood = -3262.2142 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
hba1cifcc2 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
durationm | -20.65295 .9154331 -22.56 0.000 -22.44717 -18.85874
durationm2 | 2.542909 .146907 17.31 0.000 2.254977 2.830841
betax | -15.37712 4.722978 -3.26 0.001 -24.63399 -6.120257
sex1 | -.2493569 1.49386 -0.17 0.867 -3.17727 2.678556
diagage | .1491046 .1768503 0.84 0.399 -.1975156 .4957248
|
ethnicnew |
mixed | 6.803754 2.671015 2.55 0.011 1.56866 12.03885
Black | 4.59069 1.967672 2.33 0.020 .7341242 8.447255
asian-other | 8.389881 1.816718 4.62 0.000 4.829179 11.95058
|
_cons | 203.5288 34.00385 5.99 0.000 136.8825 270.1751
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
id: Unstructured |
var(durati~m) | 18.97781 3.306243 13.48817 26.70172
var(_cons) | 301.2808 41.93402 229.3487 395.7735
cov(durati~m,_cons) | -60.38939 10.58231 -81.13033 -39.64844
-----------------------------+------------------------------------------------
var(Residual) | 118.8819 11.3258 98.63302 143.2878
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(3) = 122.30 P
Comment