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]

Re: st: stcurve: why two different graphs?


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: stcurve: why two different graphs?
Date   Mon, 15 Oct 2012 21:57:59 -0400

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, [email protected] 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?search
*   http://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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index