polychoric
s for the polytomous items, tetrachoric
s for the dichotomous items, and the polyserial
or biserial
correlations for the various mixed variables. Results include the complete correlation matrix, as well as the separate correlation matrices and difficulties for the polychoric and tetrachoric correlations.mixed.cor(x = NULL, p = NULL, d = NULL)
Item response analyses using irt.fa
may be done separately on the polytomous and dichotomous items in order to develop internally consistent scales. These scale may, in turn, be correlated with each other using the complete correlation matrix found by mixed.cor and using the score.items
function.
This function is not quite as flexible as the hetcor function in John Fox's polychor package.
Note that the variables must be organized by type of data: first continuous, then polytomous, then dichotomous.
polychoric
, tetrachoric
, score.items
data(bfi)
r <- mixed.cor(bfi[28],bfi[1:5],bfi[26])
round(r$rho,2)
#compare to raw Pearson
#note that the biserials and polychorics are not attenuated
rp <- cor(bfi[c(28,1:5,26)],use="pairwise")
round(rp,2)
Run the code above in your browser using DataCamp Workspace