Learn R Programming

sirt (version 1.5-0)

tetrachoric2: Tetrachoric Correlation Matrix

Description

This function estimates a tetrachoric correlation matrix according to the maximum likelihood estimation of Olsson (Olsson, 1979; method="Ol"), the Tucker method (Method 2 of Froemel, 1971; method="Tu") and Divgi (1979, method="Di"). In addition, an alternative non-iterative approximation of Bonett and Price (2005; method="Bo") is provided.

Usage

tetrachoric2(dat, method="Ol" , delta = 0.007, maxit = 1000000, cor.smooth=TRUE,
   progress=TRUE)

Arguments

dat
A data frame of dichotomous response
method
Computation method for calculating the tetrachoric correlation. The ML method is method="Ol" (which is the default), the Tucker method is method="Tu", the Divgi method is method="Di" the method of Bonett an
delta
The step parameter. It is set by default to $2^{-7}$ which is approximately .007.
maxit
Maximum number of iterations.
cor.smooth
Should smoothing of the tetrachoric correlation matrix be performed to ensure positive definiteness? Choosing cor.smooth=TRUE, the function cor.smooth from the psych package is used for obtaining a positive definite
progress
Display progress? Default is TRUE.

Value

  • A list with following entries
  • tauItem thresholds
  • rhoTetrachoric correlation matrix

References

Bonett, D. G., & Price, R. M. (2005). Inferential methods for the tetrachoric correlation coefficient. Journal of Educational and Behavioral Statistics, 30, 213-225. Divgi, D. R. (1979). Calculation of the tetrachoric correlation coefficient. Psychometrika, 44, 169-172. Froemel, E. C. (1971). A comparison of computer routines for the calculation of the tetrachoric correlation coefficient. Psychometrika, 36, 165-174. Olsson, U. (1979). Maximum likelihood estimation of the polychoric correlation coefficient. Psychometrika, 44, 443-460.

See Also

See also the tetrachoric function in the psych package and the function tet in the irtoys package. See polychoric2 for estimating polychoric correlations.

Examples

Run this code
#############################################################################
# EXAMPLE 1: data.read
#############################################################################

data(data.read)

# tetrachoric correlation from psych package
library(psych)
t0 <- psych::tetrachoric( data.read )$rho
# Olsson method (maximum likelihood estimation)
t1 <- tetrachoric2( data.read )$rho
# Divgi method
t2 <- tetrachoric2( data.read , method="Di"  )$rho
# Tucker method
t3 <- tetrachoric2( data.read , method="Tu" )$rho
# Bonett method
t4 <- tetrachoric2( data.read , method="Bo" )$rho

# maximum absolute deviation ML method
max( abs( t0 - t1 ) )
  ##   [1] 0.008224986
# mean absolute deviation Divgi method
max( abs( t0 - t2 ) )
  ##   [1] 0.1766688
# mean absolute deviation Tucker method
max( abs( t0 - t3 ) )
  ##   [1] 0.1766292
# mean absolute deviation Bonett method
max( abs( t0 - t4 ) )
  ##   [1] 0.05695522

Run the code above in your browser using DataLab