Description Usage Arguments Details Value Author(s) References See Also Examples
halfnorm
produces a half normal plot of the residuals with
simulated envelopes useful for model evaluation and detection of
outliers
1 2 3 4 |
object |
An object of class |
resType |
The type of residual used in the plot |
env |
Logical for whether envelopes are simulated |
nsim |
Number of simulations used for the envelopes |
plot |
Logical for whether the points should be plotted. If
|
identify |
Logical for whether it should be possible to identify
points interactively. Ignored if |
n |
How many points should be identified. Ignored if
|
Absolute values of the residuals are used in a half normal plot that otherwise corresponds to a regular normal probability plot.
Residuals from a binomial glm are not necessarily uncorrelated and normally distributed and may accordingly deviate from a straight line even if the fitted model is true. If the fitted model is true the optional simulated envelopes are likely to contain the absolute residuals.
The different types of residuals are described in
Residuals
If plot = T
a plot is produced. Otherwise a list of the
residuals and their expected values are returned
Merete K Hansen
Atkinson, A. C. (1981) Two graphical displays for outlying and influential observations in regression. Biometrika, 68, 13-20.
Collett, D. (2003) Modelling binary data. Second edition. Chapman & Hall/CRC.
1 2 3 4 5 6 7 8 9 10 11 | ## Halfnormal plot with simulated envelopes
data(beetles)
beetles.glm <- glm(cbind(y, n-y) ~ conc, family=binomial, data=beetles)
halfnorm(beetles.glm, resType='pearson')
## Not run:
## Halfnormal plot with simulated envelopes
## Two points are interactively identified when they are selected with the mouse
halfnorm(beetles.glm, resType='deviance', identify = T, n = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.