| coefvgam | R Documentation |
Extracts the estimated coefficients from vgam() objects.
coefvgam(object, type = c("linear", "nonlinear"), ...)
object |
A
|
type |
Character. The default is the first choice. |
... |
Optional arguments fed into
|
For VGAMs, because modified backfitting is performed,
each fitted function is decomposed into a linear and nonlinear
(smooth) part.
The argument type is used to return which one is wanted.
A vector if type = "linear".
A list if type = "nonlinear", and each component of
this list corresponds to an s term;
the component contains an S4 object with slot names such as
"Bcoefficients",
"knots",
"xmin",
"xmax".
Thomas W. Yee
vgam,
coefvlm,
coef.
fit <- vgam(agaaus ~ s(altitude, df = 2), binomialff, data = hunua)
coef(fit) # Same as coef(fit, type = "linear")
(ii <- coef(fit, type = "nonlinear"))
is.list(ii)
names(ii)
slotNames(ii[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.