polyserial.cor: Polyserial correlation

Description Usage Arguments Details Value References Examples

View source: R/exploratory.R

Description

Polyserial correlation coefficient is a correlation coefficient used when one variable is continuous and the other variable is dichotomous.

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
 x <- rnorm(100)
 y <- sample(1:5,100,replace=TRUE)
 cor(x, y) 
 polyserial.cor(x, y) 

Example output

[1] 0.04305512
           [,1]
[1,] 0.04597875

IRTpp documentation built on May 29, 2017, 9:58 a.m.