Print the anova_joint
object in two ways. By default, the results are shown
in the R console. The results can also be exported to the directory into a
*.txt file.
Usage
# S3 method for class 'anova_joint'
print(x, export = FALSE, file.name = NULL, digits = 3, ...)
Arguments
- x
An object of class
anova_joint
.- 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)
model <- data_ge %>% anova_joint(ENV, GEN, REP, c(GY, HM))
#> variable GY
#> ---------------------------------------------------------------------------
#> Joint ANOVA table
#> ---------------------------------------------------------------------------
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> ENV 13.00 279.57 21.5057 62.33 3.90e-17
#> REP(ENV) 28.00 9.66 0.3451 3.57 3.59e-08
#> GEN 9.00 13.00 1.4439 5.41 3.44e-06
#> GEN:ENV 117.00 31.22 0.2668 2.76 1.01e-11
#> ENV/GEN 130.00 310.79 2.3907 24.72 9.58e-95
#> ENV/G1 13.00 32.69 2.5146 26.01 1.90e-39
#> ENV/G10 13.00 42.71 3.2855 33.98 4.72e-48
#> ENV/G2 13.00 34.03 2.6180 27.08 1.11e-40
#> ENV/G3 13.00 30.39 2.3380 24.18 2.83e-37
#> ENV/G4 13.00 26.80 2.0618 21.32 1.06e-33
#> ENV/G5 13.00 23.47 1.8050 18.67 3.66e-30
#> ENV/G6 13.00 22.02 1.6937 17.52 1.47e-28
#> ENV/G7 13.00 21.99 1.6917 17.50 1.58e-28
#> ENV/G8 13.00 32.45 2.4961 25.82 3.18e-39
#> ENV/G9 13.00 44.24 3.4028 35.19 2.97e-49
#> Residuals 252.00 24.37 0.0967 NA NA
#> CV(%) 11.63 NA NA NA NA
#> MSR+/MSR- 6.71 NA NA NA NA
#> OVmean 2.67 NA NA NA NA
#> ---------------------------------------------------------------------------
#>
#> variable HM
#> ---------------------------------------------------------------------------
#> Joint ANOVA table
#> ---------------------------------------------------------------------------
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> ENV 13.00 5710 439.26 57.22 1.22e-16
#> REP(ENV) 28.00 215 7.68 2.70 2.20e-05
#> GEN 9.00 270 29.98 3.19 1.76e-03
#> GEN:ENV 117.00 1101 9.41 3.31 1.06e-15
#> ENV/GEN 130.00 6811 52.39 18.45 9.92e-81
#> ENV/G1 13.00 621 47.74 16.81 1.50e-27
#> ENV/G10 13.00 1111 85.48 30.10 4.97e-44
#> ENV/G2 13.00 642 49.42 17.40 2.15e-28
#> ENV/G3 13.00 631 48.57 17.10 5.72e-28
#> ENV/G4 13.00 556 42.77 15.06 5.56e-25
#> ENV/G5 13.00 491 37.78 13.30 2.77e-22
#> ENV/G6 13.00 677 52.11 18.35 1.01e-29
#> ENV/G7 13.00 572 44.00 15.49 1.26e-25
#> ENV/G8 13.00 591 45.46 16.01 2.18e-26
#> ENV/G9 13.00 918 70.61 24.86 4.27e-38
#> Residuals 252.00 716 2.84 NA NA
#> CV(%) 3.50 NA NA NA NA
#> MSR+/MSR- 5.24 NA NA NA NA
#> OVmean 48.09 NA NA NA NA
#> ---------------------------------------------------------------------------
#>
#> All variables with significant (p < 0.05) genotype-vs-environment interaction
#> Done!
print(model)
#> Variable GY
#> ---------------------------------------------------------------------------
#> $anova
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> 1 ENV 13.000000 279.573552 21.50565785 62.325457 3.897252e-17
#> 2 REP(ENV) 28.000000 9.661516 0.34505416 3.568548 3.593191e-08
#> 3 GEN 9.000000 12.995044 1.44389374 5.411208 3.441249e-06
#> 4 GEN:ENV 117.000000 31.219565 0.26683389 2.759595 1.005191e-11
#> 5 ENV/GEN 130.000000 310.793117 2.39071628 24.724774 9.581857e-95
#> 6 ENV/G1 13.000000 32.690006 2.51461584 26.006143 1.900819e-39
#> 7 ENV/G10 13.000000 42.710925 3.28545576 33.978165 4.716683e-48
#> 8 ENV/G2 13.000000 34.033879 2.61799067 27.075244 1.109382e-40
#> 9 ENV/G3 13.000000 30.394126 2.33800967 24.179683 2.828854e-37
#> 10 ENV/G4 13.000000 26.803006 2.06176968 21.322810 1.064021e-33
#> 11 ENV/G5 13.000000 23.465603 1.80504639 18.667779 3.661530e-30
#> 12 ENV/G6 13.000000 22.017802 1.69367706 17.515998 1.472928e-28
#> 13 ENV/G7 13.000000 21.991672 1.69166707 17.495211 1.575983e-28
#> 14 ENV/G8 13.000000 32.449759 2.49613527 25.815017 3.179843e-39
#> 15 ENV/G9 13.000000 44.236341 3.40279543 35.191691 2.970939e-49
#> 16 Residuals 252.000000 24.366674 0.09669315 NA NA
#> 17 CV(%) 11.627790 NA NA NA NA
#> 18 MSR+/MSR- 6.708789 NA NA NA NA
#> 19 OVmean 2.674242 NA NA NA NA
#>
#> $model
#> Call:
#> aov(formula = mean ~ GEN + ENV + GEN:ENV + ENV/REP, data = data)
#>
#> Terms:
#> GEN ENV GEN:ENV ENV:REP Residuals
#> Sum of Squares 12.99504 279.57355 31.21956 9.66152 24.36667
#> Deg. of Freedom 9 13 117 28 252
#>
#> Residual standard error: 0.3109552
#> Estimated effects may be unbalanced
#>
#> $augment
#> # A tibble: 420 × 11
#> ENV GEN REP mean hat sigma fitted resid stdres se.fit factors
#> <fct> <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 E1 G1 1 2.17 0.400 0.311 2.42 -0.255 -1.06 0.197 G1_1
#> 2 E1 G1 2 2.50 0.400 0.311 2.40 0.101 0.420 0.197 G1_2
#> 3 E1 G1 3 2.43 0.400 0.311 2.27 0.154 0.640 0.197 G1_3
#> 4 E1 G2 1 3.21 0.400 0.311 2.96 0.249 1.04 0.197 G2_1
#> 5 E1 G2 2 2.93 0.400 0.312 2.94 -0.00492 -0.0204 0.197 G2_2
#> 6 E1 G2 3 2.56 0.400 0.311 2.81 -0.244 -1.01 0.197 G2_3
#> 7 E1 G3 1 2.77 0.400 0.311 2.95 -0.176 -0.729 0.197 G3_1
#> 8 E1 G3 2 3.62 0.400 0.306 2.92 0.696 2.89 0.197 G3_2
#> 9 E1 G3 3 2.28 0.400 0.309 2.80 -0.521 -2.16 0.197 G3_3
#> 10 E1 G4 1 2.36 0.400 0.311 2.65 -0.286 -1.19 0.197 G4_1
#> # ℹ 410 more rows
#>
#> $details
#> # A tibble: 10 × 2
#> Parameters mean
#> <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) "
#>
#> ---------------------------------------------------------------------------
#>
#>
#>
#> Variable HM
#> ---------------------------------------------------------------------------
#> $anova
#> Source Df Sum Sq Mean Sq F value Pr(>F)
#> 1 ENV 13.000000 5710.3167 439.255133 57.223777 1.217069e-16
#> 2 REP(ENV) 28.000000 214.9307 7.676095 2.702830 2.196589e-05
#> 3 GEN 9.000000 269.8112 29.979019 3.186551 1.758247e-03
#> 4 GEN:ENV 117.000000 1100.7341 9.407984 3.312646 1.063605e-15
#> 5 ENV/GEN 130.000000 6811.0509 52.392699 18.447997 9.916041e-81
#> 6 ENV/G1 13.000000 620.5836 47.737197 16.808748 1.499159e-27
#> 7 ENV/G10 13.000000 1111.2324 85.479418 30.098164 4.972287e-44
#> 8 ENV/G2 13.000000 642.4162 49.416628 17.400093 2.148481e-28
#> 9 ENV/G3 13.000000 631.3726 48.567122 17.100973 5.719835e-28
#> 10 ENV/G4 13.000000 556.0049 42.769609 15.059610 5.557480e-25
#> 11 ENV/G5 13.000000 491.1414 37.780110 13.302757 2.765261e-22
#> 12 ENV/G6 13.000000 677.4113 52.108563 18.347950 1.011041e-29
#> 13 ENV/G7 13.000000 571.9678 43.997522 15.491971 1.257138e-25
#> 14 ENV/G8 13.000000 591.0281 45.463700 16.008227 2.176389e-26
#> 15 ENV/G9 13.000000 917.8926 70.607120 24.861479 4.273104e-38
#> 16 Residuals 252.000000 715.6853 2.840021 NA NA
#> 17 CV(%) 3.504463 NA NA NA NA
#> 18 MSR+/MSR- 5.235567 NA NA NA NA
#> 19 OVmean 48.088286 NA NA NA NA
#>
#> $model
#> Call:
#> aov(formula = mean ~ GEN + ENV + GEN:ENV + ENV/REP, data = data)
#>
#> Terms:
#> GEN ENV GEN:ENV ENV:REP Residuals
#> Sum of Squares 269.811 5710.317 1100.734 214.931 715.685
#> Deg. of Freedom 9 13 117 28 252
#>
#> Residual standard error: 1.685236
#> Estimated effects may be unbalanced
#>
#> $augment
#> # A tibble: 420 × 11
#> ENV GEN REP mean hat sigma fitted resid stdres se.fit factors
#> <fct> <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 E1 G1 1 44.9 0.400 1.68 46.5 -1.62 -1.24 1.07 G1_1
#> 2 E1 G1 2 46.9 0.400 1.69 46.0 0.942 0.721 1.07 G1_2
#> 3 E1 G1 3 47.8 0.400 1.69 47.1 0.678 0.519 1.07 G1_3
#> 4 E1 G2 1 45.2 0.400 1.69 45.4 -0.153 -0.117 1.07 G2_1
#> 5 E1 G2 2 45.3 0.400 1.69 44.8 0.538 0.412 1.07 G2_2
#> 6 E1 G2 3 45.5 0.400 1.69 45.9 -0.386 -0.295 1.07 G2_3
#> 7 E1 G3 1 46.7 0.400 1.69 45.9 0.791 0.606 1.07 G3_1
#> 8 E1 G3 2 43.2 0.400 1.68 45.3 -2.11 -1.62 1.07 G3_2
#> 9 E1 G3 3 47.8 0.400 1.69 46.4 1.32 1.01 1.07 G3_3
#> 10 E1 G4 1 47.9 0.400 1.69 48.3 -0.386 -0.296 1.07 G4_1
#> # ℹ 410 more rows
#>
#> $details
#> # A tibble: 10 × 2
#> Parameters mean
#> <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) "
#>
#> ---------------------------------------------------------------------------
#>
#>
#>
# }