Plots fitted curves or their derivatives together with simultaneous confidence bands.
# S3 method for asp
plot(x, select=NULL, drv=0, bands=TRUE, level=0.95, grid=50, pages=0,
plot=TRUE, ylim=NULL, xlab=NULL, ylab=NULL,
scb.lwd=1, scb.lty="dotted", shade=FALSE, shade.col=grey(0.85),
residuals=FALSE, residuals.col="steelblue",
bayes=FALSE, rug=TRUE,...)
list of the grid values used
list of the fitted values on the grid
list of the lower bounds of the confidence bands
list of the upper bounds of the confidence bands
the derivative order
the standard deviations on the grid
list of ylim used for plotting
the partial residuals.
an asp
object created by asp
or aspHetero
vector specifying which curves in an additive model should be plotted. If NULL, all curves are plotted.
the derivative order. Defaults to 0, i.e. the estimated curves themselves are plotted. First and second derivatives are supported. Does not apply to objects created by scbM
.
TRUE in order to include simultaneous confidence bands.
number of points used for the plot, default value 50.
if FALSE no plot is given
vector or list of vecotrs of limits on y axes. If NULL limits are automatically chosen. If multiple curves are plotted and a two-dimensional vector is given, y axes for all curves will be equal. A list with length equal to the number of smooth curves in the model can be given to specify different y-axes for each smooth.
The number of pages over which to spread the output as in package mgcv
.
For example, if pages=1 then all terms will be plotted on one page in an automatic fashion.
If pages=0 (default) all graphics settings are left as they are.
the level of confidence (does not apply to objects created by scbM
).
label for the x axis. A list with length equal to the number of smooth curves in the model can be given to specify different labels for each smooth.
label for the y axis. A list with length equal to the number of smooth curves in the model can be given to specify different labels for each smooth.
line width for simultaneous confidence bands
line type for simultaneous confidence bands. Use scb.lty="blank", if you only want to plot the shades.
set to TRUE to produce shaded regions as simultaneous confidence bands for smooths
define the color used for shading confidence bands
if TRUE, partial residuals are added to the plot
color of partial residuals
adds a rug representation (1-d plot) of the data to the plot.
FALSE for simultaneous confidence bands with (approximate) frequentist coverage probability, TRUE for (approximate) Bayesian coverage probability. See Krivobokova et al. (2010) for details.
further arguments to be passed to plot()
plot.asp() first calls scbM
and then plot.scbm() to plot an asp object.
If plotting takes long (because of a large data set) and you want to plot multiple times with different settings, use scbM
and then plot the resulting scbm
object with plot.scbm()
.
Estimated fits are centred to have zero mean.
The simultaneous confidence bands have (approximate) frequentist coverage probabilities with automatic bias correction (see references).
Krivobokova, T., Kneib, T., and Claeskens, G. (2010)
Simultaneous confidence bands for penalized spline estimators.
Journal of the American Statistical Association, 105(490):852-863.
Wiesenfarth, M., Krivobokova, T., Klasen, S., Sperlich, S. (2012).
Direct Simultaneous Inference in Additive Models and its Application to Model Undernutrition.
Journal of the American Statistical Association, 107(500): 1286-1296.
plot.spm
in package SemiPar