I have a question regarding an error message after running a likelihood ratio test (LRT). We are building multilevel models and testing each model with the previous with the intention to retain the most parsimonious model. We are using the lrtest command to assess the model fit. I think the issue is with the code but any advice is greatly appreciated. Below are the details.
We have a standardized continuous dependent variable (weight) and a binary (0,1) independent variable (smoke) - these are our level 1 variables. The level 2 variable is geographic region (geo).
We have three models and we would like to test Model1 vs Model2 and Model2 vs Model3.
Model1. Null model
Code:
mixed weight || geo:
Code:
mixed weight i.smoke|| geo:
Code:
mixed weight i.smoke|| geo: R.smoke
Code:
mixed weight || geo:, nolog est store null mixed weight i.smoke|| geo:, nolog est store ri_smoke lrtest ri_smoke null
df(unrestricted) = df(restricted) = 4
Code:
mixed weight i.smoke|| geo: R.smoke, nolog est store rc_smoke lrtest rc_smoke ri_smoke
I am using Stata 16.
Thanks in advance for your time.
Jen
0 Response to lrtest command in multilevel modelling
Post a Comment