R Markdow
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 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
library(readxl)
library(agricolae)
##
## Attaching package: 'agricolae'
## The following objects are masked from 'package:PerformanceAnalytics':
##
## kurtosis, skewness
exp <- read_excel("C:/Users/User/Desktop/exp.xlsx",
sheet = "expseca3")
attach(exp)
names(exp)
## [1] "vector" "Planta" "defh" "Rept" "numhojas" "areafol"
## [7] "folhas" "folhas2" "talo" "talo2" "raiz" "raiz2"
#View(exp)
attach(exp)
## The following objects are masked from exp (pos = 3):
##
## areafol, defh, folhas, folhas2, numhojas, Planta, raiz, raiz2,
## Rept, talo, talo2, vector
names(exp)
## [1] "vector" "Planta" "defh" "Rept" "numhojas" "areafol"
## [7] "folhas" "folhas2" "talo" "talo2" "raiz" "raiz2"
a <- as.factor(vector)
b <- as.factor(defh)
inter<-as.factor(a:b)
############ 1.1 anova numero de folhas ###########################
summary(aov(numhojas ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 57.79 19.263 5.820 0.00182 **
## b 2 28.00 14.002 4.231 0.02044 *
## inter 6 8.05 1.341 0.405 0.87191
## Residuals 47 155.55 3.310
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
LSD.test(aov(numhojas ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## numhojas groups
## VØ 11.000000 a
## VF 10.733333 a
## MT 10.266667 a
## VG 8.466667 b
LSD.test(aov(numhojas ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## numhojas groups
## 100 10.94737 a
## 60 10.10000 ab
## 30 9.30000 b
LSD.test(aov(numhojas ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## numhojas groups
## VØ:100 12.25 a
## VF:100 11.60 ab
## VØ:60 11.00 abc
## MT:100 10.80 abc
## VF:30 10.40 abc
## MT:60 10.20 abc
## VF:60 10.20 abc
## VØ:30 10.00 abc
## MT:30 9.80 abc
## VG:100 9.40 bc
## VG:60 9.00 cd
## VG:30 7.00 d
shapiro.test(unlist(aov(numhojas ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(numhojas ~ a + b + inter, data = exp)["residuals"])
## W = 0.96913, p-value = 0.1389
res <-sort(unlist(aov( numhojas ~ a + b + inter,
data = exp)["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.10216, p-value = 0.5692
## alternative hypothesis: two-sided
kruskal(numhojas, inter)["groups"]
## $groups
## numhojas groups
## VØ:100 45.75 a
## VF:100 42.50 ab
## VØ:60 37.30 abc
## MT:100 36.70 abc
## VF:30 32.60 abc
## MT:60 30.70 abc
## VF:60 30.30 abc
## VØ:30 29.10 abc
## MT:30 26.60 abcd
## VG:100 23.60 bcd
## VG:60 19.80 cd
## VG:30 8.20 d
############ 1.1 anova area foliar ###########################
summary(aov(areafol ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 19965 6655 10.506 2.1e-05 ***
## b 2 6204 3102 4.897 0.0117 *
## inter 6 6041 1007 1.590 0.1712
## Residuals 47 29772 633
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 1 observation deleted due to missingness
LSD.test(aov(areafol ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## areafol groups
## MT 127.21200 a
## VØ 112.36714 a
## VF 88.59267 b
## VG 81.61467 b
LSD.test(aov(areafol ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## areafol groups
## 100 113.2768 a
## 60 105.0940 a
## 30 89.0145 b
LSD.test(aov(areafol ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## areafol groups
## VØ:100 141.080 a
## MT:100 140.616 a
## MT:60 126.520 ab
## MT:30 114.500 abc
## VØ:60 108.070 abcd
## VG:100 98.796 bcd
## VF:60 97.906 bcd
## VØ:30 93.694 cd
## VF:30 89.696 cde
## VG:60 87.880 cde
## VF:100 78.176 de
## VG:30 58.168 e
shapiro.test(unlist(aov(areafol ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(areafol ~ a + b + inter, data = exp)["residuals"])
## W = 0.97008, p-value = 0.1543
res <-sort(unlist(aov( areafol ~ a + b + inter,
data = exp)["residuals"]),decreasing = TRUE)
ks.test(res, "pnorm" ,mean(res),sd(res))
##
## One-sample Kolmogorov-Smirnov test
##
## data: res
## D = 0.092281, p-value = 0.6622
## alternative hypothesis: two-sided
kruskal(areafol, inter)["groups"]
## $groups
## areafol groups
## MT:100 49.8 a
## VØ:100 49.5 ab
## MT:60 44.0 abc
## MT:30 36.8 abcd
## VØ:60 31.8 bcde
## VG:100 27.6 cdef
## VF:60 27.0 cdef
## VØ:30 24.4 def
## VF:30 22.4 def
## VG:60 21.0 def
## VF:100 18.2 ef
## VG:30 11.4 f
############ 1.1 anova Biomassa de folhas###########################
summary(aov(folhas ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 0.3864 0.12881 10.865 1.46e-05 ***
## b 2 0.1219 0.06096 5.142 0.00948 **
## inter 6 0.0841 0.01401 1.182 0.33190
## Residuals 48 0.5691 0.01186
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(folhas ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## folhas groups
## MT 0.4606667 a
## VØ 0.3786667 b
## VF 0.2700000 c
## VG 0.2700000 c
LSD.test(aov(folhas ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## folhas groups
## 100 0.4065 a
## 60 0.3280 b
## 30 0.3000 b
LSD.test(aov(folhas ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## folhas groups
## MT:100 0.538 a
## VØ:100 0.480 ab
## MT:60 0.474 ab
## MT:30 0.370 bc
## VG:100 0.344 bc
## VØ:60 0.330 cd
## VØ:30 0.326 cd
## VF:30 0.300 cd
## VF:100 0.264 cd
## VG:60 0.262 cd
## VF:60 0.246 cd
## VG:30 0.204 d
shapiro.test(unlist(aov(folhas ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(folhas ~ a + b + inter, data = exp)["residuals"])
## W = 0.98706, p-value = 0.776
res <-sort(unlist(aov( folhas ~ a + b + inter,
data = exp)["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.083333, p-value = 0.799
## alternative hypothesis: two-sided
kruskal(folhas, inter)["groups"]
## $groups
## folhas groups
## MT:60 50.7 a
## MT:100 50.5 a
## VØ:100 46.3 ab
## MT:30 36.5 abc
## VG:100 30.9 bcd
## VØ:60 28.9 cde
## VØ:30 28.1 cde
## VF:30 23.7 cde
## VG:60 20.9 cde
## VF:100 18.9 de
## VF:60 17.2 de
## VG:30 13.4 e
############ 1.1 anova Biomassa de talo ###########################
summary(aov(talo ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 0.2088 0.06961 7.300 0.000396 ***
## b 2 0.0769 0.03845 4.033 0.024050 *
## inter 6 0.0089 0.00148 0.156 0.987011
## Residuals 48 0.4577 0.00953
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(talo ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## talo groups
## MT 0.3366667 a
## VØ 0.2900000 a
## VF 0.2713333 a
## VG 0.1746667 b
LSD.test(aov(talo ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## talo groups
## 100 0.3180 a
## 60 0.2510 b
## 30 0.2355 b
LSD.test(aov(talo ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## talo groups
## MT:100 0.398 a
## MT:60 0.334 ab
## VØ:100 0.326 ab
## VF:100 0.322 ab
## VØ:60 0.280 ab
## MT:30 0.278 ab
## VØ:30 0.264 bc
## VF:30 0.252 bc
## VF:60 0.240 bc
## VG:100 0.226 bc
## VG:60 0.150 c
## VG:30 0.148 c
shapiro.test(unlist(aov(talo ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(talo ~ a + b + inter, data = exp)["residuals"])
## W = 0.91865, p-value = 0.0006767
res <-sort(unlist(aov( talo ~ a + b + inter,
data = exp)["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.1174, p-value = 0.3799
## alternative hypothesis: two-sided
kruskal(talo, inter)["groups"]
## $groups
## talo groups
## MT:100 50.2 a
## MT:60 41.7 ab
## VF:100 41.2 ab
## VØ:100 34.2 ab
## VØ:60 33.7 ab
## MT:30 33.4 ab
## VØ:30 31.4 b
## VF:30 29.7 b
## VF:60 27.2 bc
## VG:100 23.9 bc
## VG:30 10.5 c
## VG:60 8.9 c
############ 1.1 anova Biomassa de talo2 ###########################
summary(aov(talo2 ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 0.2531 0.08437 5.973 0.00152 **
## b 2 0.0749 0.03744 2.650 0.08094 .
## inter 6 0.0930 0.01551 1.098 0.37750
## Residuals 48 0.6780 0.01413
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(talo2 ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## talo2 groups
## MT 0.314 a
## VØ 0.280 ab
## VF 0.226 bc
## VG 0.142 c
LSD.test(aov(talo2 ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## talo2 groups
## 100 0.2885 a
## 60 0.2285 ab
## 30 0.2045 b
LSD.test(aov(talo2 ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## talo2 groups
## MT:100 0.392 a
## VØ:100 0.370 ab
## VØ:60 0.306 abc
## MT:60 0.282 abcd
## MT:30 0.268 abcd
## VF:30 0.248 abcd
## VF:100 0.240 bcd
## VF:60 0.190 cd
## VØ:30 0.164 cd
## VG:100 0.152 d
## VG:30 0.138 d
## VG:60 0.136 d
shapiro.test(unlist(aov(talo2 ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(talo2 ~ a + b + inter, data = exp)["residuals"])
## W = 0.97962, p-value = 0.4126
res <-sort(unlist(aov( talo2 ~ a + b + inter,
data = exp)["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.064742, p-value = 0.963
## alternative hypothesis: two-sided
kruskal(talo2, inter)["groups"]
## $groups
## talo2 groups
## MT:100 49.5 a
## VØ:100 47.0 ab
## VØ:60 38.1 abc
## MT:60 37.4 abc
## MT:30 34.3 abcd
## VF:30 29.5 bcd
## VF:100 28.9 bcd
## VF:60 23.9 cd
## VG:100 21.9 cd
## VG:60 19.3 cd
## VØ:30 19.2 cd
## VG:30 17.0 d
############ 1.1 anova Biomassa de raiz###########################
summary(aov(raiz ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 0.04236 0.014120 11.519 8.31e-06 ***
## b 2 0.00352 0.001762 1.437 0.248
## inter 6 0.00845 0.001408 1.149 0.349
## Residuals 48 0.05884 0.001226
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(raiz ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## raiz groups
## MT 0.1560000 a
## VØ 0.1360000 a
## VF 0.1006667 b
## VG 0.0900000 b
LSD.test(aov(raiz ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## raiz groups
## 60 0.1290 a
## 100 0.1225 a
## 30 0.1105 a
LSD.test(aov(raiz ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## raiz groups
## MT:60 0.178 a
## VØ:100 0.150 ab
## VØ:60 0.148 abc
## MT:30 0.146 abc
## MT:100 0.144 abc
## VF:100 0.112 bcd
## VØ:30 0.110 bcd
## VF:30 0.104 cd
## VG:60 0.104 cd
## VF:60 0.086 d
## VG:100 0.084 d
## VG:30 0.082 d
shapiro.test(unlist(aov(raiz ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(raiz ~ a + b + inter, data = exp)["residuals"])
## W = 0.97019, p-value = 0.149
res <-sort(unlist(aov( raiz ~ a + b + inter,
data = exp)["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.066658, p-value = 0.9525
## alternative hypothesis: two-sided
kruskal(raiz, inter)["groups"]
## $groups
## raiz groups
## MT:60 52.6 a
## VØ:100 45.4 a
## MT:30 42.9 ab
## MT:100 42.7 abc
## VØ:60 36.7 abcd
## VF:100 26.6 bcde
## VØ:30 25.8 cde
## VG:60 23.5 de
## VF:30 23.1 de
## VG:100 17.5 e
## VF:60 16.1 e
## VG:30 13.1 e
############ 1.1 anova Biomassa de raiz2 ###########################
summary(aov(raiz2 ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 0.05526 0.018419 7.112 0.000477 ***
## b 2 0.00434 0.002172 0.838 0.438600
## inter 6 0.01218 0.002029 0.784 0.587028
## Residuals 48 0.12432 0.002590
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(raiz2 ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## raiz2 groups
## MT 0.14466667 a
## VØ 0.11533333 ab
## VF 0.09000000 bc
## VG 0.06266667 c
LSD.test(aov( raiz2 ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## raiz2 groups
## 100 0.1145 a
## 60 0.1010 a
## 30 0.0940 a
LSD.test(aov(raiz2 ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## raiz2 groups
## MT:100 0.170 a
## VØ:100 0.138 ab
## MT:60 0.134 abc
## MT:30 0.130 abc
## VØ:60 0.120 abcd
## VF:30 0.108 abcde
## VF:60 0.090 bcde
## VØ:30 0.088 bcde
## VG:100 0.078 bcde
## VF:100 0.072 cde
## VG:60 0.060 de
## VG:30 0.050 e
shapiro.test(unlist(aov(raiz2 ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(raiz2 ~ a + b + inter, data = exp)["residuals"])
## W = 0.96477, p-value = 0.08065
res <-sort(unlist(aov( raiz2 ~ a + b + inter,
data = exp)["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.097107, p-value = 0.6235
## alternative hypothesis: two-sided
kruskal(raiz2, inter)["groups"]
## $groups
## raiz2 groups
## MT:100 51.4 a
## MT:60 42.7 ab
## MT:30 40.5 ab
## VØ:100 39.1 abc
## VØ:60 35.8 abcd
## VF:30 30.9 bcde
## VF:60 26.0 bcde
## VØ:30 26.0 bcde
## VG:100 21.2 cde
## VG:60 19.0 de
## VF:100 18.7 de
## VG:30 14.7 e
########## Anova CLOROFILA EXPERIMENTOS 2-3##############
exp <- read_excel("C:/Users/User/Desktop/exp.xlsx",
sheet = "clor2")
#View(exp)
attach(exp)
names(exp)
## [1] "genot" "cc" "rep" "clora2" "clorb2" "clortot2"
a <- as.factor(genot)
b <- as.factor(cc)
inter<-as.factor(a:b)
############ 1.1 anova Clorofila A2 ###########################
summary(aov(clora2 ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 336.2 112.06 4.406 0.00833 **
## b 2 0.9 0.46 0.018 0.98208
## inter 6 203.8 33.97 1.336 0.26094
## Residuals 46 1170.0 25.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
LSD.test(aov(clora2 ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clora2 groups
## VF 38.91333 a
## VA 37.50000 a
## MT 36.20667 ab
## VG 32.51333 b
LSD.test(aov(clora2 ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clora2 groups
## 60 36.38000 a
## 100 36.23333 a
## 30 36.11000 a
LSD.test(aov(clora2 ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clora2 groups
## VA:60 41.26000 a
## VF:30 40.82000 ab
## VF:100 38.88000 abc
## MT:100 37.96000 abc
## VF:60 37.04000 abcd
## MT:60 36.16000 abcd
## VA:30 35.94000 abcd
## MT:30 34.50000 bcd
## VA:100 33.83333 bcd
## VG:100 33.30000 cd
## VG:30 33.18000 cd
## VG:60 31.06000 d
shapiro.test(unlist(aov(clora2 ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clora2 ~ a + b + inter, data = exp)["residuals"])
## W = 0.97854, p-value = 0.3924
res <-sort(unlist(aov( clora2 ~ a + b + inter,
data = exp)["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.068384, p-value = 0.9491
## alternative hypothesis: two-sided
kruskal(clora2, inter)["groups"]
## $groups
## clora2 groups
## VA:60 45.40000 a
## VF:30 45.30000 a
## VF:100 36.70000 ab
## MT:100 35.10000 ab
## VA:30 29.80000 abc
## VF:60 29.50000 abc
## MT:60 27.60000 abc
## MT:30 27.40000 abc
## VG:30 20.60000 bc
## VA:100 19.33333 bc
## VG:100 18.20000 bc
## VG:60 15.00000 c
############ 1.2 anova Clorofila B2 ###########################
summary(aov(clorb2 ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 184.6 61.52 4.290 0.00944 **
## b 2 1.4 0.68 0.047 0.95406
## inter 6 102.2 17.03 1.188 0.32965
## Residuals 46 659.6 14.34
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 2 observations deleted due to missingness
LSD.test(aov(clorb2 ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clorb2 groups
## VA 15.56923 a
## VF 15.18667 a
## MT 14.96667 a
## VG 11.18000 b
LSD.test(aov(clorb2 ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clorb2 groups
## 30 14.43500 a
## 60 14.10000 a
## 100 13.98333 a
LSD.test(aov(clorb2 ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clorb2 groups
## VA:60 17.34000 a
## VF:30 16.96000 ab
## VF:100 16.04000 ab
## MT:100 15.70000 abc
## MT:60 15.34000 abc
## VA:30 14.52000 abcd
## VA:100 14.36667 abcd
## MT:30 13.86000 abcd
## VF:60 12.56000 abcd
## VG:30 12.40000 bcd
## VG:60 11.16000 cd
## VG:100 9.98000 d
shapiro.test(unlist(aov(clorb2 ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clorb2 ~ a + b + inter, data = exp)["residuals"])
## W = 0.96355, p-value = 0.07887
res <-sort(unlist(aov( clorb2 ~ a + b + inter,
data = exp)["residuals"]),decreasing = TRUE)
ks.test(res, "pnorm" ,mean(res),sd(res))
##
## One-sample Kolmogorov-Smirnov test
##
## data: res
## D = 0.08704, p-value = 0.7388
## alternative hypothesis: two-sided
kruskal(clorb2, inter)["groups"]
## $groups
## clorb2 groups
## VA:60 44.2 a
## VF:30 41.7 ab
## VF:100 37.1 abc
## MT:60 35.5 abc
## MT:100 34.8 abcd
## VA:30 29.7 abcd
## VA:100 27.0 abcd
## MT:30 25.2 abcd
## VF:60 23.9 bcd
## VG:30 21.1 cd
## VG:60 17.6 cd
## VG:100 15.2 d
############ 1.2 anova Clorofila total2 ###########################
summary(aov(clortot2 ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 1015 338.3 2.721 0.0547 .
## b 2 377 188.5 1.516 0.2299
## inter 6 2248 374.6 3.013 0.0140 *
## Residuals 48 5969 124.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LSD.test(aov(clortot2 ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clortot2 groups
## VF 54.10000 a
## MT 51.17333 ab
## VA 45.99333 ab
## VG 43.69333 b
LSD.test(aov(clortot2 ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clortot2 groups
## 30 50.545 a
## 60 50.480 a
## 100 45.195 a
LSD.test(aov(clortot2 ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clortot2 groups
## VA:60 58.60 a
## VF:30 57.78 a
## VF:100 54.92 ab
## MT:100 53.66 ab
## MT:60 51.50 ab
## VA:30 50.46 ab
## VF:60 49.60 ab
## MT:30 48.36 ab
## VG:30 45.58 ab
## VG:100 43.28 b
## VG:60 42.22 bc
## VA:100 28.92 c
shapiro.test(unlist(aov(clortot2 ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clortot2 ~ a + b + inter, data = exp)["residuals"])
## W = 0.96518, p-value = 0.08453
res <-sort(unlist(aov( clortot2~ a + b + inter,
data = exp)["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.081413, p-value = 0.8213
## alternative hypothesis: two-sided
kruskal(clortot2,inter)["groups"]
## $groups
## clortot2 groups
## VA:60 47.2 a
## VF:30 45.6 a
## VF:100 38.8 ab
## MT:100 38.4 ab
## MT:60 33.7 abc
## VA:30 32.4 abc
## VF:60 28.2 abc
## MT:30 28.0 abc
## VG:30 23.2 bc
## VG:100 18.3 c
## VG:60 16.6 c
## VA:100 15.6 c
exp <- read_excel("C:/Users/User/Desktop/exp.xlsx",
sheet = "clor3")
#View(exp)
attach(exp)
## The following objects are masked from exp (pos = 3):
##
## cc, genot, rep
names(exp)
## [1] "genot" "cc" "rep" "clora" "clorb" "clor"
a <- as.factor(genot)
b <- as.factor(cc)
inter<-as.factor(a:b)
############ 1.2 anova Clorofila A3 ###########################
summary(aov(clora ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 7.5 2.49 0.050 0.985
## b 2 48.8 24.42 0.487 0.617
## inter 6 246.5 41.08 0.820 0.560
## Residuals 48 2406.2 50.13
LSD.test(aov(clora ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clora groups
## VA 37.92667 a
## MT 37.69333 a
## VF 37.60667 a
## VG 36.97333 a
LSD.test(aov(clora ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clora groups
## 30 38.65 a
## 100 37.56 a
## 60 36.44 a
LSD.test(aov(clora ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clora groups
## MT:100 40.36 a
## VA:60 39.66 a
## VF:30 39.36 a
## VA:30 39.30 a
## VF:100 39.22 a
## MT:30 39.02 a
## VG:60 38.16 a
## VG:30 36.92 a
## VG:100 35.84 a
## VA:100 34.82 a
## VF:60 34.24 a
## MT:60 33.70 a
shapiro.test(unlist(aov(clora ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clora ~ a + b + inter, data = exp)["residuals"])
## W = 0.81671, p-value = 3.613e-07
res <-sort(unlist(aov( clora ~ a + b + inter,
data = exp)["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.18426, p-value = 0.03401
## alternative hypothesis: two-sided
kruskal(clora, inter)["groups"]
## $groups
## clora groups
## VA:100 36.8 a
## MT:30 35.6 a
## VA:60 35.4 a
## VG:60 34.7 a
## VA:30 32.4 a
## VF:30 31.4 a
## MT:100 31.1 a
## MT:60 29.8 a
## VF:100 29.2 a
## VF:60 27.8 a
## VG:100 22.6 a
## VG:30 19.2 a
############ 1.2 anova Clorofila B3 ###########################
summary(aov(clorb ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 41.7 13.905 0.894 0.451
## b 2 12.9 6.469 0.416 0.662
## inter 6 85.0 14.174 0.911 0.495
## Residuals 48 746.9 15.561
LSD.test(aov(clorb ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clorb groups
## VA 17.12667 a
## VF 16.42667 a
## MT 15.91333 a
## VG 14.84000 a
LSD.test(aov(clorb ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clorb groups
## 60 16.56 a
## 30 16.22 a
## 100 15.45 a
LSD.test(aov(clorb ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clorb groups
## VA:100 18.22 a
## MT:60 17.78 a
## VF:30 17.12 ab
## VF:100 16.92 ab
## VA:60 16.74 ab
## VG:60 16.48 ab
## VA:30 16.42 ab
## MT:30 15.68 ab
## VG:30 15.66 ab
## VF:60 15.24 ab
## MT:100 14.28 ab
## VG:100 12.38 b
shapiro.test(unlist(aov(clorb ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clorb ~ a + b + inter, data = exp)["residuals"])
## W = 0.8978, p-value = 0.0001095
res <-sort(unlist(aov( clorb ~ a + b + inter,
data = exp)["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.13566, p-value = 0.2194
## alternative hypothesis: two-sided
kruskal(clorb, inter)["groups"]
## $groups
## clorb groups
## VA:100 45.0 a
## MT:60 38.0 ab
## VG:60 34.5 ab
## VF:30 34.1 ab
## VF:100 33.0 ab
## VA:30 32.1 ab
## VA:60 31.6 ab
## MT:30 31.0 ab
## VF:60 25.5 ab
## VG:30 25.5 ab
## VG:100 19.4 b
## MT:100 16.3 b
############ 1.2 anova Clorofila total3 ###########################
summary(aov(clor ~ a+b+inter, data = exp))
## Df Sum Sq Mean Sq F value Pr(>F)
## a 3 82 27.45 0.304 0.822
## b 2 46 23.19 0.257 0.775
## inter 6 282 47.06 0.521 0.790
## Residuals 48 4336 90.34
LSD.test(aov(clor ~ a + b + inter, data = exp),
"a", alpha = 0.05)["groups"]
## $groups
## clor groups
## VA 55.05333 a
## VF 54.03333 a
## MT 53.60667 a
## VG 51.81333 a
LSD.test(aov(clor ~ a + b + inter, data = exp),
"b", alpha = 0.05)["groups"]
## $groups
## clor groups
## 30 54.87 a
## 100 53.01 a
## 60 53.00 a
LSD.test(aov(clor ~ a + b + inter, data = exp),
"inter", alpha = 0.05)["groups"]
## $groups
## clor groups
## VF:30 56.48 a
## VA:60 56.40 a
## VF:100 56.14 a
## VA:30 55.72 a
## MT:30 54.70 a
## MT:100 54.64 a
## VG:60 54.64 a
## VA:100 53.04 a
## VG:30 52.58 a
## MT:60 51.48 a
## VF:60 49.48 a
## VG:100 48.22 a
shapiro.test(unlist(aov(clor ~ a + b + inter,
data = exp)["residuals"]))
##
## Shapiro-Wilk normality test
##
## data: unlist(aov(clor ~ a + b + inter, data = exp)["residuals"])
## W = 0.86674, p-value = 9.859e-06
res <-sort(unlist(aov( clor~ a + b + inter,
data = exp)["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.14964, p-value = 0.1361
## alternative hypothesis: two-sided
kruskal(clor,inter)["groups"]
## $groups
## clor groups
## VG:60 37.7 a
## VA:100 35.7 a
## VF:30 34.6 a
## VA:30 33.6 a
## MT:30 33.5 a
## VA:60 32.5 a
## VF:100 31.1 a
## MT:60 30.2 a
## MT:100 28.1 a
## VF:60 25.9 a
## VG:30 22.2 a
## VG:100 20.9 a