pctCens | R Documentation |
Computes the percentage of censoring ("left," "right," or "multiple") for an object.
pctCens(x, type = "multiple")
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. |
The percentage of the kind of censoring specified by type
is
returned. Zero is returned if all data are missing!
This function will work for any type of data that has a method for
censoring
and as.mcens
.
censoring
pctCens(as.lcens(c(1:5, NA), 2)) # left-censored
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.