smooth_coefs | R Documentation |
Returns a vector of model coefficients of the parametric terms that represent the supplied smooth.
smooth_coefs(object, ...)
## S3 method for class 'gam'
smooth_coefs(object, select, term = deprecated(), ...)
## S3 method for class 'bam'
smooth_coefs(object, select, term = deprecated(), ...)
## S3 method for class 'gamm'
smooth_coefs(object, select, term = deprecated(), ...)
## S3 method for class 'gamm4'
smooth_coefs(object, select, term = deprecated(), ...)
## S3 method for class 'list'
smooth_coefs(object, select, term = deprecated(), ...)
## S3 method for class 'mgcv.smooth'
smooth_coefs(object, model, ...)
## S3 method for class 'scam'
smooth_coefs(object, select, term = deprecated(), ...)
object |
a fitted GAM(M) object, or, for the |
... |
arguments passed to other methods. |
select |
character; the label of the smooth whose coefficients will be returned. |
term |
|
model |
a fitted GAM(M) object. |
A numeric vector of model coefficients.
Gavin L. Simpson
smooth_coef_indices()
for extracting the indices of the
coefficients for a particular smooth.
load_mgcv()
df <- data_sim("eg1", seed = 2)
m <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = df, method = "REML")
## IGNORE_RDIFF_BEGIN
smooth_coefs(m, select = "s(x2)")
## IGNORE_RDIFF_END
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.