View source: R/q.samp.size.p.R
q.samp.size.p | R Documentation |
Calculate sample size for comparing proportions based on pwr::pwr.2p.test
q.samp.size.p(p1=NULL, p2=NULL, dropout=0.2, arms=2, sig.level = 0.05 , power = 0.8, alternative = "two.sided")
p1 |
Proportion for the product/intervention of interest |
p2 |
Proportion for comparator/placebo |
dropout |
Dropout rate to be accounted for in sample size calculation. Default is 0.2 |
arms |
Number of armes in the planned study |
sig.level |
Significance level. Default is 0.05 |
power |
Power. Default is 0.8 |
alternative |
A charater string specifying the alternative hypothesis. Options: "two.sided" (default), "greater" or "less" (see pwr.2p.test) |
A list containing the ratio of proportions, number of completers per arm, total sample size per arm, total sample size for the study and number of study arms
Abdul Malik Sulley <asulley@uwo.ca> May 8, 2020
pwr.2p.test
p1 <- 0.8 p2 <- 0.5 q.samp.size.p(p1, p2, dropout=0.2, arms=2, sig.level = 0.05 , power = 0.8, alternative = "two.sided" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.