One-way analysis of variance of genotypes conducted in both randomized complete block and alpha-lattice designs.
gafem(.data, gen, rep, resp, prob = 0.05, block = NULL, verbose = TRUE)
.data | The dataset containing the columns related to, Genotypes, replication/block and response variable(s). |
---|---|
gen | The name of the column that contains the levels of the genotypes, that will be treated as random effect. |
rep | The name of the column that contains the levels of the replications (assumed to be fixed). |
resp | The response variable(s). To analyze multiple variables in a
single procedure a vector of variables may be used. For example |
prob | The error probability. Defaults to 0.05. |
block | Defaults to |
verbose | Logical argument. If |
A list where each element is the result for one variable containing the following objects:
anova: The one-way ANOVA table.
model: The model with of lm
.
augment: Information about each observation in the dataset. This
includes predicted values in the fitted
column, residuals in the
resid
column, standardized residuals in the stdres
column,
the diagonal of the 'hat' matrix in the hat
, and standard errors for
the fitted values in the se.fit
column.
hsd: The Tukey's 'Honest Significant Difference' for genotype effect.
details: A tibble with the following data: Ngen
, the
number of genotypes; OVmean
, the grand mean; Min
, the minimum
observed (returning the genotype and replication/block); Max
the
maximum observed, MinGEN
the loser winner genotype, MaxGEN
,
the winner genotype.
gafem
analyses data from a one-way genotype testing
experiment. By default, a randomized complete block design is used
according to the following model:
\[Y_{ij} = m + g_i + r_j + e_{ij}\]
where \(Y_{ij}\) is the response variable of the ith genotype in the
jth block; m is the grand mean (fixed); \(g_i\) is the effect
of the ith genotype; \(r_j\) is the effect of the jth
replicate; and \(e_{ij}\) is the random error.
When block
is informed, then a resolvable alpha design is implemented,
according to the following model:
\[Y_{ijk} = m + g_i + r_j + b_{jk} + e_{ijk}\] where where \(y_{ijk}\) is the response variable of the ith genotype in the kth block of the jth replicate; m is the intercept, \(t_i\) is the effect for the ith genotype \(r_j\) is the effect of the jth replicate, \(b_{jk}\) is the effect of the kth incomplete block of the jth replicate, and \(e_{ijk}\) is the plot error effect corresponding to \(y_{ijk}\). All effects, except the random error are assumed to be fixed.
Patterson, H.D., and E.R. Williams. 1976. A new class of resolvable incomplete block designs. Biometrika 63:83-92.
Tiago Olivoto tiagoolivoto@gmail.com
# \donttest{ library(metan) # RCBD rcbd <- gafem(data_g, gen = GEN, rep = REP, resp = c(PH, ED, EL, CL, CW))#> variable PH #> --------------------------------------------------------------------------- #> One-way ANOVA table (randomized complete block design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 0.101 0.0507 1.55 0.2328 #> GEN 12 1.008 0.0840 2.56 0.0239 #> Residuals 24 0.786 0.0328 NA NA #> --------------------------------------------------------------------------- #> #> variable ED #> --------------------------------------------------------------------------- #> One-way ANOVA table (randomized complete block design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 10.4 5.19 2.13 1.40e-01 #> GEN 12 222.4 18.54 7.63 1.38e-05 #> Residuals 24 58.3 2.43 NA NA #> --------------------------------------------------------------------------- #> #> variable EL #> --------------------------------------------------------------------------- #> One-way ANOVA table (randomized complete block design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 1.27 0.637 0.648 0.532 #> GEN 12 13.51 1.126 1.144 0.373 #> Residuals 24 23.61 0.984 NA NA #> --------------------------------------------------------------------------- #> #> variable CL #> --------------------------------------------------------------------------- #> One-way ANOVA table (randomized complete block design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 16.1 8.06 5.7 9.45e-03 #> GEN 12 170.7 14.22 10.1 1.18e-06 #> Residuals 24 34.0 1.41 NA NA #> --------------------------------------------------------------------------- #> #> variable CW #> --------------------------------------------------------------------------- #> One-way ANOVA table (randomized complete block design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 55.2 27.59 3.66 4.10e-02 #> GEN 12 755.0 62.92 8.34 6.34e-06 #> Residuals 24 181.0 7.54 NA NA #> --------------------------------------------------------------------------- #> #> --------------------------------------------------------------------------- #> Variables with nonsignificant genotype effect #> EL #> --------------------------------------------------------------------------- #> Done!#>#>#> # A tibble: 39 x 8 #> GEN REP factors PH ED EL CL CW #> <fct> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 H1 1 H1_1 2.13 50.8 15.1 31.7 27.6 #> 2 H1 2 H1_2 2.21 49.9 14.7 30.1 25.2 #> 3 H1 3 H1_3 2.25 51.1 14.7 30.9 27.8 #> 4 H10 1 H10_1 1.97 44.1 14.2 25.6 13.0 #> 5 H10 2 H10_2 2.05 43.2 13.8 24.0 10.6 #> 6 H10 3 H10_3 2.09 44.4 13.9 24.7 13.2 #> 7 H11 1 H11_1 2.03 47.3 14.5 27.2 16.7 #> 8 H11 2 H11_2 2.11 46.3 14.1 25.6 14.3 #> 9 H11 3 H11_3 2.16 47.5 14.2 26.3 16.9 #> 10 H12 1 H12_1 2.36 48.0 14.2 26.6 18.5 #> # ... with 29 more rows# ALPHA-LATTICE DESIGN alpha <- gafem(data_alpha, gen = GEN, rep = REP, block = BLOCK, resp = YIELD)#> variable YIELD #> --------------------------------------------------------------------------- #> One-way ANOVA table (alpha-lattice design) #> --------------------------------------------------------------------------- #> Source Df Sum Sq Mean Sq F value Pr(>F) #> REP 2 6.14 3.0677 36.76 6.59e-09 #> GEN 23 14.08 0.6120 7.33 3.63e-07 #> BLOCK(REP) 15 3.60 0.2402 2.88 6.25e-03 #> Residuals 31 2.59 0.0835 NA NA #> --------------------------------------------------------------------------- #> #> Done!#>#>#> # A tibble: 72 x 5 #> GEN REP BLOCK factors YIELD #> <fct> <fct> <fct> <chr> <dbl> #> 1 G11 R1 B1 G11_R1_B1 4.41 #> 2 G04 R1 B1 G04_R1_B1 4.73 #> 3 G05 R1 B1 G05_R1_B1 5.23 #> 4 G22 R1 B1 G22_R1_B1 4.65 #> 5 G21 R1 B2 G21_R1_B2 4.61 #> 6 G10 R1 B2 G10_R1_B2 4.21 #> 7 G20 R1 B2 G20_R1_B2 4.04 #> 8 G02 R1 B2 G02_R1_B2 4.32 #> 9 G23 R1 B3 G23_R1_B3 4.11 #> 10 G14 R1 B3 G14_R1_B3 4.70 #> # ... with 62 more rows# }