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,smooth=TRUE, correct=TRUE,global=TRUE,
ncat=8, polycor=FALSE,use="pairwise",method="pearson",weight=NULL)
cor
function include "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs". The default here is "pairwise"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 may be organized by type of data: first continuous, then polytomous, then dichotomous. This is advantageous
polychoric
, tetrachoric
, score.items
, score.irt
data(bfi)
r <- mixed.cor(bfi[,c(1:5,26,28)])
r
#compare to raw Pearson
#note that the biserials and polychorics are not attenuated
rp <- cor(bfi[c(1:5,26,28)],use="pairwise")
lowerMat(rp)
Run the code above in your browser using DataLab