Skip to contents

[Stable]

Plot the eigenvalues for from singular value decomposition of BLUP interaction effects matrix.

Usage

plot_eigen(
  x,
  var = 1,
  export = FALSE,
  plot_theme = theme_metan(),
  file.type = "pdf",
  file.name = NULL,
  width = 6,
  height = 6,
  size.shape = 3.5,
  size.line = 1,
  size.tex.lab = 12,
  y.lab = "Eigenvalue",
  y2.lab = "Accumulated variance",
  x.lab = "Number of multiplicative terms",
  resolution = 300,
  ...
)

Arguments

x

The waasb object

var

The variable to plot. Defaults to var = 1 the first variable of x.

export

Export (or not) the plot. Default is TRUE.

plot_theme

The graphical theme of the plot. Default is plot_theme = theme_metan(). For more details, see ggplot2::theme().

file.type

If export = TRUE, define the type of file to be exported. Default is pdf, Graphic can also be exported in *.tiff format by declaring file.type = "tiff".

file.name

The name of the file for exportation, default is NULL, i.e. the files are automatically named.

width

The width "inch" of the plot. Default is 6.

height

The height "inch" of the plot. Default is 6.

size.shape

The size of the shape. Default is 3.5.

size.line

The size of the line. Default is 1.

size.tex.lab

The size of the text in axis text and labels.

y.lab

The label of the y-axis in the plot. Default is "Eigenvalue".

y2.lab

The label of the second y-axis in the plot. Default is "Accumulated variance".

x.lab

The label of the x-axis in the plot. Default is "Number of multiplicative terms".

resolution

The resolution of the plot. Parameter valid if file.type = "tiff" is used. Default is 300 (300 dpi)

...

Currently not used.

Value

An object of class gg, ggplot.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
BLUP <- 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:05 

#> 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
plot_eigen(BLUP)


# }