How to create a null model for conditional logistic regression in R?

时间秒杀一切 提交于 2019-12-10 11:14:46

问题


I would like to see if including some covariates will give me an AIC which is smaller than the null model, while working with conditional logistic regression in R (discrete choice).

I realize I can build a model, such as

mymodel <- clogit(choice ~ dark+soft+nuts + strata(ID), data=candy)  

and get the AIC by using

extractAIC(mymodel)[2]  

But I am a little unsure as to how I can create a null model to compare this against. Any advice would be greatly appreciated.


回答1:


Just fit a model without covariates

nullmodel <- clogit(choice ~ 1 + strata(ID), data=candy)

That's assuming that your null is that dark+soft+nuts have no effect on choice. Otherwise be clear about what your null and alternative hypothesis are.



来源:https://stackoverflow.com/questions/24225451/how-to-create-a-null-model-for-conditional-logistic-regression-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!