zeitzeigerFitCv: Estimate time-dependent mean on cross-validation.

Description Usage Arguments Value See Also

View source: R/zeitzeiger_cv.R

Description

zeitzeigerFitCv calls zeitzeigerFit for each fold of cross-validation. By default, if a parallel backend is registered, this function processes the folds in parallel.

Usage

1
2
zeitzeigerFitCv(x, time, foldid, fitMeanArgs = list(rparm = NA, nknots = 3),
  dopar = TRUE)

Arguments

x

Matrix of measurements, with observations in rows and features in columns.

time

Vector of values of the periodic variable for the observations, where 0 corresponds to the lowest possible value and 1 corresponds to the highest possible value.

foldid

Vector of values indicating which fold each observation is in.

fitMeanArgs

List of arguments to pass to bigspline.

dopar

Logical indicating whether to process the folds in parallel. Use registerDoParallel to register the parallel backend.

Value

A list consisting of the result from zeitzeigerFit for each fold.

See Also

zeitzeigerFit, zeitzeigerSpcCv, zeitzeigerPredictCv


jakejh/zeitzeiger documentation built on Nov. 22, 2017, 2:06 a.m.