add_holdout_ind: Define and fit growth models evaluated on holdout...

Description Usage Arguments Value

View source: R/utility_funs.R

Description

Define and fit growth models evaluated on holdout observations.

Usage

1
2
add_holdout_ind(data, ID, hold_column = "hold", random = TRUE,
  seed = NULL)

Arguments

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.

hold_column

A name of the column that will contain the the holdout indicators

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.

seed

Random number seed for selecting a random holdout.

Value

An input data with added holdout indicator column (TRUE for holdout observation indicator, FALSE for training observation indicator).


osofr/GriDiSL documentation built on May 24, 2019, 4:54 p.m.