Skip to contents

A function to choose optimal number of eigenfunctions via Cross-Validation

Usage

cvfunOnFun(seed, predictor, response, actual, folds = 10)

Arguments

seed

Seed for reproducibility

predictor

An object of class irregMFPCA corresponding to the predictor

response

An object of class irregMFPCA corresponding to the response

actual

A data frame with the actual values of the response

folds

Number of folds for cross-validation. Default is 10

Value

A matrix of mean squared errors for each combination of number of eigenfunctions