Description Usage Arguments Value Examples
The first goal of a Learn-As-You-Go (LAGO) study is to identify the optimal intervention package while minimizing the cost of the intervention package subject to the probability of a desired binary outcome being above a given threshold. The current LAGO design considers a logistic regression model with linear cost coefficients. This function takes as input the vector of linear cost coefficients, the true/estimated beta values, the lower and upper limits for the components of the intervention package, the desired outcome goal and a starting value of the intervention package for the optimization algorithm and calculates the optimal intervention package.
1 2 3 4 5 6 7 8 9 10 11 |
cost |
a vector of linear cost coefficients |
beta |
a vector of true/estimated beta values |
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 |
starting.value |
a vector of starting values for the components of the intervention package |
pstar |
the desired outcome goal |
intercept |
a logical argument to include intercept in the model or not (default = TRUE) |
eps |
the desired level of tolerance (default = 1.0e-7) |
max_eval |
the maximum number of iterations to perform (default = 3000) |
The returned value is a named list containing
Optimum_Intervention |
the optimum intervention package |
Obtained_p |
the outcome goal under the optimal intervention package |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Defining vector of starting values for the algorithm
x.init = c(2.5, 12.5, 7)
# Defining vector of lower limits for the components
x.l = c(1, 10, 2)
# Defining vector of upper limits for the components
x.u = c(4, 15, 15)
# Defining vector of linear cost coefficients
cost_lin = c(1, 8, 2.5)
p_bar = 0.9 # Defining the desired outcome goal
# True beta values for the study
beta = c(log(0.05), log(1.2), log(1.1), log(1.3))
## Running the LAGO optimization algorithm
opt_lago = opt_int(cost = cost_lin, beta = beta, lower = x.l,
upper = x.u, pstar = p_bar, starting.value = x.init)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.