Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • predicted survival with stcurve

    I am fitting a conditional risk model which is usually stratified by order of event and can't produce a predicted survival curve after my stcox model. Can someone help me out. I am getting an error that says "stcurve not allowed after stcox, strata()

    See an example here demonstrated using Stata stan3 data. I did not stset as the data is stset already:

    I want to predict survival at age=40 transplant=1 at two event levels that I have created:

    Code:
    clear
    use http://www.stata-press.com/data/r15/stan3.dta
    
    bysort id: gen event = _n
    
    stcox age i.transplant, strata(event) cluster(id) nolog robust
    
    stcurve, survival at1(age=40 transplant=1 event=1) at2(age=40 transplant=1 event=2)
    
    stcurve not allowed after stcox, strata()
    r(198);
    Any advise will be appreciated
    Last edited by Madu Abuchi; 03 Jun 2019, 21:13. Reason: specified transplant as indicator
Working...
X