Learn R Programming

rpsychi (version 0.3)

ind.prop.second: A Z test for the equality of two proportions using published work

Description

ind.prop.second conducts a Z test for the equality of two proportions using published work.

Usage

ind.prop.second(x, n, sig.level = 0.05, digits = 3)

Arguments

x
a numeric vector (length(x) = 2) contains the counts of successes
n
a numeric vector (length(n) = 2) contains the sample sizes
sig.level
a numeric contains the significance level (default 0.05)
digits
the specified number of decimal places (default 3)

Value

  • The returned object of ind.prop.second contains the following components:
  • samp.statreturns the proportions, sample sizes, and a effect size index (Cohen's $h$)
  • risk.differencereturns a risk difference, its' confidence interval, and standard error
  • risk.ratioreturns a risk ratio, its' confidence interval, and a standard error of a log-transformed risk ratio
  • odds.ratioreturns a odds ratio, its' confidence interval, and a standard error of a log-transformed odds ratio
  • powerreturns statistical power for detecting small ($h = 0.20$), medium ($h = 0.50$), and large ($h = 0.80$) population effect sizes

encoding

UTF-8

Details

This function conducts a Z test for the equality of two proportions using published work. Statistical power is calculated using the following specifications: (a) small ($h = 0.20$), medium ($h = 0.50$), and large ($h = 0.80$) population effect sizes, according to the interpretive guideline for effect sizes by Cohen (1992) (b) sample size specified by n (c) significance level specified by sig.level

References

Cohen J (1992) A power primer. Psychological Bulletin, 112, 155-159. Kline RB (2004) Beyond significance testing: Reforming data analysis methods in behavioral research. Washington: American Psychological Association.

See Also

ind.prop, samplesize.h

Examples

Run this code
##Kline (2004) Chapter 5
ind.prop.second(x=c(60, 40), n = c(100,100))

Run the code above in your browser using DataLab