cenregQQ {NADA2} | R Documentation |
Q-Q plot of censored regression residuals
Description
Plots a quantile-quantile (Q-Q) plot of censored regression residuals for simple or multiple regression.
Usage
cenregQQ(y.var, cen.var, x.vars, LOG = TRUE, intcens = FALSE, main = NULL)
Arguments
y.var |
The column of |
cen.var |
The column of indicators, where 1 (or |
x.vars |
One or more uncensored explanatory variable(s). See Details |
LOG |
Indicator of whether to compute the regression in the original y units, or on their logarithms. The default is to use the logarithms ( |
intcens |
a logical value indicating the input data is interval-censored instead of a column of values plus a column of indicators. |
main |
overall title for the plot. A default titel will be used if none is specified. |
Value
Q-Q Plot of model residuals and Shapiro-Francia test results.
References
Helsel, D.R., 2011. Statistics for censored environmental data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.
Millard, S.P., 2013. EnvStats: An R Package for Environmental Statistics. Springer-Verlag, New York.
Shapiro, S.S., Francia, R.S., 1972. An approximate analysis of variance test for normality. Journal of the American Statistical Association 67, 215–216.
Examples
data(Brumbaugh)
# One variable
cenregQQ(Brumbaugh$Hg,Brumbaugh$HgCen,Brumbaugh$PctWetland)
# More than one variable for demostration purposes
cenregQQ(Brumbaugh$Hg,Brumbaugh$HgCen,Brumbaugh[,c("PctWetland","SedLOI","Weight")])