polyserial_cor: Polyserial correlation

Description Usage Arguments Details Value References Examples

Description

Polyserial correlation coefficient is a correlation coefficient used when one variable is continuous and the other variable is dichotomous. Taken and adapted from psych::polyserial

Usage

1

Arguments

x

a numeric vector representing the continuous variable.

y

a numeric vector representing the dichotomous variable.

Details

The coefficient is calculated from

ρ = r_{xy} * √{(n - 1)/n} * s_y/∑{φ(τ)}

where

r_{xy}

is the coefficient of correlation of Pearson coefficient, S_y is the standard deviation of Y, and

φ(τ)

are the ordinates of the normal curve at the normal equivalent of the cut point boundaries between the item responses. This function was adapted from ltm_1.0 package.

Value

the value of the polyserial correlation.

References

U.Olsson, F.Drasgow, and N.Dorans (1982). The polyserial correlation coefficient. Psychometrika, 47:337-347.

Examples

1
2
3
4
5
6
7
## Not run: 
 x <- rnorm(100)
 y <- sample(1:5,100,replace=TRUE)
 cor(x, y) 
 polyserial_cor(x, y) 

## End(Not run)

SICSresearch/LatentREGpp documentation built on May 9, 2019, 11:13 a.m.