SLfit_wrapper: Wrapper for growthcurve SL function calls.

Description Usage Arguments

View source: R/modelingSL_main.R

Description

Predefine a wrapper for model fitting. This function returns a function that takes in two arguments: models and x. See the arguments models and x in fit_growth function for additional details.

Usage

1
2
SLfit_wrapper(method, fold_column = NULL, hold_column = NULL, data, ID,
  t_name, y)

Arguments

method

The type of model selection procedure when fitting several models. Possible options are "none" (no model selection), "cv" (model selection with V-fold cross-validation), and "holdout" (model selection based on validation holdout sample).

fold_column

The name of the column in the input data that contains the cross-validation fold indicators (must be an ordered factor).

hold_column

The name of the column that contains the holdout observation indicators (TRUE/FALSE) in the input data. This holdout column must be defined and added to the input data prior to calling this function.

data

Input dataset, can be a data.frame or a data.table.

ID

A character string name of the column that contains the unique subject identifiers.

t_name

A character string name of the column with integer-valued measurement time-points (in days, weeks, months, etc).

y

A character string name of the column that represent the response variable in the model.

nfolds

Number of folds to use in cross-validation.

hold_random

Logical, specifying if the holdout observations should be selected at random. If FALSE then the last observation for each subject is selected as a holdout.


osofr/growthcurveSL documentation built on May 24, 2019, 4:56 p.m.