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

tumultous_rooster picture tumultous_rooster · Jun 15, 2014 · Viewed 9.1k times · Source

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.

Answer

MrFlick picture MrFlick · Jun 15, 2014

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.