I ran into a problem where I have one continuous covariate which I suspect having a time-varying coefficient. This covariate was measured only once at baseline for all subjects in the dataset with no repeated measures. For example, height. The reason I believe it has a time-varying coefficient is that even though height itself does not vary by time, its 'effect' does (it violates the proportional hazards assumption). The challenge is that I do not know how to handle/implement this in R. Any help would be much appreciated. Thanks!
Asked
Active
Viewed 30 times
1
-
Technically this is not a time-dependent covariate but a covariate that you think has a time-varying coefficient. That's an important distinction in terms of how to handle it. Please edit the title and content of your question accordingly so that you are more likely to get a useful answer. – EdM Mar 29 '19 at 13:42
-
Yes I believe you are right. I've changed the title and content. Thanks! – Stats Pupil Mar 29 '19 at 13:52
-
Please look at [this link](https://stats.stackexchange.com/q/211720/28500) for discussion of the general statistical issue and the use of the tt() function in the R survival package to handle any arbitrary function for the time dependence. See [this page](https://stats.stackexchange.com/q/384074/28500) for the danger one faces if an incorrect approach is used. If questions still remain, please edit your question to focus on unresolved issues. – EdM Mar 29 '19 at 14:31
-
This is very helpful. All the issue I have have been resolved. Thank you! If you want to paste your comment in the below answer box please go ahead and I will mark this question as answered. – Stats Pupil Mar 29 '19 at 15:35
-
On this site we like to keep duplicate answers to a minimum. As I haven't added anything beyond what's already on this site I am going to recommend closing this question as a duplicate of the first question I linked in my comment. That's no reflection on the quality of your question, just an attempt to impose a little order on a site with over 130,000 questions so far. Please do come back here for your next question on statistics and data analysis. – EdM Mar 29 '19 at 15:46
-
Oh ok that makes sense. Thanks for the tip, I'm pretty new to this forum. – Stats Pupil Mar 29 '19 at 16:20
-
For concrete implementation you might also find my answer here useful: https://stackoverflow.com/questions/45870975/how-to-model-interaction-of-covariate-with-time-when-proportionality-assumption/53688493#53688493 – adibender Apr 01 '19 at 16:10