km.surv {conf}R Documentation

Probability Mass Functions for the support of the Kaplan-Meier product-limit estimator for various cumulative probabilities associated with X

Description

Plot the probability mass functions for the support values of the Kaplan-Meier product-limit estimator for a given sample size n with a probability of observing a failure h at various times 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.

Usage

km.surv(n, h, lambda, ev, line, graydots, gray.cex,
        gray.outline, xfrac)

Arguments

n

sample size

h

probability of observing a failure

lambda

plotting frequency of the probability mass functions (default is 10)

ev

option to plot the expected values of the support values (default is FALSE)

line

option to connect the expected values with lines (default is FALSE)

graydots

option to express the weight of the support values using grayscale (default is FALSE)

gray.cex

option to change the size of the gray dots (default is 1)

gray.outline

option to display outlines of the gray dots (default is TRUE)

xfrac

option to label support values on the y-axis as exact fractions (default is TRUE)

Details

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.surv function plot the probability mass functions for the support values of the Kaplan-Meier product-limit estimator for a given sample size n with a probability of observing a failure h at various times 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.

The default method to plot the probability mass functions uses the area of a dot to indicate the relative probability of a support value. An alternative is to plot the probability mass functions using grayscales (by setting graydots = TRUE). One of the two approaches might work better in different scenarios.

The expected values are calculated by removing the probability of NA and normalizing the rest of the probabilities.

Value

The km.surv function doesn't return any value.

Author(s)

Yuxin Qin (yqin08@wm.edu), Heather Sasinowska (hdsasinowska@wm.edu), Larry Leemis (leemis@math.wm.edu)

References

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.

See Also

survfit

Examples

km.surv(n = 4, h = 2/3, lambda = 100, ev = TRUE, line = TRUE)
km.surv(n = 5, h = 3/4, lambda = 50, graydots = TRUE, gray.cex = 0.6, gray.outline = FALSE)
km.surv(n = 7, h = 1/5, lambda = 30, graydots = TRUE, gray.cex = 0.6, xfrac = FALSE)

[Package conf version 1.9.1 Index]