size.cor: Sample size determination for testing Pearson's correlation...

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function performs sample size computation for testing Pearson's correlation coefficient based on precision requirements (i.e., type-I-risk, type-II-risk and an effect size).

Usage

1
2
3
size.cor(rho = NULL, delta,
         alternative = c("two.sided", "less", "greater"),
         alpha = 0.05, beta = 0.1, output = TRUE)

Arguments

rho

a number indicating the correlation coefficient under the null hypothesis, ρ.0.

delta

minimum difference to be detected, δ.

alternative

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

alpha

type-I-risk, α.

beta

type-II-risk, β.

output

logical: if TRUE, output is shown.

Value

Returns an object of class size with following entries:

call function call
type type of the test (i.e., correlation coefficient)
spec specification of function arguments
res list with the result, i.e., optimal sample size

Author(s)

Takuya Yanagida takuya.yanagida@univie.ac.at,

References

Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.

Rasch, D., Pilz, J., Verdooren, L. R., & Gebhardt, G. (2011). Optimal experimental design with R. Boca Raton: Chapman & Hall/CRC.

See Also

seqtest.cor, size.mean, size.prop, print.size

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#--------------------------------------
# H0: rho = 0.3, H1: rho != 0.3
# alpha = 0.05, beta = 0.2, delta = 0.2

size.cor(rho = 0.3, delta = 0.2, alpha = 0.05, beta = 0.2)

#--------------------------------------
# H0: rho <= 0.3, H1: rho > 0.3
# alpha = 0.05, beta = 0.2, delta = 0.2

size.cor(rho = 0.3, delta = 0.2, alternative = "greater", alpha = 0.05, beta = 0.2)


Search within the seqtest package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.