plam.fit {cvmaPLFAM}R Documentation

Fitting partial linear functional additive model

Description

Calculate the prediction values and prediction errors across all candidate models.

Usage

plam.fit(
  M,
  nump,
  numq,
  a3,
  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.

a3

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

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

muhat.train

A matrix of prediction values on training data set for M candidate models.

ehat.train

A matrix of prediction errors on training data set for M candidate models.

muhat.pred

A matrix of prediction values on test data set for M candidate models.

prederr

A matrix of prediction errors on test data set for M candidate models.

edf

A vector of effective degree of freedom for M candidate models.


[Package cvmaPLFAM version 0.1.1 Index]