q.samp.size.p: Sample size for comparing proportions

View source: R/q.samp.size.p.R

q.samp.size.pR Documentation

Sample size for comparing proportions

Description

Calculate sample size for comparing proportions based on pwr::pwr.2p.test

Usage

q.samp.size.p(p1=NULL, p2=NULL, dropout=0.2, arms=2, 
               sig.level = 0.05 , power = 0.8, alternative = "two.sided")

Arguments

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)

Value

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

Author(s)

Abdul Malik Sulley <asulley@uwo.ca> May 8, 2020

See Also

pwr.2p.test

Examples

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" )

qwickmalik/qwickr documentation built on March 30, 2022, 2:59 p.m.