poly.cor: Polyserial correlation

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

View source: R/poly.cor.R

Description

Polyserial correlation.

Usage

1
poly.cor(x, y)

Arguments

x

The continuous variable.

y

The ordinal variable, a numeric vector with numbers starting from 1.

Details

The polyserial correlation between a continuous and an ordinal variable is calculated. The function is not super fast, yet is faster than other implementations we found.

Value

A list including:

est

A vector with the polyserial correlation and its estimated variance.

test

A vector with the test statistic and its associated p-value.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>

References

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

See Also

correls, Table

Examples

1
2
3
x <- rnorm(100)
y <- rpois(100, 10) + 1
res<-poly.cor(x, y)

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.