validation.AMMIF: Cross-validation for estimation of all AMMI-family models

Description Usage Arguments Details Author(s) See Also Examples

View source: R/validation.AMMIF.R

Description

Cross-validation for estimation of all AMMI-family models

Usage

1
2
validation.AMMIF(.data, resp, gen, env, rep, design = "RCBD",
                 nboot, nrepval, verbose = TRUE)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes, replication/block and response variable(s).

resp

The response variable.

gen

The name of the column that contains the levels of the genotypes.

env

The name of the column that contains the levels of the environments.

rep

The name of the column that contains the levels of the replications/blocks.

design

The experimental desig to be considered. Default is RCBD (Randomized complete Block Design). For Completely Randomized Designs inform design = "CRD".

nboot

The number of resamples to be used in the cross-validation

nrepval

The number of replicates (r) from total number of replicates (R) to be used in the modeling dataset. Only one replicate is used as validating data each step, so, Nrepval must be equal R-1

verbose

A logical argument to define if a progress bar is shown. Default is TRUE.

Details

This function provides a complete cross-validation of replicate-based data using AMMI-family models. By default, the first validation is carried out considering the AMMIF (all possible axis used). Considering this model, the original dataset is split up into two datasets: training set and validation set. The "training" set has all combinations (genotype x environment) with the number of replications informed in nrepval. The dataset "validation" set has the remaining replication. The splitting of the dataset into modeling and validating data depends on the design informed. For Completely Randomized Block Design (default), completely blocks are selected within environments. The remained block serves validation data. If design = "RCD" is informed, completely randomly samples are made for each genotype-by-environment combination. The estimated values (depending on the naxis informed) are compared with the "validation" data. the Root Mean Square Prediction Difference (RMSPD) is computed. At the end of boots, a list is returned.

Author(s)

Tiago Olivoto [email protected]

See Also

validation.AMMI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(METAAB)
model = validation.AMMIF(data_ge,
                        resp = GY,
                        gen = GEN,
                        env = ENV,
                        rep = REP,
                        nboot = 100,
                        nrepval = 2)

# Alternatively (and more intuitively) using the pipe operator %>%
library(dplyr)
model = data_ge %>%
        validation.AMMIF(GY, GEN, ENV, REP, 100, 2)

## End(Not run)

TiagoOlivoto/WAASB documentation built on April 1, 2019, 10:25 a.m.