Description Usage Arguments Value Examples
The Bayesian RIR is a Bayesian view of the the Robustness of an Inference to Replacement proposed by Frank et al. (2021). Unlike the RIR, it takes the posterior expectation of the final quantity in the definition of the RIR. This is explained in more detail in a letter to the editor to Frank et al. (2021) in the Journal of Clinical Epidemiology.
1 2 3 4 5 6 7 | rir(
mat,
get.p = function(mat) fisher.test(mat)$p.value,
alpha = 0.05,
iters = 10000,
cl = NULL
)
|
mat |
a 2 x 2 contingency table of counts. The treatment should be on the first row and the event should be on the first column |
get.p |
a function which inputs a 2x2 matrix and outputs a p value (numeric) |
alpha |
a numeric for the significance threshold, by default 0.05 |
iters |
the number of monte carlo iterations, by default 10000 |
cl |
A parallel cluster to parellelize the monte carlo iterates, by default NULL |
a length 2 numeric vector, giving the conditional posterior mean number of replacements and the posterior probability of reversing not being possible
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.