sff {refund} | R Documentation |
Construct a smooth function-on-function regression term
Description
Defines a term ∫slo,ishi,if(Xi(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(Xi(s),s,t)
and integration over the entire range [slo,i,shi,i]=[min(si),max(si)]
. Can't deal with any missing X(s)
,
unequal lengths of Xi(s)
not (yet?) possible. Unequal ranges for
different Xi(s)
should work. Xi(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 ncol(xind) matrix of function evaluations
Xi(si1),…,Xi(siS) ; i=1,…,n .
|
yind |
DEPRECATED matrix (or vector) of indices of evaluations of
Yi(t) ; i.e. matrix with rows (ti1,…,tiT) ; no longer
used.
|
xind |
vector of indices of evaluations of Xi(s) ,
i.e, (s1,…,sS)
|
basistype |
defaults to "te ", i.e. a tensor product
spline to represent f(Xi(s),t) . Alternatively, use "s" for
bivariate basis functions (see s ) or "t2" for an
alternative parameterization of tensor product splines (see
t2 ).
|
integration |
method used for numerical integration. Defaults to
"simpson" 's rule. Alternatively and for non-equidistant grids,
"trapezoidal" .
|
L |
optional: an n by ncol(xind) giving the weights for the
numerical integration over s .
|
limits |
defaults to NULL for integration across the entire range of
X(s) , otherwise specifies the integration limits shi,i,slo,i : either one of "s<t" or "s<=t" for (shi,i,slo,i)=(0,t) or a function that takes s as the first and
t as the second argument and returns TRUE for combinations of values
(s,t) if s falls into the integration range for the given
t . This is an experimental feature and not well tested yet; use at
your own risk.
|
splinepars |
optional arguments supplied to the basistype -term.
Defaults to a cubic tensor product B-spline with marginal second
differences, i.e. list(bs="ps", m=c(2,2,2)) . See
te or s for details
|
Value
a list containing
-
call
a "call" to
te
(or s
, t2
)
using the appropriately constructed covariate and weight matrices (see
linear.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.
[Package
refund version 0.1-35
Index]