[R] prediction from glm...

From: hugues santin janin <hugues_sj_at_yahoo.fr>
Date: Mon 08 Aug 2005 - 00:11:37 EST


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@yahoo.fr

"Game Conservancy Trust"                 




R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Aug 08 00:19:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:44 EST