interval_2p: Sample Size for the confidence interval of the differnce of...

Description Usage Arguments Details Author(s) References

View source: R/interval_2p.R

Description

The $z$-based confidence interval is commonly used in estimating population mean using sample data. It is based on the Standard Normal distribution. interval_2p provides tools for calculating and illustrating the sample size requirement and other design factors associated with these intervals.

Usage

1
2
interval_2p(E = NULL, p1 = NULL, p2 = NULL, n = NULL, n1 = NULL,
  n2 = NULL, k = 0.5, alpha = 0.05)

Arguments

E

Margin of error for the difference of proportions

p1

Proportion observed in group 1.

p2

Proportion observed in group 2.

n

Total sample size for groups 1 and 2.

n1

Sample size for group 1.

n2

Sample size for group 2.

k

proportion of the total samples size n that consitutes n1. the default assumptions is that n1 = n2.

alpha

Significance level (or 1-confidence)

Details

This function is currently under development. I needed it for a study design.

This can be useful for designin equivalence trials. According to Schumi and Wittes, “Sometimes, the goal is not to show that the new treatment is better, but that the new treatment is 'equivalent' to the control...At the end of the trial, a CI is computed around the difference between two test statistics (equivalence trials typically use 90 the two treatments are called 'equivalent.'"

Author(s)

Benjamin Nutter

References

Jennifer Schumi and Janet T Wittes, “ Through the looking glass: understanding non-inferiority," _Trials_, 2011, 12:106.


nutterb/junkyard documentation built on May 24, 2019, 10:51 a.m.