Skip to contents

Inputs are validated to ensure they produce the expected results when given as the input in simulate_trials(). Therefore, any arguments to this function can also be just a single value (except the arms argument), and this function will expand such single-valued arguments to be compatible with simulate_trials(). If arguments are named vectors, they must have exactly one value per arm, and the names must match those given in the arms.

Usage

setup_scenario(
  arms = NULL,
  n_patients = NULL,
  index_hrqol = NULL,
  first_hrqol = NULL,
  final_hrqol = NULL,
  acceleration_hrqol = NULL,
  mortality = NULL,
  mortality_dampening = NULL,
  mortality_trajectory_shape = NULL,
  prop_mortality_benefitters = NULL,
  sampling_frequency = NULL,
  verbose = TRUE
)

Arguments

arms

character vector with the names of the arms

n_patients

named integer (single value or named vector), number of patients

index_hrqol

numeric (single value or named vector), the HRQoL at index (= enrolment)

first_hrqol

numeric (single value or named vector), the HRQoL at ICU discharge in each arm

final_hrqol

numeric (single value or named vector), the HRQoL at end of follow-up in each arm

acceleration_hrqol

numeric (single value or named vector), relative acceleration of HRQoL improvement in each arm

mortality

numeric (single value or named vector) in [0, 1], the mortality in at end of follow-up, in each arm

mortality_dampening

numeric (single value or named vector), dampening effect on HRQoL at ICU discharge in patients who die before end of follow-up

mortality_trajectory_shape

character (single value or named vector), valid values are "exp_decay" (default), "linear", "constant", "reflected_exp_decay" and can differ across arms.

prop_mortality_benefitters

numeric (single value or named vector) [0, 1], the proportion of patients in each arm who are so-called mortality benefitters

sampling_frequency

integer (single value or named vector), span between HRQoL sampling from patients

verbose

single logical, should the function provide detailed output on validation results? Default: TRUE

Value

An object of class 'hrqolr_scenario' with validated inputs.