Usage
## S3 method for class 'gam':
plot(x,residuals=FALSE,rug=TRUE,se=TRUE,pages=0,select=NULL,scale=-1,
n=100,n2=40,pers=FALSE,theta=30,phi=30,jit=FALSE,xlab=NULL,
ylab=NULL,main=NULL,ylim=NULL,xlim=NULL,too.far=0.1,
all.terms=FALSE,shade=FALSE,shade.col="gray80",
shift=0,trans=I,seWithMean=FALSE,by.resids=FALSE,
scheme="grey",...)
Arguments
x
a fitted gam
object as produced by gam()
.
residuals
If TRUE
then partial residuals are added to plots of 1-D smooths. If FALSE
then no residuals are added. If this is an array of the correct length then it is used as the array of
residuals to be used for producing partial residu
rug
when TRUE (default) then the covariate to which the plot applies is displayed as a rug plot
at the foot of each plot of a 1-d smooth, and the locations of the
covariates are plotted as points on the contour plot representing a 2-d
smooth.
se
when TRUE (default) upper and lower lines are added to the
1-d plots at 2 standard errors
above and below the estimate of the smooth being plotted while for
2-d plots, surfaces at +1 and -1 standard errors are contoured
and overlayed on the co
pages
(default 0) the number of pages over which to spread the output. For example,
if pages=1
then all terms will be plotted on one page with the layout performed automatically.
Set to 0 to have the routine leave all graphics settings as they ar
select
Allows the plot for a single model term to be selected for printing. e.g. if you just want the plot for the second smooth term set select=2
.
scale
set to -1 (default) to have the same y-axis scale for each plot, and to 0 for a
different y axis for each plot. Ignored if ylim
supplied.
n
number of points used for each 1-d plot - for a nice smooth plot this needs to be several times the estimated
degrees of freedom for the smooth. Default value 100.
n2
Square root of number of points used to grid estimates of 2-d
functions for contouring.
pers
Set to TRUE
if you want perspective plots for 2-d
terms.
theta
One of the perspective plot angles.
phi
The other perspective plot angle.
jit
Set to TRUE if you want rug plots for 1-d terms to be jittered.
xlab
If supplied then this will be used as the x label for all plots.
ylab
If supplied then this will be used as the y label for all plots.
main
Used as title (or z axis label) for plots if supplied.
ylim
If supplied then this pair of numbers are used as the y limits for each plot.
xlim
If supplied then this pair of numbers are used as the x limits for each plot.
too.far
If greater than 0 then this is used to determine when a location is too
far from data to be plotted when plotting 2-D smooths. This is useful since smooths tend to go wild away from data.
The data are scaled into the unit square before deciding what to ex
all.terms
if set to TRUE
then the partial effects of parametric
model components are also plotted, via a call to termplot
. Only
terms of order 1 can be plotted in this way. shade
Set to TRUE
to produce shaded regions as confidence bands
for smooths (not avaliable for parametric terms, which are plotted using termplot
).
shade.col
define the color used for shading confidence bands.
shift
constant to add to each smooth (on the scale of the linear
predictor) before plotting. Can be useful for some diagnostics, or with trans
.
trans
function to apply to each smooth (after any shift), before
plotting. shift
and trans
are occasionally useful as a means for
getting plots on the response scale, when the model consists only of a single smooth.
seWithMean
if TRUE
the component smooths are shown with confidence
intervals that include the uncertainty about the overall mean. If FALSE
then the
uncertainty relates purely to the centred smooth itself. An extension of the argument
pres
by.resids
Should partial residuals be plotted for terms with by
variables?
Usually the answer is no, they would be meaningless.
scheme
"grey"
yields greyscale, and "heat"
heatmap colors, for plot methods
that take any notice of this (e.g. mrf
smooths)....
other graphics parameters to pass on to plotting commands.