R/plot_qqmodel.R
plot_qqmodel.Rd
This function takes a linear model (simple or mixed effects) and plots a QQ graph after running rstudent
from rstudent
to generate a table of studentized model residuals on an ordinary (simple_model
), mixed model (mixed_model
or mixed_model_slopes
. The graph plots studentized residuals from the model (sample) on Y axis & Theoretical quantiles on X axis.
plot_qqmodel(Model, symsize = 2.5, symthick = 1, s_alpha = 1, fontsize = 20)
name of a saved model generated by simple_model
or mixed_model
.
size of symbols, default set to 3.
thickness of symbol border, default set to 1.
fractional opacity of symbols, default set to 1 (i.e. maximum opacity & zero transparency).
parameter of base_size
of fonts in theme_classic
, default set to size 20.
This function returns a ggplot2
object of class "gg" and "ggplot".
The function uses ggplot2[geom_qq]
and ggplot2[geom_qq_line]
geometries. Symbols receive "ok_orange" colour by default.
#Basic usage
m1 <- simple_model(data = data_2w_Festing,
Y_value = "GST",
Fixed_Factor = c("Treatment", "Strain"))
plot_qqmodel(m1)