Learn R Programming

rpsychi (version 0.3)

power.prop: Statistical power for differences between proportions

Description

This is an internal function. power.prop computes statistical power for differences between proportions.

Usage

power.prop(n, h = NULL, sig.level = 0.05, one.sided = FALSE, prop = NULL)

Arguments

n
a numeric vector (length(n) = 2) contains the sample size in each group
h
Cohen's $h$
sig.level
a numeric contains the significance level (default 0.05)
one.sided
nondirectional (one.sided = FALSE, default) or directional (one.sided = TRUE)
prop
...

Value

  • Return a numeric containing the statistical power.

encoding

UTF-8

References

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

Examples

Run this code
##Cohen (1988) ex.6.2
power.prop(h=.4, n=c(100,100), sig.level=0.05)

Run the code above in your browser using DataLab