>
> Thank you for your suggestion.
>
> Actually, I have already tried it, but I am confused because the plot I get
> is not the same as the output of plot(model) or plot.gam(model). The yaxis
> is different
-- `plot.gam' will always plot the `centered smooth', i.e.  the smooth 
constrained to sum to zero over the data. By default (i.e. using type="link") 
`predict.gam' will include the intercept in the predctions. If you want 
centered terms out of `predict.gam' use the `type="terms" option.

>
> On the other hand, if I build a more complex model, as for example:
>
> model<- gam(x ~ s(lat,long) + s(temperature))
>
> I would like to extract the information to build the effects for each
> explanatory factor (one graph for s(lat,long) and another for
> s(temperature)), as R does when you use 'plot(model)' and you press return
> for subsequent pages.
>
Again, try predict.gam with type="terms"

best,
Simon
-- 
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603  www.maths.bath.ac.uk/~sw283

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to