power.proportions: Power calculations for proportion tests (two-sided)

Description Usage Arguments Examples

Description

Power calculations for proportion tests (two-sided)

Usage

1
2
power.proportions(n = NULL, h = NULL, power = NULL, sig.level = 0.05,
  type = c("two", "one", "unequal"), ratio = 1)

Arguments

n

Total number of observations

h

Effect size, Cohen's h

power

Power of test

sig.level

Significance level

type

Type of proportion tests, must be one of "one","two" (default), or "unequal". "one" means one sample proportion test. "two"/"unequal" means two sample (equal size/unequal size) proportion test.

ratio

The ratio of sample size 1 to sample size 2. Only will be used when 'type' is "unequal".

Examples

1
2
3
4
5
6
7
8
## one sample
power.proportions(n=600,h=0.3,type="one")

## two sample with same sample size
power.proportions(h=0.2,n=600)

## two sample with different sample size
power.proportions(h=0.2,n=1200,type="unequal",ratio=2)

powerAnalysis documentation built on May 2, 2019, 12:40 p.m.