I'm new to R and running into an error with the polychoric
function in the psych
package. I'm attempting to store the polychoric correlation matrix in a data frame from using the following syntax:
RPOL36 <- polychoric(norm.kdqol36,smooth=TRUE)
where norm.kdqol36
is a data frame with vectors of ordered variables, each with 5 levels (0, 25, 50, 75, 100). Here is an example:
0 25 50 75 100
11962 19953 4987 12998 8261
Despite each variable having 5 levels, I get this error:
Error in polychoric(norm.kdqol36, smooth = TRUE) : You have more than 8 categories for your items, polychoric is probably not needed
Could there be a formatting issue causing the polychoric
function to read my variables as having more than 5 categories?