turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Strange inconsistency between JMP(SAS) and R in me...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 5, 2017 1:05 PM
(910 views)

Hi, everyone,

I came across the following strange inconsistency between R and JMP (or SAS) in median survival time estimation.

I understand that CI can be different because of different ways of doing it, but I never expected that median survival point estimation could be different. Does anyone here happen to know the actual technical reason? I tried to figure it out, but had no luck.

For the following simple dataset (event =1 means death, 0 means censor),

time | event | trt |

116 | 1 | 0 |

116 | 0 | 0 |

110 | 1 | 0 |

116 | 1 | 0 |

116 | 1 | 0 |

110 | 1 | 0 |

116 | 1 | 0 |

116 | 1 | 0 |

150 | 0 | 1 |

150 | 1 | 1 |

138 | 1 | 1 |

138 | 1 | 1 |

150 | 0 | 1 |

150 | 0 | 1 |

150 | 0 | 1 |

138 | 1 | 1 |

JMP cannot provide an estimate of median survival time for trt = 1 group while R can.

JMP output: (JMP 12.1, use analyze --> reliability and survival --> survival, Y = time, grouping = trt, cencor = event, censor code = 0 )

Group | Median Time | ... |

0 | 116 | ... |

1 | . | ... |

R output: (code: library(survival); summary(survfit(Surv(time,event)~trt, data=data))$table)

... | median | ... | |

trt=0 | ... | 116 | ... |

trt=1 | ... | 150 | ... |

Thank you all in advance!

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 9, 2017 11:08 AM
(836 views)

I think what is going on is that there are too many right-censored observations to define the median. For the 8 observations in the trt=1 group, 3 are failures at t=138, 1 is a failure at t=150, and half (4) of them are right-censored at t=150. Since the median of 8 values is the average of the 4th and 5th values, we would need to average 150 and some (unknown) value larger than 150. As a result, the Survival platform is reporting a missing value for the Median Time.

As to why R gives a value, I can only speculate, but my guess is that since the 4th ordered value is not censored and the 4th observation out of 8 would be the 0.50 quantile, R is reporting the value of the 4th observation as the median survival time. Note that if you change one more t=150 observation (row 10) to be right-censored, R reports the median for trt=1 to be missing (NA).

Hope this helps,

Michael

Michael Crotty

Sr Statistical Writer

JMP Development

Sr Statistical Writer

JMP Development

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 9, 2017 12:06 PM
(828 views)

Thanks a lot for the explanation! That makes sense!

Now I have to see if I can find a formula or something that gives a clear definition in SAS vs R, since I need to let R output the SAS result.

Thanks again!

Best,

Yan