Announcement

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

  • #46
    First, I am looking at the plots in the left panel of each graph. These are the ones that should appear parallel.

    For indtotal_grp, it appears to me that the curve for the mild group intersects the other curves--it is not parallel to the others. The others appear to be parallel overall. It's a bit hard to say because the others are also fairly close to each other, so it is difficult to discern the difference between non-parallelism and noise simply resulting in intersections and divergences in what are really almost the same curve. Similarly the curve for civil = other looks to me like it is not parallel to the others, and again some of the remaining curves are very close to each other so it is difficult to discern.

    If, in the end, you are going to report a survival model that is adjusted for covariates, it is best to examine the proportional hazards assumption with the same adjustments.

    Comment


    • #47
      Thank you for your advice. Hmm i am a bit unsure of what to do when the PH-assumption does not seem to be met?
      In regards to the PH-assumption test, does the test being significant (p=0,0000) indicate that there is not proportionality then?

      Comment


      • #48
        With the caveat that I am always reluctant, at best, to decide on model structure based on any kind of significance test, the null hypothesis of the test carried out by -estat phtest- is that the hazards are proportional, so a low p-value is more consistent with the hazards not being proportional.

        There are several alternative approaches that can be used when the PH assumption is violated.

        1. Consider other models that don't rely on PH. Some of the parametric survival regressions, for example. Of course, they involve additional assumptions of their own.

        2. Use time varying covariates in your Cox model.

        3. Omit the offending variable(s) from your modeling.

        Comment


        • #49
          Okay. I am also thinking that i will have to explore other options than the cox proportional hazards model. I have tried removing offending vaiables, but the PH-assumption isn't even met for the univariate analysis of the associations for both stroke severity and civil status.

          I am either thinking of using a cox model with time varying parameters, splitting the 15 year follow up into 3-5 year intervals or using stratified cox, but i am not sure which one is the most rational choice.

          If i then theoretically, after having concluded that the PH-assumption wasn't met, decide to use for example the stratified cox model. Would the command then just look like the following (if i am still interested in the risk factors; stroke severity and civil status, adjusted for sex, age, AMI, diabetes and alcohol intake)

          Code:
          stcox i.stroke_severity , strata(civil_status sex age ami diabetes alcohol)
          stcox i.civil_status , strata(stroke_severity sex age ami diabetes alcohol)
          Last edited by Jonas Kristensen; 02 Apr 2019, 09:43.

          Comment


          • #50
            Those commands are correct syntax for stratified Cox models. Whether stratifying the Cox models will solve your PH problem remains to be seen--that is not what it is typically used for, though it sometimes has that effect. The more direct approach to resolving the PH problem is to use time-varying covariates. That is, however, a more complicated undertaking.

            Comment


            • #51
              Yes, the hazards are sadly not proportionate either when using stratified cox.

              How would the cox with time varying covariates command look for the analysis of stroke severity and civil status, adjusted for sex, age, ami, diabetes and alcohol intake,

              Code:
              stcox stroke_severity civil_status sex age ami, diabetes and alcohol_intake , tvc(i.stroke_severity) texp(_t)
              stcox stroke_severity civil_status sex age ami, diabetes and alcohol_intake , tvc(i.stroke_severity) texp(ln(_t))
              Would it be something like the above, specifically for stroke severity?
              And would it be unwise to adjust for so many variables when doing using time varying covariates?

              Comment


              • #52
                You have too many commas in there. Only the comma before the -tvc()- option should be there. And no "and" either.

                In any modeling situation, more variables makes the likelihood more complicated and increases the chance of non-convergence. Nevertheless, I would go with the model that makes sense from an epidemiologic point of view. If you can't get it to converge, you can start over from simple and try to build up to it as closely as possible later. But you don't have that much to lose by trying the full model first.

                Comment


                • #53
                  Okay Thank you. So firstly, i have read something more in regards to stratified cox-regression and your answer in #50:
                  "In stratified cox regression there are seperate reference-rates for each category of the factor that defines strata. The seperate reference-rates does not have to be proportionate. Stratification is therefore an alternative correction method that can be used for correction of categorical variables, and a method that does not prerequisite proportionality"
                  To me this sounds like the approach that would suit this problem of non-proportinate hazards. Can you help me understand why this is not the way to go?

                  by convergence you mean; "similarity of hazards/rates" or "proportionality"? I am probably misunderstanding, but isn't the puporse of doing time varying cox, to not have to "worry" about convergence/proportionality?

                  And for my own understanding, could you say that using the below commands, would be like making an adjusted analysis of
                  first, the association between stroke severity and fractures, adjusted for civil status sex age ami diabetes and alcohol intake,
                  and then second, civil status and fractures, adjusted for stroke severity sex age ami diabetes and alcohol intake WITHOUT having to consider the effect (modification) of time?
                  So the hazard ratios that i get from that output are in fact the final results?

                  Code:
                  stcox stroke_severity civil_status sex age ami diabetes alcohol_intake , tvc(i.stroke_severity) texp(_t)
                  stcox civil_status stroke_severity sex age ami diabetes alcohol_intake , tvc(i.civil_status) texp(_t)
                  Lastly, because of this issue, i am thinking of adjusting for less variables to make it less complicated. Maybe only sex age and diabetes, which are the most heavily related factors to fractures in the elderly population.
                  Last edited by Jonas Kristensen; 03 Apr 2019, 04:47.

                  Comment


                  • #54
                    When you stratify on, say sex, then you eliminate the need for proportional hazards for the sex variable. But it doesn't mitigate the need for proportional hazards for the variables you don't stratify on. So, to take a simple example, -stcox stroke_severity, strata(age sex)- eliminates the need for proportional hazards for age and sex, but you still need proportional hazards for stroke_severity. Also, bear in mind that in the stratified model, you cannot estimate the effects of the stratified variables--so this approach is also not helpful if estimating those effects is important to your research goals.

                    By "convergence" I mean this: when you run a Cox regression, Stata does maximum likelihood estimation to arrive at the coefficient estimates. But with complicated models, sometimes the maximum likelihood estimation fails--it gets trapped in a non-concave part of the likelihood, or marches off to positive or negative infinity. So you don't get any answers: you just get an infinite loop of iterations in the output. (Well, actually, it's not infinite--by default it stops at 16,000 iterations whether it has reached the likelihood's maximum or not, but for practical purposes that's infinite, and in the end, you don't have answers.) If this has never happened to you, then I can only say you are lucky!

                    The syntax of the code near the end of #53 looks right.

                    Comment


                    • #55
                      Thank you for clarifying! So just to be absolutely sure of what i am doing when using cox-regression with time varying covariates. If i wanted to get exactly the same estimates as i did with the cox proportional hazards model, where did the following:
                      - univariate analysis of stroke severity
                      - univariate analysis of civil status
                      - multivariate analysis: stroke severity civil status sex age AMI diabetes and alchohol intake

                      The commands looked like this
                      Code:
                      stcox i.stroke_severity
                      stcox i.civil_status
                      stcox i.stroke_severity i.civil_status i.sex c.age i.ami i.diabetes i.alcohol
                      Would ALL the new commands that i needed to get exactly the same hazard ratios as above, but just for the time varying cox model, look like below?
                      Code:
                      stcox stroke_severity , tvc(i.stroke_severity) texp(_t)
                      stcox civil_status , tvc(i.civil_status) texp(_t)
                      stcox stroke_severity civil_status sex age ami diabetes alcohol_intake , tvc(i.stroke_severity) texp(_t)
                      stcox civil_status stroke_severity sex age ami diabetes alcohol_intake , tvc(i.civil_status) texp(_t)
                      And is it only the variable in brackets af tvc that can be non-proportional? Because the only variable that is proportional of ALL of them, is sex

                      Comment


                      • #56
                        You are not going to get the same estimates you got with the original models. Using time-varying covariates in a Cox regression is very much like including an interaction between the covariate and time itself. The implication of specifying, say -tvc(i.stroke_severity)- is that there is no such thing as the azard ratio of stroke_severity. The model itself stipulates that there is a different hazard ratio associated with stroke_severity at different times. The output you will get will show you what is analogous to an interaction coefficient: it will be the rate at which the hazard ratio changes over time.

                        Also, from a syntax perspective, if you specify the variable in -tvc()-, you do not also list it before the comma.

                        I suggest you review the results of your explorations of proportional hazards assumptions and make a list of which of your predictors met the proportional hazards assumption (or at least were acceptably close) and which were not. It is only the latter that you want to consider putting in -tvc()-. Among those that you consider putting in -tvc()-, if there are some that are being included only to adjust for their effects but you are not interested in estimating their effects, then you could put those in -strata()- instead of -tvc()-.

                        Comment


                        • #57
                          Thank you so much for your help. Hmm, so if the only varaibles that have proportional hazards, are sex (ami and age groups could also be close to proportional) the command would look like this, even if my interest-variables were stroke severity and civil stauts?:
                          Code:
                          stcox i.sex i.agegroups i.ami , tvc(i.stroke_severity i.civil_status)texp(_t)
                          And then i would use stratified cox also, if i wanted to adjust for diabetes and alcohol intake?

                          Comment


                          • #58
                            Yes, that sounds right.

                            Comment


                            • #59
                              Perfect, thank you.

                              In #56 you stated that; "Also, from a syntax perspective, if you specify the variable in -tvc()-, you do not also list it before the comma". So in regards to doing the univariate analysis with varying time parameters of stroke severity and civil status - how can i do this "command-wise", WITHOUT listing them both before the command and behind TVC?

                              From the command in #57, i get the output below (køn=sex, aldergrupper=age groups, indtotal_grp=stroke severity. The tvc estimates don't seem to be right, because of the e's and the coefficient of civil==9, is 193.
                              Click image for larger version

Name:	11111Output TVC.jpg
Views:	1
Size:	1,011.0 KB
ID:	1491795
                              Last edited by Jonas Kristensen; 04 Apr 2019, 04:59.

                              Comment


                              • #60
                                The reason for the errors in the output was my mistake. I used the time scale(365250). With the time scale(365.25), the results look alot more understandable (see below).
                                I have a feeling that this might be the way to go. Now i just need to understand how to do the univariate (unadjusted) analysis for stroke severity and civil status with time varying parameters.

                                An aditional question: If the hazards for Age-groups and AMI are only ALMOST/CLOSE TO proportional, but in principal they are not, would it be wise to include them as time varying parameters or should i keep them as variables that fulfill the PH-assumption (i could also have age as a continuous Var). Because then the command could look like so:
                                Code:
                                stcox i.sex , tvc(i.stroke_severity i.civil_status c.age i.ami)texp(_t)
                                Attached Files
                                Last edited by Jonas Kristensen; 04 Apr 2019, 10:09.

                                Comment

                                Working...
                                X