Alpha lattice design over location analysis on # R software

preview_player
Показать описание
Alpha lattice design (sometimes called generalized lattice design) is an
an important version of incomplete block designs group (IBD) that could reduce the experimental error by extracting out the variability among small blocks, thereby, minimizing the unknown variation within each replication,
consequently improving the efficiency of field trials compared to RCBD.
Рекомендации по теме
Комментарии
Автор

Thank you for the nice presentation. iT is very clear and well explained. Please could you give us How to get blups, heritability and genetic gain using alpha lattice design across environments.

cyrinerobbana
Автор

Do we need to scale our data before performing this?

priyankaparihar
Автор

Nice presentation sir.
Sir from this model how to extend for regression based stability analysis

seshasai
Автор

Great tutorial, am learning how to use R for my large study of >500 lines and this has helped a lot. Do you have more videos on corelograms and circos diagrams

agrictalk
Автор

Hello Mr, How can I get the syntax for alpha lattice, please!

yididyatube-
Автор

Thank you. Would you please send me the 'R' script for simple lattice design over environments (over locations & environments)? I urgently need it.

hailezibelo
Автор

The code

# lattice over location analysis

# model yijr = m + loc:Rep + trt + loc + trt:loc + loc:Rep:Block + error
# Input data

library("openxlsx")
library(lme4)
library(emmeans)
library(agricolae)
library(reshape)
library(reshape2)
library(car)
library(metan)
library(multcompView)
library(multcomp)
# import data, identify factor variables
# change to factor
met <- as.data.frame(latt)
head(met)
met = as_factor(.data = met,
c(Var.Name, Trt., Rep., Block, Location ))
str(met)

# Anova using fixed model- Individual location RCBD
#met$SiteName <- factor(met$SiteName)
# describe the traits to be analyzed

colnames(met)[10] = "Yield"
Traits <- c("PLH", "TKW", "Yield")
geno = levels(met$Trt.)

Result.aov <- vector(mode = "list", length = length(Traits))
names(Result.aov) <- Traits


Resultmean.comb = matrix(nrow = length(geno), ncol = length(Traits))
colnames(Resultmean.comb) = Traits


Resultmeancomb.contrast = matrix(nrow = length(geno)-1, ncol = length(Traits))
= Traits

chk = "80"

system.time(
for (Trait in Traits) {

eval(parse(text = paste(
"m.f <- lm(", Trait, " ~ Trt. + Location + Location:Trt. +
Location:Rep. + Location:Rep.:Block, data = met)")))
Result.aov[[Trait]] <- anova(m.f)
ls <- emmeans(object = m.f, specs = ~ Trt.) # mean separation for individual factors
cont = contrast(ls, "trt.vs.ctrl", ref = chk)
cont = as.data.frame(cont)
cont$contrast = as.factor(cont$contrast)
cont = cont[sort(cont$contrast), ]
rownames(cont) = cont$contrast
ls = as.data.frame(ls)
ls <-ls[, 1:2]
ls = ls[sort(as.factor(ls$Trt.)), ]
Resultmean.comb[, Trait] = ls$emmean
rownames(Resultmean.comb) = ls$Trt.
Resultmeancomb.contrast[, Trait] = cont$p.value
= cont$contrast

}

)



sumAnova <- data.frame(Result.aov) # combine the anova table result into one table


# Write the means to excell

# Function that writes a named list to Excel workbook


wb <- createWorkbook()
addWorksheet(wb = wb, sheetName = "SummaryANOVA")
addWorksheet(wb = wb, sheetName = "TraitMeanSep" )
addWorksheet(wb = wb, sheetName = "Cont_Trtvscntrl" )

writeData(wb = wb, sheet = "SummaryANOVA", x = sumAnova, rowNames = T)
writeData(wb = wb, sheet = "TraitMeanSep", x = Resultmean.comb, rowNames = T)
writeData(wb = wb, sheet = "Cont_Trtvscntrl", x = Resultmeancomb.contrast, rowNames = T)

saveWorkbook(wb, "SummaryresultLatticeComb.xlsx", overwrite = TRUE)

wakjiratesfahun
Автор

Thank you so much sir. can you please share r-script

kulveerdhillon