medianStats: Median Value

Description Usage Arguments Value Note References Examples

Description

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

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'lcens'
median(x, na.rm = FALSE, ...)

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

## S3 method for class '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.

Note

The median is computed using the flipped Kaplan-Meier method described in Helsel (2012).

References

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

Examples

1
median(as.lcens(1:4, 2))

leppott/baytrends033 documentation built on July 28, 2018, 10:30 p.m.