Polychoric Correlation
This function estimates the polychoric correlation coefficient using maximum likelihood estimation (Olsson, 1979).
polychoric2(dat, maxiter=100, cor.smooth=TRUE, use_pbv=1, conv=1e-10, rho_init=NULL, weights=NULL) ## exported Rcpp function sirt_rcpp_polychoric2( dat, maxK, maxiter, use_pbv, conv, rho_init, weights)
dat |
A dataset with integer values 0,1,…,K |
maxiter |
Maximum number of iterations |
cor.smooth |
An optional logical indicating whether the polychoric correlation matrix should be smooth to ensure positive definiteness. |
use_pbv |
Integer indicating whether the pbv package is used
for computation of bivariate normal distribution. |
conv |
Convergence criterion |
rho_init |
Optional matrix of initial values for polychoric correlations |
weights |
Optional vector of sampling weights |
maxK |
Maximum number of categories |
A list with following entries
tau |
Matrix of thresholds |
rho |
Polychoric correlation matrix |
Nobs |
Sample size for every item pair |
maxcat |
Maximum number of categories per item |
Cox, D. R., & Wermuth, N. (1991). A simple approximation for bivariate and trivariate normal integrals. International Statistical Review, 59(2), 263-269.
Olsson, U. (1979). Maximum likelihood estimation of the polychoric correlation coefficient. Psychometrika, 44(4), 443-460. doi: 10.1007/BF02296207
See the psych::polychoric
function in the psych package.
For estimating tetrachoric correlations see tetrachoric2
.
############################################################################# # EXAMPLE 1: data.Students | activity scale ############################################################################# data(data.Students, package="CDM") dat <- data.Students[, paste0("act", 1:5 ) ] # tetrachoric correlation from psych package library(psych) t0 <- psych::polychoric(dat)$rho # Olsson method (maximum likelihood estimation) t1 <- sirt::polychoric2(dat)$rho # maximum absolute difference max( abs( t0 - t1 ) ) ## [1] 0.004102429
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.