ff | R Documentation |
Defines a term \int^{s_{hi, i}}_{s_{lo, i}} X_i(s)\beta(t,s)ds
for
inclusion in an mgcv::gam
-formula (or bam
or gamm
or
gamm4:::gamm4
) as constructed by pffr
.
Defaults to a
cubic tensor product B-spline with marginal first order differences penalties
for \beta(t,s)
and numerical integration over the entire range
[s_{lo, i}, s_{hi, i}] = [\min(s_i), \max(s_i)]
by using Simpson
weights. Can't deal with any missing X(s)
, unequal lengths of
X_i(s)
not (yet?) possible. Unequal integration ranges for different
X_i(s)
should work. X_i(s)
is assumed to be numeric (duh...).
ff(
X,
yind = NULL,
xind = seq(0, 1, l = ncol(X)),
basistype = c("te", "t2", "ti", "s", "tes"),
integration = c("simpson", "trapezoidal", "riemann"),
L = NULL,
limits = NULL,
splinepars = if (basistype != "s") {
list(bs = "ps", m = list(c(2, 1), c(2, 1)), k
= c(5, 5))
} else {
list(bs = "tp", m = NA)
},
check.ident = TRUE
)
X |
an n by |
yind |
DEPRECATED used to supply 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 |
check.ident |
check identifiability of the model spec. See Details and
References. Defaults to |
If check.ident==TRUE
and basistype!="s"
(the default), the
routine checks conditions for non-identifiability of the effect. This occurs
if a) the marginal basis for the functional covariate is rank-deficient
(typically because the functional covariate has lower rank than the spline
basis along its index) and simultaneously b) the kernel of Cov(X(s))
is
not disjunct from the kernel of the marginal penalty over s
. In
practice, a) occurs quite frequently, and b) occurs usually because
curve-wise mean centering has removed all constant components from the
functional covariate.
If there is kernel overlap, \beta(t,s)
is
constrained to be orthogonal to functions in that overlap space (e.g., if the
overlap contains constant functions, constraints "\int \beta(t,s) ds =
0
for all t" are enforced). See reference for details.
A warning is
always given if the effective rank of Cov(X(s))
(defined as the number
of eigenvalues accounting for at least 0.995 of the total variance in
X_i(s)
) is lower than 4. If X_i(s)
is of very low rank,
ffpc
-term may be preferable.
A list containing
call |
a "call" to
|
data |
a list containing the necessary covariate and weight matrices |
Fabian Scheipl, Sonja Greven
For background on check.ident
:
Scheipl, F., Greven,
S. (2016). Identifiability in penalized function-on-function regression
models. Electronic Journal of Statistics, 10(1), 495–526.
https://projecteuclid.org/journals/electronic-journal-of-statistics/volume-10/issue-1/Identifiability-in-penalized-function-on-function-regression-models/10.1214/16-EJS1123.full
mgcv
's linear.functional.terms
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.