DADOS OBTIDOS DE SCLEROTINIA SCLEROTIORUM

library(agricolae)
library(readxl)
library(agricolae)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(PerformanceAnalytics)
## Loading required package: xts
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
## 
##     first, last
## 
## Attaching package: 'PerformanceAnalytics'
## The following objects are masked from 'package:agricolae':
## 
##     kurtosis, skewness
## The following object is masked from 'package:graphics':
## 
##     legend
library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v tibble  3.0.4     v purrr   0.3.4
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.0
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x plotly::filter() masks dplyr::filter(), stats::filter()
## x xts::first()     masks dplyr::first()
## x dplyr::lag()     masks stats::lag()
## x xts::last()      masks dplyr::last()
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
library(ggrepel)
library(rgl)
library(car)
## Loading required package: carData
## 
## Attaching package: 'car'
## The following object is masked from 'package:purrr':
## 
##     some
## The following object is masked from 'package:dplyr':
## 
##     recode
library(sf)
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(tmap)
library(rgdal)
## Loading required package: sp
## rgdal: version: 1.5-18, (SVN revision 1082)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
## Path to GDAL shared files: C:/Users/User/Documents/R/win-library/4.0/rgdal/gdal
## GDAL binary built with GEOS: TRUE 
## Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
## Path to PROJ shared files: C:/Users/User/Documents/R/win-library/4.0/rgdal/proj
## Linking to sp version:1.4-4
## To mute warnings of possible GDAL/OSR exportToProj4() degradation,
## use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
library(esquisse)
library(ggplot2)
library(gridExtra)
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
dt <- read_excel("C:/Users/User/Desktop/Sclerotinia_Sclerotiorum.xlsx", 
                 sheet = "re3")
attach(dt)
names(dt)
## [1] "genot"  "trat"   "bloco"  "folf"   "talf"   "folsec" "talsec" "rasec"
a <- as.factor(genot)
b <- as.factor(trat)
inter<-as.factor(a:b)
############ 1.1 anova folha fresca ###########################
summary(aov(folf ~ a+b+inter, data = dt))
##             Df  Sum Sq  Mean Sq F value Pr(>F)  
## a            4 0.00822 0.002054   0.476 0.7531  
## b            1 0.02504 0.025042   5.801 0.0224 *
## inter        4 0.00124 0.000310   0.072 0.9901  
## Residuals   30 0.12950 0.004317                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(folf ~ a + b + inter, data = dt),
         "a", alpha = 0.05)["groups"]
## $groups
##           folf groups
## MT   0.1790000      a
## VF.1 0.1600000      a
## VF   0.1520000      a
## VG   0.1430000      a
## VA   0.1384375      a
LSD.test(aov(folf ~ a + b + inter, data = dt),
         "b", alpha = 0.05)["groups"]
## $groups
##             folf groups
## ino    0.1795083      a
## noinoc 0.1294667      b
LSD.test(aov(folf ~ a + b + inter, data = dt),
         "inter", alpha = 0.05)["groups"]
## $groups
##                  folf groups
## MT:ino      0.2015000      a
## VF:ino      0.1815000      a
## VF.1:ino    0.1755000      a
## VG:ino      0.1696667      a
## VA:ino      0.1693750      a
## MT:noinoc   0.1565000      a
## VF.1:noinoc 0.1445000      a
## VF:noinoc   0.1225000      a
## VG:noinoc   0.1163333      a
## VA:noinoc   0.1075000      a
shapiro.test(unlist(aov(folf ~ a + b + inter, 
                        data = dt)["residuals"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  unlist(aov(folf ~ a + b + inter, data = dt)["residuals"])
## W = 0.97057, p-value = 0.375
res <-sort(unlist(aov( folf ~ a + b + inter, 
                       data = dt)["residuals"]),decreasing = TRUE)
ks.test(res,  "pnorm" ,mean(res),sd(res))
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  res
## D = 0.088877, p-value = 0.8825
## alternative hypothesis: two-sided
kruskal(folf, inter)["groups"]
## $groups
##              folf groups
## MT:ino      28.75      a
## VF:ino      24.75      a
## VA:ino      24.00      a
## VF.1:ino    23.00      a
## VG:ino      23.00      a
## MT:noinoc   21.75      a
## VF.1:noinoc 19.25      a
## VF:noinoc   15.50      a
## VG:noinoc   13.25      a
## VA:noinoc   11.75      a
##### 1.2 anova talo fresco #####################################################

summary(aov(talf ~ a+b+inter, data = dt))
##             Df  Sum Sq  Mean Sq F value Pr(>F)   
## a            4 0.01186 0.002966   0.868 0.4945   
## b            1 0.02729 0.027292   7.987 0.0083 **
## inter        4 0.00243 0.000607   0.178 0.9482   
## Residuals   30 0.10251 0.003417                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(talf ~ a + b + inter, data = dt),
         "a", alpha = 0.05)["groups"]
## $groups
##           talf groups
## MT   0.1512500      a
## VF   0.1287500      a
## VF.1 0.1122500      a
## VG   0.1107500      a
## VA   0.1029375      a
LSD.test(aov(talf ~ a + b + inter, data = dt),
         "b", alpha = 0.05)["groups"]
## $groups
##              talf groups
## ino    0.14730833      a
## noinoc 0.09506667      b
LSD.test(aov(talf ~ a + b + inter, data = dt),
         "inter", alpha = 0.05)["groups"]
## $groups
##                   talf groups
## MT:ino      0.18250000      a
## VF:ino      0.15350000     ab
## VG:ino      0.14466667     ab
## VA:ino      0.13187500     ab
## VF.1:ino    0.12400000     ab
## MT:noinoc   0.12000000     ab
## VF:noinoc   0.10400000     ab
## VF.1:noinoc 0.10050000     ab
## VG:noinoc   0.07683333      b
## VA:noinoc   0.07400000      b
shapiro.test(unlist(aov(talf ~ a + b + inter, 
                        data = dt)["residuals"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  unlist(aov(talf ~ a + b + inter, data = dt)["residuals"])
## W = 0.92541, p-value = 0.01144
res <-sort(unlist(aov( talf ~ a + b + inter, 
                       data = dt)["residuals"]),decreasing = TRUE)
ks.test(res,  "pnorm" ,mean(res),sd(res))
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  res
## D = 0.15249, p-value = 0.2806
## alternative hypothesis: two-sided
kruskal(talf, inter)["groups"]
## $groups
##               talf groups
## MT:ino      32.875      a
## VF:ino      25.500      a
## VA:ino      24.250     ab
## MT:noinoc   24.000    abc
## VG:ino      22.000    abc
## VF.1:ino    21.375    abc
## VF.1:noinoc 19.000    abc
## VF:noinoc   18.125    abc
## VA:noinoc    9.000     bc
## VG:noinoc    8.875      c
#######1.3 anova folhas secas #################################

summary(aov(folsec ~ a+b+inter, data = dt))
##             Df   Sum Sq   Mean Sq F value Pr(>F)
## a            4 0.001096 2.741e-04   0.898  0.477
## b            1 0.000011 1.061e-05   0.035  0.853
## inter        4 0.000662 1.654e-04   0.542  0.706
## Residuals   30 0.009152 3.051e-04
LSD.test(aov(folsec ~ a + b + inter, data = dt),
         "a", alpha = 0.05)["groups"]
## $groups
##          folsec groups
## MT   0.04325000      a
## VF   0.04042000      a
## VG   0.03673542      a
## VF.1 0.03162250      a
## VA   0.02925000      a
LSD.test(aov(folsec ~ a + b + inter, data = dt),
         "b", alpha = 0.05)["groups"]
## $groups
##            folsec groups
## ino    0.03677050      a
## noinoc 0.03574067      a
LSD.test(aov(folsec ~ a + b + inter, data = dt),
         "inter", alpha = 0.05)["groups"]
## $groups
##                 folsec groups
## MT:noinoc   0.04650000      a
## VF:noinoc   0.04274500     ab
## MT:ino      0.04000000     ab
## VF:ino      0.03809500     ab
## VG:ino      0.03776250     ab
## VA:ino      0.03737500     ab
## VG:noinoc   0.03570833     ab
## VF.1:noinoc 0.03262500     ab
## VF.1:ino    0.03062000     ab
## VA:noinoc   0.02112500      b
shapiro.test(unlist(aov(folsec ~ a + b + inter, 
                        data = dt)["residuals"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  unlist(aov(folsec ~ a + b + inter, data = dt)["residuals"])
## W = 0.95676, p-value = 0.1297
res <-sort(unlist(aov( folsec ~ a + b + inter, 
                       data = dt)["residuals"]),decreasing = TRUE)
ks.test(res,  "pnorm" ,mean(res),sd(res))
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  res
## D = 0.076643, p-value = 0.9586
## alternative hypothesis: two-sided
kruskal(folsec, inter)["groups"]
## $groups
##             folsec groups
## MT:noinoc   27.000      a
## VF:ino      24.250     ab
## MT:ino      24.000     ab
## VA:ino      22.625     ab
## VG:ino      22.375     ab
## VF:noinoc   21.250     ab
## VG:noinoc   21.125     ab
## VF.1:ino    17.000     ab
## VF.1:noinoc 16.250     ab
## VA:noinoc    9.125      b
#######1.4 anova talo seco #################################

summary(aov(talsec ~ a+b+inter, data = dt))
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## a            4   2.88    0.72  11.016 1.29e-05 ***
## b            1  39.25   39.25 601.324  < 2e-16 ***
## inter        4   1.47    0.37   5.637  0.00166 ** 
## Residuals   30   1.96    0.07                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(talsec ~ a + b + inter, data = dt),
         "a", alpha = 0.05)["groups"]
## $groups
##        talsec groups
## MT   1.997250      a
## VF.1 1.502500      b
## VF   1.343000      b
## VA   1.307875      b
## VG   1.272167      b
LSD.test(aov(talsec ~ a + b + inter, data = dt),
         "b", alpha = 0.05)["groups"]
## $groups
##           talsec groups
## noinoc 2.4751833      a
## ino    0.4939333      b
LSD.test(aov(talsec ~ a + b + inter, data = dt),
         "inter", alpha = 0.05)["groups"]
## $groups
##                talsec groups
## MT:noinoc   3.3395000      a
## VF.1:noinoc 2.4315000      b
## VA:noinoc   2.2897500      b
## VG:noinoc   2.2141667      b
## VF:noinoc   2.1010000      b
## MT:ino      0.6550000      c
## VF:ino      0.5850000      c
## VF.1:ino    0.5735000      c
## VG:ino      0.3301667      c
## VA:ino      0.3260000      c
shapiro.test(unlist(aov(talsec ~ a + b + inter, 
                        data = dt)["residuals"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  unlist(aov(talsec ~ a + b + inter, data = dt)["residuals"])
## W = 0.97516, p-value = 0.5154
res <-sort(unlist(aov( talsec ~ a + b + inter, 
                       data = dt)["residuals"]),decreasing = TRUE)
ks.test(res,  "pnorm" ,mean(res),sd(res))
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  res
## D = 0.1726, p-value = 0.1638
## alternative hypothesis: two-sided
kruskal(talsec, inter)["groups"]
## $groups
##             talsec groups
## MT:noinoc   38.250      a
## VF.1:noinoc 31.500     ab
## VA:noinoc   28.750      b
## VG:noinoc   28.000      b
## VF:noinoc   26.000      b
## MT:ino      14.750      c
## VF.1:ino    12.250     cd
## VF:ino      12.250     cd
## VA:ino       6.625      d
## VG:ino       6.625      d
#######1.5 anova raiz seca #################################

summary(aov(rasec ~ a+b+inter, data = dt))
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## a            4  55.69   13.92   7.542 0.000249 ***
## b            1 291.06  291.06 157.676 1.78e-13 ***
## inter        4  16.70    4.18   2.262 0.085836 .  
## Residuals   30  55.38    1.85                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(rasec ~ a + b + inter, data = dt),
         "a", alpha = 0.05)["groups"]
## $groups
##        rasec groups
## MT   7.26250      a
## VF   6.44375      a
## VF.1 5.92625     ab
## VA   4.89125     bc
## VG   3.89375      c
LSD.test(aov(rasec ~ a + b + inter, data = dt),
         "b", alpha = 0.05)["groups"]
## $groups
##        rasec groups
## noinoc 8.381      a
## ino    2.986      b
LSD.test(aov(rasec ~ a + b + inter, data = dt),
         "inter", alpha = 0.05)["groups"]
## $groups
##               rasec groups
## MT:noinoc   10.8150      a
## VF.1:noinoc  8.8975     ab
## VF:noinoc    8.3550      b
## VA:noinoc    7.9675      b
## VG:noinoc    5.8700      c
## VF:ino       4.5325     cd
## MT:ino       3.7100     de
## VF.1:ino     2.9550     de
## VG:ino       1.9175      e
## VA:ino       1.8150      e
shapiro.test(unlist(aov(rasec ~ a + b + inter, 
                        data = dt)["residuals"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  unlist(aov(rasec ~ a + b + inter, data = dt)["residuals"])
## W = 0.97357, p-value = 0.4633
res <-sort(unlist(aov( rasec ~ a + b + inter, 
                       data = dt)["residuals"]),decreasing = TRUE)
ks.test(res,  "pnorm" ,mean(res),sd(res))
## Warning in ks.test(res, "pnorm", mean(res), sd(res)): ties should not be present
## for the Kolmogorov-Smirnov test
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  res
## D = 0.099966, p-value = 0.8189
## alternative hypothesis: two-sided
kruskal(rasec, inter)["groups"]
## $groups
##             rasec groups
## MT:noinoc   37.25      a
## VF.1:noinoc 32.50     ab
## VF:noinoc   30.25     ab
## VA:noinoc   28.25      b
## VG:noinoc   21.00      c
## VF:ino      18.00      c
## MT:ino      16.25     cd
## VF.1:ino    10.50     de
## VG:ino       6.00      e
## VA:ino       5.00      e