------------------------------------------------------------------------------------------------- log: C:\MyDocs\MPH\Text\SecondEdition\WebDoFiles\6.9.Hemorrhage.log log type: text opened on: 3 Jan 2008, 17:08:09 . * 6.9.Hemorrhage.log . * . * Plot Kaplan-Meier Survival functions for recurrent . * lobar intracerebral hemorrhage in patients who are, . * or are not, homozygous for the epsilon3 allele of . * the apolipoprotein E gene (O'Donnell et al. 2000). . * . use C:\WDDtext\6.9.Hemorrhage.dta . summarize Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- genotype | 70 .5428571 .5017567 0 1 time | 71 22.50051 15.21965 .2299795 53.88091 recur | 71 .2676056 .4458618 0 1 . table genotype recur, col row -------------------------------- Apolipopro | tein E | Recurrence Genotype | No yes Total -----------+-------------------- e3/e3 | 28 4 32 e2+ or e4+ | 24 14 38 | Total | 52 18 70 -------------------------------- . stset time, failure(recur) failure event: recur != 0 & recur < . obs. time interval: (0, time] exit on or before: failure ------------------------------------------------------------------------------ 71 total obs. 0 exclusions ------------------------------------------------------------------------------ 71 obs. remaining, representing 19 failures in single record/single failure data 1597.536 total analysis time at risk, at risk from t = 0 earliest observed entry t = 0 last observed exit t = 53.88091 . * . * Graph survival function by genotype . * . sts graph, by(genotype) plot2opts(lpattern(dash)) /// > ylabel(0(.1)1, angle(0)) ymtick(0(.05)1) xlabel(0(10)50) /// > xmtick(0(2)54) xtitle("Months of Follow-up") /// > ytitle("Probability of Hemorrhage-Free Survival") /// > title(" ", size(0)) legend(ring(0) cols(1) /// > position(7) order(1 "Homozygous e3/e3" /// > 2 "At least one e2 or e4 allele")) failure _d: recur analysis time _t: time . more . * . * List survival statistics . * . sts list, by(genotype) failure _d: recur analysis time _t: time Beg. Net Survivor Std. Time Total Fail Lost Function Error [95% Conf. Int.] ------------------------------------------------------------------------------- e3/e3 .23 32 1 0 0.9688 0.0308 0.7982 0.9955 1.051 31 0 1 0.9688 0.0308 0.7982 0.9955 1.511 30 0 1 0.9688 0.0308 0.7982 0.9955 3.055 29 1 0 0.9353 0.0443 0.7651 0.9835 8.082 28 0 1 0.9353 0.0443 0.7651 0.9835 12.32 27 1 0 0.9007 0.0545 0.7224 0.9669 14.69 26 0 1 0.9007 0.0545 0.7224 0.9669 16.72 25 0 1 0.9007 0.0545 0.7224 0.9669 18.46 24 0 1 0.9007 0.0545 0.7224 0.9669 18.66 23 0 1 0.9007 0.0545 0.7224 0.9669 19.55 22 0 1 0.9007 0.0545 0.7224 0.9669 19.75 21 0 1 0.9007 0.0545 0.7224 0.9669 24.77 20 1 0 0.8557 0.0679 0.6553 0.9441 25.56 19 0 1 0.8557 0.0679 0.6553 0.9441 25.63 18 0 1 0.8557 0.0679 0.6553 0.9441 26.32 17 0 1 0.8557 0.0679 0.6553 0.9441 26.81 16 0 1 0.8557 0.0679 0.6553 0.9441 32.95 15 0 1 0.8557 0.0679 0.6553 0.9441 33.05 14 0 1 0.8557 0.0679 0.6553 0.9441 34.99 13 0 1 0.8557 0.0679 0.6553 0.9441 35.06 12 0 1 0.8557 0.0679 0.6553 0.9441 36.24 11 0 1 0.8557 0.0679 0.6553 0.9441 37.03 10 0 1 0.8557 0.0679 0.6553 0.9441 37.75 9 0 1 0.8557 0.0679 0.6553 0.9441 38.97 8 0 1 0.8557 0.0679 0.6553 0.9441 39.16 7 0 1 0.8557 0.0679 0.6553 0.9441 42.22 6 0 1 0.8557 0.0679 0.6553 0.9441 42.41 5 0 1 0.8557 0.0679 0.6553 0.9441 45.24 4 0 1 0.8557 0.0679 0.6553 0.9441 46.29 3 0 1 0.8557 0.0679 0.6553 0.9441 47.57 2 0 1 0.8557 0.0679 0.6553 0.9441 53.88 1 0 1 0.8557 0.0679 0.6553 0.9441 e2+ or e4+ 1.38 38 0 1 1.0000 . . . 1.413 37 1 0 0.9730 0.0267 0.8232 0.9961 1.577 36 1 1 0.9459 0.0372 0.8007 0.9862 3.318 34 1 0 0.9181 0.0453 0.7672 0.9728 3.515 33 1 0 0.8903 0.0518 0.7335 0.9574 3.548 32 1 0 0.8625 0.0571 0.7005 0.9404 4.041 31 0 1 0.8625 0.0571 0.7005 0.9404 4.632 30 0 1 0.8625 0.0571 0.7005 0.9404 4.764 29 1 0 0.8327 0.0624 0.6646 0.9213 8.444 28 0 1 0.8327 0.0624 0.6646 0.9213 9.528 27 1 0 0.8019 0.0673 0.6280 0.9005 10.61 26 0 1 0.8019 0.0673 0.6280 0.9005 10.68 25 0 1 0.8019 0.0673 0.6280 0.9005 11.86 24 0 1 0.8019 0.0673 0.6280 0.9005 13.27 23 0 1 0.8019 0.0673 0.6280 0.9005 13.6 22 0 1 0.8019 0.0673 0.6280 0.9005 15.57 21 1 0 0.7637 0.0742 0.5792 0.8754 17.84 20 0 1 0.7637 0.0742 0.5792 0.8754 18.04 19 0 1 0.7637 0.0742 0.5792 0.8754 18.46 18 0 2 0.7637 0.0742 0.5792 0.8754 19.15 16 1 0 0.7160 0.0835 0.5158 0.8449 20.11 15 0 1 0.7160 0.0835 0.5158 0.8449 20.27 14 0 1 0.7160 0.0835 0.5158 0.8449 20.47 13 0 1 0.7160 0.0835 0.5158 0.8449 24.87 12 1 0 0.6563 0.0955 0.4365 0.8074 28.09 11 1 0 0.5966 0.1038 0.3681 0.7658 30.52 10 0 1 0.5966 0.1038 0.3681 0.7658 33.61 9 1 0 0.5304 0.1114 0.2970 0.7180 37.52 8 1 0 0.4641 0.1156 0.2346 0.6659 38.54 7 0 1 0.4641 0.1156 0.2346 0.6659 40.61 6 0 1 0.4641 0.1156 0.2346 0.6659 42.78 5 0 1 0.4641 0.1156 0.2346 0.6659 42.87 4 1 0 0.3480 0.1327 0.1174 0.5946 43.27 3 0 1 0.3480 0.1327 0.1174 0.5946 44.65 2 0 1 0.3480 0.1327 0.1174 0.5946 46.88 1 0 1 0.3480 0.1327 0.1174 0.5946 ------------------------------------------------------------------------------- . * . * Graph survival functions by genotype with 95% confidence . * intervals. Show loss to follow-up. . * . sts graph, by(genotype) ci censored(single) separate /// > plotopts(lwidth(medthick)) censopts(lwidth(medium)) /// > ciopts(lcolor(none)) byopts(title(" ", size(0)) /// > legend(off)) ylabel(0(.1)1, angle(0)) ymtick(0(.05)1) /// > xtitle("Months of Follow-up") xlabel(0(10)50) /// > xmtick(0(2)54) xsize(7) /// > ytitle("Probability of Hemorrhage-Free Survival") failure _d: recur analysis time _t: time . more . * . * Plot cumulative morbidity for homozygous e3 patients . * together with 95% confidence intervals for this morbidity. . * . sts graph , by(genotype) plot2opts(lpattern(dash)) /// > failure risktable(,order(1 "e3/e3" 2 "Other")) /// > ylabel(0(.1).6, angle(0)) ymtick(0(.02).64) /// > ytitle("Probability of Hemorrhage") xlabel(0(10)50) /// > xmtick(0(2)54) xtitle("Months of Follow-up") /// > title(" ",size(0)) legend(ring(0) cols(1) /// > position(11) order(1 "Homozygous e3/e3" /// > 2 "Other genotypes" )) failure _d: recur analysis time _t: time . more . * . * Compare survival functions for the two genotypes using . * the log-rank test. . * . sts test genotype failure _d: recur analysis time _t: time Log-rank test for equality of survivor functions | Events Events genotype | observed expected -----------+------------------------- e3/e3 | 4 9.28 e2+ or e4+ | 14 8.72 -----------+------------------------- Total | 18 18.00 chi2(1) = 6.28 Pr>chi2 = 0.0122 . log close log: C:\MyDocs\MPH\Text\SecondEdition\WebDoFiles\6.9.Hemorrhage.log log type: text closed on: 3 Jan 2008, 17:08:52 -----------------------------------------------------------------------------------------------