Ideias para Dissertação do Vitor do HVet - AMAN
# É necessário instalar os pacotes a seguir.
# install.packages("devtools")
# install.packages("plyer")
# library (devtools)
# install_github('likert', 'jbryer')
library(likert)
library(plyr)
# dados do Programme of International Student Assessment PISA
# North American (i.e. Canada, Mexico, and United States) results from the 2009 Programme of International Student Assessment (PISA) as provided by the Organization for Economic Co-operation and Development (OECD).
# a data frame 66,690 ovservations of 81 variables from North America.
# carrega os dados na memória
data(pisaitems)
# Preparando a base de dados
# o comando substr(names(pisaitems), 1, 5) == "ST25Q" selecionar somente as colunas com os 5 primeiros caracteres igual a ST25Q
title <- "How often do you read these materials because you want to?"
items29 <- pisaitems[, substr(names(pisaitems), 1, 5) == "ST25Q"]
names(items29) <- c("Magazines", "Comic books", "Fiction", "Non-fiction books", "Newspapers")
likert29 <- likert(items29)
#summary(likert29)
plot(likert29) + ggtitle(title)

#print(items29)
plot(likert29,plot.percents=TRUE) + ggtitle(title)

plot(likert29,plot.percents=F,wrap=30,centered=FALSE) + ggtitle(title)

plot(likert29, centered=FALSE, wrap=30)

likert.bar.plot(likert29,
wrap=50,
wrap.grouping = 50,
centered=T,
include.center = T,
plot.percents=T,
plot.percent.neutral=F,
plot.percent.low=F,
plot.percent.high=F,
ordered=T,
legend = "Respostas") + ggtitle(title)

likert.density.plot(likert29)

likert.heat.plot(likert29)
