Residual plots for a output model of class waas
and waasb
. Six types
of plots are produced: (1) Residuals vs fitted, (2) normal QQ plot for the
residuals, (3) scalelocation plot (standardized residuals vs Fitted
Values), (4) standardized residuals vs Factorlevels, (5) Histogram of raw
residuals and (6) standardized residuals vs observation order. For a waasb
object, normal QQ plot for random effects may also be obtained declaring
type = 're'
# S3 method for waasb plot( x, var = 1, type = "res", position = "fill", rotate = FALSE, conf = 0.95, out = "print", n.dodge = 1, check.overlap = FALSE, labels = FALSE, plot_theme = theme_metan(), alpha = 0.2, fill.hist = "gray", col.hist = "black", col.point = "black", col.line = "red", col.lab.out = "red", size.line = 0.7, size.text = 10, width.bar = 0.75, size.lab.out = 2.5, size.tex.lab = 10, size.shape = 1.5, bins = 30, which = c(1:4), ncol = NULL, nrow = NULL, ... )
x  An object of class 

var  The variable to plot. Defaults to 
type  One of the 
position  The position adjustment when 
rotate  Logical argument. If 
conf  Level of confidence interval to use in the QQ plot (0.95 by default). 
out  How the output is returned. Must be one of the 'print' (default) or 'return'. 
n.dodge  The number of rows that should be used to render the x labels. This is useful for displaying labels that would otherwise overlap. 
check.overlap  Silently remove overlapping labels, (recursively) prioritizing the first, last, and middle labels. 
labels  Logical argument. If 
plot_theme  The graphical theme of the plot. Default is

alpha  The transparency of confidence band in the QQ plot. Must be a number between 0 (opaque) and 1 (full transparency). 
fill.hist  The color to fill the histogram. Default is 'gray'. 
col.hist  The color of the border of the the histogram. Default is 'black'. 
col.point  The color of the points in the graphic. Default is 'black'. 
col.line  The color of the lines in the graphic. Default is 'red'. 
col.lab.out  The color of the labels for the 'outlying' points. 
size.line  The size of the line in graphic. Defaults to 0.7. 
size.text  The size for the text in the plot. Defaults to 10. 
width.bar  The width of the bars if 
size.lab.out  The size of the labels for the 'outlying' points. 
size.tex.lab  The size of the text in axis text and labels. 
size.shape  The size of the shape in the plots. 
bins  The number of bins to use in the histogram. Default is 30. 
which  Which graphics should be plotted. Default is 
ncol, nrow  The number of columns and rows of the plot pannel. Defaults
to 
...  Additional arguments passed on to the function

Tiago Olivoto tiagoolivoto@gmail.com
# \donttest{ library(metan) model2 < waasb(data_ge, resp = GY, gen = GEN, env = ENV, rep = REP) #> Evaluating trait GY ============================================ 100% 00:00:01 #> Method: REML/BLUP #> Random effects: GEN, GEN:ENV #> Fixed effects: ENV, REP(ENV) #> Denominador DF: Satterthwaite's method #>  #> Pvalues for Likelihood Ratio Test of the analyzed traits #>  #> model GY #> COMPLETE NA #> GEN 1.11e05 #> GEN:ENV 2.15e11 #>  #> All variables with significant (p < 0.05) genotypevsenvironment interaction plot(model2) #> `geom_smooth()` using formula 'y ~ x' #> `geom_smooth()` using formula 'y ~ x' # }