Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Predicted survivor curve for model with interactions

From   Enzo Coviello <>
Subject   Re: st: Predicted survivor curve for model with interactions
Date   Thu, 31 Jul 2003 09:06:50 +0200

At 08.52 29/07/03 +0100, you wrote:
A colleague forwarded me the following problem about how to treat
interaction terms when drawing survivor curves. Any ideas please?
I have the model

B1 drug + B2 Age + B3 drug*Age

Imagine I want to plot the predicted survivor curves for the following cases

1) age=35, drug=0
2) age 50 drug=0
3) age=35 drug=1
4) age=50 drug=1

If I go about what you do, I will estimate the model using either the variable
age-35 or age-50 and then plot the baseline in each case and obtain cases 1)
and 2). In those cases since I have centered the age variable to 35 or 50,
that variable assumes value 0 both for age and for age*drug.
However, if I am interested in comparing those baselines with the case where
drug=1, it seems to me that only the term B1 (drug) will vary here whereas the
value of age*drug will continue to be zero since I have defined age to be
age-35. To sum up, how do I plot cases 3) and 4)?

Maybe it's a naive advice. Anyway:

stcox age35 drug age35drug,bases(S)
stcurve,surv at1(drug=0, age35=0) at2(drug=1, age35=0) at3(drug=1, age35=10, age35drug=10) at4(drug=1, age35=-10, age35drug=-10)

Last two lines should represent survival curve at age=45 and age=25 respectively where drug term is 1, i.e. cases 3) and 4).


Enzo Coviello
Dipartimento di Prevenzione ASL BA/1
via L. Barbera 27 - 70055 MINERVINO MURGE (BA)
tel - fax +39 0883 691053
tel (home) +39 0883 695055
* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index