Description

Function to create boxplots of water-quality data that
include censored values.

Usage

1

Arguments

data

is the dataset with columns that begin with P
followed by a number indicating concentration data and
columns that begin with R followed by numbers that match
those of the concentration data indicating qualification
codes. See example data sets for more information about
the data format, IllRivValleyCty and
qwMoRivOmaha.

qwcols

is a character vector with the beginning of
the column headers for remarks code (default is R), and
beginning of column headers for concentration data
(default is P for parameter).

site

is a label for the plot title indicating the
site where the water-quality samples were collected.

...

arguments to be passed to plot method.

Details

This function determines the columns within the data set
that have concentration data, based on them having column
headings that start with P (or a user-specificed
indicater in the second element of the qwcols argument)
followed by a number. The function determines the
associated remark, or qualification columns, based on
them having column headings that start with R (or a
user-specificed indicater in the first element of the
qwcols argument) followed by numbers that match the
associated concentration data. Then it determines which
values are censored, indicated by a less than symbol in
the R columns, performs regression on order statistics,
ros, using the NADA package, and estimates values
for the censored concentrations for constituents with
less than 90-percent censoring. The water-quality
concentrations are then depicted by boxplots.

Value

a boxplot

Note

The regression on order statistics function in R package
NADA (Lee, 2012), ros, is an implementation
of a regression on order statistics designed for
multiply-censored analytical-chemistry data (Helsel,
2005). The method assumes data contains zero to many
left-censored (less-than) values. For highly censored
data, ros may produce a warning message. Such as,

1
2
3

The boxplot will still be generated, but the
user should consider the warning message when
interpreting the plots. See Oblinger Childress and others
(1999) for information on the remark codes used by the
U.S. Geological Survey.

Author(s)

Karen R. Ryberg

References

Helsel, D.R., 2005, Nondetects and data analysis: New
York, John Wiley and Sons.