Polymars: multivariate adaptive polynomial spline regression
Produces two and three dimensional plots of the
fitted values from a polymars
object.
## S3 method for class 'polymars' plot(x, predictor1, response, predictor2, xx, add = FALSE, n, xyz = FALSE, contour.polymars = FALSE, xlim, ylim, intercept, ...)
x |
|
predictor1 |
the index of a predictor that was used when the |
response |
if the model was fitted to multiple response data the response index should be specified. |
predictor2 |
the index of a predictor that was used when the |
xx |
should be a vector of length equal to the number of predictors in the
original data set. The values should be in the same order as in the original
dataset. By default the function uses the median values of the data that was
used to fit the model. Although the values for predictor and predictor2 are
not used, they should still be provided as part of |
add |
should the plot be added to a previously created plot? Works only for two dimensional plots. |
n |
number of plotting points (2 dimensional plot) or plotting points along each
axis (3 dimensional plot). The default is |
xyz |
is the plot being made a 3 dimensional plot?
If there is only one response it need not be set, if two numerical values
accompany the model in the call they will be understood as two predictors
for a 3-d plot. By default a 3-d plot uses the |
contour.polymars |
if the plot being made a 3 dimensional plot should it be made as a contour plot
( |
intercept |
Setting intercept equal to |
xlim,ylim |
Plotting limits. The function tries to choose intelligent limits itself |
... |
other options are passed on. |
This function produces a 2-d plot of 1 predictor and response of a polymars
object
at n equally spaced points or a 3-d plot of two predictors and response of a
polymars
object. The range of the plot is by default equal to the range of the
particular predictor(s) in the original data, but this can be changed by
xlim = c(from, to)
and
ylim = c(from, to)
.
Martin O'Connor.
Charles Kooperberg, Smarajit Bose, and Charles J. Stone (1997). Polychotomous regression. Journal of the American Statistical Association, 92, 117–127.
Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371–1470.
data(state) state.pm <- polymars(state.region, state.x77, knots = 15, classify = TRUE, gcv = 1) plot(state.pm, 3, 4)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.