mc_lago: Optimum interventions under the multi center LAGO design

Description Usage Arguments Value Examples

View source: R/multi_center_lago.R

Description

This function takes as input several study design parameters of a multi-stage, multi-center per stage LAGO design and provides the estimated optimal intervention package through simulations. For simplicity, this function assumes an equal number of centers per stage and equal number of samples per center in each stage. The required parameters that need to be supplied to the function are an initial starting intervention package which is optimized over the stages, the lower and upper limits for the components of the intervention package, the true or best guess beta values, number of stages K, number of centers per stage J, sample size per center per stage n, the unit costs for the intervention package components and the desired outcome goal for the LAGO study. Since this function returns the estimated optimal interventions through simulations, this function also needs as input the expected variation among the subjects within and between the centers at any stage.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
mc_lago(
  x0,
  lower,
  upper,
  nstages,
  centers,
  beta.true,
  sample.size,
  icc,
  cost.vec,
  prob,
  intercept = TRUE,
  B = 100
)

Arguments

x0

a vector of starting values for the components of the intervention package

lower

a vector providing the values of lower limits for the components of the intervention package

upper

a vector providing the values of upper limits for the components of the intervention package

nstages

the number of stages of the LAGO design K (>=2)

centers

the number of centers per stage of the LAGO design

beta.true

a vector of true i.e. population beta values

sample.size

sample size (n) in each center of each of the K stages

icc

the expected variation among subjects within and between the centers at any stage

cost.vec

a vector of per unit linear cost coefficients

prob

the desired outcome goal

intercept

a logical argument to include intercept in the model or not (default = TRUE)

B

the number of simulations (default = 100)

Value

The returned value is a named list containing

xopt

a dataframe containing the stage-wise estimated optimum intervention package obtained by considering the median over the given number of simulations

p.opt.hat

a vector containing the stage-wise estimated success probabilities, i.e. the success probabilities corresponding to the estimated optimal intervention package by considering the median over simulations

power

the estimated power of the Naive Wald test for no intervention effect after the end of the study

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
x.init = c(2.5, 12.5, 7) # Initial value interventions
x.l = c(1, 10, 2) # Lower limits for X
x.u = c(4, 15, 15) # Upper limits for X
njk = 20 # Sample size per center per stage
K = 3 # Number of stages
J = 3 # Number of centers per stage
cost_lin = c(1, 8, 2.5) # Costs
p_bar = 0.9 # Desired outcome goal
# True/best guess beta values
beta = c(log(0.05), log(1.2), log(1.1), log(1.3))

sim_mc <- mc_lago(x0 = x.init, lower = x.l, upper = x.u,
                  beta.true = beta, nstages = K,
                  centers = J, sample.size = njk,
                  icc = 0.1, prob = p_bar,
                  cost.vec = cost_lin)

Arhit-Chakrabarti/logisticLAGO documentation built on Dec. 17, 2021, 9:43 a.m.