3- Albumina
dat = read.csv("Albumina.csv",
#colClasses = c(rep("integer", 15), rep("NULL", 4)),
dec=".", header=T, sep=",", check.names=FALSE,
na.strings=".")
dat <- dat[,1:11]
2 - Batimento
bati = read.csv("batimento.csv",
dec=".", header=T, sep=";", check.names=FALSE,
na.strings=".")
long <-melt(dat, id.vars = c("ani","trat", "bloc"),
variable.name="dias", value.name="val")
head(long)
long = long[complete.cases(long),]
head(long) # str(long3)
#for (i in 1:4) long3[,i] <- as.factor(long3[,i])
da = aggregate(cbind(ger_bda, ger_f) ~ exp * rep * transf, data = long3, mean)
da3$resp = da3$ger_f / da3$ger_bda
da3$sy <- c(1,19)[match(da3$exp, c(1,2))]
#str(da3)
boxplot(bat ~ trat, data=bati, col=c("green", "red", "blue"))
mod = lm(bat ~ trat + bloc, data=bati)
anova(mod)
## Analysis of Variance Table
##
## Response: bat
## Df Sum Sq Mean Sq F value Pr(>F)
## trat 1 1.37 1.3750 0.0461 0.8311
## bloc 1 9.60 9.6014 0.3220 0.5737
## Residuals 38 1132.97 29.8150
par(mfrow=c(2,2)); plot(mod, which=1:3); boxcox(mod); layout(1)
(mo1 = ea1(dplyr::select(bati, Treatments=trat, Blocks=bloc, bat), design=2))
## $`Analysis of variance`
## df type III SS mean square F value p>F
## treatments 2 1.3338 0.6669 0.022 0.9783
## blocks 3 75.6523 25.2174 0.8305 0.4861
## Residuals 35 1062.7417 30.3640 - -
##
## $`Adjusted means`
## treatment adjusted.mean standard.error tukey snk duncan t scott_knott
## 1 1 47.8213 1.5061 a a a a a
## 2 3 47.6345 1.5019 a a a a a
## 3 2 47.3605 1.5808 a a a a a
##
## $`Multiple comparison test`
## pair contrast p(tukey) p(snk) p(duncan) p(t)
## 1 1 - 3 0.1868 0.9958 0.9305 0.9305 0.9305
## 2 1 - 2 0.4608 0.9758 0.9758 0.8443 0.8341
## 3 3 - 2 0.2740 0.9913 0.9007 0.9007 0.9007
##
## $`Residual analysis`
## values
## p.value Shapiro-Wilk test 0.1478
## p.value Bartlett test 0.8561
## coefficient of variation (%) 11.5200
## first value most discrepant 4.0000
## second value most discrepant 19.0000
## third value most discrepant 22.0000
df1 = data.frame(
trat = (mo3[[2]][with(mo3[[2]], order(treatment)), ])$treatment,
let = (mo3[[2]][with(mo3[[2]], order(treatment)), ])$tukey,
me = (mo3[[2]][with(mo3[[2]], order(treatment)), ])$adjusted.mean,
se = (mo3[[2]][with(mo3[[2]], order(treatment)), ])$standard.error
); df1
str(long)
ggplot(dat, aes(trat, bat)) + geom_point() + geom_line() + facet_wrap(ani~trat)
(p_ger6 = ggplot(sumdat1, aes(trat, resp)) +
theme_bw() + geom_point(size=3, lty=3) +
geom_errorbar(aes(x = trat, ymin = bati-ci, ymax = resp+ci),
colour="black", width=.1) +
geom_hline(yintercept=sumda3[1,3], linetype=2) +
scale_y_continuous(limits= c(0,1)) +
xlab("") + ylab("Propor??o de con?dios resistentes germinados") +
# ggtitle("Germinação de conÃdios \n (Pêssegos enlatados)") +
annotate("text", x = (1:6) - 0.25, y = sumda3$resp + 0.02,
label = round(sumda3$resp,2), size=4)+
annotate("text", x = (1:6) - 0.25, y = sumda3$resp - 0.01,
label = df3$let, size=4) +
theme(axis.title.x=element_text(vjust=0.1, size=14))+
theme(axis.title.y=element_text(vjust=1, size=14))+
theme(axis.text.x=element_text(size=14, vjust=0.5)) +
theme(axis.text.y=element_text(size=14, vjust=0.5)) +
annotate("text", x = 6.3, y = 0.1, label = "C", fontface=2)
)
2 - Frequencia
freq = read.csv("frequencia.csv",
dec=".", header=T, sep=";", check.names=FALSE,
na.strings=".")
boxplot(freq ~ trat, data=freq, col=c("green", "red", "blue"))
modf = lm(freq ~ trat + bloc, data=freq)
anova(modf)
## Analysis of Variance Table
##
## Response: freq
## Df Sum Sq Mean Sq F value Pr(>F)
## trat 1 0.004 0.004 0.001 0.974814
## bloc 1 38.674 38.674 10.827 0.002164 **
## Residuals 38 135.733 3.572
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow=c(2,2)); plot(modf, which=1:3); boxcox(modf); layout(1)
(mo2 = ea1(dplyr::select(freq, Treatments=trat, Blocks=bloc, freq), design=2))
## $`Analysis of variance`
## df type III SS mean square F value p>F
## treatments 2 0.4310 0.2155 0.06 0.9419
## blocks 3 48.4342 16.1447 4.4929 0.0091
## Residuals 35 125.7676 3.5934 - -
##
## $`Adjusted means`
## treatment adjusted.mean standard.error tukey snk duncan t scott_knott
## 1 1 11.1701 0.5181 a a a a a
## 2 3 11.1333 0.5167 a a a a a
## 3 2 10.9259 0.5438 a a a a a
##
## $`Multiple comparison test`
## pair contrast p(tukey) p(snk) p(duncan) p(t)
## 1 1 - 3 0.0368 0.9986 0.9602 0.9602 0.9602
## 2 1 - 2 0.2442 0.9435 0.9435 0.7623 0.7470
## 3 3 - 2 0.2074 0.9588 0.7838 0.7838 0.7838
##
## $`Residual analysis`
## values
## p.value Shapiro-Wilk test 0.3770
## p.value Bartlett test 0.4329
## coefficient of variation (%) 16.9400
## first value most discrepant 14.0000
## second value most discrepant 11.0000
## third value most discrepant 8.0000
3 - temperatura retal
tret = read.csv("tempret.csv", dec=".", header=T, sep=";", check.names=FALSE,
na.strings=".")
boxplot(temp ~ trat, data=tret, col=c("green", "red", "blue"))
modt = lm(temp ~ trat + bloc, data=tret) ; anova(modt)
## Analysis of Variance Table
##
## Response: temp
## Df Sum Sq Mean Sq F value Pr(>F)
## trat 1 0.0229 0.022873 0.1802 0.6736
## bloc 1 0.0338 0.033776 0.2661 0.6089
## Residuals 38 4.8230 0.126920
par(mfrow=c(2,2)); plot(modt, which=1:3); boxcox(modt); layout(1)
(mo3 = ea1(dplyr::select(tret, Treatments=trat, Blocks=bloc, temp), design=2))
## $`Analysis of variance`
## df type III SS mean square F value p>F
## treatments 2 0.1271 0.0636 0.6128 0.5475
## blocks 3 1.0625 0.3542 3.4142 0.0279
## Residuals 35 3.6308 0.1037 - -
##
## $`Adjusted means`
## treatment adjusted.mean standard.error tukey snk duncan t scott_knott
## 1 2 38.4336 0.0924 a a a a a
## 2 1 38.4324 0.0880 a a a a a
## 3 3 38.3149 0.0878 a a a a a
##
## $`Multiple comparison test`
## pair contrast p(tukey) p(snk) p(duncan) p(t)
## 1 2 - 1 0.0012 1.0000 0.9925 0.9925 0.9925
## 2 2 - 3 0.1187 0.6245 0.6245 0.3872 0.3581
## 3 1 - 3 0.1175 0.6158 0.3510 0.3510 0.3510
##
## $`Residual analysis`
## values
## p.value Shapiro-Wilk test 0.3843
## p.value Bartlett test 0.7275
## coefficient of variation (%) 0.8400
## first value most discrepant 31.0000
## second value most discrepant 41.0000
## third value most discrepant 23.0000