visualización y análisis de escalas likert - viii...
Post on 12-Jul-2020
9 Views
Preview:
TRANSCRIPT
Visualización y análisis de escalas LikertVIII Jornadas de Usuarios de R
Antonio J. Perán Orcajada (antoniojose.peran@um.es)
Sección de Apoyo Estadístico, Servicio de Apoyo a la Investigación, Universidad de Murcia
17 de noviembre de 2016, Albacete
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 1 / 31
Variables ordinales discretas o de tipo Likert
Variables ordinales discretas o de tipo Likert
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 2 / 31
Variables ordinales discretas o de tipo Likert
Miscelánea
Las variables ordinales discretas más ampliamente utilizadas son lasescalas Likert, cuyo nombre se debe al educador y psicólogo RensisLikert, quien publicó en 1932 un informe donde describía su uso.Son ampliamente utilizadas en psicología y las ciencias sociales debidoa su sencillez y fácil construcción.Se ha comprobado empíricamente que declararse de acuerdo concualquier enunciado de tipo Likert, implica un menor esfuerzo psíquicopor parte del entrevistado.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 3 / 31
Variables ordinales discretas o de tipo Likert
Qué vamos a ver
El paquete likert.La función plot.likert.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 4 / 31
El paquete likert
El paquete likert
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 5 / 31
El paquete likert
El paquete likert
Description: Functions to analyze and visualize likert type items.
Date: 2015-12-14
Author: Jason Bryer jason@bryer.org, Kimberly Speerschneiderkimkspeer@gmail.com
Maintainer: Jason Bryer jason@bryer.org
URL: http://jason.bryer.org/likert,http://github.com/jbryer/likert
License: GPL
Depends: R (>= 3.0), ggplot2, xtable
Imports: psych, reshape2, gridExtra, grid, plyr
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 6 / 31
El paquete likert
Instalación
Puede instalarse haciendo uso del paquete devtools que debemos haberinstalado previamente.
require(devtools)install_github('likert', 'jbryer')
A continuación podemos cargarlo haciendo simplemente
library(likert)
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 7 / 31
El paquete likert
pisaitems
Datos procedentes del Informe PISA de 2009 realizado con estudiantesnorteamericanos, es decir, estudiantes de México, Canadá y EEUU.Este informe suele realizarse cada 3 años por engargo de la OCDE.La primera columna de la matriz de datos recoge el país en el que elestudiante está recibiendo su educación al momento de realizar elinforme.Para el ejemplo, utilizaremos los once primeros ítems de la encuesta,que se responden con uno de estos cuatro niveles: Stronglydisagree, Disagree, Agree, Strongly agree.El dataframe que contiene estos datos se encuentra en paquetelikert.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 8 / 31
El paquete likert
pisaitems
Los enunciados de los once items que usaremos son:
[1] "1. I read only if I have to."[2] "2. Reading is one of my favorite hobbies."[3] "3. I like talking about books with other people."[4] "4. I find it hard to finish books."[5] "5. I feel happy if I receive a book as a present."[6] "6. For me, reading is a waste of time."[7] "7. I enjoy going to a bookstore or a library."[8] "8. I read only to get information that I need."[9] "9. I cannot sit still and read for more than a few minutes."
[10] "10. I like to express my opinions about books I have read."[11] "11. I like to exchange books with my friends."
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 9 / 31
El paquete likert
Cargamos los datos. . .
data(pisaitems)items_without_names <- pisaitems[, 2:12]
head(items_without_names[1:6, 1:6])
## ST24Q01 ST24Q02 ST24Q03## 68038 Disagree Strongly agree Strongly agree## 68039 Agree Strongly disagree Strongly disagree## 68040 Strongly agree Strongly disagree Strongly disagree## 68041 Disagree Disagree Agree## 68042 Strongly disagree Disagree Strongly disagree## 68043 Agree Strongly disagree Strongly disagree## ST24Q04 ST24Q05 ST24Q06## 68038 Strongly disagree Strongly agree Strongly disagree## 68039 Strongly agree Strongly disagree Agree## 68040 Agree Strongly disagree Strongly agree## 68041 Strongly disagree Disagree Disagree## 68042 Disagree Strongly disagree Disagree## 68043 Agree Strongly disagree Agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 10 / 31
El paquete likert
Objeto likert
l11 <- likert(items_without_names)summary(l11)
Tabla 1: Tabla summary() del objeto l11 de tipo likert.
Item low neutral high mean sd
10 ST24Q10 41.08 0 58.92 2.605 0.9015 ST24Q05 46.93 0 53.07 2.467 0.94478 ST24Q08 50.4 0 49.6 2.485 0.9097 ST24Q07 51.21 0 48.79 2.429 0.91643 ST24Q03 54.99 0 45.01 2.328 0.90911 ST24Q11 55.54 0 44.46 2.343 0.96092 ST24Q02 56.64 0 43.36 2.345 0.92771 ST24Q01 58.73 0 41.27 2.292 0.93694 ST24Q04 65.35 0 34.65 2.178 0.89929 ST24Q09 76.25 0 23.75 1.975 0.87936 ST24Q06 82.89 0 17.11 1.81 0.8612
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 11 / 31
El paquete likert
Observaciones
IMPORTANTE: Para calcular las columnas mean y sd usa los valoresnuméricos resultantes de pasar los ítems(factores) como argumento ala función as.numeric.En principio, la función likert solo acepta objetos de tipo dataframecomo argumento, por lo que si queremos contruír un objeto likertcon un único factor debemos introducirlo como:
# Para construír un likert de un único íteml11a <- likert(items_without_names[ , 1, drop = F])
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 12 / 31
El paquete likert
Gráficos
El paquete likert permite construír tres tipos de gráficos básicos a los quese pueden añadir diversas características mediante atributos. Los distintostipos son:
Gráficos de barras, o de tipo bar.Gráficos de densidad, o de tipo density.Gráficos de calor, o de tipo heat.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 13 / 31
El paquete likert
Gráfico de barras centrado
plot(l11, type = "bar", centered = TRUE)
41%
47%
50%
51%
55%
56%
57%
59%
65%
76%
83%
59%
53%
50%
49%
45%
44%
43%
41%
35%
24%
17%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
6. For me, reading is a waste of time.
7. I enjoy going to a bookstore or a library.
8. I read only to get information that I need.
9. I cannot sit still and read for more than afew minutes.
10. I like to express my opinions about books Ihave read.
11. I like to exchange books with my friends.
100 50 0 50 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 14 / 31
El paquete likert
Gráfico de barras sin centrar
plot(l11, type = "bar", centered = FALSE)
41%
47%
50%
51%
55%
56%
57%
59%
65%
76%
83%
59%
53%
50%
49%
45%
44%
43%
41%
35%
24%
17%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
6. For me, reading is a waste of time.
7. I enjoy going to a bookstore or a library.
8. I read only to get information that I need.
9. I cannot sit still and read for more than afew minutes.
10. I like to express my opinions about books Ihave read.
11. I like to exchange books with my friends.
0 25 50 75 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 15 / 31
El paquete likert
Gráfico de barras con porcentajeslibrary(plyr)plot(l11, type = "bar", centered = TRUE, plot.percents = TRUE)
41%
47%
50%
51%
55%
56%
57%
59%
65%
76%
83%
59%
53%
50%
49%
45%
44%
43%
41%
35%
24%
17%11% 6%
17% 7%
27% 8%
31% 11%
32% 11%
32% 12%
36% 9%
37% 12%
36% 14%
40% 13%
44% 15%
41%42%
43%33%
40%25%
36%23%
36%20%
33%23%
34%21%
33%18%
35%15%
28%19%
28%14%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
6. For me, reading is a waste of time.
7. I enjoy going to a bookstore or a library.
8. I read only to get information that I need.
9. I cannot sit still and read for more than afew minutes.
10. I like to express my opinions about books Ihave read.
11. I like to exchange books with my friends.
100 50 0 50 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 16 / 31
El paquete likert
Gráfico de barras ordenado
plot(l11, group.order = colnames(items_with_names))
41%
47%
50%
51%
55%
56%
57%
59%
65%
76%
83%
59%
53%
50%
49%
45%
44%
43%
41%
35%
24%
17%
11. I like to exchange books with my friends.
10. I like to express my opinions about books Ihave read.
9. I cannot sit still and read for more than afew minutes.
8. I read only to get information that I need.
7. I enjoy going to a bookstore or a library.
6. For me, reading is a waste of time.
5. I feel happy if I receive a book as a present.
4. I find it hard to finish books.
3. I like talking about books with other people.
2. Reading is one of my favorite hobbies.
1. I read only if I have to.
100 50 0 50 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 17 / 31
El paquete likert
Gráfico de densidad
plot(l11, type = "density")
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
6. For me, reading is a waste of time.
7. I enjoy going to a bookstore or a library.
8. I read only to get information that I need.
9. I cannot sit still and read for more than a few minutes.
10. I like to express my opinions about books I have read.
11. I like to exchange books with my friends.
Stronglydisagree
(1)
Disagree(2)
Agree (3) Stronglyagree (4)
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 18 / 31
El paquete likert
Gráfico de calor
plot(l11, type = "heat")
2.60 (0.90)
2.47 (0.94)
2.48 (0.91)
2.43 (0.92)
2.33 (0.91)
2.34 (0.96)
2.34 (0.93)
2.29 (0.94)
2.18 (0.90)
1.97 (0.88)
1.81 (0.86)
22.8%
20.3%
21.2%
25.0%
19.3%
42.2%
17.8%
15.0%
33.1%
13.5%
22.5%
35.9%
36.3%
33.7%
40.4%
27.7%
40.6%
33.4%
35.4%
43.1%
27.5%
33.0%
30.5%
31.9%
36.0%
26.5%
40.2%
11.0%
36.9%
35.8%
16.9%
43.8%
32.1%
10.7%
11.4%
9.0%
8.1%
12.9%
6.1%
11.9%
13.8%
6.8%
15.1%
12.4%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
6. For me, reading is a waste of time.
7. I enjoy going to a bookstore or a library.
8. I read only to get information that I need.
9. I cannot sit still and read for more than afew minutes.
10. I like to express my opinions about books Ihave read.
11. I like to exchange books with my friends.
Mean (SD) Strongly disagree Disagree Agree Strongly agree
0
25
50
75
100Percent
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 19 / 31
El paquete likert
Agrupando los datos de acuerdo a un factor
Una característica interesante que ofrece el paquete likert es quepermite realizar los cálculos y construir los gráficos separando deacuerdo a un factor que le indiquemos de una forma muy intuitiva.Al principio vimos que hay una variable en la matriz de datos inicialpisaitems que recoge el país en el que estudia cada individuo. Esta sellama CNT. Sería útil, entonces, poder comparar los resultados de lostres países por separado.
l11_grouped <- likert(items_with_names[ , 1:5], grouping = pisaitems$CNT)
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 20 / 31
El paquete likert
Gráfico de barras agrupado
plot(l11_grouped, type = "bar")
61%
59%
50%
39%
41%
50%
62%
52%
70%
38%
48%
30%
57%
53%
59%
43%
47%
41%
72%
61%
69%
28%
39%
31%
50%
43%
62%
50%
57%
38%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
Canada
Mexico
United States
Canada
Mexico
United States
Canada
Mexico
United States
Canada
Mexico
United States
Canada
Mexico
United States
100 50 0 50 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 21 / 31
El paquete likert
Gráfico de barras agrupado con histograma
plot(l11_grouped, type = "bar", include.histogram = TRUE)
61%
59%
50%
39%
41%
50%
62%
52%
70%
38%
48%
30%
57%
53%
59%
43%
47%
41%
72%
61%
69%
28%
39%
31%
50%
43%
62%
50%
57%
38%
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
United States
Mexico
Canada
United States
Mexico
Canada
United States
Mexico
Canada
United States
Mexico
Canada
United States
Mexico
Canada
100 50 0 50 100Percentage
Response Strongly disagree Disagree Agree Strongly agree
22597
37728
5166
22601
37787
5168
22581
37676
5157
22591
37728
5161
22563
37756
5157
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
0 10000 20000 30000n
Missing Completed
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 22 / 31
El paquete likert
Gráfico de densidad agrupado
plot(l11_grouped, type = "density")
1. I read only if I have to.
2. Reading is one of my favorite hobbies.
3. I like talking about books with other people.
4. I find it hard to finish books.
5. I feel happy if I receive a book as a present.
Stronglydisagree
(1)
Disagree(2)
Agree (3) Stronglyagree (4)
Group
Canada
Mexico
United States
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 23 / 31
El paquete likert
ResumenParámetros vistos para la función likert()
grouping Le pasamos un factor para que realice los cálculos agrupando los datos deacuerdo a este.
Parámetros vistos para la función plot()
type Indica el tipo de gráfica; que puede ser bar, density o heat.centered Se usa en gráficos tipo bar. Toma el valor TRUE por defecto, y leindicaremos el valor FALSE en caso de que no queramos que las barras de la gráficase muestren centradas en el nivel neutral.plot.percents Toma el valor FALSE por defecto. Le indicaremos el valor TRUE siqueremos que imprima los porcentajes de cada nivel sobre las barra en gráficos detipo bar. Requiere plyr.group.ordered Toma como valor un vector que indica el orden en que queremos quese muestren los ítems en el gráfico.include.histogram Toma el valor FALSE por defecto. Le indicaremos el valor TRUEsi queremos que imprima un histograma del factor que pasamos mediante elparámetro grouping a la derecha del gráfico. Requiere grid.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 24 / 31
La función plot.likert
La función plot.likert
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 25 / 31
La función plot.likert
La función plot.likert
Es una función creada y descrita en detalle por el usuario Sascha W.en la entrada de r-bloggers: https://www.r-bloggers.com/visualisation-of-likert-scale-results/.Admite diversos argumentos de entre los que pasamos a describir acontinuación los más importantes.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 26 / 31
La función plot.likert
Parámetros de la función plot.likert
vec Vector numérico que recoge los valores de una variable ordinal discreta.posible.values Valores posibles de la escala, en caso de la variable a analizar notome alguno de ellosleft Nivel inferior de nuestra escala Likert.right Nivel superior de nuestra escala Likert.plot.median Le indicaremos el valor TRUE para que pinte la mediana como una líneaverde vertical en la gráfica. Toma el valor FALSE por defecto.plot.sd Toma el valor TRUE por defecto. Pinta una línea horizontal sobre la mediaque indica la desviación típica de los valores a ambos lados de esta.include.absolutes Toma el valor TRUE por defecto. Imprime la frecuencia absolutade cada uno de los niveles de la variable.include.percentages Toma el valor TRUE por defecto. Imprime la frecuencia relativacomo porcentaje de cada uno de los niveles de la variable.own.margins Por defecto es own.margins = c(2, 2, 3, 2). Se corresponde conlos márgenes inferior, izquierdo, superior y derecho respectivamente.
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 27 / 31
La función plot.likert
Gráfico resultante de la función plot.likert
plot.likert(as.numeric(pisaitems$ST24Q01),left = "Strongly disagree",right = "Strongly agree",plot.median = T,plot.sd = T,main = names_items[1])
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 28 / 31
La función plot.likert
Gráfico resultante de la función plot.likert
1 2 3 4
23 % 36 % 31 % 11 %14947 23515 20000 7029
Str
ongl
y di
sagr
ee
Str
ongl
y ag
ree
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 29 / 31
La función plot.likert
Enlaces de referencia
https://cran.r-project.org/web/packages/likert/likert.pdf
http://jason.bryer.org/likert
https://www.r-bloggers.com/visualisation-of-likert-scale-results/
https://es.wikipedia.org/wiki/Escala_Likert
http://www.ict.edu.mx/acervo_bibliotecologia_escalas_Escala%20de%20Likert.pdf
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 30 / 31
La función plot.likert
Gracias
Visualización y análisis de escalas LikertVIII Jornadas de Usuarios de R
Antonio J. Perán Orcajada (antoniojose.peran@um.es)
Sección de Apoyo Estadístico, Servicio de Apoyo a la Investigación, Universidad de Murcia
17 de noviembre de 2016, Albacete
Antonio J. Perán (UMU) Visualización y análisis de escalas Likert VIII Jornadas R 2016 31 / 31
top related