Error: BLOCK
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 4 3435 858.7
Error: BLOCK:TREAT
Df Sum Sq Mean Sq F value Pr(>F)
TREAT 1 20737 20737 83.62 0.000794 ***
Residuals 4 992 248
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
GENOTYPE 14 33364 2383.2 13.318 <2e-16 ***
TREAT:GENOTYPE 14 3535 252.5 1.411 0.16
Residuals 112 20042 178.9
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Hay diferencia significaiva para BIOMDW entre los tipos de riego a un valor p=0.000794 ***. #De igual manera hay diferencias en al menos un tipo de genotipo.Y no hay interacciónTukey_R<-HSD.test(potato2$BIOMDW, potato2$TREAT,alpha=0.01, DFerror =4, MSerror =248);Tukey_R
$statistics
MSerror Df Mean CV MSD
248 4 62.33287 25.26439 11.84043
$parameters
test name.t ntr StudentizedRange alpha
Tukey potato2$TREAT 2 6.511369 0.01
$means
potato2$BIOMDW std r se Min Max Q25 Q50 Q75
WD 50.57507 15.81736 75 1.818424 14.40 114.54 42.005 49.41 58.26
WW 74.09067 24.06450 75 1.818424 16.47 132.70 58.630 71.93 92.99
$comparison
NULL
$groups
potato2$BIOMDW groups
WW 74.09067 a
WD 50.57507 b
attr(,"class")
[1] "group"
Error: BLOCK
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 4 11.64 2.909
Error: BLOCK:TREAT
Df Sum Sq Mean Sq F value Pr(>F)
TREAT 1 124.78 124.78 118.2 0.000406 ***
Residuals 4 4.22 1.06
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
GENOTYPE 14 140.5 10.034 3.433 0.000121 ***
TREAT:GENOTYPE 14 40.4 2.889 0.988 0.469906
Residuals 112 327.4 2.923
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Hay diferencia significaiva para WUE entre los tipos de riego a un valor p=0.000406 ***. #De igual manera hay diferencias en al menos un tipo de genotipo.Y no hay interacciónTukey_R<-HSD.test(potato2$WUE, potato2$TREAT,alpha=0.01, DFerror =4, MSerror =1.06);Tukey_R
$statistics
MSerror Df Mean CV MSD
1.06 4 10.32749 9.969149 0.7740956
$parameters
test name.t ntr StudentizedRange alpha
Tukey potato2$TREAT 2 6.511369 0.01
$means
potato2$WUE std r se Min Max Q25 Q50
WD 11.239565 2.241295 75 0.1188837 5.524348 26.23454 10.259518 10.918783
WW 9.415418 1.435103 75 0.1188837 5.109102 12.13940 8.578011 9.269235
Q75
WD 12.00450
WW 10.36722
$comparison
NULL
$groups
potato2$WUE groups
WD 11.239565 a
WW 9.415418 b
attr(,"class")
[1] "group"
Error: BLOCK
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 4 25.47 6.368
Error: BLOCK:TREAT
Df Sum Sq Mean Sq F value Pr(>F)
TREAT 1 1.360 1.360 1.247 0.327
Residuals 4 4.363 1.091
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
GENOTYPE 14 395.3 28.235 39.540 <2e-16 ***
TREAT:GENOTYPE 14 14.2 1.013 1.419 0.156
Residuals 112 80.0 0.714
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Hay diferencia significaiva para TWUE en al menos un tipo de genotipo a un valor p=<2e-16 ***. #FIJARSE EN DE DONDE SE LLAMA Tukey_R<-HSD.test(potato2$TWUE, potato2$GENOTYPE,alpha=0.001, DFerror =108, MSerror =0.635);Tukey_R
# Extraer los datos del objeto Tukey_Rresults <- Tukey_R$groups# Convertir los resultados a un data frameresults_df <-as.data.frame(results)results_df$Genotype <-rownames(results_df)colnames(results_df) <-c("TWUE", "Group", "Genotype")# Ordenar el data frame por TWUEresults_df <- results_df[order(results_df$TWUE, decreasing =TRUE),]results_df$Genotype <-factor(results_df$Genotype, levels = results_df$Genotype)# Crear el gráfico de barras con ggplot2ggplot(results_df, aes(x = Genotype, y = TWUE, fill = Group)) +geom_bar(stat ="identity") +geom_text(aes(label = Group), vjust =-0.5, color ="black") +scale_fill_brewer(palette ="Set3") +theme_minimal() +theme(axis.text.x =element_text(angle =45, hjust =1),text =element_text(size =12),legend.position ="none") +labs(x ="Genotipos", y ="TWUE") +ylim(0, max(results_df$TWUE) +1)
#supuestos: NORMALIDAD, HOMOGENEIDAD, INDEPENDENCIA resid_potato2 <-aov(TWUE ~ TREAT*GENOTYPE+BLOCK/TREAT,data=potato2)plot(resid_potato2, 2)
# Calcular el tamaño del efecto ff_value <-sqrt(eta_sq / (1- eta_sq))print(paste("Tamaño del efecto f:", f_value))
[1] "Tamaño del efecto f: 0.943786927645647"
pwr.t.test(d=0.943786927645647, sig.level = .05, power=0.265 , type ="two.sample",alternative ="two.sided")
Two-sample t test power calculation
n = 5.079677
d = 0.9437869
sig.level = 0.05
power = 0.265
alternative = two.sided
NOTE: n is number in *each* group