[R] prediction from glm...

hugues santin janin hugues_sj at yahoo.fr
Sun Aug 7 16:11:37 CEST 2005


Hello r-help, 

I'm trying to fit birds counts over years using glm. In fact I'm trying to reproduce an analysis already perform with genstat (attach document). I have done (with Estate
and year as factors):

Model1 <- glm(Females~Estate+Year+offset = log(area)), family =
quasipoisson(link = log), na.action = "na.exclude") 

After I have calculated the prediction using:

Pred1 <- predict(Model1, type = "response", na.action = "na.exclude")

Pred1 given to me the prediction using Model1 e.g. Females~Estate+Year. But I search to reproduce the original data whitout the sEstate effect. That permit me to interprete only the variation in number of bird due to theYear. The argument new.data seems  useful to specify which data we want to predict but not to specify how to predict these data.
 
predict.glm is the good functoin to do that? How can I specify to predict.glm() to remove the sEstate effect of the Females prediction?
 
I have not found answer in the archives of R-help.
I thank you for your time and your help in regards to this problem,

Hugues SANTIN-JANIN

hugues_sj at yahoo.fr

"Game Conservancy Trust"






		
---------------------------------



More information about the R-help mailing list