I have a question about how to compare a GLM with a GAM model using anova
function.
A GLM is performed for example:
model1 <-glm(formula = exitus ~ age+gender+diabetes, family = "binomial",
na.action = na.exclude)
A second nested model could be:
model2 <-glm(formula = exitus ~ age+gender, family = "binomial", na.action =
na.exclude)
To compare these two GLM models the instruction is:
anova(model1,model2, test="F")
Similarly for GAM models
model3 <-gam(formula = exitus ~ s(age)+gender, family = "binomial",
na.action = na.exclude)
"R" allows to compare these two models (GLM vs. GAM)
anova(model2,model3, test="F")
This instruction returns a p-value with no error or warning, but this test
is based on maximum likelihood, and GAM models are not fitted with maximum
likelihood criteria, thus I think this p-value is not correct.
Please, I really appreciate any information about how to compare a GLM with
a GAM model.
[[alternative HTML version deleted]]
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html