Print a mtmps
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 mtmps
print(x, export = FALSE, file.name = NULL, digits = 4, ...)
Arguments
- x
An object of class
mtmps
.- export
A logical argument. If
TRUE|T
, 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)
model <-
mps(data_ge,
env = ENV,
gen = GEN,
rep = REP,
resp = everything())
#> Evaluating trait GY |====================== | 50% 00:00:01
Evaluating trait HM |============================================| 100% 00:00:03
#> 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
#> Mean performance: blupg
#> Stability: waasb
selection <- mtmps(model)
#>
#> -------------------------------------------------------------------------------
#> Principal Component Analysis
#> -------------------------------------------------------------------------------
#> # A tibble: 2 × 4
#> PC Eigenvalues `Variance (%)` `Cum. variance (%)`
#> <chr> <dbl> <dbl> <dbl>
#> 1 PC1 1.37 68.5 68.5
#> 2 PC2 0.631 31.5 100
#> -------------------------------------------------------------------------------
#> Factor Analysis - factorial loadings after rotation-
#> -------------------------------------------------------------------------------
#> # A tibble: 2 × 4
#> VAR FA1 Communality Uniquenesses
#> <chr> <dbl> <dbl> <dbl>
#> 1 GY 0.827 0.685 0.315
#> 2 HM 0.827 0.685 0.315
#> -------------------------------------------------------------------------------
#> Comunalit Mean: 0.6846623
#> -------------------------------------------------------------------------------
#> Selection differential for the mean performance and stability index
#> -------------------------------------------------------------------------------
#> # A tibble: 2 × 6
#> VAR Factor Xo Xs SD SDperc
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 GY FA 1 48.3 86.4 38.0 78.7
#> 2 HM FA 1 58.3 79.2 21.0 36.0
#> -------------------------------------------------------------------------------
#> Selection differential for the mean of the variables
#> -------------------------------------------------------------------------------
#> # A tibble: 2 × 11
#> VAR Factor Xo Xs SD SDperc h2 SG SGperc sense goal
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
#> 1 GY FA 1 2.67 2.98 0.305 11.4 0.815 0.249 9.31 increase 100
#> 2 HM FA 1 48.1 48.4 0.265 0.551 0.686 0.182 0.378 increase 100
#> ------------------------------------------------------------------------------
#> Selected genotypes
#> -------------------------------------------------------------------------------
#> G8 G3
#> -------------------------------------------------------------------------------
print(selection)
#> -------------------- Correlation matrix used used in factor analysis -----------------
#> GY HM
#> GY 1.0000000 0.3693246
#> HM 0.3693246 1.0000000
#>
#> ---------------------------- Principal component analysis -----------------------------
#> # A tibble: 2 × 4
#> PC Eigenvalues `Variance (%)` `Cum. variance (%)`
#> <chr> <dbl> <dbl> <dbl>
#> 1 PC1 1.369 68.47 68.47
#> 2 PC2 0.6307 31.53 100
#>
#> --------------------------------- Initial loadings -----------------------------------
#> # A tibble: 2 × 2
#> VAR initial_loadings
#> <chr> <dbl>
#> 1 GY 0.8274
#> 2 HM 0.8274
#>
#> -------------------------- Loadings after varimax rotation ---------------------------
#> # A tibble: 2 × 2
#> VAR FA1
#> <chr> <dbl>
#> 1 GY 0.8274
#> 2 HM 0.8274
#>
#> --------------------------- Scores for genotypes-ideotype -----------------------------
#> # A tibble: 11 × 2
#> GEN FA1
#> <chr> <dbl>
#> 1 G1 2.862
#> 2 G10 0.9893
#> 3 G2 1.828
#> 4 G3 4.028
#> 5 G4 2.666
#> 6 G5 2.610
#> 7 G6 3.430
#> 8 G7 2.448
#> 9 G8 4.268
#> 10 G9 2.019
#> 11 ID1 5.035
#>
#> ---------------------------- Multitrait stability index ------------------------------
#> # A tibble: 10 × 2
#> Genotype MTSI
#> <chr> <dbl>
#> 1 G8 0.7679
#> 2 G3 1.008
#> 3 G6 1.606
#> 4 G1 2.173
#> 5 G4 2.369
#> 6 G5 2.425
#> 7 G7 2.587
#> 8 G9 3.016
#> 9 G2 3.208
#> 10 G10 4.046
#>
#> ------------------------- Selection differential (variables) --------------------------
#> # A tibble: 2 × 11
#> VAR Factor Xo Xs SD SDperc h2 SG SGperc sense goal
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
#> 1 GY FA 1 2.674 2.979 0.3052 11.41 0.8152 0.2488 9.305 increase 100
#> 2 HM FA 1 48.09 48.35 0.2648 0.5507 0.6862 0.1817 0.3779 increase 100
#>
#> -------------------------------- Selected genotypes -----------------------------------
#> G8 G3
# }