define_tgrid: Define data with grids of time-points for growth curve...

Description Usage Arguments Value

View source: R/growthcurve_features.R

Description

Define data with grids of time-points for growth curve prediction

Usage

1
define_tgrid(dataDT, ID, t_name, y, tgrid, grid_size = 150)

Arguments

dataDT

Input data with all the relevant summaries that were used for modeling being already defined.

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.

tgrid

Specify the grid of time-points directly. If missing a subject-specific grid is defined based on the subject's follow-up range.

grid_size

How many time-points should be used in equally spaced grid? This argument is only used when tgrid is missing.

Value

A data.table of subject IDs and time-points, along with all the relevant subject specific curve summaries and predictors. In addition, the output dataset also contains an indicator column 'train_point', set to TRUE for all (ID,time-points) that also appear in the input data dataDT. That is 'train_point' indicates if the row might have been previously used for model training.


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