plot_loe_ee {cities}R Documentation

plot_loe_ee

Description

Plots the lack of efficacy (LoE) and excess efficacy (EE) graphs

Usage

plot_loe_ee(
  mean_list,
  ref_grp,
  stdev_vec,
  p_loe_max,
  z_l_loe,
  z_u_loe,
  p_ee_max,
  z_l_ee,
  z_u_ee,
  up_good,
  greyscale,
  static_output = FALSE
)

Arguments

mean_list

List of vectors of means per arm

ref_grp

ID for pairwise comparisons, e.g. for three arms, if reference_id=1, then arms 2 and 3 will be compared only to arm 1

stdev_vec

Vector of standard deviations per arm. This is used to adjust the x-axis for display

p_loe_max

The maximum probability of discontinuing due to LoE

z_l_loe

The lower (or left) threshold of the LoE curve

z_u_loe

The upper (or right) threshold of the LoE curve

p_ee_max

The maximum probability of discontinuing due to EE

z_l_ee

The lower (or left) threshold of the EE curve

z_u_ee

The upper (or right) threshold of the EE curve

up_good

"Up" if higher outcome values indicate better responses and "Down" otherwise

greyscale

TRUE for greyscale setting and FALSE for color setting

static_output

TRUE, if static and FALSE if dynamic plot is requested

Value

The plot for LoE and EE.

Examples

total_data = 3
reference_id = 1
threshold = NA
timepoints = c(0,24,48,72,96,120,144)
IR_display = TRUE
delta_adjustment_in = c(0,1)

n_patient_ctrl = 120
n_patient_expt = 150
n_patient_vector = c(n_patient_ctrl, n_patient_expt)
n_total = sum(n_patient_vector)

mean_control = c(0,0,0,0,0,0,0)
mean_treatment = c(0,0.1,0.2,0.4,0.6,0.8,1)
mean_list = list(mean_control, mean_treatment)

sigma_ar_vec = c(1, 1)
pacf_list = list(c(-0.2, 0.4),
                 c(-0.2, 0.4))

beta_list = list(c(1.25, 1.25),
                 c(1.25, 1.25))
covariate_df = NA

# LoE & EE
up_good = "Up"
p_loe_max = 0.75
z_l_loe = -7
z_u_loe = -1
p_ee_max = 0.1
z_l_ee = 4
z_u_ee = 10

# Admin & AE

p_admin_ctrl = 0.02
p_admin_expt = 0.02
p_admin = c(p_admin_ctrl, p_admin_expt)

prob_ae_ctrl = 0.7
prob_ae_expt = 0.9
prob_ae = c(prob_ae_ctrl, prob_ae_expt)

rate_dc_ae_ctrl = 0.1
rate_dc_ae_expt = 0.1
rate_dc_ae = c(rate_dc_ae_ctrl, rate_dc_ae_expt)

starting_seed_val = 1
static_output = TRUE

mean_out = plot_means(n_patient_vector = n_patient_vector, timepoints = timepoints,
pacf_list = pacf_list, sigma_ar_vec = sigma_ar_vec, mean_list = mean_list,
beta_list = beta_list, reference_id = reference_id, seed_val = starting_seed_val,
total_data = total_data, threshold = threshold, covariate_df = covariate_df,
static_output = static_output)

plot_loe_ee (mean_list = mean_list, ref_grp = reference_id,
stdev_vec = sigma_ar_vec, p_loe_max = p_loe_max, z_l_loe = z_l_loe,
z_u_loe = z_u_loe, p_ee_max = p_ee_max, z_l_ee = z_l_ee, z_u_ee = z_u_ee,
up_good = up_good, greyscale = FALSE, static_output = static_output)

[Package cities version 0.1.3 Index]