Re: [Rd] Levels attribute in integer columns created by model.frame()

2007-05-01 Thread John Maindonald
I get worms.glm <- glm(cbind(deaths, (20-deaths)) ~ sex+ doselin, + data=worms, family=binomial) > attr(worms.glm, "dataClasses") NULL But maybe the result from somewhere within predict.lm() or model.frame() is different. Surely the levels attribute has no relevance to glm's c

Re: [Rd] Levels attribute in integer columns created by model.frame()

2007-04-30 Thread Prof Brian Ripley
Stripping attributes from a column in model.frame would be highly undesirable. The mistake was using 'unclass' when the intention was to remove the levels (I presume). The new variable given is correctly reported as not matching that used during fitting. Uuse of traceback() would have shown t

[Rd] Levels attribute in integer columns created by model.frame()

2007-04-30 Thread John Maindonald
The following is evidence of what is surely an undesirable feature. The issue is the handling, in calls to model.frame(), of an explanatory variable that has been derived as an unclassed factor. (Ross Darnell drew this to my attention.) ## Data are slightly modified from p.191 of MASS > worms <-