Hello S-users,
a glm was developed using a dataset where one of the predicting factors had a
level with no observations, consequently there was no parameter estimate for
that level. Now I am trying to predict, using that model, on a new dataset
where the above factor has no missing levels. I get the following error, which
of course makes sense!
> ttt_predict.glm(c994.freq.glm.final, newdata = acr9597.all,
+ type = 'response')
Error in model.frame.default(terms.object, data, x..: factor mtass has new level
(s) 069 = Moins de 70K
is there a way around this? I know that I could combine the "new" level with
the closest one, but the same data set has to be
scored with several other models where the above offending missing level is
present? I would be very happy if I could manually insert
a coefficient (it could be eyeballed by looking at the other coefficients for
that factor) in the existing model for the missing level. Is this
possible? and how?
Any help appreciated, I'll summarize to the list,
Gérald Jean
Analyste-conseil (statistiques), Actuariat
télephone : (418) 835-8839
télecopieur : (418) 835-5865
courrier électronique: gerald.jean@spgdag.ca
"In God we trust all others must bring data"
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|