FormatData | R Documentation |
Format Data
FormatData(
data,
arm_name = "arm",
cens_after_last = TRUE,
covars = NULL,
idx_name = "idx",
status_name = "status",
strata = NULL,
time_name = "time",
weights = NULL
)
data |
Data.frame. |
arm_name |
Name of column containing treatment arm. Must be coded as 1 for treatment, 0 for reference. |
cens_after_last |
Should subjects who lack an explicit censoring time be censored after their last observed event? |
covars |
Optional covariate matrix. Rows should correspond with the subject index 'idx'. Factor and interaction terms should be expanded. |
idx_name |
Name of column containing a unique subject index. |
status_name |
Name of column containing the status. Must be coded as 0 for censoring, 1 for event, 2 for death. Each subject should have an observation-terminating event, either censoring or death. |
strata |
Optional stratification factor. Should not be provided if a covariate matrix is provided. |
time_name |
Name of column containing the observation time. |
weights |
Optional column of weights. |
Formatted data.frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.