Announcement

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

  • Setting "STSET" for Cox regressions for Age in and Age out as time scale.

    Dear Stata General Chat,

    I am currently setting up a Cox regression model using Age as the time component (Age of study entry and Age at failure). I would like to know if this is the code for setting Age_in and Age_out as a time-scale.

    stset ageout, fail(outcome==1) enter(age_in)

    then

    stcox v1 v2 v3 vn...

    Please let me know if this is the proper way to set it up or if there are suggestions/modifications needed to the code.

    Respectfully,

    Doug

  • #2
    It is likely that you want to use -origin(age_in)- rather than -enter(age_in)-m though it depends on the actual circumstances of your study. When you specify -enter(age_in)- you are stipulating that your subjects actually become at risk for the failure outcome at age 0 (i.e. at birth), but do not enter observation in the study until age = age_in. This includes the possibility that failure occurs even prior to entering the study. There can be situations like that, but they are not typical of most studies.

    Comment


    • #3
      This is a prospective cohort study, age_in would be specified as age at baseline enrollment. I am not sure what would be the appropriate STSET for establishing age as the time component. Would "enter" need to be replaced with "origin"?

      Comment


      • #4
        So the substantive question you need to answer is: is age itself the factor that initiates risk of failure here? If you have two people in the cohort study and both are of the same age, is it their age per se that predicts their risk of failure at any time, so that their chronological risk is the same. If it is, then specifying -enter(age_in)- would be OK. But in most studies, it isn't age per se that is relevant: it is usually the time from some event other than birth that marks the onset of risk of failure. For example risk might begin when a certain disease was diagnosed, or a certain medication begun, or a certain procedure performed, or upon admission to a hospital. In that case age is just a coincidental marker of the passage of time, and you would not want to use it as the analytic time variable in the study. Sometimes, though, age truly is the appropriate determinant of chronology of risk. For example, given the peculiarities of health care finance in the US, one might become at risk of some events when you turn 65 years old. In that case, age is the appropriate analytic time, and you would specify it with -origin(age == 65)-. (N.B. not -enter()-).

        So you need to focus on when a person first becomes at risk of failure. That time point, whether it is an age, or a calendar time, or whatever, goes in the -origin()- option. The -enter()- option designates instead the time at which a person enters the study and comes under observation. In most situations, -enter()- is simply not specified but is assumed to be coincident with -origin()-.

        Comment


        • #5
          The answer to your specific question is, yes that code is appropriate if you you wish to use age as the time scale.

          If one has dates rather than age at entry and exit, then the code might be:

          Code:
          stset date_out, fail(outcome==1) enter(date_in) origin(date_birth)
          Clyde made good comments regarding choice of time scale. In my area (epidemiology) there is quite a bit written on this. The key is to search on "time scale" rather than "time component". See, for example, https://doi.org/10.1002/sim.2098 ("Choice of time-scale in Cox's model analysis of epidemiologic cohort data: a simulation study").

          I see quite a lot of cohort studies where individuals are recruited from the general population such that date of entry has no clinical or biological relevance. When these individuals are followed-up for, for example, disease risk, attained age is likely to be the optimal choice of time scale.

          Comment

          Working...
          X