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

From |
"Kieran McCaul" <Kieran.McCaul@uwa.edu.au> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: graph interaction in survival analysis |

Date |
Tue, 27 Oct 2009 06:21:32 +0800 |

.... The at() options are used to produce curves at specific values of the covariates in your model. So if x and y are dichotomous and your model looks like this: xi: stcox i.x*i.y The model produces three beta coefficients, but Stata knows that there are only two covariates and so four curves are produced using: stcurve, survival at1(_Ix_1==0 _Iy_1==0) /// at1(_Ix_1==1 _Iy_1==0) /// at1(_Ix_1==0 _Iy_1==1) /// at1(_Ix_1==1 _Iy_1==1) If both x and y are code 0 or 1 and you had instead generated the interaction term by hand: gen int_xy = x*y and fitted the model: xi: stcox i.x i.y i.int_xy The model now contains three covariates because there is nothing to tell Stata that -int_xy- is simply the interaction between x and y. So then you would need to specify values for three two covariates to produce the four curves: stcurve, survival at1(_Ix_1==0 _Iy_1==0 _Iint_xy_1==0) /// at1(_Ix_1==1 _Iy_1==0 _Iint_xy_1==0) /// at1(_Ix_1==0 _Iy_1==1 _Iint_xy_1==0) /// at1(_Ix_1==1 _Iy_1==1 _Iint_xy_1==1) ______________________________________________ Kieran McCaul MPH PhD WA Centre for Health & Ageing (M573) University of Western Australia Level 6, Ainslie House 48 Murray St Perth 6000 Phone: (08) 9224-2701 Fax: (08) 9224 8009 email: Kieran.McCaul@uwa.edu.au http://myprofile.cos.com/mccaul http://www.researcherid.com/rid/B-8751-2008 ______________________________________________ If you live to be one hundred, you've got it made. Very few people die past that age - George Burns -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Weichle, Thomas Sent: Monday, 26 October 2009 11:46 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: graph interaction in survival analysis When graphing the interaction using stcurve after fitting xi: stcox i.x*i.y, isn't the interaction term also necessary in each of the at1() options? Tom Weichle Math Statistician Center for Management of Complex Chronic Care (CMC3) Hines VA Hospital, Bldg 1, C202 708-202-8387 ext. 24261 Thomas.Weichle@va.gov * * 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/ * * 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/

**References**:**st: RE: graph interaction in survival analysis***From:*"Weichle, Thomas" <Thomas.Weichle@va.gov>

- Prev by Date:
**Re: st: problem of running xtlogit, fe** - Next by Date:
**Re: st: AW: New -panels- package available from SSC** - Previous by thread:
**st: RE: graph interaction in survival analysis** - Next by thread:
**Re: st: AW: New -panels- package available from SSC** - Index(es):

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