Learn R Programming

statpsych (version 1.7.0)

size.ci.prop.ps: Sample size for a paired-sample proportion difference confidence interval

Description

Computes the sample size required to estimate a population proportion difference with desired confidence interval precision in a paired-samples design. Set the proportion planning values to .5 for a conservatively large sample size. Set the phi correlation planning value to the smallest value within a plausible range for a conservatively large sample size.

Usage

size.ci.prop.ps(alpha, p1, p2, phi, w)

Value

Returns the required sample size

Arguments

alpha

alpha level for 1-alpha confidence

p1

planning value of proportion for measurement 1

p2

planning value of proportion for measurement 2

phi

planning value of phi correlation

w

desired confidence interval width

Examples

Run this code
size.ci.prop.ps(.05, .2, .3, .8, .1)

# Should return:
# Sample size
#         118


Run the code above in your browser using DataLab