0

I am trying to do a question analysis but using dimensions, for example:

Dimension 1

  • question 1(p1):
  • question 2(p2):
  • question 3(p3):

Dimension 2

  • question 4(p4):
  • question 5(p5):
  • question 6(p6):
  • question 7(p7):
require(tibble)
tb = tibble("p1" = factor(c(5, 1, 4, 3, 2, 4, 4, 4, 2, 5), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")), 
            "p2" = factor(c(1, 3, 2, 1, 1, 5, 3, 5, 5, 4), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")),
            "p3" = factor(c(3, 5, 3, 4, 3, 2, 1, 1, 1, 2), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")),
            "p4" = factor(c(1, 3, 5, 4, 1, 4, 2, 4, 5, 2), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")),
            "p5" = factor(c(5, 4, 2, 4, 2, 3, 2, 1, 3, 5), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")),
            "p6" = factor(c(2, 5, 1, 3, 4, 1, 3, 2, 2, 1), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")),
            "p7" = factor(c(2, 4, 5, 2, 5, 5, 3, 3, 1, 2), 
                          labels = c("totally disagree","disagreement","neutral","agree","totally agree")))

now I want to make a summary but by dimensions, is there a function in the likert library for this?

for example

> likert(summary = tb$results)
  Dimensions totally disagree     disagree  neutral      agree     totally agree
1  Dimension 1     17.69912       30.08850   44.24779   6.194690     1.769912
2  Dimension 2     23.89381       36.28319   30.08850   7.964602     1.769912

royer
  • 615
  • 1
  • 6
  • 19
  • Your `tb` is giving errors `rror in factor(sample(1:5, size = 10, replace = T), labels = c("totally disagree", : invalid 'labels'; length 5 should be 1 or 4` – akrun Nov 30 '20 at 23:54
  • @akrun sorry, the `sample` function generates random values but almost always the same values do not appear, I already corrected it – royer Dec 01 '20 at 01:18
  • What do you mean by dimensions here? Do you mean column or row wise? – Ronak Shah Dec 01 '20 at 08:36
  • @RonakShah hello, When I say dimensions I refer to the categories that have n questions, for example: a list of 3 questions related to the satisfaction of car A and another list of 4 questions related to the satisfaction of car B. But I want to know in general the car satisfaction A and B – royer Dec 01 '20 at 14:17

0 Answers0