plot.gamlps {blapsr} | R Documentation |
Plot smooth functions of a generalized additive model object.
Description
Displays a plot of the fitted additive smooth components of an
gamlps
object. The routine can also be used to
print a table of point and set estimates of an additive smooth term for a
user-specified grid of values.
Usage
## S3 method for class 'gamlps'
plot(x, xp, smoo.index, cred.int = 0.95, plot.cred = TRUE,
np = 100, fit.col = "blue", shade.col = "gray75", show.plot = TRUE,
show.info = TRUE, ...)
Arguments
x |
An object of class |
xp |
A numeric vector of grid values on which to compute a point estimate
and pointwise credible interval for the smooth function specified in
|
smoo.index |
The index of the smooth function. For instance
|
cred.int |
The level of the pointwise credible interval to be
computed for the smooth additive term. Default is |
plot.cred |
Logical. Should the credible intervals be plotted?
Default is |
np |
The number of points used to construct the plot of the smooth additive function. Default is 100 and allowed values are between 20 and 200. |
fit.col |
The color of the fitted curve. |
shade.col |
The shading color for the credible intervals. |
show.plot |
Logical. Should the plot be displayed? Default is
|
show.info |
Logical. Should the table of point and set estimates of
the smooth function on the specified |
... |
Further arguments to be passed to |
Details
Produces a plot of a smooth additive term fitted with the
gamlps
function. On the y-axis, the estimated effective
dimension of the smooth term is also displayed. At the bottom of each
plot, vertical ticks indicate the location of the covariate values. The
labels on the x-axis correspond to the covariate name associated to the
smooth term.
Value
If xp
is unspecified (the default), the routine will only
return a plot of the estimated smooth curve. Otherwise, it provides a
list with the following components:
xp |
The chosen points on which to compute the smooth fit. |
sm.xp |
The estimated smooth fit at points specified in |
sm.low |
The lower bound of the pointwise credible interval for the
smooth additive function at points specified in |
sm.up |
The upper bound of the pointwise credible interval for the
smooth additive function at points specified in |
cred.int |
The chosen level to compute credible intervals. |
smoo.index |
The index of the smooth function. |
Author(s)
Oswaldo Gressani oswaldo_gressani@hotmail.fr.
See Also
gamlps
, gamlps.object
,
print.gamlps