Skip to contents

Obtains predictions from an object fitted with waasb().

Usage

# S3 method for waasb
predict(object, ...)

Arguments

object

An object of class waasb

...

Currently not used

Value

A tibble with the predicted values for each variable in the model

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
model <- waasb(data_ge,
               env = ENV,
               gen = GEN,
               rep = REP,
               resp = c(GY, HM))
#> Evaluating trait GY |======================                      | 50% 00:00:02 
Evaluating trait HM |============================================| 100% 00:00:04 

#> Method: REML/BLUP
#> Random effects: GEN, GEN:ENV
#> Fixed effects: ENV, REP(ENV)
#> Denominador DF: Satterthwaite's method
#> ---------------------------------------------------------------------------
#> P-values for Likelihood Ratio Test of the analyzed traits
#> ---------------------------------------------------------------------------
#>     model       GY       HM
#>  COMPLETE       NA       NA
#>       GEN 1.11e-05 5.07e-03
#>   GEN:ENV 2.15e-11 2.27e-15
#> ---------------------------------------------------------------------------
#> All variables with significant (p < 0.05) genotype-vs-environment interaction
predict(model)
#> # A tibble: 420 × 5
#>    ENV   GEN   REP      GY    HM
#>    <fct> <chr> <fct> <dbl> <dbl>
#>  1 E1    G1    1      2.46  46.6
#>  2 E1    G1    2      2.44  46.0
#>  3 E1    G1    3      2.31  47.1
#>  4 E1    G2    1      2.84  45.7
#>  5 E1    G2    2      2.82  45.1
#>  6 E1    G2    3      2.69  46.2
#>  7 E1    G3    1      2.89  46.3
#>  8 E1    G3    2      2.87  45.7
#>  9 E1    G3    3      2.75  46.8
#> 10 E1    G4    1      2.61  48.0
#> # … with 410 more rows
# }