Announcement

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

  • estat phtest

    Hi, I have a question about how to use the command estat phtest, detail. In my cox proportional hazard regression model, I use a variabel (pthigfbp1hilo) with categories 1-4, and I therefore ran 4 lines/models with ib1.pthigfbp1hilo to ib4.pthigfbp1hilo to compare the categories. When I want use estat phtest to test the proportional-hazard assumption, is it correct to do the command after each run, or should I do another run just using the variable (pthigfbp1hilo) itself (without ib1. to ib4 before) and do the estat phtest after? I would be so happy for an answer because one way tells me that proportional-hazard assumtion holds and the other way that i does not. Best regards Elin

  • #2
    Originally posted by elin norberg View Post
    I use a variabel (pthigfbp1hilo) with categories 1-4, and I therefore ran 4 lines/models with ib1.pthigfbp1hilo to ib4.pthigfbp1hilo to compare the categories. When I want use estat phtest to test the proportional-hazard assumption, is it correct to do the command after each run, or should I do another run just using the variable (pthigfbp1hilo) itself (without ib1. to ib4 before) and do the estat phtest after? I would be so happy for an answer because one way tells me that proportional-hazard assumtion holds and the other way that i does not.

    Changing the base should not change the results of the global test. Of course, the option -detail- will give you the test separately for each covariate, and some pairs are different if you change the base, but this should not affect the global test. If the variable is categorical, you should have "i." in front of it. Can you show the output that you claim leads to contradictory results?

    Comment


    • #3
      Hi,
      if I run stcox ib1.pthigfbp1hilo agelb1,
      stcox ib2.pthigfbp1hilo agelb1,
      stcox ib3.pthigfbp1hilo agelb1,
      stcox ib4.pthigfbp1hilo agelb1,
      followed by estat phtest, detail the global test is the same of all 0.0994 (but I got significant values at the rows for pthigfbp1hilo=4 when I use 3 as reference (ib3.) and pthigfbp1hilo=3 when I use 4 as referece ib4.)

      When I run stcox pthigfbp1hilo agelb1, all 3 rows: pthigfbp1hilo, agelb1 and global test are not significant. Global test is 0.7829.

      Comment


      • #4
        Originally posted by elin norberg View Post
        if I run stcox ib1.pthigfbp1hilo agelb1,
        stcox ib2.pthigfbp1hilo agelb1,
        stcox ib3.pthigfbp1hilo agelb1,
        stcox ib4.pthigfbp1hilo agelb1,
        followed by estat phtest, detail the global test is the same of all 0.0994
        This is what I'd expect.

        When I run stcox pthigfbp1hilo agelb1, all 3 rows: pthigfbp1hilo, agelb1 and global test are not significant. Global test is 0.7829.
        Here, you are treating "pthigfbp1hilo" as a continuous variable. If it is a categorical variable with 4 levels as you state, you should always enter it as "i.pthigfbp1hilo". I do not see a problem here.

        Comment


        • #5
          Aha, that explains it! I will test again but write i. and see. Thank you very much for your answer.

          Comment


          • #6
            Okey, when I run the model with stcox i.pthigfbp1hilo agelb1 I got the same global test like when I use ib1, ib2, ib3 and ib4 separately. Still there are a difference because when I use ib4, the variable 3.pthigfbp1hilo violates the proportional-hazards assumption and when i use ib3, the variable 4.pthigfbp1hilo violates the proportional-hazards assumption. When I run i.pthigfbp1hilo agelb1 the proportional proportional-hazards assumption is not violated because STATA chose variable 1 as reference. So I suppose I have to chose another model... Thank you again for helping me.

            Comment

            Working...
            X