View source: R/farrington-manning.R
farrington_manning_chan_pval | R Documentation |
P value based on Chan's exact method
farrington_manning_chan_pval(x1, x2, n1, n2, delta, p2_search)
x1 |
number of response in group 1 |
x2 |
number of response in group 2 |
n1 , n2 |
number of subjects in group 1 and group 2, respectively |
delta |
non-inferiority margin |
p2_search |
search grid for p2, ranging from 0 to 1 |
Calculating p values for based on Chan's exact method. max(p_exact) is the corresponding p-value
a tibble, each row represents a p2 and corresponding p value
chan1998exactr4ct
# this is the example given by Chan's 1998 paper (see figure 4)
x1 = 69; x2 = 83; n1 = 76; n2 = 88; delta = 0.1;
p2_search <- seq(0.01, 0.9, by = 0.001)
pval <- farrington_manning_chan_pval(x1, x2, n1, n2, delta = delta,
p2_search = p2_search)
max(pval$p_exact)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.