censtats: Produces summary statistics using ROS, MLE, and K-M methods.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/summary.R

Description

A convenience function that produces a comparative table of summary statistics obtained using the cenros, cenmle and cenfit routines. These methods are, Regression on Order Statistics (ROS), Maximum Likelihood Estimation (MLE), and Kaplan-Meier (K-M).

Usage

1
    censtats(obs, censored)

Arguments

obs

A numeric vector of observations.

censored

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

Details

If the data do not fulfill the criteria for the application of any method no summary statistics will be produced.

Value

A dataframe with the summary statistics.

Author(s)

R. Lopaka Lee <rclee@usgs.gov>

Dennis Helsel <dhelsel@practicalstats.com>

References

Helsel, Dennis R. (2005). Nondectects and Data Analysis; Statistics for censored environmental data. John Wiley and Sons, USA, NJ.

Examples

1
2
    data(DFe)
    with(DFe, censtats(Summer, SummerCen))

Example output

Loading required package: survival

Attaching package: 'NADA'

The following object is masked from 'package:stats':

    cor

       n    n.cen  pct.cen 
 9.00000  6.00000 66.66667 
      median     mean       sd
K-M 3.000000 5.777778 6.776867
ROS 2.763843 4.667484 6.138230
MLE 3.131899 5.211599 6.931668

NADA documentation built on March 22, 2020, 5:07 p.m.

Related to censtats in NADA...