Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Likert Package in R for analyzing real survey data

Tags:

r

I conducted a survey with 138 questions on it, of which only a few are likert type questions with some having different scales.

I have been trying to use the Likert package in R to analyze and graphically portray the data, however, I am seriously struggling to make sense of any of it.

I have gone through the "demos" which are only useful if you already know what is going on with the package. It doesn't explain any of the steps you have to take before being able to apply the likert package, what can actually be applied to the package, how you rename the variables etc.. All you get is a bunch of code and a rabbit hole to crawl down trying to figure it all out.

I have scoured google for a step by step guide to using the likert package but found nothing.

Can anyone please direct me to a guide or at least perhaps provide the steps I have to take with my dataframe before I can try to use the likert package?

I am hoping to fit a few of my columns(containing the likert responses) to stacked barplots using this package.

Once I figure out what exactly the Likert package will accept in terms of a cleaned up data frame, I should be able to follow the demo... maybe..

This is what I have done so far, based on my limited knowledge of R and trying to figure things out on my own.

   library(likert)
   library(dplyr)
   fdaff_likert <- select(f2f, RESPID, daff_rate)
   fdaff_likert <- data.frame(fdaff_likert)
   fdaff_likert <- likert(items=fdaff_likert[,2, drop = FALSE], nlevels = 5)

the output of my likert is:

summary(fdaff_likert)

       Item      low  neutral     high     mean       sd
1 daff_rate 9.977827 37.91574 52.10643 3.802661 1.302508

The plot, however, is all over the place.. (unordered)

plot (fdaff_likert)

Stacked Bar plot of performance of DAFF

The likert scale is out of order and not properly centered. In addition, how do I rename the y-axis to the question?

For later analysis, how can I break it up into the group levels (based on another column specifying a region in the original data frame?

like image 556
Chris Bova Avatar asked Jan 19 '18 12:01

Chris Bova


People also ask

How do you analyze a survey Likert scale?

A Likert scale is composed of a series of four or more Likert-type items that represent similar questions combined into a single composite score/variable. Likert scale data can be analyzed as interval data, i.e. the mean is the best measure of central tendency. use means and standard deviations to describe the scale.

How do I visualize Likert scale data in R?

To graph the data simply use the likert() function: likert(Item~., df, arg3,...) Where the Item is the column with the questions and the . means to sum each of the other columns for the graph.

How do I treat Likert scale data in R?

Likert data should be treated as ordinal data That is, 2 is equally between 1 and 3, and you could average 1 and 3 and the response would be 2.


1 Answers

library(likert)
set.seed(1)
n <- 138
# An illustrative example
fdaff_likert <- data.frame(
    RESPID=sample(1:5,n, replace=T), 
    daff_rate=factor(sample(1:5,n, replace=T), labels=c("Good","Neither","Poor","Very Good","Very Poor"))
)
fdaff_likert1 <- likert(items=fdaff_likert[,2, drop = FALSE], nlevels = 5)
# Plot with unordered categories
plot(fdaff_likert1)

enter image description here

# Reorder levels of daff_rate factor
fdaff_likert$daff_rate <- factor(fdaff_likert$daff_rate, 
                                 levels=levels(fdaff_likert$daff_rate)[c(5,3,2,1,4)])

fdaff_likert2 <- likert(items=fdaff_likert[,2, drop = FALSE], nlevels = 5)
# Plot with ordered categories
plot(fdaff_likert2)

enter image description here

Here is an illustrative example for creating a plot with grouped items.

set.seed(1)
fdaff_likert <- data.frame(
    country=factor(sample(1:3, n, replace=T), labels=c("US","Mexico","Canada")), 
    item1=factor(sample(1:5,n, replace=T), labels=c("Very Poor","Poor","Neither","Good","Very Good")),
    item2=factor(sample(1:5,n, replace=T), labels=c("Very Poor","Poor","Neither","Good","Very Good")),
    item3=factor(sample(1:5,n, replace=T), labels=c("Very Poor","Poor","Neither","Good","Very Good"))
)
names(fdaff_likert) <- c("Country", 
                         "1. I read only if I have to", 
                         "2. Reading is one of my favorite hobbies",
                         "3. I find it hard to finish books")

fdaff_likert3 <- likert(items=fdaff_likert[,2:4], grouping=fdaff_likert[,1])
plot(fdaff_likert3)

enter image description here

like image 103
Marco Sandri Avatar answered Sep 29 '22 07:09

Marco Sandri