# Shape of HR after an intermediate event based on time to that event, multi-state model

**URL:** <https://discourse.datamethods.org/t/shape-of-hr-after-an-intermediate-event-based-on-time-to-that-event-multi-state-model/3707>\
**Category:** modeling strategy\
**Tags:** r, survival-analysis\
**Created:** [August 28, 2020, 8:06am UTC](https://discourse.datamethods.org/t/shape-of-hr-after-an-intermediate-event-based-on-time-to-that-event-multi-state-model/3707 "2020-08-28T08:06:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![albertoca](https://discourse.datamethods.org/user_avatar/discourse.datamethods.org/albertoca/32/297_2.png) [@albertoca](https://discourse.datamethods.org/u/albertoca)\
**Post date:** [August 28, 2020, 3:13pm UTC](https://discourse.datamethods.org/t/shape-of-hr-after-an-intermediate-event-based-on-time-to-that-event-multi-state-model/3707/6 "2020-08-28T15:13:38Z")

</div>

No, it is an AFT model whose exponential coefficients should be interpreted as time ratios. It is well explained in the article. In this particular case, it means that the life span is shortened by 44% after a thrombotic event, taking into account the structure of a multi-state model (avoiding immortal time issues, etc). In the link there is a very beautiful vignette written by Chris Jackson who explains how to extract time-variant hazard ratios from this AFT model, and that is what we did.

> [@Hazard ratio plots with non-linear & time-varying effects in R](https://discourse.datamethods.org/t/hazard-ratio-plots-with-non-linear-time-varying-effects-in-r/1123/7):
>
> Thanks for the contribution. There is also an example code by Chris Jackson in this tutorial (example 2.1):

Regarding the R code, I recommend you to read and become familiar with the documentation of the mstate package in order to convert data to long format and obtain the structure of a multi-state model before fitting any model. Best.

---

_[View the full topic](https://discourse.datamethods.org/t/shape-of-hr-after-an-intermediate-event-based-on-time-to-that-event-multi-state-model/3707)._
