# NOT RUN {
library(metan)
#################### joint-regression analysis #####################
ge_r <- ge_reg(data_ge2, ENV, GEN, REP,
resp = c(PH, EH, CD, CL, ED))
get_model_data(ge_r)
get_model_data(ge_r, "deviations")
#################### AMMI model #####################
# Fit an AMMI model for 7 variables.
AMMI <- data_ge2 %>%
performs_ammi(ENV, GEN, REP,
resp = c(PH, ED, TKW, NKR, CD, CL, CW))
# Sum of squares
get_model_data(AMMI, "ipca_ss")
# Mean squares
get_model_data(AMMI, "ipca_ms")
# Examine the significance (p-value) of the IPCAs
get_model_data(AMMI, "ipca_pval")
# Explained sum of square for each IPCA
get_model_data(AMMI)
# Accumulated sum of square
get_model_data(AMMI, "ipca_accum")
### AMMI-based stability statistics ###
# Get the AMMI stability value
AMMI %>%
AMMI_indexes() %>%
get_model_data("ASV")
#################### WAASB model #####################
# Fitting the WAAS index
AMMI <- waas(data_ge2, ENV, GEN, REP,
resp = c(PH, ED, TKW, NKR))
# Getting the weighted average of absolute scores
get_model_data(AMMI, what = "WAAS")
# And the rank for the WAASB index.
get_model_data(AMMI, what = "OrWAAS")
#################### BLUP model #####################
# Fitting a mixed-effect model
blup <- waasb(data_ge2, ENV, GEN, REP,
resp = c(PH, ED, TKW, NKR))
# Getting p-values for likelihood-ratio test
get_model_data(blup, what = "lrt")
# Getting the variance components
get_model_data(blup, what = "vcomp")
# Getting the genetic parameters
get_model_data(blup)
### BLUP-based stability indexes ###
blup %>%
Resende_indexes() %>%
get_model_data()
#################### Stability indexes #####################
stats_ge <- ge_stats(data_ge, ENV, GEN, REP, everything())
get_model_data(stats_ge)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab