Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cox Proportional Hazards Assumption - Best program for Cox's PH

3,143 views
Skip to first unread message

DaveL

unread,
Jun 19, 2007, 1:16:39 PM6/19/07
to
Does anyone know how to test this in a non-graphical (if not - a
graphical ) manner within SPSS please (cox's proportional hazard
assumption)?

I know that in R it is a simple matter of one line of code:
cox.zph(coxmodel) to check individual and gloabal proportional
hazards within the model.

Also, what is the best program for Cox's Proportional Hazards Model? I
have access to base modules of SPSS and SAS and of course the free
software R?

Any info on your experiences of the above will be most appreciated.

I'll try and start off replying to other posts tonight to get myself
known a bit in this group.

Cheers
DaveL

Bruce Weaver

unread,
Jun 19, 2007, 1:28:37 PM6/19/07
to

I haven't done this in a while, but I did find this example in one of my
old syntax files.

* ------------------------------------------------------------ .
* Testing the assumption of proportional hazards (21-May-2002) .
* ------------------------------------------------------------ .

* See Collett (1994, pp. 192-194) for details.

* X1 = indicator for Group with (0,1) coding.
* X2 = X1*(t), where t = current time.
* Include X2 in the model, with B2 = its coefficient.
* Test of hypothesis that B2=0 is test of assumption of proportional
hazards.

* X1 = ARM2 (flag for arm 2 membership).

time program.
compute x2 = arm2 * t_ .
COXREG
ttdeath /STATUS=death(1)
/CONTRAST (arm2)=Indicator(1)
/METHOD=ENTER arm2 x2
/PRINT= summary CI(95)
/CRITERIA=PIN(.05) POUT(.10) ITERATE(20) .

* B2 = 0.007, p = 0.237; so assumption of proportional hazards seems
tenable.

* ----------------------------------------------------------------- .

Collett (1994) is Dave Collett's book, "Modelling Survival Data in
Medical Research".

--
Bruce Weaver
bwe...@lakeheadu.ca
www.angelfire.com/wv/bwhomedir

DaveL

unread,
Jun 20, 2007, 4:56:29 AM6/20/07
to
Cox Proportional Assumption

Thx Bruce, that's a big help. I was trawling through DC's book (he was
actually my tutor at Reading Uni for my undergrad in 2001) I missed
the relevent bit you pointed out because it was asterixed meaning not
essential (or harder maths). But have found it now thx to you and it
doesn't seem overly taxing.

For future ease of reference to anyone else reading this post. In DCs
book 2nd addition the info is on p.146

If i have time during or after my dissertation I'll try and post on
comparing the results from this method in SPSS to that found in R.
DaveL

Gaj Vidmar

unread,
Jun 20, 2007, 9:26:31 AM6/20/07
to
The most straight-forward way is (graphical, of course, because why would
anyone prefer anythong non-graphical to something graphical? :)

-- for categorical covariates: log minus log (LML) plot;
Remember to put the covariate that you want to test in the model as stratum
variable, not as covariate!
(Which, of course, means that you can do it with one at a time.)
Tick LML plot in the Plot sub-dialog.
The lines should be parallel if the PH assumption is met.
Of course, it can also be done via sintax (Paste it instead of pressing OK,
or look for it in the Notes object in the output).

-- for numerical covariates: by plotting Schoenfeld residuals (SPSS calls
them Partial Residuals) against time.
Tick them in the Save sub-dialog.
A variable will be created for each covariate.
(I should know, but I don't, how they work for categorical covariates, but
LML works for sure, so ignore them for categ. covar.)
Plot each residual variable (they'll be called pr1_x or something like that)
agains time and there should be no trend.
These residuals are computed only for cases with event (i.e., non-censored).
As for doing it with syntax (COXREG with /SAVE then scatterplot), the same
applies as above.

As for "the best software" for <whatever>, if you master one, whichever one,
it's great, if you master two, it's even better, and so forth.
SPSS is not really a "specialist" in survival analysis in general, but for
routine K-M and logrank and Cox (usually without time-dep. covar),
especially for non-statisticians (e.g., clinicians than I teach and do
consulting for), it's perfectly OK. For a job as a "high-tech"
biostatistician (say at a pharmaceutical company), nowadays R or SAS or
Stata is a must, and the same goes for serious research in survival analysis
(SPSS is useless for that, just like myself :) so it depends what are your
plans.

Best regards,

Gaj Vidmar
Univ. of Ljubljana, Fac. of Medicine, Inst. of Biomedical Informatics

"Bruce Weaver" <bwe...@lakeheadu.ca> wrote in message
news:46781245...@lakeheadu.ca...

0 new messages