Learn R Programming

rpsychi (version 0.3)

zero.r.test: A significance testing of a product moment correlation using individual data

Description

zero.r.test conducts a significance testing of a product moment correlation using individual data

Usage

zero.r.test(formula, data, sig.level = 0.05, digits = 3)

Arguments

formula
two-sided formula; the left-hand-side of which gives one dependent variable containing a numeric variable, and the right-hand-side of one independent variable containing a numeric variable
data
a data frame contains the variables in the fomrmula
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 zero.r.test contains the following components:
  • samp.statreturns the means and unbiased standard deviations
  • correlationreturns a product moment correlation, its' approximate confidence interval for population correlation, and standard error
  • powerreturns statistical power for detecting small ($r = 0.10$), medium ($r = 0.30$), and large ($r = 0.50$) population effect sizes

encoding

UTF-8

Details

This function conducts a significance testing of a product moment correlation using individual data. Statistical power is calculated using the following specifications: (a) small ($r = 0.10$), medium ($r = 0.30$), and large ($r = 0.50$) population effect sizes, according to the interpretive guideline for effect sizes by Cohen (1992) (b) sample size specified by data (c) significance level specified by sig.level

References

Cohen J (1992) A power primer. Psychological Bulletin, 112, 155-159.

See Also

zero.r.test.second, samplesize.r

Examples

Run this code
dat <- data.frame(x = c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1),
                  y = c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8))          
zero.r.test(y~x, data=dat)

Run the code above in your browser using DataLab