1

I've collected the data on participation and identity. I used a web-survey (via Google Forms), and there are some problems with data conversion for my regression...

My variable where I used the Likert Scale (strongly disagree - 1, strongly agree - 5) is a factor-level variable. My purpose is to convert it to numeric. For instance, the value «Согласен» should be assesed as 5, and so on.

I used droplevels() function to remove unused levels, then I used as.numeric(). But the problem is that the numeric levels do not correspond to Likert Scale. For example, due to alphabetic order in R, «Затрудняюсь ответить» (Difficult to answer) has the value 1. Which is methodologically wrong.

So, could anyone tell me hints how to convert my data properly, please?

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
rg4s
  • 811
  • 5
  • 22

1 Answers1

3

Making an example

levels <- as.factor(c("agree", "disagree", "strongly agree", "strongly disagree", "neutral"))

Factor levels are alphabetic, as indicated

[1] agree             disagree          strongly agree    strongly disagree
[5] neutral 

Relevel with factor

levels <- factor(levels, c("strongly disagree", "disagree", "neutral", "agree", "strongly agree"))

Convert to numeric with as.numeric

as.numeric(levels)
levels
[1] 4 2 5 1 3
Greg
  • 3,570
  • 5
  • 18
  • 31