Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cox Regression survival analysis with clustered data.

    Hello everyone,
    I have a database of thousands of patients from many hospitals.
    I'm trying to model a cox regression survival analysis. I would like to account for the clustering within hospitals using the hospital_ID variable. I tried using the option shared (hospital_ID ) but the issue was : delayed entries or gaps detected. Then I tried using the forceshared ( ) options. This seemed to exludes everyone from my model.

    Does anyone have experience with survival analysis using clustered data?

    thank you

  • #2

    Ignore the shared option and add the following option your stcox statement
    Code:
    vce(cluster hospital_ID)
    That will make standard errors a function of between-hospital variation. However if this is a survey data set, then you should svyset the data properly, with whatever the actual PSUs were, then run svy: stcox.

    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment

    Working...
    X