How to create a null model for conditional logisti

2019-05-28 22:06发布

问题:

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.