Hi,
I am using Stata 12IC for Windows. I have been trying to model some repeated measures data using multilevel mixed effects models with xtmixed. Briefly, 'cv' is the dependent variable, and 'concen' (0,1,2,3) is the explanatory variable. 'id' represents the sample undergoing repeated measures (level 2 variable - observations being level 1). So, in short I have made repeated measures of 'cv' on each sample (id) at four concentrations/timepoints 'concen'.
Further to the helpful comments I have received previously, I have been trying to model with a random slopes model, with and without an interaction term for 'concen', i.e. a quadratic component. Please see below the model specification for (1) the linear random slopes model, and (2) the quadratic random slopes model. I hope the graphs are displayed - as you can see, the marginsplot for model 2 (quadratic) fits the mean values from the original data more closely. However, the LR test is not significant.
Having read the manual entry for lrtest, my three questions are:
1. For my two models, would model 1 be considered restricted/constrained, and model 2 be unrestricted/unconstrained?
2. Does the p-value from LR test for these two models only relate to the null hypothesis that c.concen#c.concen = 0?
3. As the LR test is not significant, does this mean I should reject model 2 (quadratic), even though the marginsplot fits the original data better?
thanks
Jem
MODEL 1

MODEL2
I am using Stata 12IC for Windows. I have been trying to model some repeated measures data using multilevel mixed effects models with xtmixed. Briefly, 'cv' is the dependent variable, and 'concen' (0,1,2,3) is the explanatory variable. 'id' represents the sample undergoing repeated measures (level 2 variable - observations being level 1). So, in short I have made repeated measures of 'cv' on each sample (id) at four concentrations/timepoints 'concen'.
Further to the helpful comments I have received previously, I have been trying to model with a random slopes model, with and without an interaction term for 'concen', i.e. a quadratic component. Please see below the model specification for (1) the linear random slopes model, and (2) the quadratic random slopes model. I hope the graphs are displayed - as you can see, the marginsplot for model 2 (quadratic) fits the mean values from the original data more closely. However, the LR test is not significant.
Having read the manual entry for lrtest, my three questions are:
1. For my two models, would model 1 be considered restricted/constrained, and model 2 be unrestricted/unconstrained?
2. Does the p-value from LR test for these two models only relate to the null hypothesis that c.concen#c.concen = 0?
3. As the LR test is not significant, does this mean I should reject model 2 (quadratic), even though the marginsplot fits the original data better?
thanks
Jem
Code:
MODEL 1 . xtmixed cv c.concen || id: concen, mle variance cov(uns) Wald chi2(1) = 0.52 Log likelihood = -121.79785 Prob > chi2 = 0.4718 ------------------------------------------------------------------------------ cv | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- concen | 1.7 2.362601 0.72 0.472 -2.930612 6.330612 _cons | 68.7 12.40436 5.54 0.000 44.3879 93.0121 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Unstructured | var(concen) | 5.463436 . . . var(_cons) | 959.4433 . . . cov(concen,_cons) | -72.40067 . . . -----------------------------+------------------------------------------------ var(Residual) | 168.0487 . . . ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 27.23 Prob > chi2 = 0.0000 Note: LR test is conservative and provided only for reference. MODEL 2 . xtmixed cv c.concen##c.concen || id: concen, mle variance cov(uns) Wald chi2(2) = 4.25 Log likelihood = -120.11398 Prob > chi2 = 0.1197 ----------------------------------------------------------------------------------- cv | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------+---------------------------------------------------------------- concen | -11.26429 7.133662 -1.58 0.114 -25.24601 2.717435 | c.concen#c.concen | 4.321429 2.261078 1.91 0.056 -.1102031 8.75306 | _cons | 73.02143 12.5543 5.82 0.000 48.41546 97.6274 ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Unstructured | var(concen) | 5.508205 10.02448 .1555584 195.0414 var(_cons) | 967.2806 569.4238 305.1144 3066.495 cov(concen,_cons) | -72.99301 80.92262 -231.5984 85.61241 -----------------------------+------------------------------------------------ var(Residual) | 143.1493 44.17727 78.18078 262.1068 ------------------------------------------------------------------------------ LR test vs. linear regression: chi2(3) = 30.03 Prob > chi2 = 0.0000 . lrtest A B Likelihood-ratio test LR chi2(5) = 3.37 (Assumption: A nested in B) Prob > chi2 = 0.6435
MODEL2
Comment