Skip to contents

Returns the point-biserial correlation and p-value for two variables (one being dichotomous) using a user-specified correlation metric. P-values are estimated analytically, not via permutation-testing.

Usage

get.biserial.p.and.corr(x, y, alternative = 'two.sided');

Arguments

x

Vector of numbers to analyze. Variable must be dichotomous

y

Vector of numbers to analyze

alternative

What is the null-hypothesis?

Value

Returns a two-element vector containing the point-biserial correlation and its p-value.

Author

Paul C. Boutros & Dorota Sendorek

Examples

get.biserial.p.and.corr(
  x = sample(c(0:1), 10, replace= TRUE),
  y = runif(10)
  );
#> [1] -0.06302878  0.86267096