diseƱos vistos

FACTORIAL SIMPLE COMPLETAMENTE AL AZAR FACTORIAL COMPLETO EN ARREGLO COMPLETAMENTE AL AZAR FACTORIAL COMPLETO EN BLOQUES COMPLETAMENTE AL AZAR FACTORIAL COMPLETO EN PARCELAS DIVIDIDAS *FACTORIAL INCOMPLETO COMPLETAMENTE AL AZAR

##TRABAJO FACTORIAL INCOMPLETO EN BLOQUES CON COVARIABLES STRIP PLOT DESING

#TRABAJO FINAL DISEƑO MODELOS EFECTOS ALEATORIOS Y MIXTOS DISEƑO EN MEDIDAS REPETIDAS DISEƑO LATTICE ANALISIS DE PERFILES

#REQUIERE POR LO MENOS DOS FACTORES dos veces el experimento (2 aleatorizaciones) riego, fertilizacion, densidad de siembra, uso de maquinaria -factor 1: variedad (v1,v2,v3,v4) -factor 2: riego (r1,r2,r3)

library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.2
## 
## 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)
## Warning: package 'ggplot2' was built under R version 4.2.2
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()
## geom_boxplot: outlier.colour = NULL, outlier.fill = NULL, outlier.shape = 19, outlier.size = 1.5, outlier.stroke = 0.5, outlier.alpha = NULL, notch = FALSE, notchwidth = 0.5, varwidth = FALSE, na.rm = FALSE, orientation = NA
## stat_boxplot: na.rm = FALSE, orientation = NA
## position_dodge2
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   7.22   2.406   0.627  0.616
## f2:f1      6  27.02   4.503   1.173  0.398
## Residuals  9  34.55   3.839