cenQQ: Q-Q Plot censored data

Description Usage Arguments Value References Examples

View source: R/cenQQ.R

Description

Plots a quantile-quantile (Q-Q) plot of censored data versus a fitted data distribution

Usage

1
cenQQ(y.var, cen.var, dist = "lnorm", Yname = yname)

Arguments

y.var

The column of y (response variable) values plus detection limits

cen.var

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.

dist

One of three distributional shapes to fit to your data: lognormal (lnorm), normal (norm) or gamma (gamma).

Yname

Optional – input text in quotes to be used as the variable name on the Q-Q plot. The default is the Yname name of the y.var input variable.

Value

A single Q-Q plot of data fitted by normal, lognormal or gamma distributions with Shapiro-Francia W value printed on plot.

References

Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

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

1
2
3
4
5
data(Brumbaugh)
cenQQ(Brumbaugh$Hg,Brumbaugh$HgCen)

# User defined distribution
cenQQ(Brumbaugh$Hg,Brumbaugh$HgCen,dist="gamma")

NADA2 documentation built on April 30, 2021, 5:09 p.m.