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) 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.

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 newdata

rand_eff

if calculate.scores in object is TRUE (typically TRUE), then predicted scores rand_eff$scores will be calculated.

...

...

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".

[Package mfaces version 0.1-4 Index]