Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: stcox in case the ph-assumption is rejected

 From Yuval Arbel To statalist@hsphsun2.harvard.edu Subject Re: st: stcox in case the ph-assumption is rejected Date Fri, 6 Jan 2012 15:23:50 +0200

```Thanks Marteen - that seems to be very helpful.

I also thought about a different solution I would like to consult with

For each of the explanatory variables in the regression model I
defined a dummy variable which receives 1 for periods whose numerical
values are above or equal the sample mean and 0 otherwise. This
provides several possible stratifications. I then ran the Cox
regression on these dummy variables, where, as mentioned above, each
of which provides a different stratification, followed by the
PH-assumption test. Now and as we can see from the outcomes below - I
can say that the outcomes of the Cox regression is valid only for
stratifications where the PH-assumption is valid.

Here is the output:

. stcox mean_reduct_dum1 reductcurrent_mean_reduct_dum1 rent_net8_dum
> nentincomeestimate82_dum appreciation_dum,nohr

failure _d:  fail == 1
analysis time _t:  time_index
id:  appt

Iteration 0:   log likelihood = -78368.249
Iteration 1:   log likelihood = -75173.499
Iteration 2:   log likelihood = -75117.414
Iteration 3:   log likelihood = -75116.825
Iteration 4:   log likelihood = -75116.825
Refining estimates:
Iteration 0:   log likelihood = -75116.825

Cox regression -- Breslow method for ties

No. of subjects =         9547                     Number of obs   =    499393
No. of failures =         9547
Time at risk    =       547035
LR chi2(7)      =   6502.85
Log likelihood  =   -75116.825                     Prob > chi2     =    0.0000

------------------------------------------------------------------------------
_t |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
mean_redu~m1 |   1.160556   .0260155    44.61   0.000     1.109567    1.211546
reductcur~m1 |   1.332635   .0276246    48.24   0.000     1.278492    1.386779
rent_net8_~m |   .2179676   .0216012    10.09   0.000       .17563    .2603052
diff_stdma~m |   .8829475   .0920925     9.59   0.000     .7024495    1.063446
diff_mortg~m |   .2271822   .0913231     2.49   0.013     .0481921    .4061722
permanenti~m |  -.0774641   .0212722    -3.64   0.000    -.1191569   -.0357713
appreciati~m |  -.1104136   .0475282    -2.32   0.020    -.2035672   -.0172601
------------------------------------------------------------------------------

. estat phtest,detail

Test of proportional-hazards assumption

Time:  Time
----------------------------------------------------------------
|       rho            chi2       df       Prob>chi2
------------+---------------------------------------------------
mean_redu~m1|     -0.29894       664.62        1         0.0000
reductcur~m1|     -0.01441         2.31        1         0.1283
rent_net8_~m|     -0.01523         2.21        1         0.1374
diff_stdma~m|     -0.01545         0.10        1         0.7516
diff_mortg~m|     -0.14583         6.94        1         0.0084
permanenti~m|      0.06388        39.67        1         0.0000
appreciati~m|      0.04365        17.29        1         0.0000
------------+---------------------------------------------------
global test |                    758.70        7         0.0000
----------------------------------------------------------------

I wonder what is your opinion. We see here 3 stratifications, which
makes the results of the Cox regression valid

Thanks, Yuval

On Fri, Jan 6, 2012 at 2:54 PM, Maarten Buis <maartenlbuis@gmail.com> wrote:
>> On Fri, Jan 6, 2012 at 10:06 AM, Yuval Arbel <yuval.arbel@gmail.com> wrote:
>>> My first question is whether this discussion [of the proportional hazard assumption, MB] is relevant if I am
>>> applying the Cox model to describe the exercise of call (real) options
>>> to purchase appartments.
>>>
>>> My second question is <snip>: is there any command to incorporate the -stcox- with
>>> varying hazard level across time? I'm aware of the -strata()- option,
>>> but I wonder whether I can somehow account for time-varying covariates
>>> and incorporate it with -stcox-
>
> On Fri, Jan 6, 2012 at 9:33 AM, Yuval Arbel wrote:
>> Note also that in the medical context, the treatment - is a binary
>> variable, which equals 1 for the experimental treatment and 0
>> otherwise.
>> In our context - the variable of interest is the reduction rate in
>> percentage points - where this variable is quantitative.
>
> The proportional hazard assumption is required for Cox regression
> regardless of whether you are dealing with medical or economic data,
> the variables are binary or (pseudo-)continuous, or you have
> experimental or observational data.
>
> I gave an example on how to estimate and interpret a Cox model in
> which you relax the proportional hazard assumption by allowing the
> effect to change over time here:
> <http://www.stata.com/statalist/archive/2011-06/msg00358.html>
>
> Hope this helps,
> Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
>
> http://www.maartenbuis.nl
> --------------------------
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

--
Dr. Yuval Arbel
4 Shaar Palmer Street,
Haifa 33031, Israel
e-mail1: yuval.arbel@carmel.ac.il
e-mail2: yuval.arbel@gmail.com

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```