Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Steven Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: AW: st: Competing Hazards with Multiple-Record-per-Subject Data (2) |

Date |
Mon, 25 Jul 2011 08:23:13 -0400 |

Stefan, I notice two things. 1) Your "subepisode" variable is perfectly collinear with time. 2) Your "risk type" variable looks like your outcome indicator (it's the only variable that differs in the two parts of your listing). I don't have Lunn/McNeill, but I don't see how you can use the outcome indicator as a covariate for predicting that outcome. I can suggest: 1) Make sure that your multiple failure model corresponds to one of those in http://www.stata.com/support/faqs/stat/stmfail.html 2) Get that model working with a single outcome first: ordinary survival analysis, treating the other outcome as censored. Good luck Steve sjsamuels@gmail.com On Jul 25, 2011, at 4:46 AM, Stefan Göke wrote: Hi Steve, thanks for your reply! I do not use Fine and Gray because I seek to model risk type as a covariate following Lunn/McNeil 1995. Following your suggestion, I added to each ending time of one of the two risk types the constant of 0.001. After stset, the data looks like the following excerpt for ids “2” and “6”, with - id = id, - supedno = subepisode after stsplit, - risk = risk type either 0 or 1, - ddes_risk = failure variable, - dtime1_risk = ending time of the record +-----------------------------------------------------------------------+ | id subepno risk ddes_r~k dtime1~k _st _d _t _t0 | |----------------------------------------------------------------------- | 20. | 4 0 1 . 1 1 0 1 0 | 21. | 4 1 1 . 2 1 0 2 1.0001 | 22. | 4 2 1 . 3 1 0 3 2.0000999 | 23. | 4 3 1 1 4 1 1 4 3.0000999 | +-----------------------------------------------------------------------+ |----------------------------------------------------------------------- | 32. | 6 0 1 . 1 1 0 1 0 | 33. | 6 1 1 . 2 1 0 2 1.0001 | 34. | 6 2 1 . 3 1 0 3 2.0000999 | 35. | 6 3 1 . 4 1 0 4 3.0000999 | 36. | 6 4 1 . 5 1 0 5 4.0001001 | 37. | 6 5 1 . 6 1 0 6 5.0001001 | 38. | 6 6 1 . 7 1 0 7 6.0001001 | 39. | 6 7 1 0 8 1 0 8 7.0001001 | +-----------------------------------------------------------------------+ |------------------------------------------------------------------------ | 2094. | 2 0 0 . 1.0001 1 0 1.0001 1 | 2095. | 2 1 0 . 2.0001 1 0 2.0000999 2 | 2096. | 2 2 0 1 3.0001 1 1 3.0000999 3 | +------------------------------------------------------------------------+ |------------------------------------------------------------------------ | 2117. | 6 0 0 . 1.0001 1 0 1.0001 1 | 2118. | 6 1 0 . 2.0001 1 0 2.0000999 2 | 2119. | 6 2 0 . 3.0001 1 0 3.0000999 3 | 2120. | 6 3 0 . 4.0001 1 0 4.0001001 4 | 2121. | 6 4 0 . 5.0001 1 0 5.0001001 5 | 2122. | 6 5 0 . 6.0001 1 0 6.0001001 6 | 2123. | 6 6 0 . 7.0001 1 0 7.0001001 7 | 2124. | 6 7 0 0 8.0001 1 0 8.0001001 8 | +------------------------------------------------------------------------+ Is this how you meant it? I am asking because my regression does not work sound when integrating the “risk” variable into my stcox survival analysis – for “risk” the p-value is 1.000 and no confidence interval is reported. Moreover, no rho-value is reported in the Schoenfeld residuals test. I tried clustering the data when using stcox now by id with the option vce(cluster varname) to get robust standard errors given the replication of observations. However, the rho-value still is not reported. How could this be solved? Many thanks! Stefan -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Steven Samuels Gesendet: Sonntag, 24. Juli 2011 00:19 An: statalist@hsphsun2.harvard.edu Betreff: Re: st: Competing Hazards with Multiple-Record-per-Subject Data (2) Break the ties: add a small constant (e.g. 0.001) to the times for one of the failure types. Also -stcrreg- (which fits the Fine-Gray model) does not require the augmentation trick, I believe. -Steve sjsamuels@gmail.com Dear statalisters, in earlier posts implementation of data replication in Lunn/McNeil 1995 Applying Cox Regression to Competing Risks were discussed. Under the subject line above, Alex Gelber (see below) asked how to implement this particularly when using multiple-record-per-subject data – unfortunately with no reply. I stsplitted my data by year to model a linear time trend and age covariates and thus, I am facing the same problem: stsetting does not work when the data is replicated along Lunn/McNeil 1995 since at every instant two records are attached to the id variable. The question is how to solve this stset problem? Given that 5 years have passed by since Alex posted, please allow myself to basically repost this question – maybe even Alex has the answer and is still subscribed. Many thanks for your consideration Stefan -- Stefan Göke Ph.D. Candidate Department of Management University Paderborn ____________________________ In earlier Statalist posts, May Boggess of Statacorp explained how to estimate a competing hazard model using Lunn and McNeil's methods A and B. There seems to be a problem, however, with implementing Lunn and McNeil's Method B when using multiple-record-per-subject data. The problem is that to implement Lunn and McNeil Method B, you need to duplicate each subject's record twice (in the case of two competing hazards). In the case of multiple-record-per-subject data, when using the stset command to stset the data, you need to specify the ID variable using id(idname), where "idname" is the name of the ID variable. But then Stata gives you an error message, because each ID has two records attached to it at every instant, and the stset command with multiple-record-per-subject data only works correctly when there is only one record for each id-time combination. For example, in my case, the time variable is "month," the failure variable is "status," and the id variable is "id," and here is what happens when I try to stset my data: . stset month, failure(status) id(id) id: id failure event: status != 0 & status < . obs. time interval: (month[_n-1], month] exit on or before: failure ---------------------------------------------------------------------------- -- 2000 total obs. 2000 multiple records at same instant PROBABLE ERROR (month[_n-1]==month) ---------------------------------------------------------------------------- -- 0 obs. remaining, representing 0 subjects 0 failures in single failure-per-subject data 0 total analysis time at risk, at risk from t = 0 earliest observed entry t = . last observed exit t = . Does anyone know how to address this problem? Any help would be much appreciated. Alex -- Alexander Gelber Ph.D. Candidate Harvard University Department of Economics Littauer Center Cambridge, MA 02138 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**AW: AW: st: Competing Hazards with Multiple-Record-per-Subject Data (2)***From:*Stefan Göke <stefan.goeke@whu.edu>

**References**:**st: Competing Hazards with Multiple-Record-per-Subject Data (2)***From:*Stefan Göke <stefan.goeke@whu.edu>

**Re: st: Competing Hazards with Multiple-Record-per-Subject Data (2)***From:*Steven Samuels <sjsamuels@gmail.com>

**AW: st: Competing Hazards with Multiple-Record-per-Subject Data (2)***From:*Stefan Göke <stefan.goeke@whu.edu>

- Prev by Date:
**Re: st: DO editor crash - linux** - Next by Date:
**st: interaction regression with panel data** - Previous by thread:
**AW: st: Competing Hazards with Multiple-Record-per-Subject Data (2)** - Next by thread:
**AW: AW: st: Competing Hazards with Multiple-Record-per-Subject Data (2)** - Index(es):