Hi all,
I came across with the problem when using the stata to compare two multinomial logistic regression models with survey design: one model is constrained (force the coefficient of a independent variable to be equal for outcome): my code is like this: * assign the sruvey design: two stage design
svyset [w=weights12], psu(sdmvpsu) strata (sdmvstra)
*Set constrains
constraint 1 [1=2]:hyperchol
*unconstrained model
svy: mlogit db_cat hypertension hyperchol
*preserve the unconstrainted model
estimates store unconstrained
*constrained model
svy: mlogit db_cat hypertension hyperchol, constraints(1)
*test the significance between constrained and unconstrained model.
lrtest unconstrained
-----------------------------------
While without the survey design part, it works find, but with "svy" , I have this error: lrtest is not appropriate with survey estimation results. I searched online and someone suggest using "test" but the examples are all about setting coefficient of a variable/variables to 0, not setting them equal. So does anyone know how to test the difference of two model using with survey design?
Thank you very much!!
Thomas
I came across with the problem when using the stata to compare two multinomial logistic regression models with survey design: one model is constrained (force the coefficient of a independent variable to be equal for outcome): my code is like this: * assign the sruvey design: two stage design
svyset [w=weights12], psu(sdmvpsu) strata (sdmvstra)
*Set constrains
constraint 1 [1=2]:hyperchol
*unconstrained model
svy: mlogit db_cat hypertension hyperchol
*preserve the unconstrainted model
estimates store unconstrained
*constrained model
svy: mlogit db_cat hypertension hyperchol, constraints(1)
*test the significance between constrained and unconstrained model.
lrtest unconstrained
-----------------------------------
While without the survey design part, it works find, but with "svy" , I have this error: lrtest is not appropriate with survey estimation results. I searched online and someone suggest using "test" but the examples are all about setting coefficient of a variable/variables to 0, not setting them equal. So does anyone know how to test the difference of two model using with survey design?
Thank you very much!!
Thomas
Comment