Announcement

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

  • Formal Test for Differences in Individual Coefficients between Nested Cox Models

    Dear Statalist,

    I am currently estimating three nested Cox proportional hazards models on single-failure-per-subject data using Stata/SE 14.2. I am estimating the associations of several maternal characteristics with the risk of miscarriage in the first 150 days of gestation. The three models are of the form:

    Code:
    stset enddate, id(id) origin(pregnancy_start) exit(censor) scale(30) fail(miscarriage)
    
    stcox i.a
    est sto eq1
    
    stcox i.a i.b
    est sto eq2
    
    stcox i.a i.b i.c    /// variables a, b, and c are all factor variables with two levels (i.e. dummies)
    est sto eq3
    The data consist of 11,140 subjects, 48,329.5 person-months at-risk, and 1,472 failures. I know that the likelihood ratio test can be used to test for differences in the global fit of one model nested within another, but I have a slightly different interest. Is there a formal test for differences in individual coefficients between nested models, or should one simply compare confidence intervals across models to understand this? Using the example above, I would basically like to formally test if:

    Code:
    [eq1]1.a==[eq2]1.a==[eq3]1.a
    Thank you for your help!

  • #2
    You might be able to do it with suest. There is a logit parallel for some cox models - if stcox doesn't work with suest, the logit might. Alternatively, you might be able to stack the data setting the variables to zero in different layers so you can run the entire model at once but still get the partial estimates.
    a1 b1 c1 a2 b2 c2 a3 b3 c3
    1 4 0 0 0 0 0 0 0 0
    2 5 0 0 0 0 0 0 0 0
    3 0 0 0 4 3 0 0 0 0
    4 0 0 0 5 2 0 0 0 0
    5 0 0 0 0 0 0 4 3 8
    6 0 0 0 0 0 0 5 2 7

    then run all 9 variables.

    If you let the errors vary by subset, you might get the same thing you got with separate estimates (I'm not sure this works with stcox).

    Comment


    • #3
      You can duplicate an stcox model with Poisson regression for ungrouped data. In the manual entry for stcox, see Example 9 .
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment

      Working...
      X