[R] ERROR NaNs produced; when comparing two logistic regression models with the ANOVA CHI test
Jan Verbesselt
Jan.Verbesselt at agr.kuleuven.ac.be
Tue Feb 22 15:19:21 CET 2005
Dear R-list,
*When comparing two logistic regression models with the anova CHi test, I
obtain the following error: (there are no NA's in the time series). How can
this be solved such that I can compare two models on the same dataset were
different explanatory variables are used?
l.KBDI <- glm(zna.arson2 ~ zna.KBDI,family = binomial)
l.NDWI <- glm(zna.arson2 ~ zna.NDWI,family = binomial)
anova(l.KBDI,l.NDWI, test = "Chi")
Analysis of Deviance Table
Model 1: zna.arson2 ~ zna.KBDI
Model 2: zna.arson2 ~ zna.NDWI
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 110 123.227
2 110 113.593 0 9.635
Warning message:
NaNs produced in: pchisq(q, df, lower.tail, log.p)
*Is this caused by the non-linearity of the data?
*How can I obtain a p-value?
Thanks,
Jan
_______________________________________________________________________
ir. Jan Verbesselt
Research Associate
Lab of Geomatics and Forest Engineering K.U. Leuven
Vital Decosterstraat 102. B-3000 Leuven Belgium
Tel:+32-16-329750 Fax: +32-16-329760
http://gloveg.kuleuven.ac.be/
More information about the R-help
mailing list