| km.pmf | R Documentation |
Generates the probability mass function for the support values
of the Kaplan-Meier product-limit estimator for a particular sample
size n, probability of observing a failure h at the time of interest expressed as the cumulative probability perc associated with X = min(T, C), where T is the failure time and C is the censoring time under a random-censoring scheme.
km.pmf(n, h, perc, plot, sep, xfrac, cex.lollipop)
n |
sample size |
h |
probability of observing a failure, in other words, |
perc |
cumulative probability associated with |
plot |
option to plot the probability mass function (default is |
sep |
option to show the breakdown of the probability for each support value (see function |
xfrac |
option to label support values on the x-axis as exact fractions (default is |
cex.lollipop |
size of the dots atop the spikes |
The Kaplan-Meier product-limit estimator is used to
estimate the survivor function for a data set of
positive values in the presence of right censoring.
The km.pmf function generates the probability mass function for the support values
of the Kaplan-Meier product-limit estimator for a particular sample
size n, probability of observing a failure h at the time of interest expressed as the cumulative probability perc associated with X = min(T, C), where T is the failure time and C is the censoring time under a random-censoring scheme.
The n argument must be a positive integer denoting
the sample size. Allowable limits are from 1 to 23.
Larger values of n are not allowed because of CPU
and memory limitations.
For larger sample size n, it is recommended to set
sep = FALSE, xfrac = FALSE, and
cex.lollipop = 0.01 for a better visual effect.
The km.pmf function returns a dataframe with
2 columns. The column named S stores all the support
values for the Kaplan-Meier product-limit estimator
with sample size n, including NA. The
column named P stores the associated probabilities.
Yuxin Qin (yqin08@wm.edu), Heather Sasinowska (hdsasinowska@wm.edu), Larry Leemis (leemis@math.wm.edu)
Qin, Y., Sasinowska, H., Leemis, L. (2023), "The Probability Mass
Function of the Kaplan-Meier Product-Limit Estimator",
The American Statistician, Volume 77, Number 1, 102-110.
survfit
km.pmf(4, 1/3, 0.75)
km.pmf(8, 1/2, 0.75, sep = FALSE, xfrac = FALSE, cex.lollipop = 0.01)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.