问题
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