Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mrl

Mean Residual Life


Description

Function to return the mean residual life along with Hall and Wellner's upper and lower bounds.

Usage

mrl(data, alpha, main=NULL, ylim=NULL, xlab=NULL,...)

Arguments

data

a vector of survival times

alpha

(1-alpha) is the approximate coverage probability for the confidence band.

main

title of the plot. The default is "Plot of Mean Residual Life and bounds".

ylim

the limits of the y-axis. The default is to include all points in the plotting range.

xlab

the label for the x-axis. The default is Time.

...

additional plotting options

Value

The function returns a list with three vectors:

PM

the mean residual life

PMU

upper bound for the mean residual life

PML

lower bound for the mean residual life

Author(s)

Rachel Becvarik

Examples

leukemia<-c(7, 429, 579, 968, 1877, 47, 440, 581, 1077, 1886, 58,
445,  650, 1109, 2045, 74, 455, 702, 1314, 2056, 177, 468,
715, 1334, 2260, 232, 495, 779, 1367, 2429, 273, 497, 881,
1534, 2509, 285, 532, 900, 1712, 317,  571, 930, 1784)
mrl(leukemia, .05)

NSM3

Functions and Datasets to Accompany Hollander, Wolfe, and Chicken - Nonparametric Statistical Methods, Third Edition

v1.16
GPL-2
Authors
Grant Schneider, Eric Chicken, Rachel Becvarik
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.