TetrachoricCorrelationMatrix {exametrika} | R Documentation |
Tetrachoric Correlation Matrix
Description
Calculates the matrix of tetrachoric correlations between all pairs of items. Tetrachoric Correlation is superior to the phi coefficient as a measure of the relation of an item pair. This function is applicable only to binary response data.
Usage
TetrachoricCorrelationMatrix(U, na = NULL, Z = NULL, w = NULL)
## Default S3 method:
TetrachoricCorrelationMatrix(U, na = NULL, Z = NULL, w = NULL)
## S3 method for class 'binary'
TetrachoricCorrelationMatrix(U, na = NULL, Z = NULL, w = NULL)
Arguments
U |
Either an object of class "exametrika" or raw data. When raw data is given,
it is converted to the exametrika class with the |
na |
Values to be treated as missing values. |
Z |
Missing indicator matrix of type matrix or data.frame. Values of 1 indicate observed responses, while 0 indicates missing data. |
w |
Item weight vector specifying the relative importance of each item. |
Value
A matrix of tetrachoric correlations with exametrika class. Each element (i,j) represents the tetrachoric correlation between items i and j. The matrix is symmetric with ones on the diagonal.
Note
This function is implemented using a binary data compatibility wrapper and will raise an error if used with polytomous data.
Examples
# example code
TetrachoricCorrelationMatrix(J15S500)