[R] Problem with fa.poly in "psych" package

Bryan J. Maloney maloneywriting at att.net
Mon Apr 2 15:40:43 CEST 2012


I am attempting to use the psych package to do EFA on a set of data that 
mixes dichotomous and 5-value "ordinal" variables. I tried using fa.poly 
with disappointing results.

When I use a data subset that consists solely of dichotomous or solely 
of 5-value variables, fa.poly works. However, when I have both variable 
types in the input, I always get the error "Error in tab * log(P) : 
non-conformable arrays". It doesn't matter how I subset or slice the 
data. I rescale the dichotomous data to be 0=1, 1=4 (4 is the highest 
value of the ordinal set). No dice. The problem only occurs, and always 
occurs, when I mix structurally dichotomous data with structurally 
ordinal data. I have tried making the data "ordered"--psych didn't like 
that at all, it wants numbers.

My command has always been "fa.poly(foo,nfactors=1)"

So, why does it work for only dichotomous data and only ordinal data, 
but not a mixture of dichotomous and ordinal data?
I have tried to sidestep this issue by generating a polychoric 
correlation matrix with the "polycor" package, but the same quirk 
appears. It works only when the 2-value and 5-value data are not combined.



More information about the R-help mailing list