cvpredRisk {cvmaPLFAM}R Documentation

Output the prediction risks of the cross-validation model averaging (CVMA) method for partial linear functional additive models (PLFAMs)

Description

Calculate the estimated weights for averaging across all candidate models and the corresponding mean squared prediction error risk.

Usage

cvpredRisk(
  M,
  nump,
  numq,
  a2,
  a3,
  nfolds,
  X.train,
  ZZ.train,
  Y.train,
  X.pred,
  ZZ.pred,
  Y.pred,
  nbasis,
  tt
)

Arguments

M

The number of candidate models.

nump

The number of scalar predictors in candidate models.

numq

The number of funtional principal components (FPCs) in candidate models.

a2

The number of FPCs in each candidate model. See modelspec.

a3

The index for each component in each candidate model. See modelspec.

nfolds

The number of folds used in cross-validation.

X.train

The training data of scalar predictors.

ZZ.train

The training data of the functional predictor.

Y.train

The training data of response variable.

X.pred

The test data of scalar predictors.

ZZ.pred

The test data of the functional predictor.

Y.pred

The test data of response variable.

nbasis

The number of basis functions used for spline approximation.

tt

The vector of recording/measurement points for the functional predictor.

Value

A list of

cv

Mean squared error risk in training data set, produced by CVMA method.

ws

A vector of weights estimator.

predcv

Mean squared prediction error risk in test data set, produced by CVMA method.


[Package cvmaPLFAM version 0.1.1 Index]