0

I have a small dataset in R where binary and likert (0-4) items have been combined. The binary items were recoded to likert where 1 > 0 and 2 > 4. I am attempting to run polychoric correlation (r package: psych) and ordinal alpha on these data, however, I receive errors because my binary items are not consecutive in nature.

I am looking for a way to tell R that the range of possible values for my variables is 0-4, despite the fact that none of my respondents selected values 1-3 for these items so I can run the ordinal alpha on the dataset. Our PI has already considered whether it is better to separate the binary items into their own subscales; this will not be sufficient for our purposes.

Thank you for whatever insight you can provide!

EDIT: Example included.

DATA:

    q1 <- c(4,2,0,1,3)
    q2 <- c(1,4,2,3,0)
    q3 <- c(0,4,4,0,4)
    q4 <- c(0,4,4,0,4)
    q5 <- c(4,0,4,4,4)
    data <- data.frame(q1,q2,q3,q4,q5)

PACKAGES:

library(psych) library(GPArotation)

POLYCOR:

polychoric(data)

POLYCOR OUTPUT:

Call: polychoric(x = data) Polychoric correlations q1 q2 q3 q4 q5
q1 1.0
q2 -0.4 1.0
q3 NA NA 1.0
q4 NA NA NA 1.0
q5 NA NA NA NA 1.0

with tau of 0 1 2 3 q1 -0.84 -0.25 0.25 0.84 q2 -0.84 -0.25 0.25 0.84 q3 -0.25 -0.25 -0.25 -0.25 q4 -0.25 -0.25 -0.25 -0.25 q5 -0.84 -0.84 -0.84 -0.84 There were 50 or more warnings (use warnings() to see the first 50)

Warning messages: 1: In optimize(polyF, interval = c(-1, 1), rc = taux, cc = tauy, ... : NA/Inf replaced by maximum positive value (all 50 are identical).

CREATE POLYCOR MATRIX:

datmtx <- polychoric(data)

Polycor matrix result:

Warning messages: 1: In optimize(polyF, interval = c(-1, 1), rc = taux, cc = tauy, ... : NA/Inf replaced by maximum positive value

ALPHA:

alpha(datmtx$rho)

Likely variables with missing values are q3 q4 q5
Error in principal(x) : I am sorry: missing values (NAs) in the correlation matrix do not allow me to continue. Please drop those variables and try again.

mstager
  • 1
  • 2
  • 2
    Hi, welcome to Stack. Could you maybe [provide a reproducible example](http://stackoverflow.com/a/5963610/5805670)? This means: some (fake) data to work with, the code that you used, and the error that follows from that. It's easier to help if we can see what exactly you have tried. – slamballais Apr 05 '16 at 20:23
  • I don't use that package, but perhaps you should be setting levels on an ordered factor – Frank Apr 05 '16 at 20:24
  • I've been having a similar issue (which I explain in my post [here](http://ttps://stat.ethz.ch/pipermail/r-help//2012-October/336654.html)). As I write there, The *only* potential solution I've found is in [a thread](http://stats.stackexchange.com/questions/219350/ordinal-alpha-reliability-is-re-ranking-appropriate) with someone else with a very similar issue. From what I understand, what the statistician (John Fox, Dep. Sociology, McMaster University) suggests is re-ranking responses: For example, if respondents don't respond '3' but respond 1,2,and 4, then responses with '4' would be re-code – Benjamin Jun 19 '16 at 18:10

0 Answers0