Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: stcurve: why two different graphs?


From   Oliver Eger <egolto15@yahoo.de>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: stcurve: why two different graphs?
Date   Fri, 30 Nov 2012 19:25:53 +0000 (GMT)

Dear Steve,


thanks for your answer!

I vow to improve my statalist questions next time;-)

Your stata commands with the drugtr example brings my question to the point.

*************CODE BEGINS*************
webuse drugtr, clear

stcox , estimate basehc(bhc)
sts graph,hazard  saving(g00.gph, replace) ///
  title("Smoothed KM")
stcurve, hazard saving(g01, replace)  ///
  title("Smoothed Cox Baseline Hazard")

*************CODE INTERRUPTED *******
The first two graphs are identical, I can understand that. Kaplan-Meier hazard graph = stcox null model graph.

But I don´t understand, why the third graph is different from the others:

*************CODE CONTINOUS *********
stcox age drug
stcurve, hazard at(age=0 drug=0)  ///
    title("Cox  Age=0 Drug=0")saving(g02, replace)

*************CODE ENDS **************

I have in mind the formula, given by the stata press book "an introduction to survival analysis using stata", third edition, by Cleves et al, page 129:

    h(t|xj) = h0(t) exp(xjßj)

If the covariates xj = 0, as in your third example, then only h0(t) remains in the formula and should give the same graph as your first and second example.

Why don´t they?

I would be happy, if you could help me.

Best regards
Oliver


________________________________
Von: Steve Samuels <sjsamuels@gmail.com>
An: statalist@hsphsun2.harvard.edu 
Gesendet: 3:57 Dienstag, 16.Oktober 2012
Betreff: Re: st: stcurve: why two different graphs?

Dear Oliver:

The Statalist standard is to use full real
names. Please do so in the future.

We don't know what you saw, but models with and without covariates are
very different. Note that the FAQ ask that when you observe a problem,
you demonstrate it if possible on an available data set. Here is an
extreme counter-example, which works because age = 0 is outside the
range of the data.

*************CODE BEGINS*************
webuse
drugtr, clear

stcox , estimate basehc(bhc)
sts graph,hazard  saving(g00.gph, replace) ///
   title("Smoothed KM")
stcurve, hazard saving(g01, replace)  ///
   title("Smoothed Cox Baseline Hazard")
stcox age drug
stcurve, hazard at(age=0 drug=0)  ///
    title("Cox  Age=0 Drug=0")saving(g02, replace)
graph combine g00.gph g01.gph g02.gph,  ///
ycommon xcommon  saving(g03, replace)
**************CODE ENDS**************

Steve


On Oct 15, 2012, at 5:12 PM, egolto15@yahoo.de wrote:

Dear Statalisters,


unfortunately I got no answer yet, but maye now someone has an idea;-):

Stata command 

sts graph, hazard 

gives the same graph to me as

    stcox, estimate basehc(bhc)
  stcurve, hazard

I can understand that.
Kaplan-Meier hazard graph = stcox null modell.

But, why don´t I get the same result, if I
write

    stcox var1 var2 var3 var4, basehc(bhc)
    stcurve, hazard at(var1=0 var2=0 var3=0 var4=0)

?

The graph is similar, but not identical. Is this not the same as above?


Thanks!

Best
Oliver

*
*   For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/faqs/resources/statalist-faq/http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/faqs/resources/statalist-faq/http://www.ats.ucla.edu/stat/stata/

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index