| plot.hnp | R Documentation | 
The plot method for objects of class hnp.
## S3 method for class 'hnp'
plot(x, cex, pch, colour, lty, lwd, type,
     xlab, ylab, main, legpos, legcex, ...)| x | object of class  | 
| cex | character expansion size. | 
| pch | character string or vector of one character or integer for plotting characters, see  | 
| colour | vector of colours. | 
| lty | vector of line types. | 
| lwd | vector of line widths. | 
| type | type of plot for each envelope band and points. Default is  | 
| xlab | title for x axis, as in  | 
| ylab | title for y axis, as in  | 
| main | plot title. | 
| legpos | if  | 
| legcex | if  | 
| ... | extra graphical arguments passed to  | 
None.
Rafael A. Moral <rafael_moral@yahoo.com.br>, John Hinde and Clarice G. B. Demétrio
Moral, R. A., Hinde, J. and Demétrio, C. G. B. (2017) Half-normal plots and overdispersed models in R: the hnp package. Journal of Statistical Software 81(10):1-23.
Demétrio, C. G. B. and Hinde, J. (1997) Half-normal plots and overdispersion. GLIM Newsletter 27:19-26.
Hinde, J. and Demétrio, C. G. B. (1998) Overdispersion: models and estimation. Computational Statistics and Data Analysis 27:151-170.
Demétrio, C. G. B., Hinde, J. and Moral, R. A. (2014) Models for overdispersed data in entomology. In Godoy, W. A. C. and Ferreira, C. P. (Eds.) Ecological modelling applied to entomology. Springer.
hnp
## Simple Poisson regression
set.seed(100)
counts <- c(rpois(5, 2), rpois(5, 4), rpois(5, 6), rpois(5, 8))
treatment <- gl(4, 5)
fit <- glm(counts ~ treatment, family=poisson)
anova(fit, test="Chisq")
## half-normal plot
hnp(fit)
## or save it in an object and then use the plot method
my.hnp <- hnp(fit, print.on=TRUE, plot=FALSE)
plot(my.hnp)
## changing graphical parameters
plot(my.hnp, lty=2, pch=4, cex=1.2)
plot(my.hnp, lty=c(2,3,2), pch=4, cex=1.2, col=c(2,2,2,1))
plot(my.hnp, main="Half-normal plot", xlab="Half-normal scores",
     ylab="Deviance residuals", legpos="bottomright")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.