baytrends (version 1.1.0)

median.lcens: Median Value

Description

Computes the sample median: methods for "lcens," "mcens," and "qw" data.

Usage

# S3 method for lcens
median(x, na.rm = FALSE, ...)

# S3 method for mcens median(x, na.rm = FALSE, ...)

# S3 method for qw median(x, na.rm = FALSE, ...)

Arguments

x

the censored data object.

na.rm

remove missing values before computation?

potentially further arguments for methods; not used in the default or lcens method.

Value

A vector of length one representing the sample median.

References

Helsel, D.R. 2012, Statistics for censored environmental data using Minitab and R: New York, Wiley, 324 p.

Examples

Run this code
# NOT RUN {
median(as.lcens(1:4, 2))

# }

Run the code above in your browser using DataLab