data-raw/CR_CRS_data_2t_lp.R

# CRS Model calibration data - Two target (Survival, PropSick) - Limited space
# Targets simulated using 10% of true parameters' values as the sd in a PSA
# analysis

## Targets:----
v_targets_names <- c(
  'Surv' = "Surv",
  'PropSick' = "PropSick")
v_targets_labels <- c(
  'Surv' = "Survival",
  'PropSick' = "Prevalence")
v_targets_axis <- list(
  'Surv' = list(
    'x' = "time",
    'y' = "value"),
  'PropSick' = list(
    'x' = "time",
    'y' = "value"))
v_targets_axis_labels <- list(
  'Surv' = list(
    'x' = "Time in years",
    'y' = "Proportion of cohort survived"),
  'PropSick' = list(
    'x' = "Time in years",
    'y' = "Proportion of cohort with cancer"))
v_targets_weights <- c(
  'Surv' = 1,
  'PropSick' = 1)
### Likelihood distributions:----
v_targets_dists <- c(
  'Surv' = "norm",
  'PropSick' = "norm")
### Load saved target data:----
data("CRS_targets_2")
### Pack targets distributions together:----
l_targets <-
  list('v_targets_names' = v_targets_names,
       'v_targets_labels' = v_targets_labels,
       'Surv' = CRS_targets_2$Surv,
       'PropSick' = CRS_targets_2$PropSick,
       'v_targets_axis' = v_targets_axis,
       'v_targets_axis_labels' = v_targets_axis_labels,
       'v_targets_dists' = v_targets_dists,
       'v_targets_weights' = v_targets_weights)

## Parameters:----
v_params_names <- c(
  'p_Mets' = "p_Mets",
  'p_DieMets' = "p_DieMets")
v_params_labels <- c(
  'p_Mets' = "Annual probability of getting cancer",
  'p_DieMets' = "Annual probability of dying from cancer")
v_params_tex_labels <- c(
  'p_Mets' = "\\textbf{p^{nC \\rightarrow C}}",
  'p_DieMets' = "\\textbf{p^{C \\rightarrow D}}")
v_params_true_values <- c(
  'p_Mets' = 0.10,
  'p_DieMets' = 0.05)
### Prior distributions:----
#### Distribution names:----
v_params_dists <- c(
  'p_Mets' = "unif",
  'p_DieMets' = "unif")
#### Distribution moments/parameters:----
args <- list(
  'p_Mets'    = list(min = 0.07, max = 0.16),
  'p_DieMets' = list(min = 0.03, max = 0.075))
### Parameter space bounds:----
extra_args <- list(
  'p_Mets'    = list(min = 0.07, max = 0.16),
  'p_DieMets' = list(min = 0.03, max = 0.075))
### Pack parameters information together:----
l_params <- list(
  'v_params_names' = v_params_names,
  'v_params_labels' = v_params_labels,
  'v_params_tex_labels' = v_params_tex_labels,
  'v_params_true_values' = v_params_true_values,
  'v_params_dists' = v_params_dists,
  'args' = args,
  'Xargs' = extra_args)

## Interventions:----
v_interv_names <- c(
  'None' = "None",
  'Medication' = "Medication",
  'Screening' = "Screening",
  'Both' = "Both")
v_interv_outcomes <- c(
  'costs' = "costs",
  'effects' = "Effects")
### Pack interventions information together:----
l_intervs <- list(
  'v_interv_names' = v_interv_names,
  'v_interv_outcomes' = v_interv_outcomes)

## Pack targets and parameters together:----
CR_CRS_data_2t_lp <- list(
  'l_params' = l_params,
  'l_targets' = l_targets,
  'l_intervs' = l_intervs)

## Save calibration data internally:----
usethis::use_data(
  CR_CRS_data_2t_lp,
  overwrite = TRUE)
W-Mohammed/calibrater documentation built on Oct. 14, 2023, 1:57 a.m.