Learn R Programming

NSM3 (version 1.18)

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,...)

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

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

Author

Rachel Becvarik

Examples

Run this code
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)

Run the code above in your browser using DataLab