Becky
Becky

Reputation: 11

How is the restricted mean upper limit in survival analysis calculated in R

I conducted Kaplan Meier analysis in R looking at he survival of fibres in a fatigue test. I have not predefined the upper limit for the restricted mean. How does R calculate or decide the upper limit in order to calculate the restricted mean? I am using the following code:

fit = survfit(Surv(cyclicdata[,1], cyclicdata[,2]) ~ cyclicdata[,3])
print(fit, print.rmean=TRUE,rmean="common")

Upvotes: 1

Views: 408

Answers (1)

JeBronLames
JeBronLames

Reputation: 11

From experience with this calculation over the past few years, I believe that the restricted mean is by default calculated as the mean of the longest lives from each group.

For example, I have run into this with two groups having lives as below:

Group 1 Lives:

22 23 25 26 30 32 32 34 37 38 40 43 45 48 48 54 56 59 60 62 70 72 73 73 76 77 78 78 82 86 86 92 92 92 95 98 99 102 104 106 107 112 114 114 115 119 120 123 132 134 135 151 154 157 169 180

Group 2 Lives:

5 7 30 41 44 56 59 64 67 79 86 101 110 120 120 123 125 138 150 163 163 164 167 199 201 214 235 236 237 242 245 270 272 274 282 283 284 287 296 300 300 310 314 321 322 325 340 342 345 355 371 375 376 398 414 419 422 428 442 444 449 474 511 516 549 552 560 563 581 608 618 628 637 638 675 685 702 782 782 817 885 886 946 947 951

When I run my survival fit and print the output, I get this:

* restricted mean with upper limit = 566

This is equal to:

> mean(max(c(Group1$Lives,Group2$Lives)))

[1] 565.5

or

> (951+180)/2

[1] 565.5

Upvotes: 1

Related Questions