---------- Forwarded message ---------- From: Michela Leone <[EMAIL PROTECTED]> Date: 5-ott-2007 17.25 Subject: question about predict.gam To: R-help@r-project.org
I'm fitting a Poisson gam model, say model<-gam(a65tm~as.factor(day.week )+as.factor(week)+offset(log(pop65))+s(time,k=10,bs="cr",fx=FALSE,by=NA,m=1),sp=c( 0.001),data=dati1,family=poisson) Currently I've difficulties in obtaining right predictions by using gam.predict function with MGCV package in R version 2.2.1 (see below my syntax). previ<-predict.gam(model,dati2,type="response") I expect to get the predicted values in the same scale of the response variable but they are far what I expect. (i.e 1.3 when my response variable is 40), while when I use predict.gam with gam package I have right prediction (in the response scale). Does anybody know if I missed anything important? Is there anyway to make it work correctly or reliably? Moreover, if it's possible, could anybody explain me why using gam function with GAM package I obtain different predictions from those obtained using gam function with MGCV package? Any help will be highly appreciated. All the best MIchela [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.