mrl: Mean Residual Life

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
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

1
2
3
4
5
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)

Example output

Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: MASS
Loading required package: partitions
Loading required package: survival
fANCOVA 0.5-1 loaded
[[1]]
 [1] 925.1163 918.1163 939.9762 899.9762 921.9268 910.9268 933.7000 917.7000
 [9] 941.2308 838.2308 860.2895 805.2895 827.0541 786.0541 807.8889 795.8889
[17] 818.6286 786.6286 809.7647 697.7647 718.9091 707.9091 730.0312 725.0312
[25] 748.4194 738.4194 763.0333 750.0333 775.8966 748.8966 775.6429 773.6429
[33] 802.2963 767.2963 796.8077 757.8077 788.1200 780.1200 812.6250 810.6250
[41] 845.8696 776.8696 812.1818 760.1818 796.3810 783.3810 822.5500 758.5500
[49] 798.4737 696.4737 735.1667 716.1667 758.2941 728.2941 773.8125 735.8125
[57] 784.8667 675.8667 724.1429 692.1429 745.3846 540.3846 585.4167 565.4167
[65] 616.8182 583.8182 642.2000 475.2000 528.0000 350.0000 393.7500 321.7500
[73] 367.7143 274.7143 320.5000 311.5000 373.8000 214.8000 268.5000 257.5000
[81] 343.3333 139.3333 209.0000  40.0000  80.0000   0.0000

[[2]]
 [1]  1165.453  1158.453  1186.035  1146.035  1173.988  1162.988  1192.062
 [8]  1176.062  1206.218  1103.218  1132.250  1077.250  1106.365  1065.365
[15]  1094.958  1082.958  1113.900  1081.900  1113.720  1001.720  1032.075
[22]  1021.075  1052.984  1047.984  1081.790  1071.790  1107.516  1094.516
[29]  1132.258  1105.258  1144.732  1142.732  1185.055  1150.055  1194.288
[36]  1155.288  1201.500  1193.500  1243.229  1241.229  1295.195  1226.195
[43]  1281.931  1229.931  1288.500  1275.500  1339.275  1275.275  1342.394
[50]  1240.394  1309.305  1290.305  1366.205  1336.205  1419.718  1381.718
[57]  1473.833  1364.833  1462.321  1430.321  1540.345  1335.345  1446.624
[64]  1426.624  1556.317  1523.317  1675.649  1508.649  1676.277  1498.277
[71]  1685.561  1613.561  1844.070  1751.070  2042.915  2033.915  2440.698
[78]  2281.698  2852.123  2841.123  3788.164  3584.164  5376.245  5207.245
[85] 10414.491 10334.491

[[3]]
 [1]    684.77929    677.77929    693.91689    653.91689    669.86608
 [6]    658.86608    675.33774    659.33774    676.24383    573.24383
[11]    588.32919    533.32919    547.74350    506.74350    520.81971
[16]    508.81971    523.35741    491.35741    505.80910    393.80910
[21]    405.74271    394.74271    407.07842    402.07842    415.04869
[26]    405.04869    418.55031    405.55031    419.53481    392.53481
[31]    406.55391    404.55391    419.53739    384.53739    399.32728
[36]    360.32728    374.74038    366.74038    382.02123    380.02123
[41]    396.54389    327.54389    342.43225    290.43225    304.26235
[46]    291.26235    305.82547    241.82547    254.55313    152.55313
[51]    161.02830    142.02830    150.38291    120.38291    127.90684
[56]     89.90684     95.90063    -13.09937    -14.03504    -46.03504
[61]    -49.57620   -254.57620   -275.79088   -295.79088   -322.68096
[66]   -355.68096   -391.24906   -558.24906   -620.27673   -798.27673
[71]   -898.06132   -970.06132  -1108.64151  -1201.64151  -1401.91510
[76]  -1410.91510  -1693.09812  -1852.09812  -2315.12265  -2326.12265
[81]  -3101.49686  -3305.49686  -4958.24530  -5127.24530 -10254.49059
[86] -10334.49059

NSM3 documentation built on April 6, 2021, 5:05 p.m.

Related to mrl in NSM3...