Learn R Programming

NADA2 (version 2.0.1)

censummary: Summary Statistics for Censored Data

Description

Produces basic, and hopefully useful, summary statistics on censored data.

Usage

censummary(obs, censored, groups = NULL, ...)

censummary.default(obs, censored, ...)

censummary.factor(obs, censored, groups, ...)

censummary.numeric(obs, censored, groups, ...)

Value

An object of class "censummary" containing summary statistics, or a list of such objects if grouped.

Arguments

obs

A numeric vector of observations.

censored

A logical vector indicating TRUE where an observation in obs is censored (a less-than value), and FALSE otherwise.

groups

Optional grouping variable (factor or numeric) used to compute summaries by subset.

...

Additional arguments passed to methods.

Details

This is a generic function with methods for numeric vectors and grouped data.

The generic function dispatches to methods based on the presence and type of groups:

censummary.default

Basic summary for numeric vectors.

censummary.factor

Summary grouped by a factor variable.

censummary.numeric

Summary grouped by a numeric grouping variable (converted to factor).

References

Helsel, Dennis R. (2005). Nondetects and Data Analysis: Statistics for Censored Environmental Data. John Wiley and Sons, USA, NJ.