Hello I have a data.frame of 32 variables, all are ordered factors. str(dat) 
returns the following
'data.frame':   32 obs. of  43 variables:
 $ q1a: Ord.factor w/ 6 levels "Strongly Disagree"<..: 3 4 2 5 NA NA 5 5 3 5 ...
 $ q1b: Ord.factor w/ 6 levels "Strongly Disagree"<..: 3 NA 4 NA NA NA NA 5 4 4 
...
 $ q1c: Ord.factor w/ 6 levels "Strongly Disagree"<..: NA NA 5 5 NA 4 NA 5 NA 5 
...
 $ q1d: Ord.factor w/ 6 levels "Strongly Disagree"<..: 5 NA 5 NA NA 5 NA 5 NA 4 
...
 $ q1e: Ord.factor w/ 6 levels "Strongly Disagree"<..: 5 NA NA 5 5 NA NA 5 5 NA 
...
 $ q1f: Ord.factor w/ 6 levels "Strongly Disagree"<..: 4 5 5 5 5 5 5 4 5 5 ...

I'm trying to come up with a polychoric correlation matrix for these, and so I 
convert them to numeric values:
'data.frame':   32 obs. of  43 variables:
 $ q1a: num  3 4 2 5 NA NA 5 5 3 5 ...
 $ q1b: num  3 NA 4 NA NA NA NA 5 4 4 ...
 $ q1c: num  NA NA 5 5 NA 4 NA 5 NA 5 ...
 $ q1d: num  5 NA 5 NA NA 5 NA 5 NA 4 ...

and try: 
library(psych)
polychoric(values, na.rm=TRUE), but this returns the following error


The items do not have an equal number of response alternatives, global set to 
FALSE
Error in poly[1, ] : incorrect number of dimensions
In addition: Warning message:
In mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule,  :
  all scheduled cores encountered errors in user code

Can anyone provide any guidance?
Thanks, Simon Kiss

*********************************
Simon J. Kiss, PhD
Assistant Professor, Wilfrid Laurier University
73 George Street
Brantford, Ontario, Canada
N3T 2C9
Cell: +1 905 746 7606

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to