pctCens: Percent Censored

View source: R/pctCens.R

pctCensR Documentation

Percent Censored

Description

Computes the percentage of censoring ("left," "right," or "multiple") for an object.

Usage

pctCens(x, type = "multiple")

Arguments

x

the object to compute the percentage of censoring. Missing values are permitted and removed before computing the percentage,

type

the type of censoring desired. For "left," only the percent of left-censored data is computed. For "right," only the percent of right-censored data is computed. For "multiple," the percentage of left-, right-, and interval-censored data is returned.

Value

The percentage of the kind of censoring specified by type is returned. Zero is returned if all data are missing!

Note

This function will work for any type of data that has a method for censoring and as.mcens.

See Also

censoring

Examples


pctCens(as.lcens(c(1:5, NA), 2)) # left-censored 


USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.