I am familiar with the idea of comparing alternative linear regression models using anova(model1,model2)
, for models fitted using lm()
in R. For example, I might use this function to test if it was worth adding an $X^2$ term to a linear model.
I am now interested in comparing two multinomial log-linear models (both fitted from the same dataset, using multinom
from the nnet
package in R):
Model 1: The intercept model, so essentially based only on the frequencies of each category.
Model 2: A more complex model, with an intercept term and some additional explanatory variables.
When I compare two multinomial log-linear models, Model 1 and Model 2 as specified above, R does run and produce output, including a Pr(Chi)
value (note, in this example the Pr(Chi) value is not significant, but my questions are about the general principle rather than specific to these particular models):
Model Resid. df Resid. Dev Test Df LR stat. Pr(Chi)
1 Model1 471 218.4830 NA NA NA
2 Model2 465 215.2631 1 vs 2 6 3.219958 0.7807764
My questions are:
- Is this a valid way to compare multinomial log-linear models, or is there some reason that it is not valid?
If it is not valid (or if there is potentially a better way), what are alternative ways to compare the models?
What exactly is
anova
comparing in this context? e.g. what are the values in the 'Resid. Dev' column of the output? Are these the log likelihoods or something else?