predict.fcRegression {MECfda} | R 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 |
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 |
newData.Z |
A dataframe or a matrix or a atomic vector.
See arguement Z in |
... |
Further arguments passed to or from other methods,
including |
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)
[Package MECfda version 0.1.0 Index]