sff {refund} | R Documentation |
Construct a smooth function-on-function regression term
Description
Defines a term \int^{s_{hi, i}}_{s_{lo, i}} f(X_i(s), s, t) ds
for
inclusion in an mgcv::gam
-formula (or bam
or gamm
or
gamm4:::gamm
) as constructed by pffr
. Defaults to a
cubic tensor product B-spline with marginal second differences penalties for
f(X_i(s), s, t)
and integration over the entire range [s_{lo, i},
s_{hi, i}] = [\min(s_i), \max(s_i)]
. Can't deal with any missing X(s)
,
unequal lengths of X_i(s)
not (yet?) possible. Unequal ranges for
different X_i(s)
should work. X_i(s)
is assumed to be numeric.
sff()
IS AN EXPERIMENTAL FEATURE AND NOT WELL TESTED YET – USE AT
YOUR OWN RISK.
Usage
sff(
X,
yind,
xind = seq(0, 1, l = ncol(X)),
basistype = c("te", "t2", "s"),
integration = c("simpson", "trapezoidal"),
L = NULL,
limits = NULL,
splinepars = list(bs = "ps", m = c(2, 2, 2))
)
Arguments
X |
an n by |
yind |
DEPRECATED matrix (or vector) of indices of evaluations of
|
xind |
vector of indices of evaluations of |
basistype |
defaults to " |
integration |
method used for numerical integration. Defaults to
|
L |
optional: an n by |
limits |
defaults to NULL for integration across the entire range of
|
splinepars |
optional arguments supplied to the |
Value
a list containing
-
call
a "call" tote
(ors
,t2
) using the appropriately constructed covariate and weight matrices (seelinear.functional.terms
) -
data
a list containing the necessary covariate and weight matrices
Author(s)
Fabian Scheipl, based on Sonja Greven's trick for fitting functional responses.