0 ˆ¾‘äÇò 8àHû }Ò¶&ÿŸÅ ƒh¹ÄÂÁdisabled / ˆ{‹„„-i[D<†ªoZƒ›Ù«Æ 458_‘I|¥‰ÓMdœv ©ƒ†ü+=ÅÄÊ ‹Í”Qo›0…ßû+îü°7¸�ÐMM S‘)M¢”iš¦=lÀàÈv—e¿~R%­šuÛÓž¸Àw.ç\ÛÐWÉ2N?¯¦ð!½�Ãêãûù,â ~LjIš /wä!NHeíf‚¸ÝnÝíØUºÄt�•mê�Õ2·.·œD´]­ãݨ•¶Ѭåâ¨PÝ[#¹PØyvo�âu2<èh¦ø®oç½$íˆýgX¶ïЗ:¢¶‚ﬖe«6$¢²)Áè<$(sÕÌjÖ~sKY`µ É—Y¼üÚqh«^Q•EHÞÅáâzÞ�hÁA‘=ÏÜÌœ �â²�‚Ÿ…ïøNþ<ß0阄D‰0¹–+U{D±‹x5WµÙ°.ëe— Ò§Ô€ð—¦ÁòGÃXݬ§‹4™­‡‘ð¾ÅÑÝã… ÑŠiÑZH¤¹Uzw0:¨^·™Ù\?ÜÂÁ†–eeIàÀ³ä_x/TÍ…>uηÆtstyçùXŸº}bÏùcgôÖñ<ð½ÉåÀÿ‘cg¬h†åïSÎè�ãùàù“`ü�)þp¿áá$RÜaŠÃá.<gt6 ˆl—Ðz¾”d i?u8 \¸Ó·uLZ7ÿ�þBg Á7H?É ƒh¹ÈÆÅ MAJOR=4 MINOR=38 DEVNAME=tty38 6 ˆl–Ðz¾” *a,je@3q–î •1hß�þBëí,Ü­>= options(continue=" ", width=60) options(SweaveHooks=list(fig=function() par(mar=c(4.1, 4.1, .3, 1.1)))) pdf.options(pointsize=8) #text in graph about the same as regular text library(survival, quietly=TRUE) @ \title{Approximating the Cox Model} \author{Chenyang Zhong, Robert Tibshirani and Terry Therneau} \date{May 2019} \begin{document} \maketitle The Cox model can be approximated using Poisson regression, a trick that was well known when Cox models were not yet common in the major software packages \cite{Whitehead80, Laird81}. Start by plotting the cumulative hazard for the data set, and approximate it with a set of connected line segments. The kidney cancer data set, for instance, is moderately well approximated using cutpoints at 45 and 500 days. <>= ksurv <- survfit(Surv(time, status) ~1, data=kidney) plot(ksurv, fun="cumhaz", conf.int=FALSE, lwd=2, xlab="Time since catheter insertion", ylab="Cumulative Hazard") lines(c(0, 45, 500, 560), c(0, .55, 2.7, 4), col=2, lwd=2) @ Break the time scale into intervals based on these cutpoints, and fit a Poisson regression with one intercept per interval. <>= kdata2 <- survSplit(Surv(time, status) ~., data=kidney, cut=c(45, 500), episode="interval") kfit1 <- coxph(Surv(time, status) ~ age + sex, kidney, ties='breslow') kfit2 <- glm(status ~ age + sex + factor(interval) -1 + offset(log(time-tstart)), family=poisson, data=kdata2) cbind(Cox= summary(kfit1)$coefficients[,c(1,3)], poisson = summary(kfit2)$coefficients[1:2, 1:2]) @ We see that the coefficients and standard errors are very similar. If each unique death time is made into its own interval the Cox result can be duplicated exactly. One more correction is needed for perfect agreement, which is to toss away any partial contributions. If there were unique death times at 100 and 110 days, for instance, and a subject were censored at time 103, those 3 days are not counted in the in the 100--110 interval. If there is someone with follow-up after the last event, that is removed as well. After removal, everyone in the same interval will have the same number of days at risk, which means that an offset correction is no longer needed. <>= utime <- sort(unique(kidney$time[kidney$status==1])) # unique deaths kdata3 <- survSplit(Surv(time, status) ~., data=kidney, cut=utime, episode="interval") kdata3 <- subset(kdata3, time == c(utime,0)[interval]) # remove partials kfit3 <- glm(status ~ age + sex + factor(interval) -1, family=poisson, data=kdata3) kfit4 <-