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
Oliver Eger <[email protected]>
To
"[email protected]" <[email protected]>
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 <[email protected]>
An: [email protected]
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, [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/
*
* 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/