Skip to contents

Print a waasb object in two ways. By default, the results are shown in the R console. The results can also be exported to the directory.

Usage

# S3 method for waasb
print(x, export = FALSE, blup = FALSE, file.name = NULL, digits = 4, ...)

Arguments

x

An object of class waasb.

export

A logical argument. If TRUE|T, a *.txt file is exported to the working directory

blup

A logical argument. If TRUE|T, the blups are shown.

file.name

The name of the file if export = TRUE

digits

The significant digits to be shown.

...

Options used by the tibble package to format the output. See tibble::print() for more details.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
model <- waasb(data_ge,
  resp = c(GY, HM),
  gen = GEN,
  env = ENV,
  rep = REP
)
#> 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
print(model)
#> Variable GY 
#> ---------------------------------------------------------------------------
#> Individual fixed-model analysis of variance
#> ---------------------------------------------------------------------------
#> NULL
#> ---------------------------------------------------------------------------
#> Fixed effects
#> ---------------------------------------------------------------------------
#> # A tibble: 2 × 7
#>   SOURCE  `Sum Sq` `Mean Sq` NumDF DenDF `F value`  `Pr(>F)`
#>   <chr>      <dbl>     <dbl> <int> <dbl>     <dbl>     <dbl>
#> 1 ENV       66.09     5.084     13 279.8    52.58  2.954e-67
#> 2 ENV:REP    9.662    0.3451    28 252.0     3.569 3.593e- 8
#> ---------------------------------------------------------------------------
#> Random effects
#> ---------------------------------------------------------------------------
#> # A tibble: 3 × 3
#>   Group    Variance Percent
#>   <chr>       <dbl>   <dbl>
#> 1 GEN       0.02803   15.45
#> 2 GEN:ENV   0.05671   31.26
#> 3 Residual  0.09669   53.29
#> ---------------------------------------------------------------------------
#> Likelihood ratio test
#> ---------------------------------------------------------------------------
#>               model npar  logLik    AIC    LRT Df Pr(>Chisq)    
#> <none>            1   45 -214.72 519.43                         
#> (1 | GEN)         2   44 -224.38 536.75 19.315  1  1.108e-05 ***
#> (1 | GEN:ENV)     3   44 -237.13 562.27 44.832  1  2.147e-11 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> ---------------------------------------------------------------------------
#> Variance components and genetic parameters
#> ---------------------------------------------------------------------------
#> # A tibble: 9 × 2
#>   Parameters           Values
#>   <chr>                 <dbl>
#> 1 Phenotypic variance  0.1814
#> 2 Heritability         0.1545
#> 3 GEIr2                0.3126
#> 4 h2mg                 0.8152
#> 5 Accuracy             0.9029
#> 6 rge                  0.3697
#> 7 CVg                  6.260 
#> 8 CVr                 11.63  
#> 9 CV ratio             0.5384
#> ---------------------------------------------------------------------------
#>  Principal component analysis of the G x E interaction matrix
#> ---------------------------------------------------------------------------
#> # A tibble: 9 × 4
#>   PC    Eigenvalue Proportion Accumulated
#>   <chr>      <dbl>      <dbl>       <dbl>
#> 1 PC1      1.472      34.31         34.31
#> 2 PC2      1.347      31.38         65.69
#> 3 PC3      0.5479     12.77         78.46
#> 4 PC4      0.4167      9.710        88.17
#> 5 PC5      0.2126      4.955        93.12
#> 6 PC6      0.1397      3.256        96.38
#> 7 PC7      0.07912     1.844        98.22
#> 8 PC8      0.05673     1.322        99.55
#> 9 PC9      0.01947     0.4537      100   
#> ---------------------------------------------------------------------------
#> Some information regarding the analysis
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 2
#>    Parameters Values             
#>    <chr>      <chr>              
#>  1 Mean       "2.67"             
#>  2 SE         "0.05"             
#>  3 SD         "0.92"             
#>  4 CV         "34.56"            
#>  5 Min        "0.67 (G10 in E11)"
#>  6 Max        "5.09 (G8 in E5)"  
#>  7 MinENV     "E11 (1.37)"       
#>  8 MaxENV     "E3 (4.06)"        
#>  9 MinGEN     "G10 (2.47) "      
#> 10 MaxGEN     "G8 (3) "          
#> 11 wresp      "50"               
#> 12 mresp      "100"              
#> 13 Ngen       "10"               
#> 14 Nenv       "14"               
#> 
#> 
#> 
#> Variable HM 
#> ---------------------------------------------------------------------------
#> Individual fixed-model analysis of variance
#> ---------------------------------------------------------------------------
#> NULL
#> ---------------------------------------------------------------------------
#> Fixed effects
#> ---------------------------------------------------------------------------
#> # A tibble: 2 × 7
#>   SOURCE  `Sum Sq` `Mean Sq` NumDF DenDF `F value`  `Pr(>F)`
#>   <chr>      <dbl>     <dbl> <int> <dbl>     <dbl>     <dbl>
#> 1 ENV       1166.     89.69     13 257.4    31.58  5.708e-46
#> 2 ENV:REP    214.9     7.676    28 252.0     2.703 2.197e- 5
#> ---------------------------------------------------------------------------
#> Random effects
#> ---------------------------------------------------------------------------
#> # A tibble: 3 × 3
#>   Group    Variance Percent
#>   <chr>       <dbl>   <dbl>
#> 1 GEN        0.4898   8.874
#> 2 GEN:ENV    2.189   39.67 
#> 3 Residual   2.840   51.46 
#> ---------------------------------------------------------------------------
#> Likelihood ratio test
#> ---------------------------------------------------------------------------
#>               model npar  logLik    AIC    LRT Df Pr(>Chisq)    
#> <none>            1   45 -862.67 1815.3                         
#> (1 | GEN)         2   44 -866.59 1821.2  7.855  1   0.005068 ** 
#> (1 | GEN:ENV)     3   44 -894.08 1876.2 62.819  1  2.266e-15 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> ---------------------------------------------------------------------------
#> Variance components and genetic parameters
#> ---------------------------------------------------------------------------
#> # A tibble: 9 × 2
#>   Parameters           Values
#>   <chr>                 <dbl>
#> 1 Phenotypic variance 5.519  
#> 2 Heritability        0.08874
#> 3 GEIr2               0.3967 
#> 4 h2mg                0.6862 
#> 5 Accuracy            0.8284 
#> 6 rge                 0.4353 
#> 7 CVg                 1.455  
#> 8 CVr                 3.504  
#> 9 CV ratio            0.4153 
#> ---------------------------------------------------------------------------
#>  Principal component analysis of the G x E interaction matrix
#> ---------------------------------------------------------------------------
#> # A tibble: 9 × 4
#>   PC    Eigenvalue Proportion Accumulated
#>   <chr>      <dbl>      <dbl>       <dbl>
#> 1 PC1      61.96      33.83         33.83
#> 2 PC2      51.91      28.34         62.18
#> 3 PC3      19.82      10.82         73.00
#> 4 PC4      13.90       7.588        80.59
#> 5 PC5      11.50       6.282        86.87
#> 6 PC6      10.38       5.665        92.53
#> 7 PC7       8.392      4.582        97.11
#> 8 PC8       4.583      2.502        99.62
#> 9 PC9       0.7016     0.3831      100   
#> ---------------------------------------------------------------------------
#> Some information regarding the analysis
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 2
#>    Parameters Values          
#>    <chr>      <chr>           
#>  1 Mean       "48.09"         
#>  2 SE         "0.21"          
#>  3 SD         "4.37"          
#>  4 CV         "9.09"          
#>  5 Min        "38 (G2 in E14)"
#>  6 Max        "58 (G8 in E11)"
#>  7 MinENV     "E14 (41.03)"   
#>  8 MaxENV     "E11 (54.2)"    
#>  9 MinGEN     "G2 (46.66) "   
#> 10 MaxGEN     "G5 (49.3) "    
#> 11 wresp      "50"            
#> 12 mresp      "100"           
#> 13 Ngen       "10"            
#> 14 Nenv       "14"            
#> 
#> 
#> 
# }