Skip to content

residuals in plot.gam (mgcv)

2 messages · Toby.Patterson@csiro.au, Simon Wood

#
Is there a way to add residuals to plots produced by plot.gam in the mgcv
package? I'm looking for something like what you get using resid=T in Splus
plot.gam. 

Thanks in advance
Toby 


-----Original Message-----
From: Simon Wood [mailto:snw at mcs.st-and.ac.uk]
Sent: 23 January, 2002 8:14 PM
To: Toby.Patterson at csiro.au
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] multiple surfaces in persp?
plot?
- you can do this using par(new=TRUE) between calls to persp() to get
plots overlayed: persp.gam() in package mgcv does this, for example.

 ______________________________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
- It's on my "to do" list, but isn't there yet - sorry (mgcv doesn't
backfit so the partial residuals aren't just sitting there waiting to be
plotted). Of course you can add residuals of your own by using the
`select' argument to plot.gam() to produce single term plots, and then
using points() to add the residuals, but this isn't very convenient. 

Simon

  ______________________________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._