You are on page 1of 12

Tuan

V. Nguyen
Senior Principal Research Fellow, Garvan Ins6tute of Medical Research
Professor, UNSW School of Public Health and Community Medicine
Professor of Predic6ve Medicine, University of Technology Sydney
Adj. Professor of Epidemiology and Biosta6s6cs,
School of Medicine Sydney, University of Notre Dame Australia

TDTU Workshop on Applied Data Analy6cs 23/12/2018 to 29/12/2018 © Tuan V. Nguyen


Package "likert"

•  Developed by Jason Bryer (jason.bryer.org/likert)


•  Can be used to produce aZrac6ve summaries and plots of one-sample or
one-way Likert data
•  Data must be in “wide” format
•  Sample sizes for each level of the factor variable must be equal
•  Can use NA values for missing observa6ons
Big Five Personality Test

•  Constructed with items from the Interna6onal Personality Item Pool


•  50 likert rated statements, gender, age, race, na6ve language, country
•  19719 par6cipants

R codes:
big5 = read.csv("~/Dropbox/_Conferences and Workshops/
TDTU 2018/Datasets/Big Five Personality Data.csv")
Big Five Personality Test

The items were rated on a five point scale where 1=Disagree, 3=Neutral, 5=Agree
(0=missed).
All were presented in the order E1, N2, A1, C1, O1, E2 ...
A1 I feel little concern for others.
A2 I am interested in people.
E1 I am the life of the party.
A3 I insult people.
E2 I don't talk a lot. A4 I sympathize with others' feelings.
E3 I feel comfortable around people. A5 I am not interested in other people's problems.
E4 I keep in the background. A6 I have a soft heart.
A7 I am not really interested in others.
E5 I start conversations.
A8 I take time out for others.
E6 I have little to say. A9 I feel others' emotions.
E7 I talk to a lot of different people at parties. A10 I make people feel at ease.
E8 I don't like to draw attention to myself.
C1 I am always prepared.
E9 I don't mind being the center of attention.
C2 I leave my belongings around.
E10 I am quiet around strangers. C3 I pay attention to details.
C4 I make a mess of things.
N1 I get stressed out easily. C5 I get chores done right away.
C6 I often forget to put things back in their proper place.
N2 I am relaxed most of the time.
C7 I like order.
N3 I worry about things. C8 I shirk my duties.
N4 I seldom feel blue. C9 I follow a schedule.
N5 I am easily disturbed. C10 I am exacting in my work.

N6 I get upset easily.


O1 I have a rich vocabulary.
N7 I change my mood a lot. O2 I have difficulty understanding abstract ideas.
N8 I have frequent mood swings. O3 I have a vivid imagination.
N9 I get irritated easily. O4 I am not interested in abstract ideas.
O5 I have excellent ideas.
N10 I often feel blue. O6 I do not have a good imagination.
O7 I am quick to understand things.
O8 I use difficult words.
O9 I spend time reflecting on things.
O10 I am full of ideas.
big5 = read.csv("~/Dropbox/_Conferences and Workshops/TDTU 2018/
Datasets/Big Five Personality Data.csv")

test = big5[, c("gender", "E1", "E2", "E3", "E4", "E5")]


test$E1 = as.factor(test$E1)
test$E2 = as.factor(test$E2)
test$E3 = as.factor(test$E3)
test$E4 = as.factor(test$E4)
test$E5 = as.factor(test$E5)

library(likert)
temp = likert(test[, c(2:6)])
summary(temp)
plot(temp)
plot(temp, type="heat", wrap = 50, text.size = 4)
likert.heat.plot(temp)
> temp = likert(test)
> summary(temp)
Item low neutral high mean sd
3 E3 24.75278 0 75.24722 4.416755 1.236820
5 E5 25.82788 0 74.17212 4.432223 1.282003
4 E4 31.35555 0 68.64445 4.152036 1.222822
2 E2 45.67169 0 54.32831 3.759724 1.313818
1 E1 46.46787 0 53.53213 3.628937 1.232565
> temp = likert(test)
> plot(temp)

E3 25% 75%

E5 26% 74%

E4 31% 69%

E2 46% 54%

E1 46% 54%

100 50 0 50 100
Percentage

0 2 4
Response
1 3 5
> temp = likert(test)
> plot(temp, type="heat", wrap = 50, text.size = 4)

E5 4.43 (1.3) 0.0051% 9.4224% 16.4004% 20.8936% 28.0744% 25.2041%

E4 4.15 (1.2) 0.0051% 10.3707% 20.9798% 27.8970% 24.5550% 16.1925%


Percent
100

75
E3 4.42 (1.2) 0.0051% 8.2002% 16.5475% 23.7588% 28.3382% 23.1503% 50

25

0
E2 3.76 (1.3) 0.0051% 21.4970% 24.1696% 23.6878% 18.1297% 12.5108%

E1 3.63 (1.2) 0.0051% 23.7284% 22.7344% 27.8767% 18.2109% 7.4446%

Mean (SD) 0 1 2 3 4 5
> temp = likert(test)
> plot(temp, type="density", facet = TRUE, bw = 0.5)

E1

E2

E3

E4

E5

0 (1) 1 (2) 2 (3) 3 (4) 4 (5) 5 (6)


Analysis by gender
test = big5[, c("gender", "E1", "E2", "E3", "E4", "E5")]
test$E1 = as.factor(test$E1)
test$E2 = as.factor(test$E2)
test$E3 = as.factor(test$E3)
test$E4 = as.factor(test$E4)
test$E5 = as.factor(test$E5)

library(likert)
temp = likert(test[, c(2:6)], grouping=test$gender)
summary(temp)
plot(temp)
plot(temp, type="heat", wrap = 50, text.size = 4)
E1
3 66% 34%
2 46% 54%
1 48% 52%
0 54% 46%

E2
3 25% 75%
2 50% 50%
1 39% 61%
0 38% 62%

E3
3 55% 45%
2 24% 76%
1 26% 74%
0 25% 75%

E4
3 22% 78%
2 33% 67%
1 29% 71%
0 33% 67%

E5
3 53% 47%
2 23% 77%
1 30% 70%
0 25% 75%
100 50 0 50 100
Percentage

0 2 4
Response
1 3 5

You might also like