predict.fcRegression: Predicted values based on fcRegression object

View source: R/predict.fcRegression.R

predict.fcRegressionR Documentation

Predicted values based on fcRegression object

Description

Predicted values based on the linear model with functional covariates represented by a "fcRegression" class object.

Usage

## S3 method for class 'fcRegression'
predict(object, newData.FC, newData.Z = NULL, ...)

Arguments

object

A fcRegression class object produced by fcRegression.

newData.FC

A atomic vector or a matrix or a dataframe or a functional_variable class object or a list of objects above. See argument FC in fcRegression.

newData.Z

A dataframe or a matrix or a atomic vector. See arguement Z in fcRegression.

...

Further arguments passed to or from other methods, including predict.lm, predict.glm, predict.merMod.

Details

If no new data is input, will return the fitted value.

Value

See predict.lm, predict.glm, predict.merMod.

Author(s)

Heyang Ji

Examples

data(MECfda.data.sim.0.0)
res = fcRegression(FC = MECfda.data.sim.0.0$FC, Y=MECfda.data.sim.0.0$Y, Z=MECfda.data.sim.0.0$Z,
                   basis.order = 5, basis.type = c('Bspline'),
                   formula.Z = ~ Z_1 + (1|Z_2))
data(MECfda.data.sim.1.0)
predict(object = res, newData.FC = MECfda.data.sim.1.0$FC,newData.Z = MECfda.data.sim.1.0$Z)

MECfda documentation built on April 3, 2025, 10:07 p.m.