make_histories | R Documentation |
This internal function applies the history functions to create new columns in an input data table containing new variables that are functions of the histories of existing variables in the dataset.
make_histories(
pool,
histvars,
histvals,
histories,
time_name,
t,
id,
max_visits,
baselags,
below_zero_indicator
)
pool |
Data table containing all information prior to time |
histvars |
List of vectors. The kth vector specifies the names of the variables for which the kth history function
in |
histvals |
List of length two. The first element is a numeric vector specifying the lags used in the model statements (e.g., if |
histories |
Vector of history functions to apply to the variables specified in |
time_name |
Character string specifying the name of the time variable in |
t |
Integer specifying the current time index. |
id |
Character string specifying the name of the ID variable in |
max_visits |
A vector of one or more values denoting the maximum number of times
a binary covariate representing a visit process may be missed before
the individual is censored from the data (in the observed data) or
a visit is forced (in the simulated data). Multiple values exist in the
vector when the modeling of more than covariate is attached to a visit
process. A value of |
baselags |
Logical scalar for specifying the convention used for lagi and lag_cumavgi terms in the model statements when pre-baseline times are not
included in |
below_zero_indicator |
Logical scalar indicating whether the observed data set contains rows for time |
No value is returned. The data table pool
is modified in place.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.