[R] plotting gam models

Rod villegas.ro at gmail.com
Tue Jul 24 14:08:24 CEST 2007

2007/7/24, Lucia Zarauz <lzarauz at pas.azti.es>:
> Hi everybody,
> I am working with gams and I have found some questions when plotting gams models.
> I am using mgcv, and my model looks something like this:
> model<- gam(x ~ s(lat,long))
> I can plot the output of the model using plot(model) or plot.gam(model) and I get a surface plot.
> That is ok, but what I want to do now is to extract the data used to perform the surface plot. Like that I would be able to superpose them to a geographical map, and to plot these data using other programs.
> Thank you very much in advance
> Lucía
> _____________________________________________
> Lucia Zarauz
> AZTI - Tecnalia / Unidad de Investigación Marina
> Herrera kaia portualdea z/g
> 20110 Pasaia (Gipuzkoa)
> Tel: 943 004 800 - Fax: 943 004 801
> e-mail: lzarauz at pas.azti.es
> www.azti.es ; www.tecnalia.info
> _____________________________________________
> **************** LEGE OHARRA **************** AVISO LEGAL **************** DISCLAIMER ****************
> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu gabe.
> Este mensaje es personal y confidencial y su uso no autorizado está prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo, sin reenviarlo ni conservarlo.
> This message is personal and confidential, unauthorised use is legally prohibited. If you are not the intended recipient, delete it without resending or backing it.
> ______________________________________________
> R-help at 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.

Also see ?vis.gam.
Produces perspective or contour plot views of gam model predictions.


More information about the R-help mailing list