Skip to contents

Print the gamem 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 class 'gamem'
print(x, export = FALSE, file.name = NULL, digits = 4, ...)

Arguments

x

An object fitted with the function gamem() .

export

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

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)
alpha <- gamem(data_alpha,
  gen = GEN,
  rep = REP,
  block = BLOCK,
  resp = YIELD
)
#> Evaluating trait YIELD |=========================================| 100% 00:00:00 

#> Method: REML/BLUP
#> Random effects: GEN, BLOCK(REP)
#> Fixed effects: REP
#> Denominador DF: Satterthwaite's method
#> ---------------------------------------------------------------------------
#> P-values for Likelihood Ratio Test of the analyzed traits
#> ---------------------------------------------------------------------------
#>      model    YIELD
#>   Complete       NA
#>   Genotype 1.18e-06
#>  rep:block 3.35e-03
#> ---------------------------------------------------------------------------
#> All variables with significant (p < 0.05) genotype effect

print(alpha)
#> Variable YIELD 
#> ---------------------------------------------------------------------------
#> Fixed-effect anova table
#> ---------------------------------------------------------------------------
#> # A tibble: 1 × 7
#>   SOURCE `Sum Sq` `Mean Sq` NumDF DenDF `F value` `Pr(>F)`
#>   <chr>     <dbl>     <dbl> <int> <dbl>     <dbl>    <dbl>
#> 1 REP       1.381    0.6907     2 11.76     8.463 0.005287
#> ---------------------------------------------------------------------------
#> Variance components for random effects
#> ---------------------------------------------------------------------------
#> # A tibble: 3 × 2
#>   Group     Variance
#>   <chr>        <dbl>
#> 1 GEN        0.1429 
#> 2 REP:BLOCK  0.07022
#> 3 Residual   0.08162
#> ---------------------------------------------------------------------------
#> Likelihood ratio test for random effects
#> ---------------------------------------------------------------------------
#> # A tibble: 3 × 7
#>   model      npar logLik   AIC    LRT    Df `Pr(>Chisq)`
#>   <chr>     <int>  <dbl> <dbl>  <dbl> <dbl>        <dbl>
#> 1 Complete      6 -46.60 105.2 NA        NA NA          
#> 2 Genotype      5 -58.41 126.8 23.62      1  0.000001176
#> 3 rep:block     5 -50.90 111.8  8.606     1  0.003351   
#> ---------------------------------------------------------------------------
#> Details of the analysis
#> ---------------------------------------------------------------------------
#> # A tibble: 6 × 2
#>   Parameters Values                  
#>   <chr>      <chr>                   
#> 1 Ngen       24                      
#> 2 OVmean     4.4795                  
#> 3 Min        2.8873 (G03 in B6 of R3)
#> 4 Max        5.8757 (G05 in B1 of R1)
#> 5 MinGEN     3.3431 (G03)            
#> 6 MaxGEN     5.1625 (G01)            
#> ---------------------------------------------------------------------------
#> Genetic parameters
#> ---------------------------------------------------------------------------
#> # A tibble: 13 × 2
#>    Parameters      Values
#>    <chr>            <dbl>
#>  1 Gen_var        0.1429 
#>  2 Gen (%)       48.48   
#>  3 rep:block_var  0.07022
#>  4 rep:block (%) 23.82   
#>  5 Res_var        0.08162
#>  6 Res (%)       27.69   
#>  7 Phen_var       0.2947 
#>  8 H2             0.4848 
#>  9 h2mg           0.7980 
#> 10 Accuracy       0.8933 
#> 11 CVg            8.439  
#> 12 CVr            6.378  
#> 13 CV ratio       1.323  
#> 
#> 
#> 
# }