First of all, let me say this community is very helpful. As for my questions:
I have some data with likert responses 1-4 with 8 as I don't know and 9 as
I was able to replace my 8s and 9s with NAs using:
df %>% mutate_all(~ifelse(.x %in% c(8, 9), NA, .x))
and did that for each variable.
My problem now is that I have good looking data with
NAs, but I am trying to convert groups of variables into continuous scale items. For instance, ir1, ir2, and ir3, have Likert responses 1-4 to add up to
ir_scale ranging from 0 - 12. The issue is when I add them:
irscale <- df$ir1 + df$ir2 + df$ir3
Any row that had an
NA for the sum. e.g. 1+3+
NA , I want it to return 4.
I can't turn
NAs into 0 as I am going to use regressions later. Thoughts? Here is an example data set: