最近发现一个很不错的R语言包likert,它不仅可以分析likert类型的数据,还可以制作非常美观的图表。
install.packages("likert")#安装likert包
library("likert")#加载
data(pisaitems)
items29 <- pisaitems[,substr(names(pisaitems), 1,5) == 'ST25Q']
names(items29) <- c("Magazines", "Comic books", "Fiction",
"Non-fiction books", "Newspapers")
l29 <- likert(items29)
l29
Item Never or almost never A few times a year About once a month
1 Magazines 10.18458 20.03231 21.33091
2 Comic books 36.74596 25.68500 15.78368
3 Fiction 17.03551 24.73829 19.61739
4 Non-fiction books 30.85323 30.57142 19.55493
5 Newspapers 18.78107 18.51270 15.72688
Several times a month Several times a week
1 31.02166 17.430535
2 14.51694 7.268416
3 22.29721 16.311601
4 13.47311 5.547302
5 23.85563 23.123723
summary(l29)
Item low neutral high mean sd
1 Magazines 30.21689 21.33091 48.45219 3.254813 1.245086
5 Newspapers 37.29377 15.72688 46.97935 3.140282 1.442299
3 Fiction 41.77380 19.61739 38.60882 2.961111 1.342667
2 Comic books 62.43096 15.78368 21.78536 2.298768 1.292631
4 Non-fiction books 61.42466 19.55493 19.02042 2.322898 1.199176
print(l29)
Item Never or almost never A few times a year About once a month
1 Magazines 10.18458 20.03231 21.33091
2 Comic books 36.74596 25.68500 15.78368
3 Fiction 17.03551 24.73829 19.61739
4 Non-fiction books 30.85323 30.57142 19.55493
5 Newspapers 18.78107 18.51270 15.72688
Several times a month Several times a week
1 31.02166 17.430535
2 14.51694 7.268416
3 22.29721 16.311601
4 13.47311 5.547302
5 23.85563 23.123723
如果要制作图表,可以这样:
plot(l29)#各题型比例

likert.heat.plot(l29)#热力图

likert.density.plot(l29)

likert.histogram.plot(l29)

https://mp.weixin.qq.com/s?__biz=MzAxODg1OTQyMA==&mid=2649956546&idx=1&sn=91e0d46134b119f0342949b3ea11c72d&chksm=83c85431b4bfdd278f0fd874f3a71cad57510c6205d5f3b130ce72f4333bbba8e1a27074e0c6&token=131341756&lang=zh_CN#rd



雷达卡





京公网安备 11010802022788号







