Residual plots for a output model of class gamem
. Six types of plots
are produced: (1) Residuals vs fitted, (2) normal Q-Q plot for the residuals,
(3) scale-location plot (standardized residuals vs Fitted Values), (4)
standardized residuals vs Factor-levels, (5) Histogram of raw residuals and
(6) standardized residuals vs observation order. For a waasb
object,
normal Q-Q plot for random effects may also be obtained declaring type
= 're'
# S3 method for gamem
plot(
x,
var = 1,
type = "res",
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.lab.out = 2.5,
size.tex.lab = 10,
size.shape = 1.5,
bins = 30,
which = c(1:4),
ncol = NULL,
nrow = NULL,
align = "hv",
...
)
An object of class gamem
.
The variable to plot. Defaults to var = 1
the first
variable of x
.
If type = 're'
, normal Q-Q plots for the random effects
are obtained.
Level of confidence interval to use in the Q-Q plot (0.95 by default).
How the output is returned. Must be one of the 'print' (default) or 'return'.
The number of rows that should be used to render the x labels. This is useful for displaying labels that would otherwise overlap.
Silently remove overlapping labels, (recursively) prioritizing the first, last, and middle labels.
Logical argument. If TRUE
labels the points outside
confidence interval limits.
The graphical theme of the plot. Default is
plot_theme = theme_metan()
. For more details, see
theme
.
The transparency of confidence band in the Q-Q plot. Must be a number between 0 (opaque) and 1 (full transparency).
The color to fill the histogram. Default is 'gray'.
The color of the border of the the histogram. Default is 'black'.
The color of the points in the graphic. Default is 'black'.
The color of the lines in the graphic. Default is 'red'.
The color of the labels for the 'outlying' points.
The size of the labels for the 'outlying' points.
The size of the text in axis text and labels.
The size of the shape in the plots.
The number of bins to use in the histogram. Default is 30.
Which graphics should be plotted. Default is which =
c(1:4)
that means that the first four graphics will be plotted.
The number of columns and rows of the plot pannel. Defaults
to NULL
Specifies whether graphs in the grid should be horizontally
("h"
) or vertically ("v"
) aligned. "hv"
(default)
align in both directions, "none"
do not align the plot.
Additional arguments passed on to the function
plot_grid
# NOT RUN {
library(metan)
model <- gamem(data_g,
gen = GEN,
rep = REP,
resp = PH)
plot(model)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab