Predict subject-specific curves based on a fit from "mface.sparse".
# S3 method for mface.sparse
predict(object, newdata, calculate.scores = T, ...)A "mface.sparse" fit
Input data
Predicted/estimated objects at the observation time points in newdata
if calculate.scores in object is TRUE (typically TRUE), then predicted scores rand_eff$scores will be calculated.
...
a fitted object from the R function "mface.sparse".
a list containing all functional outcomes. Each element is a data frame with three arguments:
(1) argvals: observation times;
(2) subj: subject indices;
(3) y: values of observations for each dimension.
NA values are allowed in "y" but not in the other two.
if TRUE, scores will be calculated.
further arguments passed to or from other methods.
Cai Li <cli9@ncsu.edu>
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.
Cai Li, Luo Xiao, and Sheng Luo, 2020. Fast covariance estimation for multivariate sparse functional data. Stat, 9(1), p.e245, tools:::Rd_expr_doi("10.1002/sta4.245").
# See the examples for "mface.sparse".
Run the code above in your browser using DataLab