Description Usage Arguments Examples

View source: R/borrow_simulate.r

borrow trial simulations for multiple subgroups using borrow method.

1 2 3 4 |

`resp` |
the response outcome or the true response rates in each basket. |

`is.resp.rate` |
the vector to indicate if the true_rate is response rate (FALSE means the resp value is response outcome) |

`size` |
the size of each basket. |

`name` |
the name of each basket. |

`drug_index` |
the index vector of the basket to be studied. |

`p0` |
the null response rate vector for the poster probability calculation (default 0.15). |

`num_sim` |
the number of simulationst (default 100). |

`shape1` |
the first shape parameter(s) for the prior of each basket (default 0.5). |

`shape2` |
the second shape parameter(s) for the prior of each basket (default 0.5). |

`prior` |
the matrix giving the prior inclusion probability for each pair of baskets. The default is on on the main diagonal and 0.5 elsewhere. |

`hpd_alpha` |
the highest posterior density trial significance. |

`alternative` |
the alternative case definition (default greater) |

`call` |
the call of the function (default NULL). |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# 6 baskets, each with enrollement size 5
trial_sizes <- rep(25, 6)
# The response rates for the baskets.
resp_rate <- 0.15
# The trials: a column of the number of responses and a column of the
# the size of each trial.
trials <- data.frame(
resprate = rep(0.15, 6),
size = trial_sizes,
name = letters[1:6]
)
borrow_simulate(trials$resprate, trials$size, trials$name, drug_index = 1:2)
``` |

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.