I am trying to generate KM curves in a survival analysis that is stratified by matched pairs and also adjusted for a time varying covariate. In short, stcurve doesn't seem to be an option and I cannot figure out how to get sts graph to work accurately (details below).
Data: The data are set up with multiple observations per individual. There are two groups of subjects: those who ever used treatment (_treated==1) and those who never used treatment (_treated==0). The data are organized by visit number (vnum) and subjects are matched by several variables (not shown). On the day of starting treatment (niv_rx==1) the users are matched to a never user. The survival (match_time) since the date of matching (match_visit==1) is then compared to see if treatment has an effect on survival.
In addition, I have a time-varying covariate (niv_hrs) which indicates the number of hours per day that the subject was using therapy.
An example of two matched pairs is below
[ATTACH=CONFIG]temp_16676_1578769765488_922[/ATTACH]
The code and output for my survival analysis is as follows, looking at the survival by receiving therapy, stratified by pair, with niv_hrs as a time-varying covariate. You will see that there is a trend towards a benefit to niv_rx:
stcox niv_rx, strata(pair) tvc(niv_hrs) vce(robust)
[ATTACH=CONFIG]temp_16677_1578769905742_546[/ATTACH]
However, I cannot do stcurve after this analysis as stcurve is not compatible with stratified analyses. Sts graph does not have an obvious way to both stratify by pairs and adjust for the time-varying covariate. Is there another way to accurately represent this survival curve? Such as through graphing a twoway line to do this with post-estimation commands?
Thank you so much in advance for your time and effort!
JT
Related Posts with KM curves in stratified survival analysis with time-varying covariate
Explanatory and explained variables with opposite time trendsDear All! I am conducting a cross-country study exploring the relationship between ESG disclosure …
Struggling to create a percent change variable that is organized by multiple subgroupingsHi all! Apologies for the possibly beginner question, I've been searching this forum all afternoon a…
Continuous variable Treatment Group in DID RegressionI am struggling to understand how to interpret the treatment and control group in the following case…
Microfinance or Self Help GroupHi everyone, I am writing a desk-based research paper for my class on "impact of Microfinance (or S…
"by" and missingness in table1_mcHi I have two queries relating to the use of table1_mc: 1) I would like to create a table1 descri…
Subscribe to:
Post Comments (Atom)
0 Response to KM curves in stratified survival analysis with time-varying covariate
Post a Comment