[R] predict.gam, a question about offset variable and spatial resolution

2012-08-13 Thread Samuel Turgeon
Dear all, I'm using predict.gam (mgcv package) to predict count data (y) from line transect to a regular grid. My model have this form: y=offset(log(x1*0.6))+s(x2)+s( x3)+s(x4), family=quasipoisson,... the offset is the area covered by a portion of a transect line (length(x1)*observation distanc

[R] proportion explained by each term in a GAM

2011-06-16 Thread Samuel Turgeon
Dear list, I have read several posts on this topic. I would use the same methodology as proposed by Simon Wood in this post: http://r.789695.n4.nabble.com/variance-explained-by-each-term-in-a-GAM-td836513.html My first question is: Does anyone know a scientific source (paper, book,...) that exp

[R] residual checking for GAM (mgcv)

2011-06-08 Thread Samuel Turgeon
Dear list, i'm checking the residuals plots of a gam model after a processus of model selection. I found the "best" model, all my terms are significant, the r-square and the deviance explained are good, but I have strange residuals plots: http://dl.dropbox.com/u/1169100/gam.check.png http://dl.dr

[R] Model checking for gam (mgcv) result

2011-04-12 Thread Samuel Turgeon
Dear list, i'm checking the residuals plots of a gam model after a processus of model selection. I found the "best" model, all my terms are significant, the r-square and the deviance explained are good, but I have strange residuals plots: http://dl.dropbox.com/u/1169100/gam.check.png http://dl.dr

[R] Question about GAM (mgcv)

2011-04-11 Thread Samuel Turgeon
Dear list, i'm using the GAM function from mgcv package. I'm using this syntax: model=gam(y~offset(x)+s(log1p(x1))+s(log1p(x2))+s(x3)+s(x4)+s(5),family=quasipoisson,data=data) and I'm sequentially dropping the single term with the highest non-significant p-value from the model and re-fitting unt