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

1
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)

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

Value

The returned object of zero.r.test contains the following components:

samp.stat

returns the means and unbiased standard deviations

correlation

returns a product moment correlation, its' approximate confidence interval for population correlation, and standard error

power

returns statistical power for detecting small (r = 0.10), medium (r = 0.30), and large (r = 0.50) population effect sizes

Author(s)

Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp

References

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

See Also

zero.r.test.second, samplesize.r

Examples

1
2
3
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.