Produces three quantile-quantile (Q-Q) plots, also called probability plots, based on three distributions (normal, lognormal and gamma distributions).
cenCompareQQ(y.var, cen.var, Yname = yname, printrslt = TRUE)
The column of y (response variable) values plus detection limits
The column of indicators, where 1 (or TRUE
) indicates a detection limit in the y.var
column, and 0 (or FALSE
) indicates a detected value in y.var
.
Optional <U+2013> input text in quotes to be used as the variable name on all plots. The default Yname
is the name of the y.var
input variable.
Logical TRUE
/FALSE
option of whether to print the best distribution in the console window, or not. Default is TRUE.
Plots three Q-Q plots based on normal, lognormal and gamma distributions and prints the best-fit distribution.
Produces three Q-Q plots and reports which one has the highest Shapiro-Francia test statistic (W). The distribution with the highest W is the best fit of the three.
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<U+2013>216.
# NOT RUN {
data(Brumbaugh)
cenCompareQQ(Brumbaugh$Hg,Brumbaugh$HgCen)
# }
Run the code above in your browser using DataLab