[R] warnings about factor levels dropped from predict.glm

Cade, Brian cadeb at usgs.gov
Tue Dec 5 21:17:00 CET 2017

I am helping a student with some logistic regression analyses and we are
getting some strange inconsistencies regarding a warning about factor
levels being dropped when running predict.glm(, newdata = ournewdata) on
the logistic regression model object.  We have checked multiple times that
the factor levels have been defined similarly on both data sets (one used
to estimate model and the newdata) and that values occur for all factor
levels in both data sets.  When I run these commands on my version of R
(3.2.5) on a Windows 7 OS I do not get the warnings.  When the student runs
them on her version of R (not sure what number hers is) on her Mac, she
gets these warnings constantly.  I've checked some records manually by
doing the algebra and the predict.glm() function is working correctly
incorporating the factor levels on my machine.  Any thoughts???


Brian S. Cade, PhD

U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO  80526-8818

email:  cadeb at usgs.gov <brian_cade at usgs.gov>
tel:  970 226-9326

	[[alternative HTML version deleted]]

More information about the R-help mailing list