leandro.vvalter@gmail.com
Universidade Estadual da Paraíba
Centro de Ciência e Tecnologia
Departamento de Estatística

Um experimento foi conduzido segundo o delineamento inteiramente casualizado com duas repetições, com o objetivo de controlar ninfas (formas jovens) de cigarrinhas (Deois flavopicta) das pastagens por meio do uso de inseticidas e do manejo (modos de aplicação, em tempo após o corte). Os valores obtidos da porcentagem de eficiência do controle químico são a presentados na tabela a seguir.

Diretório e Entrada de dados

setwd("C:/Users/Win7/Desktop/Experimentação/parcelassubdivididas")
subd<- read.table("quest5.txt", header=TRUE,sep=";")
head(subd)
##   manejo inseticida rep resp
## 1      1   Decis FW   1   53
## 2      1   Decis FW   2   57
## 3      1  Mipcin 4G   1   58
## 4      1  Mipcin 4G   2   64
## 5      1 Mipcin 2GF   1   80
## 6      1 Mipcin 2GF   2   84
attach(subd)
str(subd)
## 'data.frame':    30 obs. of  4 variables:
##  $ manejo    : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ inseticida: Factor w/ 5 levels "Decis FW","Lorsban",..: 1 1 4 4 3 3 5 5 2 2 ...
##  $ rep       : int  1 2 1 2 1 2 1 2 1 2 ...
##  $ resp      : int  53 57 58 64 80 84 28 32 25 29 ...
summary(subd)
##      manejo        inseticida      rep           resp      
##  Min.   : 1   Decis FW  :6    Min.   :1.0   Min.   :25.00  
##  1st Qu.: 1   Lorsban   :6    1st Qu.:1.0   1st Qu.:35.50  
##  Median : 8   Mipcin 2GF:6    Median :1.5   Median :53.00  
##  Mean   : 8   Mipcin 4G :6    Mean   :1.5   Mean   :50.77  
##  3rd Qu.:15   Toxafeno  :6    3rd Qu.:2.0   3rd Qu.:64.00  
##  Max.   :15                   Max.   :2.0   Max.   :84.00

Formatando variáveis para fatores

subd$inseticida = as.factor(subd$inseticida)
subd$manejo  = as.factor(subd$manejo)
subd$rep = as.factor(subd$rep)
summary(subd)
##  manejo       inseticida rep         resp      
##  1 :10   Decis FW  :6    1:15   Min.   :25.00  
##  8 :10   Lorsban   :6    2:15   1st Qu.:35.50  
##  15:10   Mipcin 2GF:6           Median :53.00  
##          Mipcin 4G :6           Mean   :50.77  
##          Toxafeno  :6           3rd Qu.:64.00  
##                                 Max.   :84.00
attach(subd)
dados=subd

Visualização do Experimento

xyplot(resp ~ manejo, data=dados, pch=c(19))

xyplot(resp ~ inseticida, data=dados, pch=c(19))

xyplot(resp ~ inseticida|manejo, groups=manejo, data=subd, pch=c(19,20,1),auto.key=TRUE, jitter.x=T)

xyplot(resp ~ manejo|inseticida, groups=inseticida, data=subd, pch=c(19,20,1,2), auto.key=TRUE, jitter.x=T)

Análise de variância

subd.av = aov(resp ~  manejo*inseticida + Error(rep:manejo))
summary(subd.av)
## 
## Error: rep:manejo
##           Df Sum Sq Mean Sq F value Pr(>F)
## manejo     2  252.9   126.4   2.731  0.211
## Residuals  3  138.9    46.3               
## 
## Error: Within
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## inseticida         4   2456   614.0   161.6 2.53e-10 ***
## manejo:inseticida  8   5436   679.5   178.8 2.72e-11 ***
## Residuals         12     46     3.8                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Visualização gráfica do comportamento dos inseticida dentro de manejo e vice-versa.

par(mfrow=c(2,1))
with(dados, interaction.plot(manejo, inseticida, resp, col=1:4, ylab='Porcentagem'))
with(dados, interaction.plot(inseticida,manejo, resp, col=1:4, ylab='Porcentagem'))

Mas para analisar os pressupostos, é comun trabalhar com o erro principal onde a segunda sintese facilita a extração deste, exemplificado no comando a seguir:

subd.avb = aov(resp ~ manejo*inseticida + rep*manejo-rep)
summary(subd.avb)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## manejo             2    253   126.4   33.27 1.27e-05 ***
## inseticida         4   2456   614.0  161.57 2.53e-10 ***
## manejo:inseticida  8   5436   679.5  178.82 2.72e-11 ***
## manejo:rep         3    139    46.3   12.18 0.000593 ***
## Residuals         12     46     3.8                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Boxplots da interação

media.vs = with(dados, tapply(resp, list(manejo, inseticida), mean))
with(dados, 
     boxplot(resp ~ manejo:inseticida, data=dados, las=1, range=0,
             notch=FALSE, main="", sub="", col='lightyellow',
             xlab="Manejo*Inseticidas", ylab="Porcentagem"))
points(c(media.vs), pch='+', col='red', cex=1.3)

As médias de cada fator

subd.m = model.tables(subd.av, ty="means")
subd.m
## Tables of means
## Grand mean
##          
## 50.76667 
## 
##  manejo 
## manejo
##    1    8   15 
## 51.0 47.1 54.2 
## 
##  inseticida 
## inseticida
##   Decis FW    Lorsban Mipcin 2GF  Mipcin 4G   Toxafeno 
##      50.50      34.33      61.67      55.00      52.33 
## 
##  manejo:inseticida 
##       inseticida
## manejo Decis FW Lorsban Mipcin 2GF Mipcin 4G Toxafeno
##     1  55.0     27.0    82.0       61.0      30.0    
##     8  60.5     35.0    49.0       30.0      61.0    
##     15 36.0     41.0    54.0       74.0      66.0

Análise de resíduos

par(mfrow=c(2,2))
plot(subd.avb)

shapiro.test(subd.avb$res)
## 
##  Shapiro-Wilk normality test
## 
## data:  subd.avb$res
## W = 0.97688, p-value = 0.738
par(mfrow=c(1,3))
car::Boxplot(subd.avb$res~inseticida)
## [1] "16" "15" "28" "27"
car::Boxplot(subd.avb$res~manejo)
car::Boxplot(subd.avb$res~manejo:inseticida)

bartlett.test(subd.avb$res, inseticida)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  subd.avb$res and inseticida
## Bartlett's K-squared = 8.1032, df = 4, p-value = 0.08787
bartlett.test(subd.avb$res, manejo)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  subd.avb$res and manejo
## Bartlett's K-squared = 13.199, df = 2, p-value = 0.001361

Fator a nível de parcela (MANEJO)

subd.anovaRA = anova(subd.av$'rep:manejo')
subd.anovaRA
## Analysis of Variance Table
## 
## Response: resp
##           Df Sum Sq Mean Sq F value Pr(>F)
## Residuals  3  138.9    46.3

Teste de Tukey para o fator a nível de parcela

QMEa = subd.anovaRA$Mean;QMEa
## [1] 46.3
Dfea = subd.anovaRA$Df;Dfea
## [1] 3
tukey1 = HSD.test(resp,inseticida, Dfea, QMEa, alpha=0.05);tukey1
## $statistics
##   MSerror Df     Mean      CV      MSD
##      46.3  3 50.76667 13.4033 20.83878
## 
## $parameters
##    test     name.t ntr StudentizedRange alpha
##   Tukey inseticida   5         7.501659  0.05
## 
## $means
##                resp      std r Min Max  Q25 Q50   Q75
## Decis FW   50.50000 12.09545 6  35  66 41.0  54 56.50
## Lorsban    34.33333  6.56252 6  25  42 30.0  35 39.25
## Mipcin 2GF 61.66667 16.02082 6  47  84 51.5  54 73.75
## Mipcin 4G  55.00000 20.43526 6  28  77 38.5  61 69.25
## Toxafeno   52.33333 17.63708 6  28  68 38.5  61 64.00
## 
## $comparison
## NULL
## 
## $groups
##                resp groups
## Mipcin 2GF 61.66667      a
## Mipcin 4G  55.00000     ab
## Toxafeno   52.33333     ab
## Decis FW   50.50000     ab
## Lorsban    34.33333      b
## 
## attr(,"class")
## [1] "group"

Fator a nível de subparcela (Inseticida)

subd.anovaRB = anova(subd.av$'Within')
subd.anovaRB
## Analysis of Variance Table
## 
## Response: resp
##                   Df Sum Sq Mean Sq F value    Pr(>F)    
## manejo:inseticida  8 5436.1  679.52  178.82 2.724e-11 ***
## Residuals         12   45.6    3.80                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Teste de Tukey para o fator a nível de subparcela

QMEb = subd.anovaRB$Mean[2];QMEb
## [1] 3.8
Dfeb = subd.anovaRB$Df[2];Dfeb
## [1] 12
tukey2 = HSD.test(resp,inseticida,Dfeb,QMEb,alpha=0.05);tukey2
## $statistics
##   MSerror Df     Mean      CV      MSD
##       3.8 12 50.76667 3.83984 3.587337
## 
## $parameters
##    test     name.t ntr StudentizedRange alpha
##   Tukey inseticida   5          4.50771  0.05
## 
## $means
##                resp      std r Min Max  Q25 Q50   Q75
## Decis FW   50.50000 12.09545 6  35  66 41.0  54 56.50
## Lorsban    34.33333  6.56252 6  25  42 30.0  35 39.25
## Mipcin 2GF 61.66667 16.02082 6  47  84 51.5  54 73.75
## Mipcin 4G  55.00000 20.43526 6  28  77 38.5  61 69.25
## Toxafeno   52.33333 17.63708 6  28  68 38.5  61 64.00
## 
## $comparison
## NULL
## 
## $groups
##                resp groups
## Mipcin 2GF 61.66667      a
## Mipcin 4G  55.00000      b
## Toxafeno   52.33333     bc
## Decis FW   50.50000      c
## Lorsban    34.33333      d
## 
## attr(,"class")
## [1] "group"

Desdobrando e testanto a interação “manejo:inseticida”

Primeiro vamos estudar o fatores a nível de subparcela dentro do fator a nível de parcela

subd.avISP = aov(resp ~ manejo/inseticida + manejo*inseticida -inseticida+Error(rep:manejo))
summary(subd.avISP)
## 
## Error: rep:manejo
##           Df Sum Sq Mean Sq F value Pr(>F)
## manejo     2  252.9   126.4   2.731  0.211
## Residuals  3  138.9    46.3               
## 
## Error: Within
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## manejo:inseticida 12   7892   657.7   173.1 1.62e-11 ***
## Residuals         12     46     3.8                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(subd.avISP,split=list("manejo:inseticida"=list(b.dentro.a1=c(1,4,7,10),
                                                      b.dentro.a2=c(2,5,8,11),
                                                      b.dentro.a3=c(3,6,9,12))))
## 
## Error: rep:manejo
##           Df Sum Sq Mean Sq F value Pr(>F)
## manejo     2  252.9   126.4   2.731  0.211
## Residuals  3  138.9    46.3               
## 
## Error: Within
##                                  Df Sum Sq Mean Sq F value   Pr(>F)    
## manejo:inseticida                12   7892   657.7   173.1 1.62e-11 ***
##   manejo:inseticida: b.dentro.a1  4   4188  1047.0   275.5 1.08e-11 ***
##   manejo:inseticida: b.dentro.a2  4   1630   407.6   107.3 2.77e-09 ***
##   manejo:inseticida: b.dentro.a3  4   2074   518.4   136.4 6.82e-10 ***
## Residuals                        12     46     3.8                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tapply(subd$resp,list(manejo=subd$manejo,Tratamento=subd$inseticida),mean)
##       Tratamento
## manejo Decis FW Lorsban Mipcin 2GF Mipcin 4G Toxafeno
##     1      55.0      27         82        61       30
##     8      60.5      35         49        30       61
##     15     36.0      41         54        74       66

Teste de Tukey

Subparcela dentro do primeiro fator a nível de parcela

A1 = subset(subd,subd$manejo=="1");A1
##    manejo inseticida rep resp
## 1       1   Decis FW   1   53
## 2       1   Decis FW   2   57
## 3       1  Mipcin 4G   1   58
## 4       1  Mipcin 4G   2   64
## 5       1 Mipcin 2GF   1   80
## 6       1 Mipcin 2GF   2   84
## 7       1   Toxafeno   1   28
## 8       1   Toxafeno   2   32
## 9       1    Lorsban   1   25
## 10      1    Lorsban   2   29
tuk1 = HSD.test(A1$resp,A1$inseticida,DFRb,QMRb);tuk1
## $statistics
##   MSerror Df Mean       CV      MSD
##       3.8 12   51 3.822272 6.213449
## 
## $parameters
##    test        name.t ntr StudentizedRange alpha
##   Tukey A1$inseticida   5          4.50771  0.05
## 
## $means
##            A1$resp      std r Min Max  Q25 Q50  Q75
## Decis FW        55 2.828427 2  53  57 54.0  55 56.0
## Lorsban         27 2.828427 2  25  29 26.0  27 28.0
## Mipcin 2GF      82 2.828427 2  80  84 81.0  82 83.0
## Mipcin 4G       61 4.242641 2  58  64 59.5  61 62.5
## Toxafeno        30 2.828427 2  28  32 29.0  30 31.0
## 
## $comparison
## NULL
## 
## $groups
##            A1$resp groups
## Mipcin 2GF      82      a
## Mipcin 4G       61      b
## Decis FW        55      b
## Toxafeno        30      c
## Lorsban         27      c
## 
## attr(,"class")
## [1] "group"

subparcela dentro do segundo fator a nível de parcela

A2 = subset(subd,subd$manejo=="8");A2
##    manejo inseticida rep resp
## 11      8   Decis FW   1   55
## 12      8   Decis FW   2   66
## 13      8  Mipcin 4G   1   28
## 14      8  Mipcin 4G   2   32
## 15      8 Mipcin 2GF   1   47
## 16      8 Mipcin 2GF   2   51
## 17      8   Toxafeno   1   58
## 18      8   Toxafeno   2   64
## 19      8    Lorsban   1   33
## 20      8    Lorsban   2   37
tuk2 = HSD.test(A2$resp,A2$inseticida,DFRb,QMRb);tuk2
## $statistics
##   MSerror Df Mean       CV      MSD
##       3.8 12 47.1 4.138766 6.213449
## 
## $parameters
##    test        name.t ntr StudentizedRange alpha
##   Tukey A2$inseticida   5          4.50771  0.05
## 
## $means
##            A2$resp      std r Min Max   Q25  Q50   Q75
## Decis FW      60.5 7.778175 2  55  66 57.75 60.5 63.25
## Lorsban       35.0 2.828427 2  33  37 34.00 35.0 36.00
## Mipcin 2GF    49.0 2.828427 2  47  51 48.00 49.0 50.00
## Mipcin 4G     30.0 2.828427 2  28  32 29.00 30.0 31.00
## Toxafeno      61.0 4.242641 2  58  64 59.50 61.0 62.50
## 
## $comparison
## NULL
## 
## $groups
##            A2$resp groups
## Toxafeno      61.0      a
## Decis FW      60.5      a
## Mipcin 2GF    49.0      b
## Lorsban       35.0      c
## Mipcin 4G     30.0      c
## 
## attr(,"class")
## [1] "group"

subparcela dentro do terceiro fator a nível de parcela

A3 = subset(subd,subd$manejo=="15");A3
##    manejo inseticida rep resp
## 21     15   Decis FW   1   35
## 22     15   Decis FW   2   37
## 23     15  Mipcin 4G   1   77
## 24     15  Mipcin 4G   2   71
## 25     15 Mipcin 2GF   1   55
## 26     15 Mipcin 2GF   2   53
## 27     15   Toxafeno   1   68
## 28     15   Toxafeno   2   64
## 29     15    Lorsban   1   40
## 30     15    Lorsban   2   42
tuk3 = HSD.test(A3$resp,A3$inseticida,DFRb,QMRb);tuk3
## $statistics
##   MSerror Df Mean       CV      MSD
##       3.8 12 54.2 3.596603 6.213449
## 
## $parameters
##    test        name.t ntr StudentizedRange alpha
##   Tukey A3$inseticida   5          4.50771  0.05
## 
## $means
##            A3$resp      std r Min Max  Q25 Q50  Q75
## Decis FW        36 1.414214 2  35  37 35.5  36 36.5
## Lorsban         41 1.414214 2  40  42 40.5  41 41.5
## Mipcin 2GF      54 1.414214 2  53  55 53.5  54 54.5
## Mipcin 4G       74 4.242641 2  71  77 72.5  74 75.5
## Toxafeno        66 2.828427 2  64  68 65.0  66 67.0
## 
## $comparison
## NULL
## 
## $groups
##            A3$resp groups
## Mipcin 4G       74      a
## Toxafeno        66      b
## Mipcin 2GF      54      c
## Lorsban         41      d
## Decis FW        36      d
## 
## attr(,"class")
## [1] "group"
subd.avIPS = aov(resp ~ inseticida/manejo + inseticida*manejo -manejo)
summary(subd.avIPS)
##                   Df Sum Sq Mean Sq F value   Pr(>F)    
## inseticida         4   2456   614.0   49.92 1.72e-08 ***
## inseticida:manejo 10   5689   568.9   46.25 1.94e-09 ***
## Residuals         15    185    12.3                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(subd.avIPS,split=list("inseticida:manejo"=list(a.dentro.b1=c(1,6),
                                                a.dentro.b2=c(2,7),
                                                a.dentro.b3=c(3,8),
                                                a.dentro.b4=c(4,9),
                                                a.dentro.b5=c(5,10))))
##                                  Df Sum Sq Mean Sq F value   Pr(>F)    
## inseticida                        4   2456   614.0  49.916 1.72e-08 ***
## inseticida:manejo                10   5689   568.9  46.252 1.94e-09 ***
##   inseticida:manejo: a.dentro.b1  2    661   330.5  26.870 1.10e-05 ***
##   inseticida:manejo: a.dentro.b2  2    197    98.7   8.022  0.00427 ** 
##   inseticida:manejo: a.dentro.b3  2   1265   632.7  51.436 1.93e-07 ***
##   inseticida:manejo: a.dentro.b4  2   2044  1022.0  83.089 7.67e-09 ***
##   inseticida:manejo: a.dentro.b5  2   1521   760.7  61.843 5.69e-08 ***
## Residuals                        15    185    12.3                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##Erro A
QMa = 46.3
Gla =3
##Erro B
QMb = 3.8
Glb = 12
#N° de tratamentos secundários
NTb = 5
##Erro médio
QMex = (QMa+(NTb-1)*QMb)/NTb;QMex
## [1] 12.3
##Graus de liberdade
Glx = ((QMa+(NTb-1)*QMb)^2) / ( ((QMa^2)/Gla)  + ((((NTb-1)*QMb)^2)/Glb));Glx
## [1] 5.154217

Parcela dentro do primeiro fator a nível de subparcela

B1 = subset(subd,subd$inseticida=="Decis FW");B1
##    manejo inseticida rep resp
## 1       1   Decis FW   1   53
## 2       1   Decis FW   2   57
## 11      8   Decis FW   1   55
## 12      8   Decis FW   2   66
## 21     15   Decis FW   1   35
## 22     15   Decis FW   2   37
Tukey1 = HSD.test(B1$resp,B1$manejo,Glx,QMex,group=T);Tukey1
## $statistics
##   MSerror       Df Mean       CV      MSD
##      12.3 5.154217 50.5 6.944823 11.29089
## 
## $parameters
##    test    name.t ntr StudentizedRange alpha
##   Tukey B1$manejo   3         4.552926  0.05
## 
## $means
##    B1$resp      std r Min Max   Q25  Q50   Q75
## 1     55.0 2.828427 2  53  57 54.00 55.0 56.00
## 15    36.0 1.414214 2  35  37 35.50 36.0 36.50
## 8     60.5 7.778175 2  55  66 57.75 60.5 63.25
## 
## $comparison
## NULL
## 
## $groups
##    B1$resp groups
## 8     60.5      a
## 1     55.0      a
## 15    36.0      b
## 
## attr(,"class")
## [1] "group"

Parcela dentro do segundo fator a nível de subparcela

B2 = subset(subd,subd$inseticida=="Mipcin 4G");B2
##    manejo inseticida rep resp
## 3       1  Mipcin 4G   1   58
## 4       1  Mipcin 4G   2   64
## 13      8  Mipcin 4G   1   28
## 14      8  Mipcin 4G   2   32
## 23     15  Mipcin 4G   1   77
## 24     15  Mipcin 4G   2   71
Tukey2 = HSD.test(B2$resp,B2$manejo,Glx,QMex);Tukey2
## $statistics
##   MSerror       Df Mean      CV      MSD
##      12.3 5.154217   55 6.37661 11.29089
## 
## $parameters
##    test    name.t ntr StudentizedRange alpha
##   Tukey B2$manejo   3         4.552926  0.05
## 
## $means
##    B2$resp      std r Min Max  Q25 Q50  Q75
## 1       61 4.242641 2  58  64 59.5  61 62.5
## 15      74 4.242641 2  71  77 72.5  74 75.5
## 8       30 2.828427 2  28  32 29.0  30 31.0
## 
## $comparison
## NULL
## 
## $groups
##    B2$resp groups
## 15      74      a
## 1       61      b
## 8       30      c
## 
## attr(,"class")
## [1] "group"

Parcela dentro do terceiro fator a nível de subparcela

B3 = subset(subd,subd$inseticida=="Mipcin 2GF");B3
##    manejo inseticida rep resp
## 5       1 Mipcin 2GF   1   80
## 6       1 Mipcin 2GF   2   84
## 15      8 Mipcin 2GF   1   47
## 16      8 Mipcin 2GF   2   51
## 25     15 Mipcin 2GF   1   55
## 26     15 Mipcin 2GF   2   53
Tukey3 = HSD.test(B3$resp,B3$manejo,Glx,QMex);Tukey3
## $statistics
##   MSerror       Df     Mean       CV      MSD
##      12.3 5.154217 61.66667 5.687247 11.29089
## 
## $parameters
##    test    name.t ntr StudentizedRange alpha
##   Tukey B3$manejo   3         4.552926  0.05
## 
## $means
##    B3$resp      std r Min Max  Q25 Q50  Q75
## 1       82 2.828427 2  80  84 81.0  82 83.0
## 15      54 1.414214 2  53  55 53.5  54 54.5
## 8       49 2.828427 2  47  51 48.0  49 50.0
## 
## $comparison
## NULL
## 
## $groups
##    B3$resp groups
## 1       82      a
## 15      54      b
## 8       49      b
## 
## attr(,"class")
## [1] "group"

Parcela dentro do quarto fator a nível de subparcela

B4 = subset(subd,subd$inseticida=="Toxafeno");B4
##    manejo inseticida rep resp
## 7       1   Toxafeno   1   28
## 8       1   Toxafeno   2   32
## 17      8   Toxafeno   1   58
## 18      8   Toxafeno   2   64
## 27     15   Toxafeno   1   68
## 28     15   Toxafeno   2   64
Tukey4 = HSD.test(B4$resp,B4$manejo,Glx,QMex);Tukey4
## $statistics
##   MSerror       Df     Mean       CV      MSD
##      12.3 5.154217 52.33333 6.701533 11.29089
## 
## $parameters
##    test    name.t ntr StudentizedRange alpha
##   Tukey B4$manejo   3         4.552926  0.05
## 
## $means
##    B4$resp      std r Min Max  Q25 Q50  Q75
## 1       30 2.828427 2  28  32 29.0  30 31.0
## 15      66 2.828427 2  64  68 65.0  66 67.0
## 8       61 4.242641 2  58  64 59.5  61 62.5
## 
## $comparison
## NULL
## 
## $groups
##    B4$resp groups
## 15      66      a
## 8       61      a
## 1       30      b
## 
## attr(,"class")
## [1] "group"

Parcela dentro do quinto fator a nível de subparcela

B5 = subset(subd,subd$inseticida=="Lorsban");B5
##    manejo inseticida rep resp
## 9       1    Lorsban   1   25
## 10      1    Lorsban   2   29
## 19      8    Lorsban   1   33
## 20      8    Lorsban   2   37
## 29     15    Lorsban   1   40
## 30     15    Lorsban   2   42
Tukey5 = HSD.test(B5$resp,B5$manejo,Glx,QMex);Tukey5
## $statistics
##   MSerror       Df     Mean       CV      MSD
##      12.3 5.154217 34.33333 10.21496 11.29089
## 
## $parameters
##    test    name.t ntr StudentizedRange alpha
##   Tukey B5$manejo   3         4.552926  0.05
## 
## $means
##    B5$resp      std r Min Max  Q25 Q50  Q75
## 1       27 2.828427 2  25  29 26.0  27 28.0
## 15      41 1.414214 2  40  42 40.5  41 41.5
## 8       35 2.828427 2  33  37 34.0  35 36.0
## 
## $comparison
## NULL
## 
## $groups
##    B5$resp groups
## 15      41      a
## 8       35     ab
## 1       27      b
## 
## attr(,"class")
## [1] "group"

Tabela de comparações de médias

Manejo/Inseticida DecisFW Lorsban Mipcin2GF Mipcin4G Toxafeno
1 55.0 bA 27 cB 82 aA 61 bB 30 cB
8 60.5 aA 35 cAB 49 bB 30 cC 61 aA
15 36.0 dB 41 dA 54 cB 74 aA 66 bA

Letras minúsculas diferentes significam uma difereça de médias entre as colunas. Letras maiúscula diferentes significam uma difereça de médias entre as linsas.

Alternativa

require(ExpDes.pt)
## Loading required package: ExpDes.pt
## 
## Attaching package: 'ExpDes.pt'
## The following objects are masked from 'package:agricolae':
## 
##     lastC, order.group, tapply.stat
## The following object is masked from 'package:MASS':
## 
##     ginv
## The following object is masked from 'package:stats':
## 
##     ccf
psub2.dic(manejo,inseticida,rep, resp, quali = c(TRUE, TRUE), mcomp = "tukey", 
fac.names = c("Manejo", "Inseticida"), sigF = 0.05)
## ------------------------------------------------------------------------
## Legenda:
## FATOR 1    (parcela):  Manejo 
## FATOR 2 (subparcela):  Inseticida 
## ------------------------------------------------------------------------
## 
## ------------------------------------------------------------------------
## $`Quadro da analise de variancia`
##                   GL     SQ     QM      Fc Pr(>Fc)    
## Manejo             2  252.9 126.43   2.731  0.2111    
## Erro a             3  138.9  46.30                    
## Inseticida         4 2455.9 613.97 161.570  <2e-16 ***
## Manejo*Inseticida  8 5436.1 679.52 178.820  <2e-16 ***
## Erro b            12   45.6   3.80                    
## Total             29 8329.4                           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## ------------------------------------------------------------------------
## CV 1 = 13.4033 %
## CV 2 = 3.83984 %
## 
## ------------------------------------------------------------------------
## #Teste de normalidade dos residuos (Shapiro-Wilk)
## valor-p:  0.7380429 
## De acordo com o teste de Shapiro-Wilk a 5% de significancia, os residuos podem ser considerados normais.
## ------------------------------------------------------------------------
## 
## 
## 
## Interacao significativa: desdobrando a interacao
## ------------------------------------------------------------------------
## 
## Desdobrando  Manejo  dentro de cada nivel de  Inseticida 
## ------------------------------------------------------------------------
##                                       GL         SQ         QM        Fc
## Manejo : Inseticida Decis FW    2.000000  661.00000  330.50000 26.869919
## Manejo : Inseticida Lorsban     2.000000  197.33333   98.66667   8.02168
## Manejo : Inseticida Mipcin 2GF  2.000000 1265.33333  632.66667 51.436314
## Manejo : Inseticida Mipcin 4G   2.000000 2044.00000 1022.00000 83.089431
## Manejo : Inseticida Toxafeno    2.000000 1521.33333  760.66667 61.842818
## Erro combinado                  5.154217   63.39687   12.30000          
##                                  valor.p
## Manejo : Inseticida Decis FW    0.001878
## Manejo : Inseticida Lorsban     0.026142
## Manejo : Inseticida Mipcin 2GF  0.000393
## Manejo : Inseticida Mipcin 4G    0.00012
## Manejo : Inseticida Toxafeno     0.00025
## Erro combinado                          
## ------------------------------------------------------------------------
## 
## 
##  Manejo dentro de Inseticida Decis FW
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     8   60.5 
## a     1   55 
##  b    15      36 
## ------------------------------------------------------------------------
## 
##  Manejo dentro de Inseticida Lorsban
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     15      41 
## ab    8   35 
##  b    1   27 
## ------------------------------------------------------------------------
## 
##  Manejo dentro de Inseticida Mipcin 2GF
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     1   82 
##  b    15      54 
##  b    8   49 
## ------------------------------------------------------------------------
## 
##  Manejo dentro de Inseticida Mipcin 4G
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     15      74 
##  b    1   61 
##   c   8   30 
## ------------------------------------------------------------------------
## 
##  Manejo dentro de Inseticida Toxafeno
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     15      66 
## a     8   61 
##  b    1   30 
## ------------------------------------------------------------------------
## 
## 
## Desdobrando  Inseticida  dentro de cada nivel de  Manejo 
## ------------------------------------------------------------------------
##                         GL     SQ     QM         Fc valor.p
## Inseticida : Manejo 1    4 4188.0 1047.0 275.526316       0
## Inseticida : Manejo 8    4 1630.4  407.6 107.263158       0
## Inseticida : Manejo 15   4 2073.6  518.4 136.421053       0
## Erro b                  12   45.6    3.8                   
## ------------------------------------------------------------------------
## 
## 
##  Inseticida dentro de Manejo 1
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     Mipcin 2GF      82 
##  b    Mipcin 4G   61 
##  b    Decis FW    55 
##   c   Toxafeno    30 
##   c   Lorsban     27 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------
## 
## 
##  Inseticida dentro de Manejo 8
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     Toxafeno    61 
## a     Decis FW    60.5 
##  b    Mipcin 2GF      49 
##   c   Lorsban     35 
##   c   Mipcin 4G   30 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------
## 
## 
##  Inseticida dentro de Manejo 15
## ------------------------------------------------------------------------
## Teste de Tukey
## ------------------------------------------------------------------------
## Grupos Tratamentos Medias
## a     Mipcin 4G   74 
##  b    Toxafeno    66 
##   c   Mipcin 2GF      54 
##    d      Lorsban     41 
##    d      Decis FW    36 
## ------------------------------------------------------------------------
## ------------------------------------------------------------------------