plot.SSM {SSM} | R Documentation |
Plot smooth supersaturated model main effects
Description
plot.SSM
is a plot method for SSM objects. It plots the main effects
of the SSM only, that is the subset of basis terms that are dependent on a
single variable only. For single variable data this is a plot of the
complete model.
Usage
## S3 method for class 'SSM'
plot(x, ..., grid = 200, yrange = "full", GP = TRUE)
Arguments
x |
An SSM object. |
... |
(optional) arguments to pass to the |
grid |
(optional) A number. This specifies the resolution of the plot, i.e. how many model evaluations are used to construct the curve. |
yrange |
(optional) Character. Only "full" will have an effect. |
GP |
(optional) Logical. For single variable data, the credible interval of the metamodel error estimator will be plotted if TRUE. |
Details
For each variable, the effect is plotted over by default
although passing an alternate range to the
xlim
argument will override
this.
The yrange
argument is designed to automatically compute the relevant
plot range for each effect. By default a ylim
value is passed to
plot
that covers the range of responses. "full" results in a
ylim
value that covers the range of predictions or, if appropriate,
the range of the metamodel error credible interval.
For single variable data, setting GP
to TRUE will plot a credible
interval for the metamodel error estimating Gaussian process if this has been
computed for the SSM object.
Examples
# A single variable example
X <- seq(-1, 1, 0.25)
Y <- sapply(X, "^", 3)
s <- fit.ssm(X, Y, GP = TRUE)
plot(s)
# A six variable example
data(attitude)
X <- transform11(attitude[ 2:7])
Y <- attitude[ , 1]
s <- fit.ssm(X, Y)
plot(s)