##Diseño de parcelas dividas

#Diseños vistos (parcial)

Facotrial completo al azar Factorial completo en bloques Parcelas divididas Factorial incompleto al azar

Trabajo parcial Factorial inconpleto en bloques y covariable Strip Plot Desing


Trabajo final (Quiz) Modelos efectos aleatorios y mixtos Diseño en medias repetidas Diseño lattice Analisis de perfiles

###PARCELAS DIVIDIDAS (Split plot desing)

-Debe contener por los menos 2 factores -Dos aleatoriazariones (se realiza dos veces el experimento) -Es comun en problemas relacionado en riego, fertilización, densidad, maquinaria -Podría necesitar bloques -Factor 1: parcela (s1,s2, s3)(pordría ser bloqueo) -Factor 2: fertilización (F0, F1, F2)

EXAMPLE

F1 : Variedad (V1,V2,V3,V4) F2 : Riego (R1,R2,R3) Tratamiento : 4 x 3 = 12 X2 rep/trat x 12 trat = 24 unidades experimentales

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
xy = expand.grid(y = seq(4), x = seq(6))
f2 = gl(3, 8, 24, paste0('R',1:3))
lf1 = paste0('V',1:4)
f1 = c(sample(lf1),sample(lf1),
       sample(lf1),sample(lf1),
       sample(lf1),sample(lf1))
rep = rep(rep(paste0('r',1:2), each=4), 3)

data = data.frame(xy, f1, f2, rep)
data$name = with(data, paste0(f1, rep))

library(ggplot2)
ggplot(data)+
  aes(x,y,label=name, fill=f1)+
  geom_tile(color='white')+
  geom_text()+
  facet_wrap(~f2, scales = 'free')+
  theme(axis.text = element_blank())

library(dplyr)
xy = expand.grid(y = seq(4), x = seq(6))
f2 = gl(3, 8, 24, paste0('R',1:3))
lf1 = paste0('V',1:4)
f1 = c(sample(lf1),sample(lf1),
       sample(lf1),sample(lf1),
       sample(lf1),sample(lf1))
rep = rep(rep(paste0('r',1:2), each=4), 3)

data = data.frame(xy, f1, f2, rep)
data$name = with(data, paste0(f1, rep))
library(ggplot2)
ggplot(data)+
  aes(x,y,label=name, fill=f1)+
  geom_tile(color='white')+
  geom_text()+
  facet_wrap(~f2, scales = 'free')+
  theme(axis.text = element_blank())

set.seed(123)
data$biom = rnorm(24, 8, 2)

Analisis descriptivo

ggplot(data)+
  aes(f2, biom)+
  geom_boxplot()

ggplot(data)+
  aes(f1, biom)+
  geom_boxplot()

ggplot(data)+
  aes(f2, biom, fill=f1)+
  geom_boxplot()

mod1 = aov(biom ~ f2 * f1 + Error(f2:rep), data)
## Warning in aov(biom ~ f2 * f1 + Error(f2:rep), data): Error() model is singular
summary(mod1)
## 
## Error: f2:rep
##           Df Sum Sq Mean Sq F value Pr(>F)  
## f2         2 13.327   6.664   8.078  0.062 .
## Residuals  3  2.475   0.825                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Error: Within
##           Df Sum Sq Mean Sq F value Pr(>F)  
## f1         3   6.08   2.028   0.870 0.4915  
## f2:f1      6  41.73   6.955   2.985 0.0686 .
## Residuals  9  20.97   2.330                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Como el p-value en el fila F1:F2 es mayor al 5% se rechaza la hipoteis nula, por ende no hay interacción Los p-value de los factores es mayo al 5%, por ende el efecto de los tratamientos no influye en la biomasa