plot.manylm
is used to check the linear model assumptions that are made
when fitting a model via manylm
. Similarly, plot.manyglm
checks
the generalised linear model assumptions made when using manyglm
.
As in Wang et al (2012), you should check the residual vs fits plot for no pattern
(hence no suggestion of failure of key linearity and mean-variance assumptions).
For manylm fits of small datasets, it is desirable that residuals on the normal Q-Q plot be close
to a straight line, although in practice the most important thing is to make
sure there are no big outliers and no suggestion of strong skew in the data.
The recommended res.type
option for manyglm calls, "pit-norm", uses randomised quantile or "Dunn-Smyth"
residuals (Dunn & Smyth 1996). Note that for discrete data, these residuals
involve random number generation, and will not return identical results on replicate runs - so it is recommended
that you plot your data a few times to check if any pattern shows up consistently across replicate plots.
The other main residual option is "pearson", Pearson residuals. Note that all res.type options
are equivalent for manylm.
Some technical details on usage of this function:
sub.caption
- by default the function call - is shown as
a subtitle (under the x-axis title) on each plot when plots are on
separate pages, or as a subtitle in the outer margin (if any) when
there are multiple plots per page.
The ‘Scale-Location’ plot, also called ‘Spread-Location’ or
‘S-L’ plot, takes the square root of the absolute residuals in
order to diminish skewness (\(\sqrt{| E |}\) is much less skewed
than \(| E |\) for Gaussian zero-mean \(E\)).
If studentized=FALSE
the ‘S-L’, the Q-Q, and the Residual-Leverage
plot, use standardized residuals which have identical variance
(under the hypothesis) otherwise studentized residuals are used.
Unlike other plotting functions plot.manylm
and plot.manyglm
respectively do not have a subset argument, the subset needs to be specified
in the manylm
or respectively manyglm
function.
For all arguments that are formally located after the position of …
,
positional matching does not work.
For restrictions on filename
see R's help on eps/pdf/jpeg.
Note that keep.window
will be ignored if write.plot
is
not show
.