Informações gerais

Bancos de dados

setwd("~/Dropbox/R Stat")
library(readxl)
bd <- read_excel("bd_prof.xlsx", sheet = "bd3")
itens <- read_excel("bd_prof.xlsx", sheet = "itens")

Organiza banco

# Transforma em factor
bd[ , 3:16] <- lapply(bd[ , 3:16], function(x){ factor(x, 
        levels = c("1", "2", "3", "4", "5"),                                  
        labels = c("DT", "D", "N", "C", "CT"))})

# Muda os nomes das variĂ¡veis
names(bd)[3:16] <- paste(names(bd)[3:16], itens$texto, sep="_")

Roda likert

library(likert)
## Loading required package: ggplot2
## Loading required package: xtable
lik <- likert(as.data.frame(bd[ , 3:16]))

Plota as figuras

# OpĂ§Ă£o 1
plot(lik, wrap = 60, text.size=3) + theme(axis.text.y = element_text(size="5"))

# OpĂ§Ă£o 2

plot(lik, type = "heat", wrap = 60, text.size=3) + theme(axis.text.y = element_text( size="5"))

Compara opiniĂ£o considerando diferentes tipos de deficiĂªncia (variĂ¡vel categ)

lik2 <- likert(as.data.frame(bd[ , 3:5]), grouping = bd$categ)
plot(lik2, wrap = 60, text.size=3) + theme(axis.text.y = element_text(size="6"))