| plotvgam | R Documentation |
Component functions of a vgam-class object can
be plotted with plotvgam(). These are on the scale of
the linear/additive predictor.
plotvgam(x, newdata = NULL, y = NULL, residuals = NULL,
rugplot = TRUE, se = FALSE, scale = 0, raw = TRUE,
offset.arg = 0, deriv.arg = 0, overlay = FALSE,
type.residuals = c("deviance", "working", "pearson", "response"),
plot.arg = TRUE, which.term = NULL, which.cf = NULL,
control = plotvgam.control(...), varxij = 1, ...)
x |
A fitted VGAM object, e.g., produced by
|
newdata |
Data frame. May be used to reconstruct the original data set. |
y |
Unused. |
residuals |
Logical. If |
rugplot |
Logical. If |
se |
Logical. If |
scale |
Numerical. By default, each plot will have its own
y-axis scale. However, by specifying a value, each plot's y-axis
scale will be at least |
raw |
Logical. If |
offset.arg |
Numerical vector of length |
deriv.arg |
Numerical. The order of the derivative.
Should be assigned an small
integer such as 0, 1, 2. Only applying to |
overlay |
Logical. If |
type.residuals |
if |
plot.arg |
Logical. If |
which.term |
Character or integer vector containing all terms to be
plotted, e.g., |
which.cf |
An integer-valued vector specifying which
linear/additive predictors are to be plotted.
The values must be from the set {1,2,..., |
control |
Other control parameters. See |
... |
Other arguments that can be fed into
|
varxij |
Positive integer.
Used if |
In this help file M is the number of linear/additive
predictors, and r is the number of columns of the
constraint matrix of interest.
Many of plotvgam()'s options can be found in
plotvgam.control, e.g., line types, line widths,
colors.
The original object, but with the preplot slot of the object
assigned information regarding the plot.
While plot(fit) will work if class(fit)
is "vgam", it is necessary to use plotvgam(fit)
explicitly otherwise.
plotvgam() is quite buggy at the moment.
Thomas W. Yee
vgam,
plotvgam.control,
predict.vgam,
plotvglm,
vglm.
coalminers <- transform(coalminers, Age = (age - 42) / 5)
fit <- vgam(cbind(nBnW, nBW, BnW, BW) ~ s(Age),
binom2.or(zero = NULL), data = coalminers)
## Not run: par(mfrow = c(1,3))
plot(fit, se = TRUE, ylim = c(-3, 2), las = 1)
plot(fit, se = TRUE, which.cf = 1:2, lcol = "blue", scol = "orange",
ylim = c(-3, 2))
plot(fit, se = TRUE, which.cf = 1:2, lcol = "blue", scol = "orange",
overlay = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.