# One-Sample Log-Rank Test

**URL:** <https://discourse.datamethods.org/t/one-sample-log-rank-test/4601>\
**Category:** general\
**Created:** [July 8, 2021, 10:27am UTC](https://discourse.datamethods.org/t/one-sample-log-rank-test/4601 "2021-07-08T10:27:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YMareev](https://discourse.datamethods.org/letter_avatar_proxy/v4/letter/y/919ad9/32.png) [@YMareev](https://discourse.datamethods.org/u/YMareev)\
**Post date:** [July 8, 2021, 10:27am UTC](https://discourse.datamethods.org/t/one-sample-log-rank-test/4601/1 "2021-07-08T10:27:09Z")

</div>

How to perform a one-Sample Log-Rank Test in R and is there a better way to compare mortality in the treatment group with predicted mortality (for example with predicted mortality by Seattle heart failure model)?

> **[3fee3d74054d914578e65017f115e9ec05f8.pdf](https://pdfs.semanticscholar.org/2ca4/3fee3d74054d914578e65017f115e9ec05f8.pdf)**
>
> 348.83 KB

---

<div class="post-metadata">

**Author:** ![f2harrell](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/f2harrell/32/165_2.png) [@f2harrell](https://discourse.datamethods.org/u/f2harrell)\
**Post date:** [July 8, 2021, 12:38pm UTC](https://discourse.datamethods.org/t/one-sample-log-rank-test/4601/2 "2021-07-08T12:38:02Z")

</div>

The log-rank test makes a _relative_ comparison of survival time distributions so there is no one-sample version of it. And note that it will be difficult to do a fully proper comparison of predicted vs. observed survival probabilities without taking into account imprecision in the original Seattle heart failure model estimates (e.g., confidence intervals for predicted probabilities).
