test_correlation {esci}R Documentation

Test a hypothesis about the strength of a Pearson's r correlation

Description

test_correlation is suitable for testing a hypothesis about a the strength of correlation between two continuous variables (designs in which Pearson's r is a suitable measure of correlation).

Usage

test_correlation(estimate, rope = c(0, 0), output_html = FALSE)

Arguments

estimate
  • An esci_estimate object generated by the estimate_r function

rope
  • A two-element vector defining the Region of Practical Equivalence (ROPE). Specify c(0, 0) to test a point null of exactly 0. Specify any two ascending values between -1 and 1 to test an interval null (e.g. c(.25, .45) to test the hypothesis that Pearson's r in the population (rho) is between .25 and .45).

output_html
  • TRUE to return results in HTML; FALSE (default) to return standard output

Details

This function can be passed an esci_estimate object generated by estimate_r().

It can test hypotheses about a specific value for the difference (a point null) or about a range of values (an interval null)

Value

Returns a list with 1-2 data frames

Examples

# example code
estimate <- esci::estimate_r(r = 0.536, n = 50)

# Test against a point null of exactly 0
test_correlation(estimate)

# Test against an interval null (-0.1, 0.1)
test_correlation(estimate, rope = c(-0.1, 0.1))



[Package esci version 1.0.2 Index]