| lf_old {refund} | R Documentation |
Construct an FLM regression term
Description
Defines a term \int_{T}\beta(t)X_i(t)dt for inclusion in an gam-formula
(or bam or gamm or gamm4) as constructed by
fgam, where \beta(t) is an unknown coefficient function and X_i(t)
is a functional predictor on the closed interval T. Defaults to a cubic B-spline with
second-order difference penalties for estimating \beta(t). The functional predictor must
be fully observed on a regular grid.
Usage
lf_old(
X,
argvals = seq(0, 1, l = ncol(X)),
xind = NULL,
integration = c("simpson", "trapezoidal", "riemann"),
L = NULL,
splinepars = list(bs = "ps", k = min(ceiling(n/4), 40), m = c(2, 2)),
presmooth = TRUE
)
Arguments
X |
an |
argvals |
matrix (or vector) of indices of evaluations of |
xind |
same as argvals. It will not be supported in the next version of refund. |
integration |
method used for numerical integration. Defaults to |
L |
an optional |
splinepars |
optional arguments specifying options for representing and penalizing the
functional coefficient |
presmooth |
logical; if true, the functional predictor is pre-smoothed prior to fitting. See
|
Value
a list with the following entries
-
call- acalltote(ors,t2) using the appropriately constructed covariate and weight matrices -
argvals- theargvalsargument supplied tolf -
L- the matrix of weights used for the integration xindname - the name used for the functional predictor variable in the
formulaused bymgcv-
tindname- the name used forargvalsvariable in theformulaused bymgcv -
LXname- the name used for theLvariable in theformulaused bymgcv -
presmooth- thepresmoothargument supplied tolf -
Xfd- anfdobject from presmoothing the functional predictors usingsmooth.basisPar. Only present ifpresmooth=TRUE. Seefd
Author(s)
Mathew W. McLean mathew.w.mclean@gmail.com and Fabian Scheipl
See Also
fgam, af, mgcv's linear.functional.terms,
fgam for examples