predict.mface.sparse {mfaces} | R Documentation |
Subject-specific curve prediction from a mface.sparse fit
Description
Predict subject-specific curves based on a fit from "mface.sparse".
Usage
## S3 method for class 'mface.sparse'
predict(object, newdata, calculate.scores = T, ...)
Arguments
object |
a fitted object from the R function "mface.sparse". |
newdata |
a list containing all functional outcomes. Each element is a data frame with three arguments:
(1) |
calculate.scores |
if TRUE, scores will be calculated. |
... |
further arguments passed to or from other methods. |
Details
This function makes prediction based on observed data for each subject. So for each subject,
it requires at least one observed data. For the time points prediction is desired but no observation is available, just make the corresponding data$y
as NA.
Value
object |
A "mface.sparse" fit |
newdata |
Input data |
y.pred , mu.pred , se.pred , Chat.diag.pred , var.error.pred |
Predicted/estimated objects at the observation time points in |
rand_eff |
if |
... |
... |
Author(s)
Cai Li <cli9@ncsu.edu>
References
Cai Li, Luo Xiao, and Sheng Luo, 2020. Fast covariance estimation for multivariate sparse functional data. Stat, 9(1), p.e245, doi: 10.1002/sta4.245.
Examples
# See the examples for "mface.sparse".