propind: Compute power for Tests of Two Independent Proportions Takes...

View source: R/propind.R

propindR Documentation

Compute power for Tests of Two Independent Proportions Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user This test uses what is sometimes called the chi-square test for comparing proportions

Description

Compute power for Tests of Two Independent Proportions Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user This test uses what is sometimes called the chi-square test for comparing proportions

Usage

propind(p1, p2, nlow, nhigh, nratio = 0.5, alpha = 0.05, tails = 2, by = 1)

Arguments

p1

expected proportion Group 1

p2

expected proportion Group 2

nlow

starting sample size

nhigh

ending sample size

nratio

ratio of sample size of first group to second (default is .5 for equally sized groups)

alpha

Type I error (default is .05)

tails

number of tails for test (default is 2)

by

Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14)

Value

Power for Tests of Two Independent Proportions

Examples

propind(p1=.62, p2=.55,nlow=200,nhigh=2500, by=100,nratio=.2)

pwr2ppl documentation built on Sept. 6, 2022, 5:06 p.m.