| pmrm_data | R Documentation |
Clean and annotate the data to prepare it for modeling.
pmrm_data(
data,
outcome,
time,
patient,
visit,
arm,
covariates = ~0,
subset = FALSE
)
data |
A |
outcome |
Character string, name of the column in the data
with the numeric outcome variable on the continuous scale.
Could be a clinical measure of healthy or of disease severity.
Baseline is part of the model, so the |
time |
Character string, name of the column in the data with the numeric time variable on the continuous scale. This time is the time since enrollment/randomization of each patient. A time value of 0 should indicate baseline. |
patient |
Character string, name of the column in the data
with the patient ID.
This vector could be a numeric, integer, factor, or character vector.
|
visit |
Character string, name of the column in the
data which indicates the study visit of each row.
This column could be a numeric, integer, factor, or character vector.
An ordered factor is highly recommended because |
arm |
Character string, name of the column in the
data which indicates the study arm of each row.
This column could be a numeric, integer, factor, or character vector.
An ordered factor is highly recommended because |
covariates |
Partial right-sided formula
of concomitant terms in the model
for covariate adjustment (e.g. by age, gender, biomarker status, etc.).
Usually does not include main variables such as the values of
The columns in the data referenced in the formula must not have any missing values. Set |
subset |
|
A tibble of class "pmrm_data"
with one row per patient visit.
Rows with missing outcomes are removed,
variables arm and visit are converted into ordered factors
(with minimum values at the control arm and baseline, respectively),
and then the rows are sorted by patient and visit.
The "labels" attribute is a named list with the values of arguments
outcome, time, visit, arm, and covariates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.