Announcement

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

  • Landmark analysis

    Dear All
    I need help for landmark analysis.
    i do some landmark analysis in example data, i wan to
    combine these graph in one graph like in the publication
    i am attaching.
    i am coping my program below.
    I really appreciate any help.


    Thanks you
    Suganthiny

    ************************************************** *****************************************
    *stata 14

    webuse stan3, clear
    stset t1, fail(died) id(id)

    *landmar, 18, 30 and 60 months
    stsplit timeband, at(18 30 60)

    *creating data for each landmark
    *data for 0 to 18 day
    preserve
    keep if timeband==0
    save stan3_18.dta, replace
    restore, preserve
    *data for 19 to 30 month
    keep if timeband==18
    save stan3_19_30.dta, replace
    restore, preserve

    * >31 to 60month
    keep if timeband==30
    cou
    save stan3_31_60.dta, replace
    restore, preserve

    keep if timeband==60
    save stan3_61_more.dta, replace

    *******************
    *************0 t0 18
    use stan3_18.dta, clear
    ta _t

    sts test posttran
    sts graph, by(posttran) tmin(0) tmax(18) ///
    ylabel (0(0.2)1) xlabel(0(2)18) ///
    title("landmark 0-18 month", size(medium)) ///
    caption("log rank test; χ2 = 0.95; P=0.3307",size(vsmall))

    gen dummy=1
    stcox dummy, strata(posttran)
    predict surv, basesurv
    separate surv, by(posttran)
    twoway connect surv0 surv1 _t , ///
    sort lp(dash solid) ///
    saving(0_18', replace) ///
    title("Landmark = 0-18 Days")
    *******************19 to 30
    use stan3_19_30.dta, clear
    ta _t
    sts test posttran

    sts graph, by(posttran) tmin(19) ///
    ylabel (0(0.2)1) xlabel(19(2)30) ///
    title("landmark 19-30 month", size(medium)) ///
    caption("log rank test; χ2 = 0.39; P=0.5326",size(vsmall))


    ***************31 to 60*************
    use stan3_31_60.dta, clear
    ta _t
    sts test posttran

    sts graph, by(posttran) tmin(31) ///
    ylabel (0(0.2)1) xlabel(31(4)60) ///
    title("landmark 31-60 month", size(medium)) ///
    caption("log rank test; χ2 = 0.76; P=0.3830",size(vsmall))
    ***************61 or more
    use stan3_61_more.dta, clear
    ta _t
    sts test posttran

    sts graph, by(posttran) tmin(31) ///
    ylabel (0(0.2)1) xlabel(41(200)1880) ///
    title("landmark >60 month", size(medium)) ///
    caption("log rank test; χ2 = 0.10; P=0.7473",size(vsmall))

  • #2
    see help -graph combine-
    Roman

    Comment

    Working...
    X