Learn R Programming

sirt (version 1.5-0)

polychoric2: Polychoric Correlation

Description

This function estimates the polychoric correlation coefficient using maximum likelihood estimation (Olsson, 1979).

Usage

polychoric2(dat, maxiter = 100, cor.smooth = TRUE)

Arguments

dat
A dataset with integer values
maxiter
Maximum number of iterations
cor.smooth
An optional logical indicating whether the polychoric correlation matrix should be smooth to ensure positive definiteness.

Value

  • A list with following entries
  • tauMatrix of thresholds
  • rhoPolychoric correlation matrix
  • NobsSample size for every item pair
  • maxcatMaximum number of categories per item

References

Olsson, U. (1979). Maximum likelihood estimation of the polychoric correlation coefficient. Psychometrika, 44, 443-460.

See Also

See the polychoric function in the psych package. For estimating tetrachoric correlations see tetrachoric2.

Examples

Run this code
#############################################################################
# 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 <- polychoric2( dat )$rho
# maximum absolute difference
max( abs( t0 - t1 ) )
  ##   [1] 0.006914892

Run the code above in your browser using DataLab