Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: stcoxkm command for testing PH assumption


From   "Weichle, Thomas" <[email protected]>
To   <[email protected]>
Subject   st: stcoxkm command for testing PH assumption
Date   Mon, 13 Jun 2011 16:31:46 -0500

Hi Statalisters,
Suppose I want to check the proportional hazards assumption using the
-stcoxkm- command.  

If treatment1 is a 2-level variable, I would do the following:
stcoxkm, by(treatment1) seperate

This produces a nice figure where I can compare Observed KM survival
curves with Predicted Cox survival curves.  

Suppose I want to check the PH assumption with treatment2 which is a
3-level variable.  I can simply do the following:
stcoxkm, by(treatment2) seperate

Again, this produces a figure similar to above but the panels for each
level are very compact and not easy to interpret.  
If I do the following to only show 2 of the 3 levels of treatment2, then
a figure is easier to interpret because there isn't a scrunching of
panels.
stcoxkm if treatment2 == 1 | treatment2 ==2, by(treatment2) separate

However, this is incorrect because stcoxkm will execute stcox itself to
fit the model and obtain predicted values.  These predicted values would
be for the limited sample where treatment2 == 1 | treatment2 == 2 and
not treatment2 == 3.  

Is there a way to still include the entire sample when using the
-stcoxkm- command but only show a selected panel for a particular level
of a variable?  You can imagine how distorted the panels would become if
you are testing a variable which as 3 or more levels.

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
[email protected] 

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index