Learn R Programming

mcradds (version 1.1.1)

size_corr: Sample Size for Testing Pearson's correlation

Description

[Experimental]

This function performs sample size computation for testing Pearson's correlation, using uses Fisher's classic z-transformation to normalize the distribution of Pearson's correlation coefficient.

Usage

size_corr(
  r1,
  r0,
  alpha = 0.05,
  power = 0.8,
  alternative = c("two.sided", "less", "greater")
)

Value

an object of size class that contains the sample size and relevant parameters.

Arguments

r1

(numeric)
expected correlation coefficient of the evaluated assay.

r0

(numeric)
acceptable correlation coefficient of the evaluated assay.

alpha

(numeric)
type-I-risk, \(\alpha\).

power

(numeric)
Power of test, equal to 1 minus type-II-risk (\(\beta\)).

alternative

(string)
string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

References

Fisher (1973, p. 199).

See Also

size_one_prop() size_ci_one_prop() size_ci_corr()

Examples

Run this code
size_corr(r1 = 0.95, r0 = 0.9, alpha = 0.025, power = 0.8, alternative = "greater")

Run the code above in your browser using DataLab