Polyserial correlation | R Documentation |
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@uoc.gr>
Olsson U., Drasgow F. and Dorans N. J. (1982). The polyserial correlation coefficient. Psychometrika, 47(3):337-347.
correls, Table
x <- rnorm(100)
y <- rpois(100, 10) + 1
res<-poly.cor(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.