Lectura de la base de datos depurada.

encgraf <- read.csv2("encuesta_graficas2.csv", enc = "utf8")

Valores vedaderos para cada sector indutrial

crec <- c(17, 13.1, 11.6, 8.4, 5, 3.4)
names(crec) <- c("Inst_y_apar", "Cosm_y_aseo", 
                 "Farma", "Plastico", "Construc", "Metalme")
crec
## Inst_y_apar Cosm_y_aseo       Farma    Plastico    Construc     Metalme 
##        17.0        13.1        11.6         8.4         5.0         3.4

Primeras gráficas exploratorias comparando entre las estimaciones de barras y círculos.

with(encgraf, plot(tipo, Inst_y_apar, notch = TRUE,
                   main = "Instrumentos y aparatos"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[1], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

with(encgraf, plot(tipo, Cosm_y_aseo, notch = TRUE,
                   main = "Cosméticos y productos de aseo"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[2], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

with(encgraf, plot(tipo, Farma, notch = TRUE,
                   main = "Farmacéutico"))
abline(h=crec[3], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

with(encgraf, plot(tipo, Plastico, notch = TRUE,
                   main = "Plásticos"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[4], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

with(encgraf, plot(tipo, Construc, notch = TRUE,
                   main = "Materiales de construcción"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[5], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

with(encgraf, plot(tipo, Metalme, notch = TRUE,
                   main = "Metalmecánica"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[6], col = "red", lwd = 2)

plot of chunk unnamed-chunk-3

Gráficas por tipo (se tenía el mayor o el menor valor dado).

 with(encgraf, plot(mayor, Inst_y_apar, notch = TRUE,
                    main = "Instrumentos y aparatos"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
 abline(h=crec[1], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

 with(encgraf, plot(mayor, Cosm_y_aseo, notch = TRUE,
                    main = "Cosméticos y productos de aseo"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
 abline(h=crec[2], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

 with(encgraf, plot(mayor, Farma, notch = TRUE,
                    mian = "Framacéutico"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
 abline(h=crec[3], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

 with(encgraf, plot(mayor, Plastico, notch = TRUE,
                   main = "Plásticos"))
 abline(h=crec[4], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

 with(encgraf, plot(mayor, Construc, notch = TRUE,
                   main = "Materiales de construcción"))
 abline(h=crec[5], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

 with(encgraf, plot(mayor, Metalme, notch = TRUE,
                   main = "Metalmecánica"))
 abline(h=crec[6], col = "red", lwd = 2)

plot of chunk unnamed-chunk-4

Construcción de una nueva variable para hacer las comparaciones de barra y del número dado para realizar la estimación.

 require(car)
## Loading required package: car
 encgraf$dado <- recode(encgraf$mayor,"'si'='Inst_y_apar';
                       'no'='Metalme'")
 encgraf$Categ <- factor(with(encgraf, paste(tipo,"-",dado, sep="")))
op <- par(no.readonly = TRUE)
par(mar = op$mar + c(5, 0, 0, 0))
with(encgraf, plot(Categ, Inst_y_apar, notch = TRUE, las = 2,
                   main = "Instrumentos y aparatos"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[1], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

with(encgraf, plot(Categ, Cosm_y_aseo, notch = TRUE, las = 2,
                   main = "Cosméticos y productos de aseo"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[2], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

with(encgraf, plot(Categ, Farma, notch = TRUE, las = 2,
                   main = "Farmacéutico"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[3], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

with(encgraf, plot(Categ, Plastico, notch = TRUE, las = 2,
                   main = "Plásticos"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[4], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

with(encgraf, plot(Categ, Construc, notch = TRUE, las = 2,
                   main = "Materiales de construcción"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[5], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

with(encgraf, plot(Categ, Metalme, notch = TRUE, las = 2,
                   main = "Metalmecánica"))
## Warning: some notches went outside hinges ('box'): maybe set notch=FALSE
abline(h=crec[6], col = "red", lwd = 2)

plot of chunk unnamed-chunk-6

par(op)