Description Usage Arguments Value Examples

Simulate a GIA model with an assumed error structure

1 2 3 4 5 6 7 8 9 10 11 12 | ```
simulate_coverage(
n_sims = 10,
n_boot = 100,
verbose = TRUE,
experimental_grid,
model_par,
alpha = 0.05,
noise_par = c(a0 = 2, a1 = 0.01),
GIA_fn = base_GIA,
S_fn = calc_S_base,
fn_list = NULL
)
``` |

`n_sims` |
number of coverage simulations |

`n_boot` |
number of bootstraps to use in each simulation |

`verbose` |
logical indicating whether we should use print statements. Default is TRUE |

`experimental_grid` |
data frame with columns 'dose_A' and 'dose_B' |

`model_par` |
named vector of parameters corresponding to those used in GIA_fn() |

`alpha` |
alpha level used to produce confidence intervals for each bootstrap |

`noise_par` |
named vector for the noise parameter. Must have names "a0" and "a1". See |

`GIA_fn` |
function used to calculate GIA. Default is base_GIA(). |

`S_fn` |
function to calculate S |

`fn_list` |
additional parameters to pass to GIA_fn |

list with the following entries

- interaction_cov
This is the percent of times 0 was in the (1-alpha)% confidence interval for the interaction term "tau_1" from the simulated results

- params_cov
This is the percent of times the true model parameter (those from model_par) lies in the (marginal) 95% confidence interval for that model parameter.

- tau_pos
This is the percent of times the (1-alpha)% CI of "tau_1" was completely above 0.

- tau_neg
This is the percent of times (1-alpha)% CI of "tau_1" is completely below zero

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
df <- loewesadditivity::cyrpa_ripr
df$dose_A <- df$CyRPA
df$dose_B <- df$RIPR
data <- fortify_gia_data(df)
model_params <- c("beta_A" = .247, "beta_B" = .224,
"gamma_A" = .734, "gamma_B" = .806,
"tau_1" = .28, "tau_2" = -.28)
experimental_grid <- make_grid(par = model_params,
n = 5)
n_boot <- 100
n_sims <- 10
GIA_fn <- base_GIA
S_fn <- calc_S_base
fn_list <- NULL
alpha <- .05
verbose <- TRUE
## NOT RUN
##out <- simulate_coverage(n_sims = n_sims,
## n_boot = n_boot,
## verbose = TRUE,
## experimental_grid = experimental_grid,
## model_par = model_params,
## alpha = .05,
## noise_par = c("a0" = 3, "a1" = .01),
## GIA_fn = base_GIA,
## fn_list = NULL)
##out
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.