Closed davidmeester1 closed 4 years ago
Dear David,
you are pointing at a weak spot (one of many?) regarding eha: Documentation. When it comes to the documentation of 'aftreg' the vignette from 2009(!) only describes ML estimation in the case of time-fixed covariates, without mentioning the time-varying case (too bad).
A short description, without formulas (almost ...): The starting point is the definition of the survivor function as
S(t; z) = S_0(\int_0^t g(s)) ds,
where g is the time-varying acceleration factor. Then standard ML estimation techniques are applied. The point to understand is that in order to evaluate S(t; z) at t, we must know g(s), 0 < s <= t, and not only g(t). This is of course impossible with left-truncated observations, but 'aftreg' solves that obstacle by assuming that g(s) is constant on (0, t_0], where t_0 is the left truncation time point, that is, constant equal to the first observed value. You have to accept that, or try a PH model instead ...
This is not documented, but touched upon in the help page for aftreg:
id: If there are more than one spell per individual, it is
essential to keep spells together by the id argument. This
allows for time-varying covariates.
As a matter of fact, I am devoting this corona summer to writing better documentation in the form of vignettes and a second edition of EHAR.
Regarding the paper you referred to: I haven't seen it, but I will have a look. aftreg does not handle interval censored models, but maybe there are something to learn anyway. And implementing interval censored models shouldn't be that hard, with suitable assumptions.
Thanks for your interest in eha and aftreg in particular.
Best, Göran
On 2020-06-28 22:39, davidmeester1 wrote:
Dear @goranbrostrom https://github.com/goranbrostrom,
I apologize for asking this question here, it might not be the most appropriate place. However, I have been trying to figure out how time-varying covariates are implemented in aftreg, but could not find any documentation on this. I have tried to track the code connected to the |id| argument but have not been succesful. It also appears that Event History Analysis with R omits the details regarding time-varying covariates in AFT models, or am I overlooking something? The aftreg documentation also did not provide those insights. In particular, I am interested in how the likelihood function is adapted to handle time-varying covariates. Could you point me to a source where your technique is documented? Do you use a technique similar to Sparling, Younes, Lachin and Bautista (2006)?
Best, David Meester
Sparling, Y. H., Younes, N., Lachin, J. M., & Bautista, O. M. (2006). Parametric survival models for interval-censored data with time-dependent covariates. Biostatistics, 7(4), 599-614.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/goranbrostrom/eha/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7LHZ65UDS3XICDDRKZJUTRY6TBPANCNFSM4OKWFYLA.
Dear Göran,
Thanks for your quick reply, this is already very helpful, especially the starting point of the survivor function.
Best, David
Dear @goranbrostrom,
I apologize for asking this question here, it might not be the most appropriate place. However, I have been trying to figure out how time-varying covariates are implemented in aftreg, but could not find any documentation on this. I have tried to track the code connected to the
id
argument but have not been succesful. It also appears that Event History Analysis with R omits the details regarding time-varying covariates in AFT models, or am I overlooking something? The aftreg documentation also did not provide those insights. In particular, I am interested in how the likelihood function is adapted to handle time-varying covariates. Could you point me to a source where your technique is documented? Do you use a technique similar to Sparling, Younes, Lachin and Bautista (2006)?Best, David Meester
Sparling, Y. H., Younes, N., Lachin, J. M., & Bautista, O. M. (2006). Parametric survival models for interval-censored data with time-dependent covariates. Biostatistics, 7(4), 599-614.