Skip to contents

Obtains predictions from an object fitted with gamem().

Usage

# S3 method for class 'gamem'
predict(object, ...)

Arguments

object

An object of class gamem

...

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 <- gamem(data_g,
              gen = GEN,
              rep = REP,
              resp = everything())
#> Evaluating trait PH |===                                         | 7% 00:00:00 
Evaluating trait EH |======                                      | 13% 00:00:00 
Evaluating trait EP |=========                                   | 20% 00:00:00 
Evaluating trait EL |============                                | 27% 00:00:00 
Evaluating trait ED |===============                             | 33% 00:00:00 
Evaluating trait CL |==================                          | 40% 00:00:00 
Evaluating trait CD |=====================                       | 47% 00:00:00 
Evaluating trait CW |=======================                     | 53% 00:00:00 
Evaluating trait KW |==========================                  | 60% 00:00:00 
Evaluating trait NR |=============================               | 67% 00:00:00 
Evaluating trait NKR |================================           | 73% 00:00:01 
Evaluating trait CDED |==================================        | 80% 00:00:01 
Evaluating trait PERK |====================================      | 87% 00:00:01 
Evaluating trait TKW |========================================   | 93% 00:00:01 
Evaluating trait NKE |===========================================| 100% 00:00:01 

#> Method: REML/BLUP
#> Random effects: GEN
#> Fixed effects: REP
#> Denominador DF: Satterthwaite's method
#> ---------------------------------------------------------------------------
#> P-values for Likelihood Ratio Test of the analyzed traits
#> ---------------------------------------------------------------------------
#>     model    PH    EH    EP    EL       ED       CL    CD       CW     KW
#>  Complete    NA    NA    NA    NA       NA       NA    NA       NA     NA
#>  Genotype 0.051 0.454 0.705 0.786 2.73e-05 2.25e-06 0.118 1.24e-05 0.0253
#>      NR   NKR     CDED     PERK     TKW     NKE
#>      NA    NA       NA       NA      NA      NA
#>  0.0056 0.216 9.14e-06 4.65e-07 0.00955 0.00952
#> ---------------------------------------------------------------------------
#> Variables with nonsignificant Genotype effect
#> PH EH EP EL CD NKR 
#> ---------------------------------------------------------------------------
predict(model)
#> # A tibble: 39 × 17
#>    GEN   REP      PH    EH    EP    EL    ED    CL    CD    CW    KW    NR   NKR
#>    <chr> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 H1    1      2.12  1.06 0.502  14.9  50.5  31.5  16.0  26.9  156.  15.8  29.9
#>  2 H1    2      2.20  1.08 0.491  14.5  49.5  29.9  15.4  24.4  146.  16.1  28.6
#>  3 H1    3      2.24  1.11 0.494  14.6  50.7  30.6  16.0  27.1  159.  15.7  30.0
#>  4 H10   1      2.02  1.03 0.503  14.8  44.6  26.0  15.6  14.0  132.  15.4  32.1
#>  5 H10   2      2.10  1.06 0.492  14.4  43.7  24.4  15.1  11.6  122.  15.7  30.9
#>  6 H10   3      2.14  1.08 0.495  14.5  44.9  25.1  15.6  14.2  135.  15.3  32.2
#>  7 H11   1      2.06  1.06 0.507  14.9  47.4  27.4  15.7  17.3  145.  16.1  31.7
#>  8 H11   2      2.14  1.08 0.496  14.5  46.4  25.8  15.2  14.9  135.  16.4  30.5
#>  9 H11   3      2.18  1.11 0.499  14.5  47.6  26.5  15.8  17.5  148.  16.0  31.8
#> 10 H12   1      2.26  1.12 0.506  14.8  48.0  26.9  15.3  18.9  150.  16.1  30.4
#> # ℹ 29 more rows
#> # ℹ 4 more variables: CDED <dbl>, PERK <dbl>, TKW <dbl>, NKE <dbl>
# }