validation.AMMI: Cross-validation for estimation of AMMI model

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/validation.AMMI.R

Description

Cross-validation for estimation of AMMI models

Usage

1
2
validation.AMMI(.data, resp, gen, env, rep, design = "RCBD",
                nboot, nrepval, naxis, 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

naxis

The number of axis to be considered for estimation of GE effects.

verbose

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

Details

For each iteration, the original dataset is split into two datasets: modeling and validating data. The dataset "modeling" has all combinations (genotype x environment) with the number of replications informed in nrepval. The dataset "validating" has one replication. The splitting of the dataset into modeling and validating data depends on the design informed. For Completely Randomized Block Design (default), compltely 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 NAXIS informed) are compared with the "validating" data. the Root Means Square error is computed. At the end of boots, a list is returned with the following values.

Value

RMSE

A vector with Nboot-estimates of the root mean squared error estimated with the difference between predicted and validating data.

RSMEmean

The mean of RMSE estimates.

Estimated

A data frame that contain the values (predicted, observed, validation) of the last loop.

Modeling

The dataset used as modeling data in the last loop.

Testing

The dataset used as testing data in the last loop.

Author(s)

Tiago Olivoto [email protected]

See Also

validation.AMMIF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
library(METAAB)
model = validation.AMMI(data_ge,
                        resp = GY,
                        gen = GEN,
                        env = ENV,
                        rep = REP,
                        nboot = 100,
                        nrepval = 2,
                        naxis = 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.