Skip to contents

Predict the means for a genotype-vs-environment trial based on a Genotype plus Genotype-vs-Environment interaction (GGE) model.

Usage

# S3 method for class 'gge'
predict(object, naxis = 2, output = "wide", ...)

Arguments

object

An object of class gge.

naxis

The the number of principal components to be used in the prediction. Generally, two axis may be used. In this case, the estimated values will be those shown in the biplot.

output

The type of output. It must be one of the 'long' (default) returning a long-format table with the columns for environment (ENV), genotypes (GEN) and response variable (Y); or 'wide' to return a two-way table with genotypes in the row, environments in the columns, filled by the estimated values.

...

Currently not used.

Value

A two-way table with genotypes in rows and environments in columns if output = "wide" or a long format (columns ENV, GEN and Y) if output = "long" with the predicted values by the GGE model.

Details

This function is used to predict the response variable of a two-way table (for examples the yielding of g genotypes in e environments) based on GGE model. This prediction is based on the number of principal components used. For more details see Yan and Kang (2007).

References

Yan, W., and M.S. Kang. 2003. GGE biplot analysis: a graphical tool for breeders, geneticists, and agronomists. CRC Press.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
mod <- gge(data_ge, GEN, ENV, c(GY, HM))
predict(mod)
#> $GY
#> # A tibble: 14 × 10
#>       G1   G10    G2    G3    G4    G5    G6    G7    G8    G9
#>  * <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1  2.52 2.03   2.62  2.80  2.42  2.32  2.38  2.70  2.97 2.43 
#>  2  2.14 1.65   2.24  2.44  2.09  2.01  2.08  2.40  2.59 2.00 
#>  3  1.26 0.913  1.39  1.62  1.40  1.36  1.41  1.71  1.71 0.998
#>  4  1.55 1.03   1.66  1.87  1.58  1.52  1.60  1.95  2.02 1.34 
#>  5  3.07 1.97   3.09  3.22  2.64  2.51  2.67  3.16  3.59 3.09 
#>  6  1.57 1.77   1.77  2.03  1.90  1.84  1.79  1.92  1.94 1.33 
#>  7  3.07 3.30   3.24  3.47  3.19  3.06  2.99  3.08  3.41 3.02 
#>  8  4.10 4.01   4.22  4.40  3.94  3.76  3.73  3.89  4.47 4.20 
#>  9  3.58 4.01   3.77  4.00  3.71  3.56  3.45  3.46  3.88 3.58 
#> 10  4.06 3.34   4.11  4.24  3.64  3.47  3.55  3.90  4.52 4.19 
#> 11  2.62 2.42   2.75  2.96  2.63  2.52  2.53  2.76  3.03 2.53 
#> 12  1.80 1.96   1.98  2.24  2.08  2.01  1.96  2.10  2.17 1.58 
#> 13  2.37 2.60   2.56  2.80  2.60  2.50  2.44  2.54  2.73 2.23 
#> 14  2.75 3.59   3.01  3.29  3.18  3.07  2.89  2.80  3.02 2.63 
#> 
#> $HM
#> # A tibble: 14 × 10
#>       G1   G10    G2    G3    G4    G5    G6    G7    G8    G9
#>  * <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1  46.4  47.6  46.0  46.9  47.4  48.7  48.0  47.3  48.4  47.1
#>  2  44.5  42.2  47.3  44.4  41.9  50.6  45.9  40.9  43.9  41.4
#>  3  52.9  56.5  51.7  53.6  53.7  53.4  54.8  54.0  55.0  55.6
#>  4  48.2  50.9  46.8  48.9  50.2  49.2  50.0  50.4  51.0  50.3
#>  5  45.1  47.3  43.4  45.8  48.0  46.2  46.7  48.2  48.4  46.9
#>  6  39.8  40.2  38.5  40.4  43.0  42.2  41.1  43.0  43.1  40.1
#>  7  43.3  43.2  43.4  43.7  44.2  46.6  44.7  43.9  45.2  42.8
#>  8  51.8  54.8  50.9  52.4  52.4  52.8  53.6  52.6  53.8  53.9
#>  9  48.9  51.1  48.2  49.5  49.9  50.5  50.7  50.0  51.0  50.4
#> 10  51.8  53.2  52.6  52.1  50.4  54.6  53.6  50.1  52.4  52.2
#> 11  44.7  45.6  44.2  45.2  46.1  47.2  46.2  46.0  47.0  45.1
#> 12  47.4  49.3  46.7  48.0  48.7  49.3  49.1  48.8  49.7  48.7
#> 13  43.9  44.8  43.3  44.5  45.7  46.4  45.5  45.7  46.4  44.4
#> 14  50.5  52.6  50.3  51.0  50.6  52.4  52.3  50.6  52.1  51.7
#> 
# }