Hi All,
I would like to ask for advice on how to perform Ordinal Logistic Regression in R using my created below dataframe:
My_OLR_dataframe <- structure(list(ID = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20), Group = c(1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2), Question_1 = c(4,
2, 3, 4, 1, 1, 2, 4, 4, 3, 2, 4, 1, 2, 3, 5, 3, 4, 2, 1), Question_2 = c(2,
4, 4, 1, 3, 2, 2, 4, 1, 3, 2, 5, 5, 3, 4, 1, 1, 2, 3, 2), Question_3 = c(2,
3, 1, 5, 5, 1, 1, 2, 5, 2, 1, 1, 4, 2, 5, 1, 3, 3, 4, 4), Question_4 = c(2,
1, 3, 3, 5, 4, 5, 5, 1, 3, 4, 1, 3, 5, 2, 4, 3, 1, 2, 1), Question_5 = c(4,
3, 4, 1, 4, 4, 3, 2, 4, 1, 1, 1, 4, 4, 3, 3, 3, 4, 1, 3), Question_6 = c(5,
2, 1, 4, 1, 2, 2, 2, 1, 2, 1, 4, 2, 4, 3, 4, 5, 3, 5, 1), Question_7 = c(1,
5, 4, 2, 1, 4, 2, 4, 3, 2, 2, 3, 3, 4, 4, 3, 4, 4, 4, 1), Question_8 = c(4,
1, 1, 1, 1, 4, 2, 1, 5, 2, 3, 4, 3, 1, 2, 2, 5, 4, 1, 2), Question_9 = c(2,
3, 1, 4, 4, 3, 5, 4, 1, 3, 2, 1, 5, 3, 3, 4, 1, 1, 1, 5), Question_10 = c(1,
2, 4, 4, 4, 3, 1, 2, 3, 1, 3, 2, 2, 2, 3, 3, 3, 5, 3, 3), Question_11 = c(3,
1, 3, 3, 5, 4, 2, 4, 1, 4, 5, 4, 1, 2, 2, 3, 2, 1, 2, 3), Question_12 = c(1,
1, 1, 5, 5, 3, 3, 3, 2, 3, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2), Question_13 = c(2,
5, 5, 1, 1, 3, 1, 4, 5, 1, 2, 4, 1, 3, 2, 5, 2, 5, 5, 5), Question_14 = c(4,
1, 4, 1, 3, 1, 5, 4, 3, 1, 3, 4, 1, 4, 5, 3, 1, 4, 2, 1), Question_15 = c(2,
4, 1, 3, 1, 2, 2, 3, 3, 1, 5, 2, 3, 5, 5, 2, 2, 1, 2, 3)), row.names = c(NA,
-20L), class = c("tbl_df", "tbl", "data.frame"))
> aaa <- structure(list(ID = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20), Group = c(1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2), Question_1 = c(4,
+ 2, 3, 4, 1, 1, 2, 4, 4, 3, 2, 4, 1, 2, 3, 5, 3, 4, 2, 1), Question_2 = c(2,
+ 4, 4, 1, 3, 2, 2, 4, 1, 3, 2, 5, 5, 3, 4, 1, 1, 2, 3, 2), Question_3 = c(2,
+ 3, 1, 5, 5, 1, 1, 2, 5, 2, 1, 1, 4, 2, 5, 1, 3, 3, 4, 4), Question_4 = c(2,
+ 1, 3, 3, 5, 4, 5, 5, 1, 3, 4, 1, 3, 5, 2, 4, 3, 1, 2, 1), Question_5 = c(4,
+ 3, 4, 1, 4, 4, 3, 2, 4, 1, 1, 1, 4, 4, 3, 3, 3, 4, 1, 3), Question_6 = c(5,
+ 2, 1, 4, 1, 2, 2, 2, 1, 2, 1, 4, 2, 4, 3, 4, 5, 3, 5, 1), Question_7 = c(1,
+ 5, 4, 2, 1, 4, 2, 4, 3, 2, 2, 3, 3, 4, 4, 3, 4, 4, 4, 1), Question_8 = c(4,
+ 1, 1, 1, 1, 4, 2, 1, 5, 2, 3, 4, 3, 1, 2, 2, 5, 4, 1, 2), Question_9 = c(2,
+ 3, 1, 4, 4, 3, 5, 4, 1, 3, 2, 1, 5, 3, 3, 4, 1, 1, 1, 5), Question_10 = c(1,
+ 2, 4, 4, 4, 3, 1, 2, 3, 1, 3, 2, 2, 2, 3, 3, 3, 5, 3, 3), Question_11 = c(3,
+ 1, 3, 3, 5, 4, 2, 4, 1, 4, 5, 4, 1, 2, 2, 3, 2, 1, 2, 3), Question_12 = c(1,
+ 1, 1, 5, 5, 3, 3, 3, 2, 3, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2), Question_13 = c(2,
+ 5, 5, 1, 1, 3, 1, 4, 5, 1, 2, 4, 1, 3, 2, 5, 2, 5, 5, 5), Question_14 = c(4,
+ 1, 4, 1, 3, 1, 5, 4, 3, 1, 3, 4, 1, 4, 5, 3, 1, 4, 2, 1), Question_15 = c(2,
+ 4, 1, 3, 1, 2, 2, 3, 3, 1, 5, 2, 3, 5, 5, 2, 2, 1, 2, 3)), row.names = c(NA,
+ -20L), class = c("tbl_df", "tbl", "data.frame"))
which (partially) presents in View() like this:
I have two groups to compare: 1 and 2 - and each participant answered 15 questions based on Likert 5 item data (measured from 1 to 5).
These go as follows: 1=very bad, 2=bad, 3=neutral, 4=good, 5=very good.
I have read in many places that OLR would be good choice.
How to get it done in R ?
Any help will be greatly appreciated.
Thanks.