coefficients.pfr {refund} | R Documentation |
Extract coefficient functions from a fitted pfr-object
Description
This function is used to extract a coefficient from a fitted 'pfr' model, in
particular smooth functions resulting from including functional terms specified
with lf
, af
, etc. It can also be used to extract smooths
genereated using mgcv
's s
, te
, or t2
.
Usage
## S3 method for class 'pfr'
coefficients(
object,
select = 1,
coords = NULL,
n = NULL,
se = ifelse(length(object$smooth) & select, TRUE, FALSE),
seWithMean = FALSE,
useVc = TRUE,
Qtransform = FALSE,
...
)
## S3 method for class 'pfr'
coef(
object,
select = 1,
coords = NULL,
n = NULL,
se = ifelse(length(object$smooth) & select, TRUE, FALSE),
seWithMean = FALSE,
useVc = TRUE,
Qtransform = FALSE,
...
)
Arguments
object |
return object from |
select |
integer indicating the index of the desired smooth term
in |
coords |
named list indicating the desired coordinates where the
coefficient function is to be evaluated. Names must match the argument names
in |
n |
integer vector indicating the number of equally spaced coordinates
for each argument. If length 1, the same number is used for each argument.
Otherwise, the length must match |
se |
if |
seWithMean |
if |
useVc |
if |
Qtransform |
For additive functional terms, |
... |
these arguments are ignored |
Value
a data frame containing the evaluation points,
coefficient function values and optionally the SE's for the term indicated
by select
.
Author(s)
Jonathan Gellar and Fabian Scheipl
References
Marra, G and S.N. Wood (2012) Coverage Properties of Confidence Intervals for Generalized Additive Model Components. Scandinavian Journal of Statistics.