equivalent_n: Censored data sample size

View source: R/equivalent_n.R

equivalent_nR Documentation

Censored data sample size

Description

Computes the equivalent sample size of censored data. Observations at lower detection limits have a greater percent of the equivalent information of a detected value than observations at higher detection limits.

Usage

equivalent_n(y.var, y.cen, printstat = TRUE)

Arguments

y.var

The column of data values plus detection limits.

y.cen

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.

printstat

Logical TRUE/FALSE option of whether to print the resulting statistics in the console window, or not. Default is TRUE.

Details

Based on "Method 2" of Dr. Brenda Gillespie's talk at ASA National Meeting 2019. This method differs from hers in how the percentile probabilities for the detection limits are computed. Probabilities here are computed using Regression on Order Statistics (ROS).

Computes the equivalent n, the number of observations including censored values, as a measure of information content for data with nondetects.

Value

Prints summary statistics including

  • n sample size

  • n.cen number of censored data

  • pct.cen percent of data censored

  • min minimum reported value

  • max maximum reported value

Summary of censored data including

  • limit detection limit

  • n number of censored values per limit

  • uncen number of detected values at or above the limit

  • pexceed proportion of data that exceeds the limit

Summary of the equivalent sample size for detected and censored values.

  • n.equiv the equivalent number of observations

  • n.cen.equiv equivalent number of detected obs in the censored data

  • n.detected number of uncensored values

References

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

Gillespie, B.W., Dominguez, A., Li, Y., 2019. Quantifying the information in values below the detection limit (left-censored data). Presented at the 2019 Joint Statistical Meetings of the Amer. Stat. Assoc., Denver, CO., July 31, 2019.

See Also

NADA::censummary

Examples

data(Brumbaugh)

equivalent_n(Brumbaugh$Hg,Brumbaugh$HgCen)

NADA2 documentation built on Oct. 20, 2023, 5:07 p.m.