Skip to contents

Prepare monitored study data for monitoring and analysis

Usage

prepare_monitored_study_data(
  data,
  study_time,
  id_variable,
  covariates_variables,
  enrollment_time_variable,
  treatment_variable,
  outcome_variables,
  outcome_time_variables,
  observe_missing_times,
  outcomes_sequential = TRUE,
  time_to_event = FALSE
)

Arguments

data

A data.frame containing the baseline covariates, treatment assignment, randomization time, observed outcomes, and times of outcome assessments.

study_time

A numeric scalar indicating the time from study initiation to the export of the data (or latest observed event, such as randomization of participants or outcome ascertainment).

id_variable

A character scalar containing the column name of the study participant identifier.

covariates_variables

A character vector containing the column names of the covariates and outcomes observed prior to randomization.

enrollment_time_variable

A character scalar containing the column name of the enrollment/randomization time variable.

treatment_variable

A character scalar containing the column name of the binary treatment assignment variable.

outcome_variables

A character vector containing the column names of the outcomes observed after randomization.

outcome_time_variables

A character vector containing the column names of the observation times of outcomes observed after randomization.

observe_missing_times

A numeric vector containing the

outcomes_sequential

A logical scalar: are outcomes sequential in nature (e.g. a sequence of study visits) or not (e.g. times from randomization to different events)?

time_to_event

A logical scalar: are outcomes times from randomization to events (TRUE) or a continuous, binary, or ordinal outcome (FALSE)?

Value

a list containing the prepared data, the original data, and the variables specified above.

Examples

# To be added