Learn R Programming

rpsychi (version 0.3)

samplesize.h: Sample size estimation in the differences between proportions

Description

samplesize.h determines the sample size, when specified the effect size to be detected, desired statistical power, and significance level. samplesize.h always specifies two-sided test.

Usage

samplesize.h(delta, power = 0.8, sig.level = 0.05)

Arguments

delta
a numeric contains the effect size (Cohen's $h$) to be detected
power
a numeric contains the desired statistical power (default 0.80)
sig.level
a numeric contains the significance level (default 0.05)

Value

  • Return a numeric containing the appropriate sample size in each group.

encoding

UTF-8

References

Cohen J (1988). Statistical power analysis for the behavioral sciences (2nd ed). Hillsdale, NJ: Erlbaum.

See Also

ind.prop, ind.prop.second

Examples

Run this code
##Cohen (1988) ex.6.7
samplesize.h(delta=.20, power=.90, sig.level=.01)

##Cohen (1988) ex.6.8
samplesize.h(delta=.2828, power=.95, sig.level=.05)

Run the code above in your browser using DataLab