Polyserial correlation
Polyserial correlation.
poly.cor(x, y)
x |
The continuous variable. |
y |
The ordinal variable, a numeric vector with numbers starting from 1. |
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.
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. |
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr>
Olsson U., Drasgow F. and Dorans N. J. (1982). The polyserial correlation coefficient. Psychometrika, 47(3):337-347.
x <- rnorm(100) y <- rpois(100, 10) + 1 res<-poly.cor(x, y)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.