PhiCoefficient: Phi-Coefficient
Description
The phi coefficient is the Pearson's product moment correlation coefficient
between two binary items. This function is applicable only to binary response data.
The coefficient ranges from -1 to 1, where 1 indicates perfect positive correlation,
-1 indicates perfect negative correlation, and 0 indicates no correlation.
Usage
PhiCoefficient(U, na = NULL, Z = NULL, w = NULL, ...)
Value
A matrix of phi coefficients with exametrika class.
Each element (i,j) represents the phi coefficient between items i and j.
The matrix is symmetric with ones on the diagonal.
Arguments
- U
U is a data matrix of the type matrix or data.frame.
- na
na argument specifies the numbers or characters to be treated as missing values.
- Z
Z is a missing indicator matrix of the type matrix or data.frame
- w
w is item weight vector
- ...
Internal parameters for maintaining compatibility with the binary data
processing system. Not intended for direct use.
Examples
Run this code# example code
# Calculate Phi-Coefficient using sample dataset J15S500
PhiCoefficient(J15S500)
Run the code above in your browser using DataLab