mets/0000755000176200001440000000000013623150474011227 5ustar liggesusersmets/NAMESPACE0000644000176200001440000002405513623061405012447 0ustar liggesusers# Generated by roxygen2: do not edit by hand S3method(bootstrap,timemets) S3method(coef,biprobit) S3method(coef,cor) S3method(coef,mets.twostage) S3method(coef,phreg) S3method(coef,phreg.par) S3method(coef,randomcif) S3method(coef,randomcifrv) S3method(coef,survd) S3method(coef,survival.twostage.fullse) S3method(coef,timemets) S3method(coef,twinlm) S3method(coef,twinlm.strata) S3method(compare,twinlm) S3method(concordance,cor) S3method(gof,phreg) S3method(iid,binreg) S3method(iid,phreg) S3method(iid,phreg.par) S3method(iid,twinlm) S3method(lifetable,formula) S3method(lifetable,matrix) S3method(lines,phreg) S3method(logLik,biprobit) S3method(logLik,phreg.par) S3method(logLik,twinlm) S3method(logLik,twinlm.strata) S3method(model.frame,bptwin) S3method(model.frame,phreg.par) S3method(model.frame,twinlm) S3method(plot,BiRecurrent) S3method(plot,bptwin) S3method(plot,casewise) S3method(plot,claytonoakes) S3method(plot,covariance.recurrent) S3method(plot,cumh) S3method(plot,eventpois) S3method(plot,gof.phreg) S3method(plot,mets.twostage) S3method(plot,phreg) S3method(plot,predictphreg) S3method(plot,timemets) S3method(plot,twinlm) S3method(plot,twinlm.strata) S3method(predict,binreg) S3method(predict,biprobit) S3method(predict,mets.twostage) S3method(predict,phreg) S3method(predict,phreg.par) S3method(print,Print) S3method(print,binreg) S3method(print,biprobit) S3method(print,casewise) S3method(print,claytonoakes) S3method(print,cor) S3method(print,cumh) S3method(print,daggregate) S3method(print,do.twinlm.strata) S3method(print,dreg) S3method(print,dtable) S3method(print,gof.phreg) S3method(print,mets.twostage) S3method(print,pc.twostage) S3method(print,phreg) S3method(print,phreg.par) S3method(print,randomcif) S3method(print,randomcifrv) S3method(print,summary.biprobit) S3method(print,summary.bptwin) S3method(print,summary.claytonoakes) S3method(print,summary.cor) S3method(print,summary.pc.twostage) S3method(print,summary.phreg) S3method(print,summary.twinlm) S3method(print,summary.twinlm.group) S3method(print,survd) S3method(print,survival.twostage.fullse) S3method(print,timemets) S3method(print,twinlm) S3method(print,twinlm.strata) S3method(residuals,phreg) S3method(score,biprobit) S3method(score,twinlm) S3method(score,twinlm.strata) S3method(sim,cox) S3method(simulate,bptwin) S3method(simulate,cox) S3method(summary,binreg) S3method(summary,biprobit) S3method(summary,bptwin) S3method(summary,casewise) S3method(summary,claytonoakes) S3method(summary,cor) S3method(summary,cumh) S3method(summary,dreg) S3method(summary,gof.phreg) S3method(summary,mets.twostage) S3method(summary,pc.twostage) S3method(summary,phreg) S3method(summary,randomcif) S3method(summary,randomcifrv) S3method(summary,survd) S3method(summary,survival.twostage.fullse) S3method(summary,timemets) S3method(summary,twinlm) S3method(summary,twinlm.strata) S3method(twostage,aalen) S3method(twostage,cox.aalen) S3method(twostage,coxph) S3method(twostage,phreg) S3method(vcov,binreg) S3method(vcov,biprobit) S3method(vcov,phreg) S3method(vcov,phreg.par) S3method(vcov,survd) S3method(vcov,timemets) S3method(vcov,twinlm) export("dby2<-") export("dby<-") export("dcut<-") export("ddrop<-") export("dfactor<-") export("dkeep<-") export("dlag<-") export("dnames<-") export("dnumeric<-") export("drelev<-") export("drelevel<-") export("drename<-") export("drm<-") export("dsort<-") export("dspline<-") export("dtrans<-") export("dtransform<-") export(Bootcovariancerecurrence) export(BootcovariancerecurrenceS) export(Bootphreg) export(CCbinomial.twostage) export(ClaytonOakes) export(Dbvn) export(EVaddGam) export(FastCoxPLstrataR) export(Grandom.cif) export(Interval) export(LinSpline) export(aalenfrailty) export(ace.family.design) export(addCums) export(alpha2kendall) export(alpha2spear) export(ascertained.pairs) export(back2timereg) export(basecumhaz) export(basehazplot.phreg) export(bicomprisk) export(binomial.twostage) export(binomial.twostage.time) export(binreg) export(biprobit) export(biprobit.time) export(biprobit.vector) export(blocksample) export(bplot) export(bptwin) export(bptwin.time) export(casewise) export(casewise.bin) export(casewise.test) export(cif) export(cifreg) export(cluster.index) export(coarse.clust) export(coefmat) export(concordanceCor) export(concordanceTwinACE) export(concordanceTwostage) export(cor.cif) export(corsim.prostate) export(corsim.prostate.random) export(count.history) export(countID) export(covIntH1dM1IntH2dM2) export(covarianceRecurrent) export(covarianceRecurrentS) export(covfr) export(covfridstrata) export(covfridstrataCov) export(cumContr) export(cumsumidstratasum) export(cumsumidstratasumCov) export(cumsumstrata) export(cumsumstratasum) export(dInterval) export(daggr) export(daggregate) export(dby) export(dby2) export(dbyr) export(dcor) export(dcount) export(dcut) export(ddrop) export(deval) export(deval2) export(dfactor) export(dhead) export(divide.conquer) export(divide.conquer.timereg) export(dkeep) export(dlag) export(dlev) export(dlevel) export(dlevels) export(dlist) export(dmean) export(dmeansd) export(dmvn) export(dnames) export(dnumeric) export(dprint) export(dquantile) export(dreg) export(drelev) export(drelevel) export(drename) export(dreshape) export(drm) export(dsample) export(dscalar) export(dsd) export(dsort) export(dsort2) export(dspline) export(dstr) export(dsubset) export(dsum) export(dsummary) export(dtab) export(dtable) export(dtail) export(dtrans) export(dtransform) export(dunique) export(easy.binomial.twostage) export(easy.survival.twostage) export(eventpois) export(extendCums) export(familycluster.index) export(familyclusterWithProbands.index) export(fast.approx) export(fast.cluster) export(fast.pattern) export(fast.reshape) export(faster.reshape) export(folds) export(force.same.cens) export(gofG.phreg) export(gofM.phreg) export(gofZ.phreg) export(grouptable) export(haplo.surv.discrete) export(ilap) export(interval.logitsurv.discrete) export(ipw) export(ipw2) export(jumptimes) export(kendall.ClaytonOakes.twin.ace) export(kendall.normal.twin.ace) export(km) export(lifecourse) export(lifetable) export(logitSurv) export(loglikMVN) export(make.pairwise.design) export(make.pairwise.design.competing) export(matdoubleindex) export(matplot.mets.twostage) export(mdi) export(mets.options) export(mlogit) export(mystrata) export(nonparcuminc) export(npc) export(object.defined) export(or.cif) export(or2prob) export(p11.binomial.twostage.RV) export(pairRisk) export(pbvn) export(pcif) export(phreg) export(phreg.par) export(phregR) export(piecewise.data) export(piecewise.twostage) export(plack.cif) export(plack.cif2) export(plotConfRegion) export(plotSurvd) export(plotcr) export(pmvn) export(pred.cif.boot) export(predictPairPlack) export(predictSurvd) export(predictlogitSurvd) export(prob.exceed.recurrent) export(prob.exceedBiRecurrent) export(prob.exceedBiRecurrentStrata) export(prob.exceedRecurrent) export(prob.exceedRecurrentStrata) export(procform) export(procform3) export(procformdata) export(random.cif) export(randomDes) export(readPhreg) export(recmarg) export(recurrentMarginal) export(recurrentMarginalIPCW) export(recurrentMarginalgam) export(revcumsum) export(revcumsumidstratasum) export(revcumsumidstratasumCov) export(revcumsumstrata) export(revcumsumstratasum) export(rmvn) export(robust.basehaz.phreg) export(robust.phreg) export(rpch) export(rr.cif) export(scoreMVN) export(showfitsim) export(simAalenFrailty) export(simBinFam) export(simBinFam2) export(simBinPlack) export(simClaytonOakes) export(simClaytonOakes.family.ace) export(simClaytonOakes.twin.ace) export(simClaytonOakesLam) export(simClaytonOakesWei) export(simCompete.simple) export(simCompete.twin.ace) export(simCox) export(simFrailty.simple) export(simMultistate) export(simRecurrent) export(simRecurrentGamma) export(simRecurrentII) export(simRecurrentTS) export(simSurvFam) export(simTTP) export(simbinClaytonOakes.family.ace) export(simbinClaytonOakes.pairs) export(simbinClaytonOakes.twin.ace) export(simlogitSurvd) export(simnordic) export(simnordic.random) export(slope.process) export(squareintHdM) export(sumstrata) export(surv.boxarea) export(survival.iterative) export(survival.twostage) export(survival.twostage.fullse) export(tailstrata) export(test.conc) export(tetrachoric) export(tie.breaker) export(twin.clustertrunc) export(twin.polygen.design) export(twinlm) export(twinlm.strata) export(twinlm.time) export(twinsim) export(twostageMLE) import(Rcpp) import(mvtnorm) import(splines) import(stats) import(timereg) importFrom(grDevices,dev.interactive) importFrom(grDevices,dev.list) importFrom(grDevices,devAskNewPage) importFrom(graphics,abline) importFrom(graphics,legend) importFrom(graphics,lines) importFrom(graphics,matlines) importFrom(graphics,matplot) importFrom(graphics,par) importFrom(graphics,plot) importFrom(graphics,points) importFrom(graphics,polygon) importFrom(graphics,title) importFrom(lava,"%++%") importFrom(lava,"%ni%") importFrom(lava,"addvar<-") importFrom(lava,"constrain<-") importFrom(lava,"covariance<-") importFrom(lava,"distribution<-") importFrom(lava,"intercept<-") importFrom(lava,"kill<-") importFrom(lava,"latent<-") importFrom(lava,"parameter<-") importFrom(lava,"regression<-") importFrom(lava,Col) importFrom(lava,Expand) importFrom(lava,Inverse) importFrom(lava,Model) importFrom(lava,blockdiag) importFrom(lava,bootstrap) importFrom(lava,cancel) importFrom(lava,compare) importFrom(lava,confband) importFrom(lava,constraints) importFrom(lava,covariance) importFrom(lava,coxWeibull.lvm) importFrom(lava,devcoords) importFrom(lava,endogenous) importFrom(lava,estimate) importFrom(lava,eventTime) importFrom(lava,getoutcome) importFrom(lava,gof) importFrom(lava,iid) importFrom(lava,information) importFrom(lava,latent) importFrom(lava,lava.options) importFrom(lava,lvm) importFrom(lava,multigroup) importFrom(lava,pars) importFrom(lava,regression) importFrom(lava,revdiag) importFrom(lava,score) importFrom(lava,sim) importFrom(lava,trim) importFrom(lava,twostage) importFrom(survival,Surv) importFrom(survival,concordance) importFrom(survival,is.Surv) importFrom(utils,capture.output) importFrom(utils,getS3method) importFrom(utils,glob2rx) importFrom(utils,head) importFrom(utils,tail) useDynLib(mets, .registration=TRUE) mets/demo/0000755000176200001440000000000013623061405012146 5ustar liggesusersmets/demo/models.R0000644000176200001440000000052613623061405013557 0ustar liggesusersmessage("Bivariate Probit models") example(biprobit) message("Polygenic models") example(bptwin) example(twinlm) message("Clayton-Oakes, Two-stage") example(ClaytonOakes) example(twostage) message("Pairwise-Odds-Ratio") example(binomial.twostage) example(easy.binomial.twostage) message("Bivariate competing risks") example(bicomprisk) mets/demo/tools.R0000644000176200001440000000013113623061405013424 0ustar liggesusers example(fast.reshape) example(fast.approx) example(fast.pattern) example(lifetable) mets/demo/mets.R0000644000176200001440000000004713623061405013242 0ustar liggesusersdemo(mets:::models) demo(mets:::tools) mets/demo/00Index0000644000176200001440000000005413623061405013277 0ustar liggesusersmets All demos models Models tools Tools mets/data/0000755000176200001440000000000013623061756012144 5ustar liggesusersmets/data/datalist0000644000176200001440000000023213623061753013666 0ustar liggesusersbase1cumhaz base44cumhaz base4cumhaz dermalridges dermalridgesMZ drcumhaz hapfreqs haploX hHaplos: ghaplos mena migr multcif np prt ttpd twinbmi twinstut mets/data/multcif.txt.xz0000644000176200001440000002664013623061754015016 0ustar liggesusers7zXZi"6!X-a] &wNpt` L6b<8:ɽ~MMaGxm5Dha&ox񵖯c1^s_3sߖE/ <͙PfKnJnP5AƐ:3U-sd~B6cu Gn&PIL%"yHKHR/-T󿡮聙 KqUBѳBo??EzDE mbc[ tW{iz$3'j-Sg7ӕgĈKB j0-ŧ h=nE|X[Mj be; JVs俭QQUA}jIbᚄ#6O2^ӷH*EVU> fnhS< _-{ K (^YOY\R٦'3Tb⤹!%k4s^e6W)]hk;cf/L+2z/G"u]3AJiwh+C&~y@?slBZnYFFc[Kbn*1]Z6YPkkrNCNJN)<Ι w5M|Vܷ?0f{Qñ'o Z$_<,|/`HdDos6&O%-MàxB{wkf0v: ԛc ,(0\E8+^⬭ yP(&|9Nx>ߔnvLk [ǫ""aAΛ[@ i^)W¿OgbX ӑwS j*KyeuYZ dQ+eIV+ {+׾/2x nfg>㎻ܷ cLeT KCY 3"ZvqMх4}u/Uz*h|/L ]ȇ )Bk$F]׾Yvr?e^ a)Ql!95n|fAylr*G'Mh/R{yuOA߱X @KEoՁ6Ybg=TXb0f*Im9JSC};Gz'VC"% {Jt/w<ٿ:$Dȑ|;![U{$CJ-xAH -݇.AHDAղoq4,ɋ Fտ2 Vp^$D[$C)*XPGE+wbGR"z֒xmy_mvEH-8xJ3Z. ^B*HFsE<->?e~9^Ri-tmC|<ېsNvnSCfh|[7n4cA"͖avI9O6H-ed'QaO-lUABr ϭ~0]x%/CRQ&Ұ_q*^&ׁ.`* _9r8 ُ+ˡ^-ID@S[Lyo0a"hZCҠ4vb,Zx;Μ5l bul#फUmNDt )M%d{k4~_b.H_iޚQ\ w]u4;zLO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\r˗u]nލ>|ҵkZֵkZԣ!B!OD1B)eYeYeYe+\uׯ^znݻqqvXcEVZ^VZh&[[[[[P LXh R)Kт@c5 cW^z׼B^z( \wpB!B()JRR8!9c1c1c~kׯWbM;}15ª+DdDDvgIkz;HMHBEPP6[ Ng]fK+6$eVj6 sjɍk3cZف[qit=^3ٰw6hp[q[J3Э;n,qe9<WaxBT)_ 8=ҧHSCyJ)"_Q>)PETJ jϞΑEQ}=ﮕ<*ZW}s+Ge޺'xVWLT'BWy[D;x=V''TӚ[XP^3o^E #yjU%$Dxy5|3+J$g4 pICƇfش^_I&zދhCX9P*g.z39AkYѡ2#gv@MΫL\w7q8[M s^-= zuJ `;m &YCpIY1('.i3nuF\z4Hlؠ%?3b< ou+R(tErtznf| 鎴-e}tsvff>:'-iVA}+ Jmnƫ*ԟ8x hU]`V^D ق#J가 85BƐdRNlDnJxNYÝ`"g ee /:_բNDBQ]H:9S2> -z0um $'~؇ 6 2#ܢ*3 TI7W%3\Ӣ܎8.:]œbz=Ξ쁛r|R" ^YmԂ#`}9!t=` B[_4;CElL6r,"G'7V|.b=(gI9 1C4՜d3wDYmets/data/dermalridgesMZ.rda0000644000176200001440000000103113623061756015540 0ustar liggesusers]S@MZmD|Hq( 0+tɤے4apOg7vys69Gn1ƙS;$]Ne%3= 0 z60[ o#m';ϿMk{}׮96հQ,yzY/E"B9.("(I0 xfC0 =xT\a E?ӹI083 /g[J<G#,ډWzDHS3~N`jV6yŔ>SuӨQ[ZVZ3jݨQ56zmyFn< 27{^U +_.;&mets/data/twinbmi.txt.xz0000644000176200001440000035024413623061754015024 0ustar liggesusers7zXZi"6!X] "'Á#bL`ÑJcƺō!T4u/[jeH̹-povp ' ӼHT #hU,HbHzD,3LJFF b2oDG[Ybx={S|sɚZzY$B[a/~k>bգ[vO\%PCs[J;qTu!̭PN54J?c>dΚ`i5QkdezmD6dh8@q6U Ojd7~NsEC.cU'kї{^+U Sn a2*Yg6~ Tn-fIР#VX%#7ګIW҇AI{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p LDŎS4>R[kz Xg΋D*>r@I: OטiFI٫C0  x>#$wڪ f)Mt?oot)mO#p'ֆ9)4c[KglZSD*NH }' ^V>)bfo$^tKLxPCȩK/fuh/US^=วtD?(k: /@J>f_/'k!-E?}r['!uZA Mmg "_V;`v2Kr UM4Dag53'B vzEYF5T,,_;F@6YϨX֖?qzM纕acaR+M-ca*M2:ۊ@*wšҘ i uy.1#uǎ6}Y7ľg %gKNK80 =٤/ӏ, Ho&&t%a+xiNJV5VZ}y}xtbK+=ԷQf"bKzloN6n)Ub"~4Y; #5pU(C^&YzUkWn!FsZ4IaFX'j57iվj\,Y.v%hTA1稤)^ACFk'75'K_N W } #E(s_̼deZ/i2tS"b=iϑkRFr^ 57=0#4Q]zXSUG!뢁b[]hNC!O-]m{aFaW WQzO 7Iٔu*\/c\E TlzpKv~+#&ć@/FDqB.x=+#iO6HC"gqEDMVA^t坮 gR[ħYԾu;|OPJGtIŎ-MqEG#DF-D)CV7+o9[H.:0 YZmets/man/0000755000176200001440000000000013623061405011775 5ustar liggesusersmets/man/dcut.Rd0000644000176200001440000000502613623061405013226 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dutils.R \name{dcut} \alias{dcut} \alias{dcut<-} \alias{dunique} \alias{drm} \alias{drm<-} \alias{dnames} \alias{dnames<-} \alias{drename} \alias{drename<-} \alias{dkeep} \alias{dkeep<-} \alias{ddrop} \alias{ddrop<-} \title{Cutting, sorting, rm (removing), rename for data frames} \usage{ dcut(data, y = NULL, x = NULL, breaks = 4, probs = NULL, equi = FALSE, regex = mets.options()$regex, sep = NULL, na.rm = TRUE, labels = NULL, all = FALSE, ...) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{name of variable, or fomula, or names of variables on data frame.} \item{breaks}{number of breaks, for variables or vector of break points,} \item{probs}{groups defined from quantiles} \item{equi}{for equi-spaced breaks} \item{regex}{for regular expressions.} \item{sep}{seperator for naming of cut names.} \item{na.rm}{to remove NA for grouping variables.} \item{labels}{to use for cut groups} \item{all}{to do all variables, even when breaks are not unique} \item{...}{Optional additional arguments} } \description{ Cut variables, if breaks are given these are used, otherwise cuts into using group size given by probs, or equispace groups on range. Default is equally sized groups if possible } \examples{ data("sTRACE",package="timereg") sTRACE$age2 <- sTRACE$age^2 sTRACE$age3 <- sTRACE$age^3 mm <- dcut(sTRACE,~age+wmi) head(mm) mm <- dcut(sTRACE,catage4+wmi4~age+wmi) head(mm) mm <- dcut(sTRACE,~age+wmi,breaks=c(2,4)) head(mm) mm <- dcut(sTRACE,c("age","wmi")) head(mm) mm <- dcut(sTRACE,~.) head(mm) mm <- dcut(sTRACE,c("age","wmi"),breaks=c(2,4)) head(mm) gx <- dcut(sTRACE$age) head(gx) ## Removes all cuts variables with these names wildcards mm1 <- drm(mm,c("*.2","*.4")) head(mm1) ## wildcards, for age, age2, age4 and wmi head(dcut(mm,c("a*","?m*"))) ## with direct asignment drm(mm) <- c("*.2","*.4") head(mm) dcut(mm) <- c("age","*m*") dcut(mm) <- ageg1+wmig1~age+wmi head(mm) ############################ ## renaming ############################ head(mm) drename(mm, ~Age+Wmi) <- c("wmi","age") head(mm) mm1 <- mm ## all names to lower drename(mm1) <- ~. head(mm1) ## A* to lower mm2 <- drename(mm,c("A*","W*")) head(mm2) drename(mm) <- "A*" head(mm) dd <- data.frame(A_1=1:2,B_1=1:2) funn <- function(x) gsub("_",".",x) drename(dd) <- ~. drename(dd,fun=funn) <- ~. names(dd) } \author{ Klaus K. Holst and Thomas Scheike } mets/man/dsort.Rd0000644000176200001440000000132613623061405013421 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dsort.R \name{dsort} \alias{dsort} \alias{dsort2} \alias{dsort<-} \title{Sort data frame} \usage{ dsort(data, x, ..., decreasing = FALSE, return.order = FALSE) } \arguments{ \item{data}{Data frame} \item{x}{variable to order by} \item{...}{additional variables to order by} \item{decreasing}{sort order (vector of length x)} \item{return.order}{return order} } \value{ data.frame } \description{ Sort data according to columns in data frame } \examples{ data(data="hubble",package="lava") dsort(hubble, "sigma") dsort(hubble, hubble$sigma,"v") dsort(hubble,~sigma+v) dsort(hubble,~sigma-v) ## with direct asignment dsort(hubble) <- ~sigma-v } mets/man/cluster.index.Rd0000644000176200001440000000205513623061405015055 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clusterindex-reshape.R \name{cluster.index} \alias{cluster.index} \alias{countID} \alias{pairRisk} \alias{mystrata} \title{Finds subjects related to same cluster} \usage{ cluster.index(clusters, index.type = FALSE, num = NULL, Rindex = 0, mat = NULL, return.all = FALSE, code.na = NA) } \arguments{ \item{clusters}{list of indeces} \item{index.type}{if TRUE then already list of integers of index.type} \item{num}{to get numbering according to num-type in separate columns} \item{Rindex}{index starts with 1, in C is it is 0} \item{mat}{to return matrix of indeces} \item{return.all}{return all arguments} \item{code.na}{how to code missing values} } \description{ Finds subjects related to same cluster } \examples{ i<-c(1,1,2,2,1,3) d<- cluster.index(i) print(d) type<-c("m","f","m","c","c","c") d<- cluster.index(i,num=type,Rindex=1) print(d) } \references{ Cluster indeces } \seealso{ familycluster.index familyclusterWithProbands.index } \author{ Klaus Holst, Thomas Scheike } mets/man/twinlm.Rd0000644000176200001440000000744013623061405013603 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twinlm.R \name{twinlm} \alias{twinlm} \alias{twinlm.strata} \title{Classic twin model for quantitative traits} \usage{ twinlm(formula, data, id, zyg, DZ, group = NULL, group.equal = FALSE, strata = NULL, weights = NULL, type = c("ace"), twinnum = "twinnum", binary = FALSE, ordinal = 0, keep = weights, estimator = NULL, constrain = TRUE, control = list(), messages = 1, ...) } \arguments{ \item{formula}{Formula specifying effects of covariates on the response} \item{data}{\code{data.frame} with one observation pr row. In addition a column with the zygosity (DZ or MZ given as a factor) of each individual much be specified as well as a twin id variable giving a unique pair of numbers/factors to each twin pair} \item{id}{The name of the column in the dataset containing the twin-id variable.} \item{zyg}{The name of the column in the dataset containing the zygosity variable} \item{DZ}{Character defining the level in the zyg variable corresponding to the dyzogitic twins. If this argument is missing, the reference level (i.e. the first level) will be interpreted as the dyzogitic twins} \item{group}{Optional. Variable name defining group for interaction analysis (e.g., gender)} \item{group.equal}{If TRUE marginals of groups are asummed to be the same} \item{strata}{Strata variable name} \item{weights}{Weights matrix if needed by the chosen estimator. For use with Inverse Probability Weights} \item{type}{Character defining the type of analysis to be performed. Should be a subset of "aced" (additive genetic factors, common environmental factors, unique environmental factors, dominant genetic factors).} \item{twinnum}{The name of the column in the dataset numbering the twins (1,2). If it does not exist in \code{data} it will automatically be created.} \item{binary}{If \code{TRUE} a liability model is fitted. Note that if the right-hand-side of the formula is a factor, character vector, og logical variable, then the liability model is automatically chosen (wrapper of the \code{bptwin} function).} \item{ordinal}{If non-zero (number of bins) a liability model is fitted.} \item{keep}{Vector of variables from \code{data} that are not specified in \code{formula}, to be added to data.frame of the SEM} \item{estimator}{Choice of estimator/model} \item{constrain}{Development argument} \item{control}{Control argument parsed on to the optimization routine} \item{messages}{Control amount of messages shown} \item{...}{Additional arguments parsed on to lower-level functions} } \value{ Returns an object of class \code{twinlm}. } \description{ Fits a classical twin model for quantitative traits. } \examples{ ## Simulate data set.seed(1) d <- twinsim(1000,b1=c(1,-1),b2=c(),acde=c(1,1,0,1)) ## E(y|z1,z2) = z1 - z2. var(A) = var(C) = var(E) = 1 ## E.g to fit the data to an ACE-model without any confounders we simply write ace <- twinlm(y ~ 1, data=d, DZ="DZ", zyg="zyg", id="id") ace ## An AE-model could be fitted as ae <- twinlm(y ~ 1, data=d, DZ="DZ", zyg="zyg", id="id", type="ae") ## LRT: lava::compare(ae,ace) ## AIC AIC(ae)-AIC(ace) ## To adjust for the covariates we simply alter the formula statement ace2 <- twinlm(y ~ x1+x2, data=d, DZ="DZ", zyg="zyg", id="id", type="ace") ## Summary/GOF summary(ace2) \donttest{ ## Reduce Ex.Timings ## An interaction could be analyzed as: ace3 <- twinlm(y ~ x1+x2 + x1:I(x2<0), data=d, DZ="DZ", zyg="zyg", id="id", type="ace") ace3 ## Categorical variables are also supported d2 <- transform(d,x2cat=cut(x2,3,labels=c("Low","Med","High"))) ace4 <- twinlm(y ~ x1+x2cat, data=d2, DZ="DZ", zyg="zyg", id="id", type="ace") } } \seealso{ \code{\link{bptwin}}, \code{\link{twinlm.time}}, \code{\link{twinlm.strata}}, \code{\link{twinsim}} } \author{ Klaus K. Holst } \keyword{models} \keyword{regression} mets/man/binreg.Rd0000644000176200001440000000332713623061405013537 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial.regression.R \name{binreg} \alias{binreg} \title{Binomial Regression for censored competing risks data} \usage{ binreg(formula, data, cause = 1, time = NULL, beta = NULL, offset = NULL, weights = NULL, cens.weights = NULL, cens.model = ~+1, se = TRUE, kaplan.meier = TRUE, cens.code = 0, no.opt = FALSE, method = "nr", ...) } \arguments{ \item{formula}{formula with outcome (see \code{coxph})} \item{data}{data frame} \item{cause}{cause of interest} \item{time}{time of interest} \item{beta}{starting values} \item{offset}{offsets for partial likelihood} \item{weights}{for score equations} \item{cens.weights}{censoring weights} \item{cens.model}{stratified cox model} \item{se}{to compute se's based on IPCW} \item{kaplan.meier}{uses Kaplan-Meier for baseline than standard Cox} \item{cens.code}{gives censoring code} \item{no.opt}{to not optimize} \item{method}{for optimization} \item{...}{Additional arguments to lower level funtions} } \description{ Simple version of comp.risk function of timereg for just one time-point thus fitting the model \deqn{P(T \leq t, \epsilon=1 | X ) = expit( X^T beta) } } \details{ Based on binomial regresion IPCW response estimating equation: \deqn{ X ( \Delta I(T \leq t, \epsilon=1 )/G_c(T_i-) - expit( X^T beta)) = 0 } for IPCW adjusted responses. } \examples{ data(bmt) # logistic regresion with IPCW binomial regression out <- binreg(Event(time,cause)~tcell+platelet,bmt,time=50) summary(out) predict(out,data.frame(tcell=c(0,1),platelet=c(1,1)),se=TRUE) outs <- binreg(Event(time,cause)~tcell+platelet,bmt,time=50,cens.model=~strata(tcell,platelet)) summary(outs) } \author{ Thomas Scheike } mets/man/lifetable.matrix.Rd0000644000176200001440000000203613623061405015517 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lifetable.R \name{lifetable.matrix} \alias{lifetable.matrix} \alias{lifetable} \alias{lifetable.formula} \title{Life table} \usage{ \method{lifetable}{matrix}(x, strata = list(), breaks = c(), weights=NULL, confint = FALSE, ...) \method{lifetable}{formula}(x, data=parent.frame(), breaks = c(), weights=NULL, confint = FALSE, ...) } \arguments{ \item{x}{time formula (Surv) or matrix/data.frame with columns time,status or entry,exit,status} \item{strata}{strata} \item{breaks}{time intervals} \item{weights}{weights variable} \item{confint}{if TRUE 95\% confidence limits are calculated} \item{...}{additional arguments to lower level functions} \item{data}{data.frame} } \description{ Create simple life table } \examples{ library(timereg) data(TRACE) d <- with(TRACE,lifetable(Surv(time,status==9)~sex+vf,breaks=c(0,0.2,0.5,8.5))) summary(glm(events ~ offset(log(atrisk))+factor(int.end)*vf + sex*vf, data=d,poisson)) } \author{ Klaus K. Holst } mets/man/dermalridges.Rd0000644000176200001440000000137713623061405014736 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{dermalridges} \alias{dermalridges} \title{Dermal ridges data (families)} \format{Data on 50 families with ridge counts in left and right hand for moter, father and each child. Family id in 'family' and gender and child number in 'sex' and 'child'.} \source{ Sarah B. Holt (1952). Genetics of dermal ridges: bilateral asymmetry in finger ridge-counts. Annals of Eugenics 17 (1), pp.211--231. DOI: 10.1111/j.1469-1809.1952.tb02513.x } \description{ Data on dermal ridge counts in left and right hand in (nuclear) families } \examples{ data(dermalridges) fast.reshape(dermalridges,id="family",varying=c("child.left","child.right","sex")) } \keyword{data} mets/man/ClaytonOakes.Rd0000644000176200001440000000465613623061405014673 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/claytonakes.R \name{ClaytonOakes} \alias{ClaytonOakes} \title{Clayton-Oakes model with piece-wise constant hazards} \usage{ ClaytonOakes(formula, data = parent.frame(), cluster, var.formula = ~1, cuts = NULL, type = "piecewise", start, control = list(), var.invlink = exp, ...) } \arguments{ \item{formula}{formula specifying the marginal proportional (piecewise constant) hazard structure with the right-hand-side being a survival object (Surv) specifying the entry time (optional), the follow-up time, and event/censoring status at follow-up. The clustering can be specified using the special function \code{cluster} (see example below).} \item{data}{Data frame} \item{cluster}{Variable defining the clustering (if not given in the formula)} \item{var.formula}{Formula specifying the variance component structure (if not given via the cluster special function in the formula) using a linear model with log-link.} \item{cuts}{Cut points defining the piecewise constant hazard} \item{type}{when equal to \code{two.stage}, the Clayton-Oakes-Glidden estimator will be calculated via the \code{timereg} package} \item{start}{Optional starting values} \item{control}{Control parameters to the optimization routine} \item{var.invlink}{Inverse link function for variance structure model} \item{...}{Additional arguments} } \description{ Clayton-Oakes frailty model } \examples{ set.seed(1) d <- subset(simClaytonOakes(500,4,2,1,stoptime=2,left=2),truncated) e <- ClaytonOakes(survival::Surv(lefttime,time,status)~x+cluster(~1,cluster), cuts=c(0,0.5,1,2),data=d) e d2 <- simClaytonOakes(500,4,2,1,stoptime=2,left=0) d2$z <- rep(1,nrow(d2)); d2$z[d2$cluster\%in\%sample(d2$cluster,100)] <- 0 ## Marginal=Cox Proportional Hazards model: ts <- ClaytonOakes(survival::Surv(time,status)~timereg::prop(x)+cluster(~1,cluster), data=d2,type="two.stage") ## Marginal=Aalens additive model: ts2 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~1,cluster), data=d2,type="two.stage") ## Marginal=Piecewise constant: e2 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~-1+factor(z),cluster), cuts=c(0,0.5,1,2),data=d2) e2 plot(ts) plot(e2,add=TRUE) e3 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~1,cluster),cuts=c(0,0.5,1,2), data=d,var.invlink=identity) e3 } \author{ Klaus K. Holst } mets/man/base1cumhaz.Rd0000644000176200001440000000045613623061405014474 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{base1cumhaz} \alias{base1cumhaz} \title{rate of CRBSI for HPN patients of Copenhagen} \source{ Estimated data } \description{ rate of CRBSI for HPN patients of Copenhagen } \keyword{data} mets/man/daggregate.Rd0000644000176200001440000000453413623061405014364 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/daggregate.R \name{daggregate} \alias{daggregate} \alias{daggr} \title{aggregating for for data frames} \usage{ daggregate(data, y = NULL, x = NULL, subset, ..., fun = "summary", regex = mets.options()$regex, missing = FALSE, remove.empty = FALSE, matrix = FALSE, silent = FALSE, na.action = na.pass, convert = NULL) } \arguments{ \item{data}{data.frame} \item{y}{name of variable, or formula, or names of variables on data frame.} \item{x}{name of variable, or formula, or names of variables on data frame.} \item{subset}{subset expression} \item{...}{additional arguments to lower level functions} \item{fun}{function defining aggregation} \item{regex}{interpret x,y as regular expressions} \item{missing}{Missing used in groups (x)} \item{remove.empty}{remove empty groups from output} \item{matrix}{if TRUE a matrix is returned instead of an array} \item{silent}{suppress messages} \item{na.action}{How model.frame deals with 'NA's} \item{convert}{if TRUE try to coerce result into matrix. Can also be a user-defined function} } \description{ aggregating for for data frames } \examples{ data("sTRACE",package="timereg") daggregate(iris, "^.e.al", x="Species", fun=cor, regex=TRUE) daggregate(iris, Sepal.Length+Petal.Length ~Species, fun=summary) daggregate(iris, log(Sepal.Length)+I(Petal.Length>1.5) ~ Species, fun=summary) daggregate(iris, "*Length*", x="Species", fun=head) daggregate(iris, "^.e.al", x="Species", fun=tail, regex=TRUE) daggregate(sTRACE, status~ diabetes, fun=table) daggregate(sTRACE, status~ diabetes+sex, fun=table) daggregate(sTRACE, status + diabetes+sex ~ vf+I(wmi>1.4), fun=table) daggregate(iris, "^.e.al", x="Species",regex=TRUE) dlist(iris,Petal.Length+Sepal.Length ~ Species |Petal.Length>1.3 & Sepal.Length>5, n=list(1:3,-(3:1))) daggregate(iris, I(Sepal.Length>7)~Species | I(Petal.Length>1.5)) daggregate(iris, I(Sepal.Length>7)~Species | I(Petal.Length>1.5), fun=table) dsum(iris, .~Species, matrix=TRUE, missing=TRUE) par(mfrow=c(1,2)) data(iris) drename(iris) <- ~. daggregate(iris,'sepal*'~species|species!="virginica",fun=plot) daggregate(iris,'sepal*'~I(as.numeric(species))|I(as.numeric(species))!=1,fun=summary) dnumeric(iris) <- ~species daggregate(iris,'sepal*'~species.n|species.n!=1,fun=summary) } mets/man/blocksample.Rd0000644000176200001440000000215413623061405014562 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blocksample.R \name{blocksample} \alias{blocksample} \alias{dsample} \title{Block sampling} \usage{ blocksample(data, size, idvar = NULL, replace = TRUE, ...) } \arguments{ \item{data}{Data frame} \item{size}{Size of samples} \item{idvar}{Column defining the clusters} \item{replace}{Logical indicating wether to sample with replacement} \item{\dots}{additional arguments to lower level functions} } \value{ \code{data.frame} } \description{ Sample blockwise from clustered data } \details{ Original id is stored in the attribute 'id' } \examples{ d <- data.frame(x=rnorm(5), z=rnorm(5), id=c(4,10,10,5,5), v=rnorm(5)) (dd <- blocksample(d,size=20,~id)) attributes(dd)$id \dontrun{ blocksample(data.table::data.table(d),1e6,~id) } d <- data.frame(x=c(1,rnorm(9)), z=rnorm(10), id=c(4,10,10,5,5,4,4,5,10,5), id2=c(1,1,2,1,2,1,1,1,1,2), v=rnorm(10)) dsample(d,~id, size=2) dsample(d,.~id+id2) dsample(d,x+z~id|x>0,size=5) } \author{ Klaus K. Holst } \keyword{models} \keyword{utilities} mets/man/km.Rd0000644000176200001440000000170113623061405012672 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{km} \alias{km} \title{Kaplan-Meier with robust standard errors} \usage{ km(formula, data = data, conf.type = "log", conf.int = 0.95, robust = TRUE, ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{conf.type}{transformation} \item{conf.int}{level of confidence intervals} \item{robust}{for robust standard errors based on martingales} \item{...}{Additional arguments to lower level funtions} } \description{ Kaplan-Meier with robust standard errors Robust variance is default variance with the summary. } \examples{ data(TRACE) TRACE$cluster <- sample(1:100,1878,replace=TRUE) out1 <- km(Surv(time,status==9)~strata(vf,chf),data=TRACE) out2 <- km(Surv(time,status==9)~strata(vf,chf)+cluster(cluster),data=TRACE) par(mfrow=c(1,2)) bplot(out1,se=TRUE) bplot(out2,se=TRUE) } \author{ Thomas Scheike } mets/man/eventpois.Rd0000644000176200001440000000160113623061405014276 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lifetable.R \name{eventpois} \alias{eventpois} \alias{pcif} \title{Extract survival estimates from lifetable analysis} \usage{ eventpois(object, ..., timevar, time, int.len, confint = FALSE, level = 0.95, individual = FALSE, length.out = 25) } \arguments{ \item{object}{glm object (poisson regression)} \item{...}{Contrast arguments} \item{timevar}{Name of time variable} \item{time}{Time points (optional)} \item{int.len}{Time interval length (optional)} \item{confint}{If TRUE confidence limits are supplied} \item{level}{Level of confidence limits} \item{individual}{Individual predictions} \item{length.out}{Length of time vector} } \description{ Summary for survival analyses via the 'lifetable' function } \details{ Summary for survival analyses via the 'lifetable' function } \author{ Klaus K. Holst } mets/man/dermalridgesMZ.Rd0000644000176200001440000000124313623061405015175 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{dermalridgesMZ} \alias{dermalridgesMZ} \title{Dermal ridges data (monozygotic twins)} \format{Data on dermal ridge counts (left and right hand) in 18 monozygotic twin pairs.} \source{ Sarah B. Holt (1952). Genetics of dermal ridges: bilateral asymmetry in finger ridge-counts. Annals of Eugenics 17 (1), pp.211--231. DOI: 10.1111/j.1469-1809.1952.tb02513.x } \description{ Data on dermal ridge counts in left and right hand in (nuclear) families } \examples{ data(dermalridgesMZ) fast.reshape(dermalridgesMZ,id="id",varying=c("left","right")) } \keyword{data} mets/man/familycluster.index.Rd0000644000176200001440000000130413623061405016253 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clusterindex-reshape.R \name{familycluster.index} \alias{familycluster.index} \title{Finds all pairs within a cluster (family)} \usage{ familycluster.index(clusters, index.type = FALSE, num = NULL, Rindex = 1) } \arguments{ \item{clusters}{list of indeces} \item{index.type}{argument of cluster index} \item{num}{num} \item{Rindex}{index starts with 1 in R, and 0 in C} } \description{ Finds all pairs within a cluster (family) } \examples{ i<-c(1,1,2,2,1,3) d<- familycluster.index(i) print(d) } \references{ Cluster indeces } \seealso{ cluster.index familyclusterWithProbands.index } \author{ Klaus Holst, Thomas Scheike } mets/man/twinbmi.Rd0000644000176200001440000000060213623061405013733 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{twinbmi} \alias{twinbmi} \title{BMI data set} \format{Self-reported BMI-values on 11,411 subjects tvparnr: twin id bmi: BMI (m/kg^2) age: Age gender: (male/female) zyg: zygosity, MZ:=mz, DZ(same sex):=dz, DZ(opposite sex):=os} \description{ BMI data set } \keyword{data} mets/man/simRecurrentTS.Rd0000644000176200001440000000431113623061405015214 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{simRecurrentTS} \alias{simRecurrentTS} \title{Simulation of recurrent events data based on cumulative hazards: Two-stage model} \usage{ simRecurrentTS(n, cumhaz, cumhaz2, death.cumhaz = NULL, nu = rep(1, 3), share1 = 0.3, vargamD = 2, vargam12 = 0.5, gap.time = FALSE, max.recurrent = 100, cens = NULL, ...) } \arguments{ \item{n}{number of id's} \item{cumhaz}{cumulative hazard of recurrent events} \item{cumhaz2}{cumulative hazard of recurrent events of type 2} \item{death.cumhaz}{cumulative hazard of death} \item{nu}{powers of random effects where nu > -1/shape} \item{share1}{how random effect for death splits into two parts} \item{vargamD}{variance of random effect for death} \item{vargam12}{shared random effect for N1 and N2} \item{gap.time}{if true simulates gap-times with specified cumulative hazard} \item{max.recurrent}{limits number recurrent events to 100} \item{cens}{rate of censoring exponential distribution} \item{...}{Additional arguments to lower level funtions} } \description{ Simulation of recurrent events data based on cumulative hazards } \details{ Model is constructed such that marginals are on specified form by linear approximations of cumulative hazards that are on a specific form to make them equivalent to marginals after integrating out. Must give hazard of death and two recurrent events. Possible with two event types and their dependence can be specified but the two recurrent events need to share random effect. Random effect to death Z.death=(Zd1+Zd2), Z1=(Zd1^nu1) Z12, Z2=(Zd2^nu2) Z12^nu3 \deqn{Z.death=Zd1+Zd2} gamma distributions \deqn{Zdj} gamma distribution with mean parameters (sharej), vargamD, share2=1-share1 \deqn{Z12} gamma distribution with mean 1 and variance vargam12 } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz rr <- simRecurrentTS(1000,base1,base4,death.cumhaz=dr) dtable(rr,~death+status) showfitsim(causes=2,rr,dr,base1,base4) } \author{ Thomas Scheike } mets/man/survival.twostage.Rd0000644000176200001440000003000113623061405015765 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twostage.R \name{survival.twostage} \alias{survival.twostage} \alias{survival.twostage.fullse} \alias{twostage.aalen} \alias{twostage.cox.aalen} \alias{twostage.coxph} \alias{twostage.phreg} \alias{randomDes} \title{Twostage survival model for multivariate survival data} \usage{ survival.twostage(margsurv, data = sys.parent(), score.method = "fisher.scoring", Nit = 60, detail = 0, clusters = NULL, silent = 1, weights = NULL, control = list(), theta = NULL, theta.des = NULL, var.link = 1, iid = 1, step = 0.5, model = "clayton.oakes", marginal.trunc = NULL, marginal.survival = NULL, marginal.status = NULL, strata = NULL, se.clusters = NULL, numDeriv = 0, random.design = NULL, pairs = NULL, pairs.rvs = NULL, numDeriv.method = "simple", additive.gamma.sum = NULL, var.par = 1, cr.models = NULL, case.control = 0, ascertained = 0, shut.up = 0) } \arguments{ \item{margsurv}{Marginal model} \item{data}{data frame} \item{score.method}{Scoring method "fisher.scoring", "nlminb", "optimize", "nlm"} \item{Nit}{Number of iterations} \item{detail}{Detail} \item{clusters}{Cluster variable} \item{silent}{Debug information} \item{weights}{Weights} \item{control}{Optimization arguments} \item{theta}{Starting values for variance components} \item{theta.des}{design for dependence parameters, when pairs are given this is could be a (pairs) x (numer of parameters) x (max number random effects) matrix} \item{var.link}{Link function for variance} \item{iid}{Calculate i.i.d. decomposition} \item{step}{Step size} \item{model}{model} \item{marginal.trunc}{marginal left truncation probabilities} \item{marginal.survival}{optional vector of marginal survival probabilities} \item{marginal.status}{related to marginal survival probabilities} \item{strata}{strata for fitting, see example} \item{se.clusters}{for clusters for se calculation with iid} \item{numDeriv}{to get numDeriv version of second derivative, otherwise uses sum of squared score} \item{random.design}{random effect design for additive gamma model, when pairs are given this is a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below} \item{pairs}{matrix with rows of indeces (two-columns) for the pairs considered in the pairwise composite score, useful for case-control sampling when marginal is known.} \item{pairs.rvs}{for additive gamma model and random.design and theta.des are given as arrays, this specifice number of random effects for each pair.} \item{numDeriv.method}{uses simple to speed up things and second derivative not so important.} \item{additive.gamma.sum}{for two.stage=0, this is specification of the lamtot in the models via a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number of theta parameters), when null then sums all parameters.} \item{var.par}{is 1 for the default parametrization with the variances of the random effects, var.par=0 specifies that the \eqn{\lambda_j}'s are used as parameters.} \item{cr.models}{competing risks models for two.stage=0, should be given as a list with models for each cause} \item{case.control}{assumes case control structure for "pairs" with second column being the probands, when this options is used the twostage model is profiled out via the paired estimating equations for the survival model.} \item{ascertained}{if the pair are sampled only when there is an event. This is in contrast to case.control sampling where a proband is given. This can be combined with control probands. Pair-call of twostage is needed and second column of pairs are the first jump time with an event for ascertained pairs, or time of control proband.} \item{shut.up}{to make the program more silent in the context of iterative procedures for case-control and ascertained sampling} } \description{ Fits Clayton-Oakes or bivariate Plackett models for bivariate survival data using marginals that are on Cox form. The dependence can be modelled via \enumerate{ \item Regression design on dependence parameter. \item Random effects, additive gamma model. } If clusters contain more than two subjects, we use a composite likelihood based on the pairwise bivariate models, for MLE see twostageMLE. The two-stage model is constructed such that given the gamma distributed random effects it is assumed that the survival functions are indpendent, and that the marginal survival functions are on Cox form (or additive form) \deqn{ P(T > t| x) = S(t|x)= exp( -exp(x^T \beta) A_0(t) ) } One possibility is to model the variance within clusters via a regression design, and then one can specify a regression structure for the indenpendent gamma distributed random effect for each cluster, such that the variance is given by \deqn{ \theta = z_j^T \alpha } where \eqn{z} is specified by theta.des The reported standard errors are based on the estimated information from the likelihood assuming that the marginals are known. Can also fit a structured additive gamma random effects model, such as the ACE, ADE model for survival data. In this case the random.design specificies the random effects for each subject within a cluster. This is a matrix of 1's and 0's with dimension n x d. With d random effects. For a cluster with two subjects, we let the random.design rows be \eqn{v_1} and \eqn{v_2}. Such that the random effects for subject 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. By construction subjects 1's random effect are Gamma distributed with mean \eqn{\lambda_j/v_1^T \lambda} and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed within clusters as it would be for the ACE model below. Based on these parameters the relative contribution (the heritability, h) is equivalent to the expected values of the random effects: \eqn{\lambda_j/v_1^T \lambda} The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \deqn{ \theta_j = \lambda_j/(v_1^T \lambda)^2 } For alternative parametrizations one can specify how the parameters relate to \eqn{\lambda_j} with the argument var.par=0. For both types of models the basic model assumptions are that given the random effects of the clusters the survival distributions within a cluster are independent and ' on the form \deqn{ P(T > t| x,z) = exp( -Z \cdot Laplace^{-1}(lamtot,lamtot,S(t|x)) ) } with the inverse laplace of the gamma distribution with mean 1 and variance 1/lamtot. The parameters \eqn{(\lambda_1,...,\lambda_d)} are related to the parameters of the model by a regression construction \eqn{pard} (d x k), that links the \eqn{d} \eqn{\lambda} parameters with the (k) underlying \eqn{\theta} parameters \deqn{ \lambda = theta.des \theta } here using theta.des to specify these low-dimension association. Default is a diagonal matrix. This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. The case.control option that can be used with the pair specification of the pairwise parts of the estimating equations. Here it is assumed that the second subject of each pair is the proband. } \examples{ data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) ### Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) ### Plackett model mph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett") summary(fitp) ### Clayton-Oakes fitco2 <- survival.twostage(mph,data=diabetes,theta=0.0,detail=0, clusters=diabetes$id,var.link=1,model="clayton.oakes") summary(fitco2) fitco3 <- survival.twostage(margph,data=diabetes,theta=1.0,detail=0, clusters=diabetes$id,var.link=0,model="clayton.oakes") summary(fitco3) ### without covariates but with stratafied marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitpa <- survival.twostage(marg,data=diabetes,theta=1.0, clusters=diabetes$id,score.method="optimize") summary(fitpa) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) ### Piecewise constant cross hazards ratio modelling ######################################################## d <- subset(simClaytonOakes(2000,2,0.5,0,stoptime=2,left=0),!truncated) udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="clayton.oakes",silent=0) summary(udp) \donttest{ ## Reduce Ex.Timings ### Same model using the strata option, a bit slower ######################################################## ## makes the survival pieces for different areas in the plane ##ud1=surv.boxarea(c(0,0),c(0.5,0.5),data=d,id="cluster",timevar="time",status="status") ##ud2=surv.boxarea(c(0,0.5),c(0.5,2),data=d,id="cluster",timevar="time",status="status") ##ud3=surv.boxarea(c(0.5,0),c(2,0.5),data=d,id="cluster",timevar="time",status="status") ##ud4=surv.boxarea(c(0.5,0.5),c(2,2),data=d,id="cluster",timevar="time",status="status") ## everything done in one call ud <- piecewise.data(c(0,0.5,2),data=d,timevar="time",status="status",id="cluster") ud$strata <- factor(ud$strata); ud$intstrata <- factor(ud$intstrata) ## makes strata specific id variable to identify pairs within strata ## se's computed based on the id variable across strata "cluster" ud$idstrata <- ud$id+(as.numeric(ud$strata)-1)*2000 marg2 <- aalen(Surv(boxtime,status)~-1+factor(num):factor(intstrata), data=ud,n.sim=0,robust=0) tdes <- model.matrix(~-1+factor(strata),data=ud) fitp2 <- survival.twostage(marg2,data=ud,se.clusters=ud$cluster,clusters=ud$idstrata, score.method="fisher.scoring",model="clayton.oakes", theta.des=tdes,step=0.5) summary(fitp2) ### now fitting the model with symmetry, i.e. strata 2 and 3 same effect ud$stratas <- ud$strata; ud$stratas[ud$strata=="0.5-2,0-0.5"] <- "0-0.5,0.5-2" tdes2 <- model.matrix(~-1+factor(stratas),data=ud) fitp3 <- survival.twostage(marg2,data=ud,clusters=ud$idstrata,se.cluster=ud$cluster, score.method="fisher.scoring",model="clayton.oakes", theta.des=tdes2,step=0.5) summary(fitp3) ### same model using strata option, a bit slower fitp4 <- survival.twostage(marg2,data=ud,clusters=ud$cluster,se.cluster=ud$cluster, score.method="fisher.scoring",model="clayton.oakes", theta.des=tdes2,step=0.5,strata=ud$strata) summary(fitp4) } \donttest{ ## Reduce Ex.Timings ### structured random effects model additive gamma ACE ### simulate structured two-stage additive gamma ACE model data <- simClaytonOakes.twin.ace(4000,2,1,0,3) out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes pardes des.rv <- out$des.rv head(des.rv) aa <- phreg(Surv(time,status)~x+cluster(cluster),data=data,robust=0) ts <- survival.twostage(aa,data=data,clusters=data$cluster,detail=0, theta=c(2,1),var.link=0,step=0.5, random.design=des.rv,theta.des=pardes) summary(ts) } } \references{ Twostage estimation of additive gamma frailty models for survival data. Scheike (2019), work in progress Shih and Louis (1995) Inference on the association parameter in copula models for bivariate survival data, Biometrics, (1995). Glidden (2000), A Two-Stage estimator of the dependence parameter for the Clayton Oakes model, LIDA, (2000). Measuring early or late dependence for bivariate twin data Scheike, Holst, Hjelmborg (2015), LIDA Estimating heritability for cause specific mortality based on twins studies Scheike, Holst, Hjelmborg (2014), LIDA Additive Gamma frailty models for competing risks data, Biometrics (2015) Eriksson and Scheike (2015), } \author{ Thomas Scheike } \keyword{survival} mets/man/dlag.Rd0000644000176200001440000000131013623061405013166 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dutils.R \name{dlag} \alias{dlag} \alias{dlag<-} \title{Lag operator} \usage{ dlag(data, x, k = 1, combine = TRUE, simplify = TRUE, names, ...) } \arguments{ \item{data}{data.frame or vector} \item{x}{optional column names or formula} \item{k}{lag (vector of integers)} \item{combine}{combine results with original data.frame} \item{simplify}{Return vector if possible} \item{names}{optional new column names} \item{...}{additional arguments to lower level functions} } \description{ Lag operator } \examples{ d <- data.frame(y=1:10,x=c(10:1)) dlag(d,k=1:2) dlag(d,~x,k=0:1) dlag(d$x,k=1) dlag(d$x,k=-1:2, names=letters[1:4]) } mets/man/familyclusterWithProbands.index.Rd0000644000176200001440000000175613623061405020613 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clusterindex-reshape.R \name{familyclusterWithProbands.index} \alias{familyclusterWithProbands.index} \title{Finds all pairs within a cluster (famly) with the proband (case/control)} \usage{ familyclusterWithProbands.index(clusters, probands, index.type = FALSE, num = NULL, Rindex = 1) } \arguments{ \item{clusters}{list of indeces giving the clusters (families)} \item{probands}{list of 0,1 where 1 specifices which of the subjects that are probands} \item{index.type}{argument passed to other functions} \item{num}{argument passed to other functions} \item{Rindex}{index starts with 1, in C is it is 0} } \description{ second column of pairs are the probands and the first column the related subjects } \examples{ i<-c(1,1,2,2,1,3) p<-c(1,0,0,1,0,1) d<- familyclusterWithProbands.index(i,p) print(d) } \references{ Cluster indeces } \seealso{ familycluster.index cluster.index } \author{ Klaus Holst, Thomas Scheike } mets/man/basehazplot.phreg.Rd0000644000176200001440000000311313623061405015702 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{basehazplot.phreg} \alias{basehazplot.phreg} \alias{bplot} \alias{basecumhaz} \alias{plotConfRegion} \title{Plotting the baslines of stratified Cox} \usage{ basehazplot.phreg(x, se = FALSE, time = NULL, add = FALSE, ylim = NULL, xlim = NULL, lty = NULL, col = NULL, legend = TRUE, ylab = NULL, xlab = NULL, polygon = TRUE, level = 0.95, stratas = NULL, robust = FALSE, ...) } \arguments{ \item{x}{phreg object} \item{se}{to include standard errors} \item{time}{to plot for specific time variables} \item{add}{to add to previous plot} \item{ylim}{to give ylim} \item{xlim}{to give xlim} \item{lty}{to specify lty of components} \item{col}{to specify col of components} \item{legend}{to specify col of components} \item{ylab}{to specify ylab} \item{xlab}{to specify xlab} \item{polygon}{to get standard error in shaded form} \item{level}{of standard errors} \item{stratas}{wich strata to plot} \item{robust}{to use robust standard errors if possible} \item{...}{Additional arguments to lower level funtions} } \description{ Plotting the baslines of stratified Cox } \examples{ data(TRACE) dcut(TRACE) <- ~. out1 <- phreg(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) par(mfrow=c(2,2)) bplot(out1) bplot(out1,stratas=c(0,3)) bplot(out1,stratas=c(0,3),col=2:3,lty=1:2,se=TRUE) bplot(out1,stratas=c(0),col=2,lty=2,se=TRUE,polygon=FALSE) bplot(out1,stratas=c(0),col=matrix(c(2,1,3),1,3), lty=matrix(c(1,2,3),1,3),se=TRUE,polygon=FALSE) } \author{ Klaus K. Holst, Thomas Scheike } mets/man/internal.Rd0000644000176200001440000000271613623061405014106 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \name{npc} \alias{npc} \alias{plotcr} \alias{nonparcuminc} \alias{simnordic} \alias{corsim.prostate} \alias{alpha2kendall} \alias{alpha2spear} \alias{coefmat} \alias{piecewise.twostage} \alias{surv.boxarea} \alias{faster.reshape} \alias{piecewise.data} \alias{simBinPlack} \alias{simBinFam} \alias{simBinFam2} \alias{simSurvFam} \alias{corsim.prostate.random} \alias{simnordic.random} \alias{simCox} \alias{sim} \alias{grouptable} \alias{jumptimes} \alias{folds} \alias{ace.family.design} \alias{ascertained.pairs} \alias{CCbinomial.twostage} \alias{coarse.clust} \alias{concordanceTwinACE} \alias{concordanceTwostage} \alias{fast.cluster} \alias{force.same.cens} \alias{ilap} \alias{kendall.ClaytonOakes.twin.ace} \alias{kendall.normal.twin.ace} \alias{make.pairwise.design} \alias{make.pairwise.design.competing} \alias{matplot.mets.twostage} \alias{object.defined} \alias{p11.binomial.twostage.RV} \alias{predictPairPlack} \alias{simbinClaytonOakes.family.ace} \alias{simbinClaytonOakes.pairs} \alias{simbinClaytonOakes.twin.ace} \alias{simClaytonOakes.family.ace} \alias{simClaytonOakes.twin.ace} \alias{simFrailty.simple} \alias{simCompete.simple} \alias{simCompete.twin.ace} \alias{twin.polygen.design} \alias{twostage.fullse} \alias{procform} \alias{procform3} \alias{procformdata} \title{For internal use} \description{ For internal use } \author{ Klaus K. Holst } \keyword{utilities} mets/man/ipw.Rd0000644000176200001440000000377113623061405013073 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipw.R \name{ipw} \alias{ipw} \title{Inverse Probability of Censoring Weights} \usage{ ipw(formula, data, cluster, same.cens = FALSE, obs.only = TRUE, weight.name = "w", trunc.prob = FALSE, weight.name2 = "wt", indi.weight = "pr", cens.model = "aalen", pairs = FALSE, theta.formula = ~1, ...) } \arguments{ \item{formula}{Formula specifying the censoring model} \item{data}{data frame} \item{cluster}{clustering variable} \item{same.cens}{For clustered data, should same censoring be assumed (bivariate probability calculated as mininum of the marginal probabilities)} \item{obs.only}{Return data with uncensored observations only} \item{weight.name}{Name of weight variable in the new data.frame} \item{trunc.prob}{If TRUE truncation probabilities are also calculated and stored in 'weight.name2' (based on Clayton-Oakes gamma frailty model)} \item{weight.name2}{Name of truncation probabilities} \item{indi.weight}{Name of individual censoring weight in the new data.frame} \item{cens.model}{Censoring model (default Aalens additive model)} \item{pairs}{For paired data (e.g. twins) only the complete pairs are returned (With pairs=TRUE)} \item{theta.formula}{Model for the dependence parameter in the Clayton-Oakes model (truncation only)} \item{...}{Additional arguments to censoring model} } \description{ Internal function. Calculates Inverse Probability of Censoring Weights (IPCW) and adds them to a data.frame } \examples{ \dontrun{ data("prt",package="mets") prtw <- ipw(Surv(time,status==0)~country, data=prt[sample(nrow(prt),5000),], cluster="id",weight.name="w") plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") count <- 0 for (l in unique(prtw$country)) { count <- count+1 prtw <- prtw[order(prtw$time),] with(subset(prtw,country==l), lines(time,w,col=count,lwd=2)) } legend("topright",legend=unique(prtw$country),col=1:4,pch=-1,lty=1) } } \author{ Klaus K. Holst } mets/man/back2timereg.Rd0000644000176200001440000000044513623061405014626 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/casewise.R \name{back2timereg} \alias{back2timereg} \title{Convert to timereg object} \usage{ back2timereg(obj) } \arguments{ \item{obj}{no use} } \description{ convert to timereg object } \author{ Thomas Scheike } mets/man/print.casewise.Rd0000644000176200001440000000065713623061405015232 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/casewise.R \name{print.casewise} \alias{print.casewise} \title{prints Concordance test} \usage{ \method{print}{casewise}(x, digits = 3, ...) } \arguments{ \item{x}{output from casewise.test} \item{digits}{number of digits} \item{\dots}{Additional arguments to lower level functions} } \description{ prints Concordance test } \author{ Thomas Scheike } mets/man/bptwin.Rd0000644000176200001440000000557313623061405013601 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bptwin.R \name{bptwin} \alias{bptwin} \alias{twinlm.time} \alias{bptwin.time} \title{Liability model for twin data} \usage{ bptwin(x, data, id, zyg, DZ, group = NULL, num = NULL, weights = NULL, biweight = function(x) 1/min(x), strata = NULL, messages = 1, control = list(trace = 0), type = "ace", eqmean = TRUE, pairs.only = FALSE, samecens = TRUE, allmarg = samecens & !is.null(weights), stderr = TRUE, robustvar = TRUE, p, indiv = FALSE, constrain, bound = FALSE, varlink, ...) } \arguments{ \item{x}{Formula specifying effects of covariates on the response.} \item{data}{\code{data.frame} with one observation pr row. In addition a column with the zygosity (DZ or MZ given as a factor) of each individual much be specified as well as a twin id variable giving a unique pair of numbers/factors to each twin pair.} \item{id}{The name of the column in the dataset containing the twin-id variable.} \item{zyg}{The name of the column in the dataset containing the zygosity variable.} \item{DZ}{Character defining the level in the zyg variable corresponding to the dyzogitic twins.} \item{group}{Optional. Variable name defining group for interaction analysis (e.g., gender)} \item{num}{Optional twin number variable} \item{weights}{Weight matrix if needed by the chosen estimator (IPCW)} \item{biweight}{Function defining the bivariate weight in each cluster} \item{strata}{Strata} \item{messages}{Control amount of messages shown} \item{control}{Control argument parsed on to the optimization routine. Starting values may be parsed as '\code{start}'.} \item{type}{Character defining the type of analysis to be performed. Should be a subset of "acde" (additive genetic factors, common environmental factors, dominant genetic factors, unique environmental factors).} \item{eqmean}{Equal means (with type="cor")?} \item{pairs.only}{Include complete pairs only?} \item{samecens}{Same censoring} \item{allmarg}{Should all marginal terms be included} \item{stderr}{Should standard errors be calculated?} \item{robustvar}{If TRUE robust (sandwich) variance estimates of the variance are used} \item{p}{Parameter vector p in which to evaluate log-Likelihood and score function} \item{indiv}{If TRUE the score and log-Likelihood contribution of each twin-pair} \item{constrain}{Development argument} \item{bound}{Development argument} \item{varlink}{Link function for variance parameters} \item{...}{Additional arguments to lower level functions} } \description{ Liability-threshold model for twin data } \examples{ data(twinstut) b0 <- bptwin(stutter~sex, data=droplevels(subset(twinstut,zyg\%in\%c("mz","dz"))), id="tvparnr",zyg="zyg",DZ="dz",type="ae") summary(b0) } \seealso{ \code{\link{twinlm}}, \code{\link{twinlm.time}}, \code{\link{twinlm.strata}}, \code{\link{twinsim}} } \author{ Klaus K. Holst } mets/man/mets.options.Rd0000644000176200001440000000116513623061405014731 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/options.R \name{mets.options} \alias{mets.options} \title{Set global options for \code{mets}} \usage{ mets.options(...) } \arguments{ \item{...}{Arguments} } \value{ \code{list} of parameters } \description{ Extract and set global parameters of \code{mets}. } \details{ \itemize{ \item \code{regex}: If TRUE character vectors will be interpreted as regular expressions (\code{dby}, \code{dcut}, ...) \item \code{silent}: Set to \code{FALSE} to disable various output messages } } \examples{ \dontrun{ mets.options(regex=TRUE) } } \keyword{models} mets/man/ipw2.Rd0000644000176200001440000000655013623061405013153 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipw.R \name{ipw2} \alias{ipw2} \title{Inverse Probability of Censoring Weights} \usage{ ipw2(data, times = NULL, entrytime = NULL, time = "time", cause = "cause", same.cens = FALSE, cluster = NULL, pairs = FALSE, strata = NULL, obs.only = TRUE, cens.formula = NULL, cens.code = 0, pair.cweight = "pcw", pair.tweight = "ptw", pair.weight = "weights", cname = "cweights", tname = "tweights", weight.name = "indi.weights", prec.factor = 100, ...) } \arguments{ \item{data}{data frame} \item{times}{possible time argument for speciying a maximum value of time tau=max(times), to specify when things are considered censored or not.} \item{entrytime}{nam of entry-time for truncation.} \item{time}{name of time variable on data frame.} \item{cause}{name of cause indicator on data frame.} \item{same.cens}{For clustered data, should same censoring be assumed and same truncation (bivariate probability calculated as mininum of the marginal probabilities)} \item{cluster}{name of clustering variable} \item{pairs}{For paired data (e.g. twins) only the complete pairs are returned (With pairs=TRUE)} \item{strata}{name of strata variable to get weights stratified.} \item{obs.only}{Return data with uncensored observations only} \item{cens.formula}{model for Cox models for truncation and right censoring times.} \item{cens.code}{censoring.code} \item{pair.cweight}{Name of weight variable in the new data.frame for right censorig of pairs} \item{pair.tweight}{Name of weight variable in the new data.frame for left truncation of pairs} \item{pair.weight}{Name of weight variable in the new data.frame for right censoring and left truncation of pairs} \item{cname}{Name of weight variable in the new data.frame for right censoring of individuals} \item{tname}{Name of weight variable in the new data.frame for left truncation of individuals} \item{weight.name}{Name of weight variable in the new data.frame for right censoring and left truncation of individuals} \item{prec.factor}{To let tied censoring and truncation times come after the death times.} \item{...}{Additional arguments to censoring model} } \description{ Internal function. Calculates Inverse Probability of Censoring and Truncation Weights and adds them to a data.frame } \examples{ library("timereg") d <- simnordic.random(3000,delayed=TRUE,ptrunc=0.7, cordz=0.5,cormz=2,lam0=0.3,country=FALSE) d$strata <- as.numeric(d$country)+(d$zyg=="MZ")*4 times <- seq(60,100,by=10) c1 <- comp.risk(Event(time,cause)~1+cluster(id),data=d,cause=1, model="fg",times=times,max.clust=NULL,n.sim=0) mm=model.matrix(~-1+zyg,data=d) out1<-random.cif(c1,data=d,cause1=1,cause2=1,same.cens=TRUE,theta.des=mm) summary(out1) pc1 <- predict(c1,X=1,se=0) plot(pc1) dl <- d[!d$truncated,] dl <- ipw2(dl,cluster="id",same.cens=TRUE,time="time",entrytime="entry",cause="cause", strata="strata",prec.factor=100) cl <- comp.risk(Event(time,cause)~+1+ cluster(id), data=dl,cause=1,model="fg", weights=dl$indi.weights,cens.weights=rep(1,nrow(dl)), times=times,max.clust=NULL,n.sim=0) pcl <- predict(cl,X=1,se=0) lines(pcl$time,pcl$P1,col=2) mm=model.matrix(~-1+factor(zyg),data=dl) out2<-random.cif(cl,data=dl,cause1=1,cause2=1,theta.des=mm, weights=dl$weights,censoring.weights=rep(1,nrow(dl))) summary(out2) } \author{ Thomas Scheike } mets/man/bicomprisk.Rd0000644000176200001440000000702613623061405014433 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bicomprisk.R \name{bicomprisk} \alias{bicomprisk} \title{Estimation of concordance in bivariate competing risks data} \usage{ bicomprisk(formula, data, cause = c(1, 1), cens = 0, causes, indiv, strata = NULL, id, num, max.clust = 1000, marg = NULL, se.clusters = NULL, wname = NULL, prodlim = FALSE, messages = TRUE, model, return.data = 0, uniform = 0, conservative = 1, resample.iid = 1, ...) } \arguments{ \item{formula}{Formula with left-hand-side being a \code{Event} object (see example below) and the left-hand-side specying the covariate structure} \item{data}{Data frame} \item{cause}{Causes (default (1,1)) for which to estimate the bivariate cumulative incidence} \item{cens}{The censoring code} \item{causes}{causes} \item{indiv}{indiv} \item{strata}{Strata} \item{id}{Clustering variable} \item{num}{num} \item{max.clust}{max number of clusters in comp.risk call for iid decompostion, max.clust=NULL uses all clusters otherwise rougher grouping.} \item{marg}{marginal cumulative incidence to make stanard errors for same clusters for subsequent use in casewise.test()} \item{se.clusters}{to specify clusters for standard errors. Either a vector of cluster indices or a column name in \code{data}. Defaults to the \code{id} variable.} \item{wname}{name of additonal weight used for paired competing risks data.} \item{prodlim}{prodlim to use prodlim estimator (Aalen-Johansen) rather than IPCW weighted estimator based on comp.risk function.These are equivalent in the case of no covariates. These esimators are the same in the case of stratified fitting.} \item{messages}{Control amount of output} \item{model}{Type of competing risk model (default is Fine-Gray model "fg", see comp.risk).} \item{return.data}{Should data be returned (skipping modeling)} \item{uniform}{to compute uniform standard errors for concordance estimates based on resampling.} \item{conservative}{for conservative standard errors, recommended for larger data-sets.} \item{resample.iid}{to return iid residual processes for further computations such as tests.} \item{...}{Additional arguments to comp.risk function} } \description{ Estimation of concordance in bivariate competing risks data } \examples{ library("timereg") ## Simulated data example prt <- simnordic.random(2000,delayed=TRUE,ptrunc=0.7, cordz=0.5,cormz=2,lam0=0.3) ## Bivariate competing risk, concordance estimates p11 <- bicomprisk(Event(time,cause)~strata(zyg)+id(id),data=prt,cause=c(1,1)) p11mz <- p11$model$"MZ" p11dz <- p11$model$"DZ" par(mfrow=c(1,2)) ## Concordance plot(p11mz,ylim=c(0,0.1)); plot(p11dz,ylim=c(0,0.1)); ## entry time, truncation weighting ### other weighting procedure prtl <- prt[!prt$truncated,] prt2 <- ipw2(prtl,cluster="id",same.cens=TRUE, time="time",cause="cause",entrytime="entry", pairs=TRUE,strata="zyg",obs.only=TRUE) prt22 <- fast.reshape(prt2,id="id") prt22$event <- (prt22$cause1==1)*(prt22$cause2==1)*1 prt22$timel <- pmax(prt22$time1,prt22$time2) ipwc <- comp.risk(Event(timel,event)~-1+factor(zyg1), data=prt22,cause=1,n.sim=0,model="rcif2",times=50:90, weights=prt22$weights1,cens.weights=rep(1,nrow(prt22))) p11wmz <- ipwc$cum[,2] p11wdz <- ipwc$cum[,3] lines(ipwc$cum[,1],p11wmz,col=3) lines(ipwc$cum[,1],p11wdz,col=3) } \references{ Scheike, T. H.; Holst, K. K. & Hjelmborg, J. B. Estimating twin concordance for bivariate competing risks twin data Statistics in Medicine, Wiley Online Library, 2014 , 33 , 1193-204 } \author{ Thomas Scheike, Klaus K. Holst } mets/man/haploX.Rd0000644000176200001440000000052413623061405013520 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{haploX} \alias{haploX} \title{haploX covariates and response for haplo survival discrete survival} \source{ Simulated data } \description{ haploX covariates and response for haplo survival discrete survival } \keyword{data} mets/man/fast.pattern.Rd0000644000176200001440000000134613623061405014701 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fastpattern.R \name{fast.pattern} \alias{fast.pattern} \title{Fast pattern} \usage{ fast.pattern(x, y, categories = 2, ...) } \arguments{ \item{x}{Matrix (binary) of patterns. Optionally if \code{y} is also passed as argument, then the pattern matrix is defined as the elements agreeing in the two matrices.} \item{y}{Optional matrix argument with same dimensions as \code{x} (see above)} \item{categories}{Default 2 (binary)} \item{...}{Optional additional arguments} } \description{ Fast pattern } \examples{ X <- matrix(rbinom(100,1,0.5),ncol=4) fast.pattern(X) X <- matrix(rbinom(100,3,0.5),ncol=4) fast.pattern(X,categories=4) } \author{ Klaus K. Holst } mets/man/survival.iterative.Rd0000644000176200001440000001617513623061405016144 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twostage.R \name{survival.iterative} \alias{survival.iterative} \title{Survival model for multivariate survival data} \usage{ survival.iterative(margsurv, data = sys.parent(), score.method = "fisher.scoring", Nit = 60, detail = 0, clusters = NULL, silent = 1, weights = NULL, control = list(), theta = NULL, theta.des = NULL, var.link = 1, iid = 1, step = 0.5, model = "clayton.oakes", marginal.trunc = NULL, marginal.survival = NULL, marginal.status = NULL, strata = NULL, se.clusters = NULL, max.clust = NULL, numDeriv = 0, random.design = NULL, pairs = NULL, pairs.rvs = NULL, numDeriv.method = "simple", additive.gamma.sum = NULL, var.par = 1, cr.models = NULL, case.control = 0, ascertained = 0, shut.up = 0) } \arguments{ \item{margsurv}{Marginal model} \item{data}{data frame} \item{score.method}{Scoring method "fisher.scoring", "nlminb", "optimize", "nlm"} \item{Nit}{Number of iterations} \item{detail}{Detail} \item{clusters}{Cluster variable} \item{silent}{Debug information} \item{weights}{Weights} \item{control}{Optimization arguments} \item{theta}{Starting values for variance components} \item{theta.des}{design for dependence parameters, when pairs are given this is could be a (pairs) x (numer of parameters) x (max number random effects) matrix} \item{var.link}{Link function for variance} \item{iid}{Calculate i.i.d. decomposition} \item{step}{Step size} \item{model}{model} \item{marginal.trunc}{marginal left truncation probabilities} \item{marginal.survival}{optional vector of marginal survival probabilities} \item{marginal.status}{related to marginal survival probabilities} \item{strata}{strata for fitting, see example} \item{se.clusters}{for clusters for se calculation with iid} \item{max.clust}{max se.clusters for se calculation with iid} \item{numDeriv}{to get numDeriv version of second derivative, otherwise uses sum of squared score} \item{random.design}{random effect design for additive gamma model, when pairs are given this is a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below} \item{pairs}{matrix with rows of indeces (two-columns) for the pairs considered in the pairwise composite score, useful for case-control sampling when marginal is known.} \item{pairs.rvs}{for additive gamma model and random.design and theta.des are given as arrays, this specifice number of random effects for each pair.} \item{numDeriv.method}{uses simple to speed up things and second derivative not so important.} \item{additive.gamma.sum}{for two.stage=0, this is specification of the lamtot in the models via a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number of theta parameters), when null then sums all parameters.} \item{var.par}{is 1 for the default parametrization with the variances of the random effects, var.par=0 specifies that the \eqn{\lambda_j}'s are used as parameters.} \item{cr.models}{competing risks models for two.stage=0, should be given as a list with models for each cause} \item{case.control}{assumes case control structure for "pairs" with second column being the probands, when this options is used the twostage model is profiled out via the paired estimating equations for the survival model.} \item{ascertained}{if the pair are sampled only when there is an event. This is in contrast to case.control sampling where a proband is given. This can be combined with control probands. Pair-call of twostage is needed and second column of pairs are the first jump time with an event for ascertained pairs, or time of control proband.} \item{shut.up}{to make the program more silent in the context of iterative procedures for case-control and ascertained sampling} } \description{ Fits additive gamma frailty model with additive hazard condtional on the random effects \deqn{ \lambda_{ij} = (V_{ij}^T Z) (X_{ij}^T \alpha(t)) } The baseline \eqn{\alpha(t)} is profiled out using marginal modelling adjusted for the random effects structure as in Eriksson and Scheike (2015). One advantage of the standard frailty model is that one can deal with competing risks for this model. For all models the standard errors do not reflect this uncertainty of the baseline estimates, and might therefore be a bit to small. To remedy this one can do bootstrapping or use survival.twostage.fullse function when possible. If clusters contain more than two times, we use a composite likelihood based on the pairwise bivariate models. Can also fit a additive gamma random effects model described in detail below. We allow a regression structure for the indenpendent gamma distributed random effects and their variances that may depend on cluster covariates. So \deqn{ \theta = z_j^T \alpha } where \eqn{z} is specified by theta.des The reported standard errors are based on the estimated information from the likelihood assuming that the marginals are known. Can also fit a structured additive gamma random effects model, such as the ACE, ADE model for survival data. Now random.design specificies the random effects for each subject within a cluster. This is a matrix of 1's and 0's with dimension n x d. With d random effects. For a cluster with two subjects, we let the random.design rows be \eqn{v_1} and \eqn{v_2}. Such that the random effects for subject 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. By construction subjects 1's random effect are Gamma distributed with mean \eqn{\lambda_j/v_1^T \lambda} and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed over all clusters as it would be for the ACE model below. The lamtot parameter may be specified separately for some sets of the parameter is the additive.gamma.sum (ags) matrix is specified and then lamtot for the j'th random effect is \eqn{ags_j^T \lambda}. Based on these parameters the relative contribution (the heritability, h) is equivalent to the expected values of the random effects \eqn{\lambda_j/v_1^T \lambda} The DEFAULT parametrization uses the variances of the random effecs \deqn{ \theta_j = \lambda_j/(v_1^T \lambda)^2 } For alternative parametrizations one can specify how the parameters relate to \eqn{\lambda_j} with the function Given the random effects the survival distributions with a cluster are independent and on the form \deqn{ P(T > t| x,z) = exp( -Z A(t) \exp( Z^t beta)) } The parameters \eqn{(\lambda_1,...,\lambda_d)} are related to the parameters of the model by a regression construction \eqn{pard} (d x k), that links the \eqn{d} \eqn{\lambda} parameters with the (k) underlying \eqn{\theta} parameters \deqn{ \lambda = theta.des \theta } here using theta.des to specify these low-dimension association. Default is a diagonal matrix. The case.control option that can be used with the pair specification of the pairwise parts of the estimating equations. Here it is assumed that the second subject of each pair is the proband. } \author{ Thomas Scheike } \keyword{survival} mets/man/dspline.Rd0000644000176200001440000000327313623061405013727 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dutils.R \name{dspline} \alias{dspline} \alias{dspline<-} \title{Simple linear spline} \usage{ dspline(data, y = NULL, x = NULL, breaks = 4, probs = NULL, equi = FALSE, regex = mets.options()$regex, sep = NULL, na.rm = TRUE, labels = NULL, all = FALSE, ...) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{name of variable, or fomula, or names of variables on data frame.} \item{breaks}{number of breaks, for variables or vector of break points,} \item{probs}{groups defined from quantiles} \item{equi}{for equi-spaced breaks} \item{regex}{for regular expressions.} \item{sep}{seperator for naming of cut names.} \item{na.rm}{to remove NA for grouping variables.} \item{labels}{to use for cut groups} \item{all}{to do all variables, even when breaks are not unique} \item{...}{Optional additional arguments} } \description{ Constructs simple linear spline on a data frame using the formula syntax of dutils that is adds (x-cuti)* (x>cuti) to the data-set for each knot of the spline. The full spline is thus given by x and spline variables added to the data-set. } \examples{ data(TRACE) TRACE <- dspline(TRACE,~wmi,breaks=c(1,1.3,1.7)) cca <- coxph(Surv(time,status==9)~age+vf+chf+wmi,data=TRACE) cca2 <- coxph(Surv(time,status==9)~age+wmi+vf+chf+wmi.spline1+wmi.spline2+wmi.spline3,data=TRACE) anova(cca,cca2) nd=data.frame(age=50,vf=0,chf=0,wmi=seq(0.4,3,by=0.01)) nd <- dspline(nd,~wmi,breaks=c(1,1.3,1.7)) pl <- predict(cca2,newdata=nd) plot(nd$wmi,pl,type="l") } \author{ Thomas Scheike } mets/man/EVaddGam.Rd0000644000176200001440000000332113623061405013673 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twostage.R \name{EVaddGam} \alias{EVaddGam} \title{Relative risk for additive gamma model} \usage{ EVaddGam(theta, x1, x2, thetades, ags) } \arguments{ \item{theta}{theta} \item{x1}{x1} \item{x2}{x2} \item{thetades}{thetades} \item{ags}{ags} } \description{ Computes the relative risk for additive gamma model at time 0 } \examples{ lam0 <- c(0.5,0.3) pars <- c(1,1,1,1,0,1) ## genetic random effects, cause1, cause2 and overall parg <- pars[c(1,3,5)] ## environmental random effects, cause1, cause2 and overall parc <- pars[c(2,4,6)] ## simulate competing risks with two causes with hazards 0.5 and 0.3 ## ace for each cause, and overall ace out <- simCompete.twin.ace(10000,parg,parc,0,2,lam0=lam0,overall=1,all.sum=1) ## setting up design for running the model mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 # dout <- make.pairwise.design.competing(pairs,kinship, # type="ace",compete=length(lam0),overall=1) # head(dout$ant.rvs) ## MZ # dim(dout$theta.des) # dout$random.design[,,1] ## DZ # dout$theta.des[,,nrow(pairs)] # dout$random.design[,,nrow(pairs)] # # thetades <- dout$theta.des[,,1] # x <- dout$random.design[,,1] # x ##EVaddGam(rep(1,6),x[1,],x[3,],thetades,matrix(1,18,6)) # thetades <- dout$theta.des[,,nrow(out)/2] # x <- dout$random.design[,,nrow(out)/2] ##EVaddGam(rep(1,6),x[1,],x[4,],thetades,matrix(1,18,6)) } \references{ Eriksson and Scheike (2015), Additive Gamma frailty models for competing risks data, Biometrics (2015) } \author{ Thomas Scheike } mets/man/cor.cif.Rd0000644000176200001440000001775713623061405013630 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{cor.cif} \alias{cor.cif} \alias{or.cif} \alias{rr.cif} \title{Cross-odds-ratio, OR or RR risk regression for competing risks} \usage{ cor.cif(cif, data, cause = NULL, times = NULL, cause1 = 1, cause2 = 1, cens.code = NULL, cens.model = "KM", Nit = 40, detail = 0, clusters = NULL, theta = NULL, theta.des = NULL, step = 1, sym = 0, weights = NULL, par.func = NULL, dpar.func = NULL, dimpar = NULL, score.method = "nlminb", same.cens = FALSE, censoring.weights = NULL, silent = 1, ...) } \arguments{ \item{cif}{a model object from the comp.risk function with the marginal cumulative incidence of cause1, i.e., the event of interest, and whose odds the comparision is compared to the conditional odds given cause2} \item{data}{a data.frame with the variables.} \item{cause}{specifies the causes related to the death times, the value cens.code is the censoring value. When missing it comes from marginal cif.} \item{times}{time-vector that specifies the times used for the estimating euqations for the cross-odds-ratio estimation.} \item{cause1}{specificies the cause considered.} \item{cause2}{specificies the cause that is conditioned on.} \item{cens.code}{specificies the code for the censoring if NULL then uses the one from the marginal cif model.} \item{cens.model}{specified which model to use for the ICPW, KM is Kaplan-Meier alternatively it may be "cox"} \item{Nit}{number of iterations for Newton-Raphson algorithm.} \item{detail}{if 0 no details are printed during iterations, if 1 details are given.} \item{clusters}{specifies the cluster structure.} \item{theta}{specifies starting values for the cross-odds-ratio parameters of the model.} \item{theta.des}{specifies a regression design for the cross-odds-ratio parameters.} \item{step}{specifies the step size for the Newton-Raphson algorithm.} \item{sym}{specifies if symmetry is used in the model.} \item{weights}{weights for estimating equations.} \item{par.func}{parfunc} \item{dpar.func}{dparfunc} \item{dimpar}{dimpar} \item{score.method}{"nlminb", can also use "fisher-scoring".} \item{same.cens}{if true then censoring within clusters are assumed to be the same variable, default is independent censoring.} \item{censoring.weights}{these probabilities are used for the bivariate censoring dist.} \item{silent}{1 to suppress output about convergence related issues.} \item{...}{Not used.} } \value{ returns an object of type 'cor'. With the following arguments: \item{theta}{estimate of proportional odds parameters of model.} \item{var.theta}{variance for gamma. } \item{hess}{the derivative of the used score.} \item{score}{scores at final stage.} \item{score}{scores at final stage.} \item{theta.iid}{matrix of iid decomposition of parametric effects.} } \description{ Fits a parametric model for the log-cross-odds-ratio for the predictive effect of for the cumulative incidence curves for \eqn{T_1} experiencing cause i given that \eqn{T_2} has experienced a cause k : \deqn{ \log(COR(i|k)) = h(\theta,z_1,i,z_2,k,t)=_{default} \theta^T z = } with the log cross odds ratio being \deqn{ COR(i|k) = \frac{O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ O(T_1 \leq t,cause_1=i)} } the conditional odds divided by the unconditional odds, with the odds being, respectively \deqn{ O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_1=k) = \frac{ P_x(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ P_x((T_1 \leq t,cause_1=i)^c | T_2 \leq t,cause_2=k)} } and \deqn{ O(T_1 \leq t,cause_1=i) = \frac{P_x(T_1 \leq t,cause_1=i )}{P_x((T_1 \leq t,cause_1=i)^c )}. } Here \eqn{B^c} is the complement event of \eqn{B}, \eqn{P_x} is the distribution given covariates (\eqn{x} are subject specific and \eqn{z} are cluster specific covariates), and \eqn{h()} is a function that is the simple identity \eqn{\theta^T z} by default. } \details{ The OR dependence measure is given by \deqn{ OR(i,k) = \log ( \frac{O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ O(T_1 \leq t,cause_1=i) | T_2 \leq t,cause_2=k)} } This measure is numerically more stabile than the COR measure, and is symetric in i,k. The RR dependence measure is given by \deqn{ RR(i,k) = \log ( \frac{P(T_1 \leq t,cause_1=i , T_2 \leq t,cause_2=k)}{ P(T_1 \leq t,cause_1=i) P(T_2 \leq t,cause_2=k)} } This measure is numerically more stabile than the COR measure, and is symetric in i,k. The model is fitted under symmetry (sym=1), i.e., such that it is assumed that \eqn{T_1} and \eqn{T_2} can be interchanged and leads to the same cross-odd-ratio (i.e. \eqn{COR(i|k) = COR(k|i))}, as would be expected for twins or without symmetry as might be the case with mothers and daughters (sym=0). \eqn{h()} may be specified as an R-function of the parameters, see example below, but the default is that it is simply \eqn{\theta^T z}. } \examples{ library("timereg") data(multcif); multcif$cause[multcif$cause==0] <- 2 zyg <- rep(rbinom(200,1,0.5),each=2) theta.des <- model.matrix(~-1+factor(zyg)) times=seq(0.05,1,by=0.05) # to speed up computations use only these time-points add<-comp.risk(Event(time,cause)~+1+cluster(id),data=multcif,cause=1, n.sim=0,times=times,model="fg",max.clust=NULL) add2<-comp.risk(Event(time,cause)~+1+cluster(id),data=multcif,cause=2, n.sim=0,times=times,model="fg",max.clust=NULL) out1<-cor.cif(add,data=multcif,cause1=1,cause2=1) summary(out1) out2<-cor.cif(add,data=multcif,cause1=1,cause2=1,theta.des=theta.des) summary(out2) ##out3<-cor.cif(add,data=multcif,cause1=1,cause2=2,cif2=add2) ##summary(out3) ########################################################### # investigating further models using parfunc and dparfunc ########################################################### \donttest{ ## Reduce Ex.Timings set.seed(100) prt<-simnordic.random(2000,cordz=2,cormz=5) prt$status <-prt$cause table(prt$status) times <- seq(40,100,by=10) cifmod <- comp.risk(Event(time,cause)~+1+cluster(id),data=prt, cause=1,n.sim=0, times=times,conservative=1,max.clust=NULL,model="fg") theta.des <- model.matrix(~-1+factor(zyg),data=prt) parfunc <- function(par,t,pardes) { par <- pardes \%*\% c(par[1],par[2]) + pardes \%*\% c( par[3]*(t-60)/12,par[4]*(t-60)/12) par } head(parfunc(c(0.1,1,0.1,1),50,theta.des)) dparfunc <- function(par,t,pardes) { dpar <- cbind(pardes, t(t(pardes) * c( (t-60)/12,(t-60)/12)) ) dpar } head(dparfunc(c(0.1,1,0.1,1),50,theta.des)) names(prt) or1 <- or.cif(cifmod,data=prt,cause1=1,cause2=1,theta.des=theta.des, same.cens=TRUE,theta=c(0.6,1.1,0.1,0.1), par.func=parfunc,dpar.func=dparfunc,dimpar=4, score.method="fisher.scoring",detail=1) summary(or1) cor1 <- cor.cif(cifmod,data=prt,cause1=1,cause2=1,theta.des=theta.des, same.cens=TRUE,theta=c(0.5,1.0,0.1,0.1), par.func=parfunc,dpar.func=dparfunc,dimpar=4, control=list(trace=TRUE),detail=1) summary(cor1) ### piecewise contant OR model gparfunc <- function(par,t,pardes) { cuts <- c(0,80,90,120) grop <- diff(t15) dsummary(xx,ll+ll2~I(agemena>15)) } mets/man/np.Rd0000644000176200001440000000033213623061405012677 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{np} \alias{np} \title{np data set} \source{ Simulated data } \description{ np data set } \keyword{data} mets/man/cifreg.Rd0000644000176200001440000000344213623061405013526 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cifreg.R \name{cifreg} \alias{cifreg} \title{CIF regression} \usage{ cifreg(formula, data = data, cause = 1, cens.code = 0, weights = NULL, offset = NULL, Gc = NULL, propodds = 1, ...) } \arguments{ \item{formula}{formula with 'Event' outcome} \item{data}{data frame} \item{cause}{of interest} \item{cens.code}{code of censoring} \item{weights}{weights for Cox score equations} \item{offset}{offsets for cox model} \item{Gc}{censoring weights for time argument, default is to calculate these with a Kaplan-Meier estimator, should then give G_c(T_i-)} \item{propodds}{1 is logistic model, NULL is fine-gray model} \item{...}{Additional arguments to lower level funtions} } \description{ CIF logistic for propodds=1 default CIF Fine-Gray (cloglog) regression for propodds=NULL } \details{ For FG model: \deqn{ \int (X - E ) Y_1(t) w(t) dM_1 } is computed and summed over clusters and returned multiplied with inverse of second derivative as iid.naive The iid decomposition of the beta's, however, also have a censoring term that is also is computed and added to UUiid (still scaled with inverse second derivative) \deqn{ \int (X - E ) Y_1(t) w(t) dM_1 + \int q(s)/p(s) dM_c } and returned as iid } \examples{ ## data with no ties data(bmt,package="timereg") bmt$time <- bmt$time+runif(nrow(bmt))*0.01 bmt$id <- 1:nrow(bmt) ## logistic link OR interpretation ll=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1) bplot(ll) nd <- data.frame(tcell=c(1,0),platelet=0,age=0) pll <- predict(ll,nd) plot(pll) ## Fine-Gray model llfg=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1,propodds=NULL) bplot(ll) nd <- data.frame(tcell=c(1,0),platelet=0,age=0) pll <- predict(ll,nd) plot(pll) } \author{ Thomas Scheike } mets/man/test.conc.Rd0000644000176200001440000000103413623061405014162 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/casewise.R \name{test.conc} \alias{test.conc} \title{Concordance test Compares two concordance estimates} \usage{ test.conc(conc1, conc2, same.cluster = FALSE) } \arguments{ \item{conc1}{Concordance estimate of group 1} \item{conc2}{Concordance estimate of group 2} \item{same.cluster}{if FALSE then groups are independent, otherwise estimates are based on same data.} } \description{ .. content for description (no empty lines) .. } \author{ Thomas Scheike } mets/man/easy.binomial.twostage.Rd0000644000176200001440000001622713623061405016662 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial.twostage.R \name{easy.binomial.twostage} \alias{easy.binomial.twostage} \title{Fits two-stage binomial for describing depdendence in binomial data using marginals that are on logistic form using the binomial.twostage funcion, but call is different and easier and the data manipulation is build into the function. Useful in particular for family design data.} \usage{ easy.binomial.twostage(margbin = NULL, data = sys.parent(), score.method = "fisher.scoring", response = "response", id = "id", Nit = 60, detail = 0, silent = 1, weights = NULL, control = list(), theta = NULL, theta.formula = NULL, desnames = NULL, deshelp = 0, var.link = 1, iid = 1, step = 1, model = "plackett", marginal.p = NULL, strata = NULL, max.clust = NULL, se.clusters = NULL) } \arguments{ \item{margbin}{Marginal binomial model} \item{data}{data frame} \item{score.method}{Scoring method} \item{response}{name of response variable in data frame} \item{id}{name of cluster variable in data frame} \item{Nit}{Number of iterations} \item{detail}{Detail for more output for iterations} \item{silent}{Debug information} \item{weights}{Weights for log-likelihood, can be used for each type of outcome in 2x2 tables.} \item{control}{Optimization arguments} \item{theta}{Starting values for variance components} \item{theta.formula}{design for depedence, either formula or design function} \item{desnames}{names for dependence parameters} \item{deshelp}{if 1 then prints out some data sets that are used, on on which the design function operates} \item{var.link}{Link function for variance} \item{iid}{Calculate i.i.d. decomposition} \item{step}{Step size} \item{model}{model} \item{marginal.p}{vector of marginal probabilities} \item{strata}{strata for fitting} \item{max.clust}{max clusters used for i.i.d. decompostion} \item{se.clusters}{clusters for iid decomposition for roubst standard errors} } \description{ If clusters contain more than two times, the algoritm uses a compososite likelihood based on the pairwise bivariate models. } \details{ The reported standard errors are based on the estimated information from the likelihood assuming that the marginals are known. This gives correct standard errors in the case of the plackett distribution (OR model for dependence), but incorrect for the clayton-oakes types model. The OR model is often known as the ALR model. Our fitting procedures gives correct standard errors due to the ortogonality and is fast. } \examples{ data(twinstut) twinstut0 <- subset(twinstut, tvparnr<2300000) twinstut <- twinstut0 twinstut$binstut <- (twinstut$stutter=="yes")*1 theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des,detail=0, score.method="fisher.scoring") summary(bin) lava::estimate(coef=bin$theta,vcov=bin$var.theta,f=function(p) exp(p)) twinstut$cage <- scale(twinstut$age) theta.des <- model.matrix( ~-1+factor(zyg)+cage,data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des,detail=0) summary(bina) theta.des <- model.matrix( ~-1+factor(zyg)+factor(zyg)*cage,data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, response="binstut",id="tvparnr",var.link=1, theta.formula=~-1+factor(zyg1)) summary(out) ## refers to zygosity of first subject in eash pair : zyg1 ## could also use zyg2 (since zyg2=zyg1 within twinpair's)) desfs <- function(x,num1="zyg1",namesdes=c("mz","dz","os")) c(x[num1]=="mz",x[num1]=="dz",x[num1]=="os")*1 out3 <- easy.binomial.twostage(binstut~factor(sex)+age, data=twinstut, response="binstut",id="tvparnr", var.link=1,theta.formula=desfs, desnames=c("mz","dz","os")) summary(out3) \donttest{ ## Reduce Ex.Timings n <- 10000 set.seed(100) dd <- simBinFam(n,beta=0.3) binfam <- fast.reshape(dd,varying=c("age","x","y")) ## mother, father, children (ordered) head(binfam) ########### ########### ########### ########### ########### ########### #### simple analyses of binomial family data ########### ########### ########### ########### ########### ########### desfs <- function(x,num1="num1",num2="num2") { pp <- 1*(((x[num1]=="m")*(x[num2]=="f"))|(x[num1]=="f")*(x[num2]=="m")) pc <- (x[num1]=="m" | x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 cc <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 c(pp,pc,cc) } ud <- easy.binomial.twostage(y~+1,data=binfam, response="y",id="id", theta.formula=desfs,desnames=c("pp","pc","cc")) summary(ud) udx <- easy.binomial.twostage(y~+x,data=binfam, response="y",id="id", theta.formula=desfs,desnames=c("pp","pc","cc")) summary(udx) ########### ########### ########### ########### ########### ########### #### now allowing parent child POR to be different for mother and father ########### ########### ########### ########### ########### ########### desfsi <- function(x,num1="num1",num2="num2") { pp <- (x[num1]=="m")*(x[num2]=="f")*1 mc <- (x[num1]=="m")*(x[num2]=="b1" | x[num2]=="b2")*1 fc <- (x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 cc <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 c(pp,mc,fc,cc) } udi <- easy.binomial.twostage(y~+1,data=binfam, response="y",id="id", theta.formula=desfsi,desnames=c("pp","mother-child","father-child","cc")) summary(udi) ##now looking to see if interactions with age or age influences marginal models ##converting factors to numeric to make all involved covariates numeric ##to use desfai2 rather then desfai that works on binfam nbinfam <- binfam nbinfam$num <- as.numeric(binfam$num) head(nbinfam) desfsai <- function(x,num1="num1",num2="num2") { pp <- (x[num1]=="m")*(x[num2]=="f")*1 ### av age for pp=1 i.e parent pairs agepp <- ((as.numeric(x["age1"])+as.numeric(x["age2"]))/2-30)*pp mc <- (x[num1]=="m")*(x[num2]=="b1" | x[num2]=="b2")*1 fc <- (x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 cc <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 agecc <- ((as.numeric(x["age1"])+as.numeric(x["age2"]))/2-12)*cc c(pp,agepp,mc,fc,cc,agecc) } desfsai2 <- function(x,num1="num1",num2="num2") { pp <- (x[num1]==1)*(x[num2]==2)*1 agepp <- (((x["age1"]+x["age2"]))/2-30)*pp ### av age for pp=1 i.e parent pairs mc <- (x[num1]==1)*(x[num2]==3 | x[num2]==4)*1 fc <- (x[num1]==2)*(x[num2]==3 | x[num2]==4)*1 cc <- (x[num1]==3)*(x[num2]==3 | x[num2]==4)*1 agecc <- ((x["age1"]+x["age2"])/2-12)*cc ### av age for children c(pp,agepp,mc,fc,cc,agecc) } udxai2 <- easy.binomial.twostage(y~+x+age,data=binfam, response="y",id="id", theta.formula=desfsai, desnames=c("pp","pp-age","mother-child","father-child","cc","cc-age")) summary(udxai2) } } \keyword{binomial} \keyword{regression} mets/man/predict.phreg.Rd0000644000176200001440000000305713623061405015027 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{predict.phreg} \alias{predict.phreg} \alias{tailstrata} \alias{revcumsumstrata} \alias{revcumsumstratasum} \alias{cumsumstrata} \alias{sumstrata} \alias{covfr} \alias{covfridstrata} \alias{covfridstrataCov} \alias{cumsumidstratasum} \alias{cumsumidstratasumCov} \alias{cumsumstratasum} \alias{revcumsum} \alias{revcumsumidstratasum} \alias{revcumsumidstratasumCov} \alias{robust.basehaz.phreg} \alias{matdoubleindex} \alias{mdi} \title{Predictions from proportional hazards model} \usage{ \method{predict}{phreg}(object, newdata, times = NULL, individual.time = FALSE, tminus = FALSE, se = TRUE, robust = FALSE, conf.type = "log", conf.int = 0.95, km = FALSE, ...) } \arguments{ \item{object}{phreg object} \item{newdata}{data.frame} \item{times}{Time where to predict variable, default is all time-points from the object sorted} \item{individual.time}{when TRUE then newdata and times have same length and makes only predictions for these individual times.} \item{tminus}{to make predictions in T- that is just before, useful for IPCW techniques} \item{se}{with standard errors and upper and lower confidence intervals.} \item{robust}{to get robust se's.} \item{conf.type}{transformation for suvival estimates, default is log} \item{conf.int}{significance level} \item{km}{to use Kaplan-Meier for baseline \deqn{S_{s0}(t)= (1 - dA_{s0}(t))} where s is strata.} \item{...}{Additional arguments to plot functions} } \description{ Predictions from proportional hazards model } mets/man/ghaplos.Rd0000644000176200001440000000045613623061405013726 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{ghaplos} \alias{ghaplos} \title{ghaplos haplo-types for subjects of haploX data} \source{ Simulated data } \description{ ghaplos haplo-types for subjects of haploX data } \keyword{data} mets/man/Bootphreg.Rd0000644000176200001440000000333613623061405014222 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wild-phreg.R \name{Bootphreg} \alias{Bootphreg} \alias{pred.cif.boot} \title{Wild bootstrap for Cox PH regression} \usage{ Bootphreg(formula, data, offset = NULL, weights = NULL, B = 1000, type = c("exp", "poisson", "normal"), ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{offset}{offsets for cox model} \item{weights}{weights for Cox score equations} \item{B}{bootstraps} \item{type}{distribution for multiplier} \item{...}{Additional arguments to lower level funtions} } \description{ wild bootstrap for uniform bands for Cox models } \examples{ n <- 100 x <- 4*rnorm(n) time1 <- 2*rexp(n)/exp(x*0.3) time2 <- 2*rexp(n)/exp(x*(-0.3)) status <- ifelse(time1=1, when iid=2 then avoids adding the uncertainty for marginal paramters for additive gamma model (default).} \item{step}{Step size} \item{notaylor}{Taylor expansion} \item{model}{model} \item{marginal.p}{vector of marginal probabilities} \item{beta.iid}{iid decomposition of marginal probability estimates for each subject, if based on GLM model this is computed.} \item{Dbeta.iid}{derivatives of marginal model wrt marginal parameters, if based on GLM model this is computed.} \item{strata}{strata for fitting: considers only pairs where both are from same strata} \item{max.clust}{max clusters} \item{se.clusters}{clusters for iid decomposition for roubst standard errors} \item{numDeriv}{uses Fisher scoring aprox of second derivative if 0, otherwise numerical derivatives} \item{random.design}{random effect design for additive gamma model, when pairs are given this is a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below} \item{pairs}{matrix with rows of indeces (two-columns) for the pairs considered in the pairwise composite score, useful for case-control sampling when marginal is known.} \item{pairs.rvs}{for additive gamma model and random.design and theta.des are given as arrays, this specifice number of random effects for each pair.} \item{additive.gamma.sum}{this is specification of the lamtot in the models via a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number of theta parameters), when null then sums all parameters. Default is a matrix of 1's} \item{pair.ascertained}{if pairs are sampled only when there are events in the pair i.e. Y1+Y2>=1.} \item{case.control}{if data is case control data for pair call, and here 2nd column of pairs are probands (cases or controls)} \item{twostage}{default twostage=1, to fit MLE use twostage=0} \item{beta}{is starting value for beta for MLE version} } \description{ The pairwise pairwise odds ratio model provides an alternative to the alternating logistic regression (ALR). } \details{ The reported standard errors are based on a cluster corrected score equations from the pairwise likelihoods assuming that the marginals are known. This gives correct standard errors in the case of the Odds-Ratio model (Plackett distribution) for dependence, but incorrect standard errors for the Clayton-Oakes types model (that is also called "gamma"-frailty). For the additive gamma version of the standard errors are adjusted for the uncertainty in the marginal models via an iid deomposition using the iid() function of lava. For the clayton oakes model that is not speicifed via the random effects these can be fixed subsequently using the iid influence functions for the marginal model, but typically this does not change much. For the Clayton-Oakes version of the model, given the gamma distributed random effects it is assumed that the probabilities are indpendent, and that the marginal survival functions are on logistic form \deqn{ logit(P(Y=1|X)) = \alpha + x^T \beta } therefore conditional on the random effect the probability of the event is \deqn{ logit(P(Y=1|X,Z)) = exp( -Z \cdot Laplace^{-1}(lamtot,lamtot,P(Y=1|x)) ) } Can also fit a structured additive gamma random effects model, such the ACE, ADE model for survival data: Now random.design specificies the random effects for each subject within a cluster. This is a matrix of 1's and 0's with dimension n x d. With d random effects. For a cluster with two subjects, we let the random.design rows be \eqn{v_1} and \eqn{v_2}. Such that the random effects for subject 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. By construction subjects 1's random effect are Gamma distributed with mean \eqn{\lambda_j/v_1^T \lambda} and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed over all clusters as it would be for the ACE model below. The DEFAULT parametrization uses the variances of the random effecs (var.par=1) \deqn{ \theta_j = \lambda_j/(v_1^T \lambda)^2 } For alternative parametrizations (var.par=0) one can specify how the parameters relate to \eqn{\lambda_j} with the function Based on these parameters the relative contribution (the heritability, h) is equivalent to the expected values of the random effects \eqn{\lambda_j/v_1^T \lambda} Given the random effects the probabilities are independent and on the form \deqn{ logit(P(Y=1|X)) = exp( - Laplace^{-1}(lamtot,lamtot,P(Y=1|x)) ) } with the inverse laplace of the gamma distribution with mean 1 and variance lamtot. The parameters \eqn{(\lambda_1,...,\lambda_d)} are related to the parameters of the model by a regression construction \eqn{pard} (d x k), that links the \eqn{d} \eqn{\lambda} parameters with the (k) underlying \eqn{\theta} parameters \deqn{ \lambda = theta.des \theta } here using theta.des to specify these low-dimension association. Default is a diagonal matrix. } \examples{ library("timereg") data("twinstut",package="mets") twinstut0 <- subset(twinstut, tvparnr<2300000) twinstut <- twinstut0 twinstut$binstut <- (twinstut$stutter=="yes")*1 theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des,detail=0, score.method="fisher.scoring") summary(bin) twinstut$cage <- scale(twinstut$age) theta.des <- model.matrix( ~-1+factor(zyg)+cage,data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) theta.des <- model.matrix( ~-1+factor(zyg)+factor(zyg)*cage,data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) ## refers to zygosity of first subject in eash pair : zyg1 ## could also use zyg2 (since zyg2=zyg1 within twinpair's)) out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, response="binstut",id="tvparnr",var.link=1, theta.formula=~-1+factor(zyg1)) summary(out) ## refers to zygosity of first subject in eash pair : zyg1 ## could also use zyg2 (since zyg2=zyg1 within twinpair's)) desfs<-function(x,num1="zyg1",num2="zyg2") c(x[num1]=="dz",x[num1]=="mz",x[num1]=="os")*1 out3 <- easy.binomial.twostage(binstut~factor(sex)+age, data=twinstut,response="binstut",id="tvparnr",var.link=1, theta.formula=desfs,desnames=c("mz","dz","os")) summary(out3) ### use of clayton oakes binomial additive gamma model ########################################################### \donttest{ ## Reduce Ex.Timings data <- simbinClaytonOakes.family.ace(10000,2,1,beta=NULL,alpha=NULL) margbin <- glm(ybin~x,data=data,family=binomial()) margbin head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) ### make ace random effects design out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv) bints <- binomial.twostage(margbin,data=data, clusters=data$cluster,detail=0,var.par=1, theta=c(2,1),var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bints) data <- simbinClaytonOakes.twin.ace(10000,2,1,beta=NULL,alpha=NULL) out <- twin.polygen.design(data,id="cluster",zygname="zygosity") out$pardes head(out$des.rv) margbin <- glm(ybin~x,data=data,family=binomial()) bintwin <- binomial.twostage(margbin,data=data, clusters=data$cluster,detail=1,var.par=1, theta=c(2,1),random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) concordanceTwinACE(bintwin) } } \references{ Two-stage binomial modelling } \author{ Thomas Scheike } \keyword{binomial} \keyword{regression} mets/man/fast.reshape.Rd0000644000176200001440000000656613623061405014664 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fastreshape.R \name{fast.reshape} \alias{fast.reshape} \alias{dreshape} \title{Fast reshape} \usage{ fast.reshape(data, varying, id, num, sep = "", keep, idname = "id", numname = "num", factor = FALSE, idcombine = TRUE, labelnum = FALSE, labels, regex = mets.options()$regex, dropid = FALSE, ...) } \arguments{ \item{data}{data.frame or matrix} \item{varying}{Vector of prefix-names of the time varying variables. Optional for Long->Wide reshaping.} \item{id}{id-variable. If omitted then reshape Wide->Long.} \item{num}{Optional number/time variable} \item{sep}{String seperating prefix-name with number/time} \item{keep}{Vector of column names to keep} \item{idname}{Name of id-variable (Wide->Long)} \item{numname}{Name of number-variable (Wide->Long)} \item{factor}{If true all factors are kept (otherwise treated as character)} \item{idcombine}{If TRUE and \code{id} is vector of several variables, the unique id is combined from all the variables. Otherwise the first variable is only used as identifier.} \item{labelnum}{If TRUE varying variables in wide format (going from long->wide) are labeled 1,2,3,... otherwise use 'num' variable. In long-format (going from wide->long) varying variables matching 'varying' prefix are only selected if their postfix is a number.} \item{labels}{Optional labels for the number variable} \item{regex}{Use regular expressions} \item{dropid}{Drop id in long format (default FALSE)} \item{...}{Optional additional arguments} } \description{ Fast reshape/tranpose of data } \examples{ library("lava") m <- lvm(c(y1,y2,y3,y4)~x) d <- sim(m,5) d fast.reshape(d,"y") fast.reshape(fast.reshape(d,"y"),id="id") ##### From wide-format (dd <- fast.reshape(d,"y")) ## Same with explicit setting new id and number variable/column names ## and seperator "" (default) and dropping x fast.reshape(d,"y",idname="a",timevar="b",sep="",keep=c()) ## Same with 'reshape' list-syntax fast.reshape(d,list(c("y1","y2","y3","y4")),labelnum=TRUE) ##### From long-format fast.reshape(dd,id="id") ## Restrict set up within-cluster varying variables fast.reshape(dd,"y",id="id") fast.reshape(dd,"y",id="id",keep="x",sep=".") ##### x <- data.frame(id=c(5,5,6,6,7),y=1:5,x=1:5,tv=c(1,2,2,1,2)) x (xw <- fast.reshape(x,id="id")) (xl <- fast.reshape(xw,c("y","x"),idname="id2",keep=c())) (xl <- fast.reshape(xw,c("y","x","tv"))) (xw2 <- fast.reshape(xl,id="id",num="num")) fast.reshape(xw2,c("y","x"),idname="id") ### more generally: ### varying=list(c("ym","yf","yb1","yb2"), c("zm","zf","zb1","zb2")) ### varying=list(c("ym","yf","yb1","yb2"))) ##### Family cluster example d <- mets:::simBinFam(3) d fast.reshape(d,var="y") fast.reshape(d,varying=list(c("ym","yf","yb1","yb2"))) d <- sim(lvm(~y1+y2+ya),10) d (dd <- fast.reshape(d,"y")) fast.reshape(d,"y",labelnum=TRUE) fast.reshape(dd,id="id",num="num") fast.reshape(dd,id="id",num="num",labelnum=TRUE) fast.reshape(d,c(a="y"),labelnum=TRUE) ## New column name ##### Unbalanced data m <- lvm(c(y1,y2,y3,y4)~ x+z1+z3+z5) d <- sim(m,3) d fast.reshape(d,c("y","z")) ##### not-varying syntax: fast.reshape(d,-c("x")) ##### Automatically define varying variables from trailing digits fast.reshape(d) ##### Prostate cancer example data(prt) head(prtw <- fast.reshape(prt,"cancer",id="id")) ftable(cancer1~cancer2,data=prtw) rm(prtw) } \author{ Thomas Scheike, Klaus K. Holst } mets/man/plack.cif.Rd0000644000176200001440000000104013623061405014111 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{plack.cif} \alias{plack.cif} \alias{plack.cif2} \title{plack Computes concordance for or.cif based model, that is Plackett random effects model} \usage{ plack.cif(cif1, cif2, object) } \arguments{ \item{cif1}{Cumulative incidence of first argument.} \item{cif2}{Cumulative incidence of second argument.} \item{object}{or.cif object with dependence parameters.} } \description{ .. content for description (no empty lines) .. } \author{ Thomas Scheike } mets/man/phreg.Rd0000644000176200001440000000244613623061405013377 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{phreg} \alias{phreg} \alias{phreg.par} \alias{robust.phreg} \alias{readPhreg} \title{Fast Cox PH regression} \usage{ phreg(formula, data, offset = NULL, weights = NULL, ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{offset}{offsets for cox model} \item{weights}{weights for Cox score equations} \item{...}{Additional arguments to lower level funtions} } \description{ Fast Cox PH regression Robust variance is default variance with the summary. } \details{ influence functions (iid) will follow numerical order of given cluster variable so ordering after $id will give iid in order of data-set. } \examples{ data(TRACE) dcut(TRACE) <- ~. out1 <- phreg(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) ## tracesim <- timereg::sim.cox(out1,1000) ## sout1 <- phreg(Surv(time,status==1)~vf+chf+strata(wmicat.4),data=tracesim) ## robust standard errors default summary(out1) par(mfrow=c(1,2)) bplot(out1) ## bplot(sout1,se=TRUE) ## computing robust variance for baseline rob1 <- robust.phreg(out1) bplot(rob1,se=TRUE,robust=TRUE) ## making iid decomposition of regression parameters betaiiid <- iid(out1) } \author{ Klaus K. Holst, Thomas Scheike } mets/man/rpch.Rd0000644000176200001440000000056613623061405013227 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pch.R \name{rpch} \alias{rpch} \alias{ppch} \title{Piecewise constant hazard distribution} \usage{ rpch(n, lambda = 1, breaks = c(0, Inf)) } \arguments{ \item{n}{sample size} \item{lambda}{rate parameters} \item{breaks}{time cut-points} } \description{ Piecewise constant hazard distribution } mets/man/dreg.Rd0000644000176200001440000001013013623061405013200 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dreg.R \name{dreg} \alias{dreg} \title{Regression for data frames with dutility call} \usage{ dreg(data, y, x = NULL, z = NULL, x.oneatatime = TRUE, x.base.names = NULL, z.arg = c("clever", "base", "group", "condition"), fun. = lm, summary. = summary, regex = FALSE, convert = NULL, doSummary = TRUE, special = NULL, equal = TRUE, test = 1, ...) } \arguments{ \item{data}{data frame} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{name of variable, or fomula, or names of variables on data frame.} \item{z}{name of variable, or fomula, or names of variables on data frame.} \item{x.oneatatime}{x's one at a time} \item{x.base.names}{base covarirates} \item{z.arg}{what is Z, c("clever","base","group","condition"), clever decides based on type of Z, base means that Z is used as fixed baseline covaraites for all X, group means the analyses is done based on groups of Z, and condition means that Z specifies a condition on the data} \item{fun.}{function lm is default} \item{summary.}{summary to use} \item{regex}{regex} \item{convert}{convert} \item{doSummary}{doSummary or not} \item{special}{special's} \item{equal}{to do pairwise stuff} \item{test}{development argument} \item{...}{Additional arguments for fun} } \description{ Regression for data frames with dutility call } \examples{ ##' data(iris) data <- iris drename(iris) <- ~. names(iris) set.seed(1) iris$time <- runif(nrow(iris)) iris$time1 <- runif(nrow(iris)) iris$status <- rbinom(nrow(iris),1,0.5) iris$S1 <- with(iris,Surv(time,status)) iris$S2 <- with(iris,Surv(time1,status)) iris$id <- 1:nrow(iris) mm <- dreg(iris,"*.length"~"*.width"|I(species=="setosa" & status==1)) mm <- dreg(iris,"*.length"~"*.width"|species+status) mm <- dreg(iris,"*.length"~"*.width"|species) mm <- dreg(iris,"*.length"~"*.width"|species+status,z.arg="group") \donttest{ ## Reduce Ex.Timings y <- "S*"~"*.width" xs <- dreg(iris,y,fun.=phreg) xs <- dreg(iris,y,fun.=survdiff) y <- "S*"~"*.width" xs <- dreg(iris,y,x.oneatatime=FALSE,fun.=phreg) ## under condition y <- S1~"*.width"|I(species=="setosa" & sepal.width>3) xs <- dreg(iris,y,z.arg="condition",fun.=phreg) xs <- dreg(iris,y,fun.=phreg) ## under condition y <- S1~"*.width"|species=="setosa" xs <- dreg(iris,y,z.arg="condition",fun.=phreg) xs <- dreg(iris,y,fun.=phreg) ## with baseline after | y <- S1~"*.width"|sepal.length xs <- dreg(iris,y,fun.=phreg) ## by group by species, not working y <- S1~"*.width"|species ss <- split(iris,paste(iris$species,iris$status)) xs <- dreg(iris,y,fun.=phreg) ## species as base, species is factor so assumes that this is grouping y <- S1~"*.width"|species xs <- dreg(iris,y,z.arg="base",fun.=phreg) ## background var after | and then one of x's at at time y <- S1~"*.width"|status+"sepal*" xs <- dreg(iris,y,fun.=phreg) ## background var after | and then one of x's at at time ##y <- S1~"*.width"|status+"sepal*" ##xs <- dreg(iris,y,x.oneatatime=FALSE,fun.=phreg) ##xs <- dreg(iris,y,fun.=phreg) ## background var after | and then one of x's at at time ##y <- S1~"*.width"+factor(species) ##xs <- dreg(iris,y,fun.=phreg) ##xs <- dreg(iris,y,fun.=phreg,x.oneatatime=FALSE) y <- S1~"*.width"|factor(species) xs <- dreg(iris,y,z.arg="base",fun.=phreg) y <- S1~"*.width"|cluster(id)+factor(species) xs <- dreg(iris,y,z.arg="base",fun.=phreg) xs <- dreg(iris,y,z.arg="base",fun.=coxph) ## under condition with groups y <- S1~"*.width"|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) ## under condition with groups y <- S1~"*.width"+I(log(sepal.length))|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) y <- S1~"*.width"+I(dcut(sepal.length))|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) ff <- function(formula,data,...) { ss <- survfit(formula,data,...) kmplot(ss,...) return(ss) } if (interactive()) { dcut(iris) <- ~"*.width" y <- S1~"*.4"|I(sepal.length>4) par(mfrow=c(1,2)) xs <- dreg(iris,y,fun.=ff) } } } \author{ Klaus K. Holst, Thomas Scheike } mets/man/simAalenFrailty.Rd0000644000176200001440000000137413623061405015355 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aalenfrailty.R \name{simAalenFrailty} \alias{simAalenFrailty} \title{Simulate from the Aalen Frailty model} \usage{ simAalenFrailty(n = 5000, theta = 0.3, K = 2, beta0 = 1.5, beta = 1, cens = 1.5, cuts = 0, ...) } \arguments{ \item{n}{Number of observations in each cluster} \item{theta}{Dependence paramter (variance of frailty)} \item{K}{Number of clusters} \item{beta0}{Baseline (intercept)} \item{beta}{Effect (log hazard ratio) of covariate} \item{cens}{Censoring rate} \item{cuts}{time cuts} \item{...}{Additional arguments} } \description{ Simulate observations from Aalen Frailty model with Gamma distributed frailty and constant intensity. } \author{ Klaus K. Holst } mets/man/hapfreqs.Rd0000644000176200001440000000036213623061405014076 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{hapfreqs} \alias{hapfreqs} \title{hapfreqs data set} \source{ Simulated data } \description{ hapfreqs data set } \keyword{data} mets/man/random.cif.Rd0000644000176200001440000001056313623061405014311 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{random.cif} \alias{random.cif} \title{Random effects model for competing risks data} \usage{ random.cif(cif, data, cause = NULL, cif2 = NULL, cause1 = 1, cause2 = 1, cens.code = NULL, cens.model = "KM", Nit = 40, detail = 0, clusters = NULL, theta = NULL, theta.des = NULL, sym = 1, step = 1, same.cens = FALSE, var.link = 0, score.method = "fisher.scoring", entry = NULL, trunkp = 1, ...) } \arguments{ \item{cif}{a model object from the comp.risk function with the marginal cumulative incidence of cause2, i.e., the event that is conditioned on, and whose odds the comparision is made with respect to} \item{data}{a data.frame with the variables.} \item{cause}{specifies the causes related to the death times, the value cens.code is the censoring value.} \item{cif2}{specificies model for cause2 if different from cause1.} \item{cause1}{cause of first coordinate.} \item{cause2}{cause of second coordinate.} \item{cens.code}{specificies the code for the censoring if NULL then uses the one from the marginal cif model.} \item{cens.model}{specified which model to use for the ICPW, KM is Kaplan-Meier alternatively it may be "cox"} \item{Nit}{number of iterations for Newton-Raphson algorithm.} \item{detail}{if 0 no details are printed during iterations, if 1 details are given.} \item{clusters}{specifies the cluster structure.} \item{theta}{specifies starting values for the cross-odds-ratio parameters of the model.} \item{theta.des}{specifies a regression design for the cross-odds-ratio parameters.} \item{sym}{1 for symmetry 0 otherwise} \item{step}{specifies the step size for the Newton-Raphson algorith.m} \item{same.cens}{if true then censoring within clusters are assumed to be the same variable, default is independent censoring.} \item{var.link}{if var.link=1 then var is on log-scale.} \item{score.method}{default uses "nlminb" optimzer, alternatively, use the "fisher-scoring" algorithm.} \item{entry}{entry-age in case of delayed entry. Then two causes must be given.} \item{trunkp}{gives probability of survival for delayed entry, and related to entry-ages given above.} \item{...}{extra arguments.} } \value{ returns an object of type 'cor'. With the following arguments: \item{theta}{estimate of proportional odds parameters of model.} \item{var.theta}{variance for gamma. } \item{hess}{the derivative of the used score.} \item{score}{scores at final stage.} \item{score}{scores at final stage.} \item{theta.iid}{matrix of iid decomposition of parametric effects.} } \description{ Fits a random effects model describing the dependence in the cumulative incidence curves for subjects within a cluster. Given the gamma distributed random effects it is assumed that the cumulative incidence curves are indpendent, and that the marginal cumulative incidence curves are on the form \deqn{ P(T \leq t, cause=1 | x,z) = P_1(t,x,z) = 1- exp( -x^T A(t) exp(z^T \beta)) } We allow a regression structure for the random effects variances that may depend on cluster covariates. } \examples{ \donttest{ ## Reduce Ex.Timings library("timereg") d <- simnordic.random(4000,delayed=TRUE, cordz=0.5,cormz=2,lam0=0.3,country=TRUE) times <- seq(50,90,by=10) add1<-comp.risk(Event(time,cause)~-1+factor(country)+cluster(id),data=d, times=times,cause=1,max.clust=NULL) ### making group indidcator mm <- model.matrix(~-1+factor(zyg),d) out1<-random.cif(add1,data=d,cause1=1,cause2=1,theta=1,same.cens=TRUE) summary(out1) out2<-random.cif(add1,data=d,cause1=1,cause2=1,theta=1, theta.des=mm,same.cens=TRUE) summary(out2) ######################################### ##### 2 different causes ######################################### add2<-comp.risk(Event(time,cause)~const(country)+cluster(id),data=d, times=times,cause=2,max.clust=NULL) out3<-random.cif(add1,data=d,cause1=1,cause2=2,cif2=add2,sym=1,same.cens=TRUE) summary(out3) ## negative dependence out4<-random.cif(add1,data=d,cause1=1,cause2=2,cif2=add2,theta.des=mm,sym=1,same.cens=TRUE) summary(out4) ## negative dependence } } \references{ A Semiparametric Random Effects Model for Multivariate Competing Risks Data, Scheike, Zhang, Sun, Jensen (2010), Biometrika. Cross odds ratio Modelling of dependence for Multivariate Competing Risks Data, Scheike and Sun (2012), work in progress. } \author{ Thomas Scheike } \keyword{survival} mets/man/dcor.Rd0000644000176200001440000000204313623061405013212 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/daggregate.R \name{dcor} \alias{dcor} \alias{dsummary} \alias{dstr} \alias{dsubset} \alias{dquantile} \alias{dcount} \alias{dmean} \alias{dmeansd} \alias{dscalar} \alias{deval} \alias{deval2} \alias{dsum} \alias{dsd} \title{summary, tables, and correlations for data frames} \usage{ dcor(data, y = NULL, x = NULL, use = "pairwise.complete.obs", ...) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{possible group variable} \item{use}{how to handle missing values} \item{...}{Optional additional arguments} } \description{ summary, tables, and correlations for data frames } \examples{ data("sTRACE",package="timereg") dt<- sTRACE dt$time2 <- dt$time^2 dt$wmi2 <- dt$wmi^2 head(dt) dcor(dt) dcor(dt,~time+wmi) dcor(dt,~time+wmi,~vf+chf) dcor(dt,time+wmi~vf+chf) dcor(dt,c("time*","wmi*"),~vf+chf) } \author{ Klaus K. Holst and Thomas Scheike } mets/man/logitSurv.Rd0000644000176200001440000000174213623061405014266 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{logitSurv} \alias{logitSurv} \title{Proportional odds survival model} \usage{ logitSurv(formula, data, offset = NULL, weights = NULL, ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{offset}{offsets for exp(x beta) terms} \item{weights}{weights for score equations} \item{...}{Additional arguments to lower level funtions} } \description{ Semiparametric Proportional odds model, that has the advantage that \deqn{ logit(S(t|x)) = \log(\Lambda(t)) + x \beta } so covariate effects give OR of survival. } \details{ This is equivalent to using a hazards model \deqn{ Z \lambda(t) \exp(x \beta) } where Z is gamma distributed with mean and variance 1. } \examples{ data(TRACE) dcut(TRACE) <- ~. out1 <- logitSurv(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) summary(out1) gof(out1) bplot(out1) } \author{ Thomas Scheike } mets/man/phregR.Rd0000644000176200001440000000161213623061405013513 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{phregR} \alias{phregR} \alias{FastCoxPLstrataR} \title{Fast Cox PH regression and calculations done in R to make play and adjustments easy} \usage{ phregR(formula, data, offset = NULL, weights = NULL, ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{offset}{offsets for cox model} \item{weights}{weights for Cox score equations} \item{...}{Additional arguments to lower level funtions} } \description{ Fast Cox PH regression with R implementation to play and adjust in R function: FastCoxPLstrataR } \details{ Robust variance is default variance with the summary. influence functions (iid) will follow numerical order of given cluster variable so ordering after $id will give iid in order of data-set. } \author{ Klaus K. Holst, Thomas Scheike } mets/man/recurrentMarginal.Rd0000644000176200001440000000766213623061405015763 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{recurrentMarginal} \alias{recurrentMarginal} \alias{tie.breaker} \alias{recmarg} \alias{recurrentMarginalIPCW} \title{Fast recurrent marginal mean when death is possible} \usage{ recurrentMarginal(recurrent, death, fixbeta = NULL, km = TRUE, ...) } \arguments{ \item{recurrent}{phreg object with recurrent events} \item{death}{phreg object with deaths} \item{fixbeta}{to force the estimation of standard errors to think of regression coefficients as known/fixed} \item{km}{if true then uses Kaplan-Meier for death, otherwise exp(- Nelson-Aalen )} \item{...}{Additional arguments to lower level funtions} } \description{ Fast Marginal means of recurrent events. Using the Lin and Ghosh (2000) standard errors. Fitting two models for death and recurent events these are combined to prducte the estimator \deqn{ \int_0^t S(u|x=0) dR(u|x=0) } the mean number of recurrent events, here \deqn{ S(u|x=0) } is the probability of survival for the baseline group, and \deqn{ dR(u|x=0) } is the hazard rate of an event among survivors for the baseline. Here \deqn{ S(u|x=0) } is estimated by \deqn{ exp(-\Lambda_d(u|x=0) } with \deqn{\Lambda_d(u|x=0) } being the cumulative baseline for death. } \details{ Assumes no ties in the sense that jump times needs to be unique, this is particularly so for the stratified version. } \examples{ data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz rr <- simRecurrent(1000,base1,death.cumhaz=dr) rr$x <- rnorm(nrow(rr)) rr$strata <- floor((rr$id-0.01)/500) ## to fit non-parametric models with just a baseline xr <- phreg(Surv(entry,time,status)~cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) ### robust standard errors rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=4) ## marginal mean of expected number of recurrent events out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=2) ######################################################################## ### with strata ################################################## ######################################################################## xr <- phreg(Surv(entry,time,status)~strata(strata)+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~strata(strata)+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) ######################################################################## ### cox case ################################################## ######################################################################## xr <- phreg(Surv(entry,time,status)~x+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~x+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) ######################################################################## ### CIF ############################################################# ######################################################################## ### use of function to compute cumulative incidence (cif) with robust standard errors data(bmt) bmt$id <- 1:nrow(bmt) xr <- phreg(Surv(time,cause==1)~cluster(id),data=bmt) dr <- phreg(Surv(time,cause!=0)~cluster(id),data=bmt) out <- recurrentMarginal(xr,dr,km=TRUE) bplot(out,se=TRUE,ylab="cumulative incidence") } \references{ Ghosh and Lin (2002) Nonparametric Analysis of Recurrent events and death, Biometrics, 554--562. } \author{ Thomas Scheike } mets/man/Grandom.cif.Rd0000644000176200001440000001457313623061405014425 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{Grandom.cif} \alias{Grandom.cif} \title{Additive Random effects model for competing risks data for polygenetic modelling} \usage{ Grandom.cif(cif, data, cause = NULL, cif2 = NULL, times = NULL, cause1 = 1, cause2 = 1, cens.code = NULL, cens.model = "KM", Nit = 40, detail = 0, clusters = NULL, theta = NULL, theta.des = NULL, weights = NULL, step = 1, sym = 0, same.cens = FALSE, censoring.weights = NULL, silent = 1, var.link = 0, score.method = "fisher.scoring", entry = NULL, estimator = 1, trunkp = 1, admin.cens = NULL, random.design = NULL, ...) } \arguments{ \item{cif}{a model object from the comp.risk function with the marginal cumulative incidence of cause2, i.e., the event that is conditioned on, and whose odds the comparision is made with respect to} \item{data}{a data.frame with the variables.} \item{cause}{specifies the causes related to the death times, the value cens.code is the censoring value.} \item{cif2}{specificies model for cause2 if different from cause1.} \item{times}{time points} \item{cause1}{cause of first coordinate.} \item{cause2}{cause of second coordinate.} \item{cens.code}{specificies the code for the censoring if NULL then uses the one from the marginal cif model.} \item{cens.model}{specified which model to use for the ICPW, KM is Kaplan-Meier alternatively it may be "cox"} \item{Nit}{number of iterations for Newton-Raphson algorithm.} \item{detail}{if 0 no details are printed during iterations, if 1 details are given.} \item{clusters}{specifies the cluster structure.} \item{theta}{specifies starting values for the cross-odds-ratio parameters of the model.} \item{theta.des}{specifies a regression design for the cross-odds-ratio parameters.} \item{weights}{weights for score equations.} \item{step}{specifies the step size for the Newton-Raphson algorith.m} \item{sym}{1 for symmetri and 0 otherwise} \item{same.cens}{if true then censoring within clusters are assumed to be the same variable, default is independent censoring.} \item{censoring.weights}{Censoring probabilities} \item{silent}{debug information} \item{var.link}{if var.link=1 then var is on log-scale.} \item{score.method}{default uses "nlminb" optimzer, alternatively, use the "fisher-scoring" algorithm.} \item{entry}{entry-age in case of delayed entry. Then two causes must be given.} \item{estimator}{estimator} \item{trunkp}{gives probability of survival for delayed entry, and related to entry-ages given above.} \item{admin.cens}{Administrative censoring} \item{random.design}{specifies a regression design of 0/1's for the random effects.} \item{...}{extra arguments.} } \value{ returns an object of type 'random.cif'. With the following arguments: \item{theta}{estimate of parameters of model.} \item{var.theta}{variance for gamma. } \item{hess}{the derivative of the used score.} \item{score}{scores at final stage.} \item{theta.iid}{matrix of iid decomposition of parametric effects.} } \description{ Fits a random effects model describing the dependence in the cumulative incidence curves for subjects within a cluster. Given the gamma distributed random effects it is assumed that the cumulative incidence curves are indpendent, and that the marginal cumulative incidence curves are on additive form \deqn{ P(T \leq t, cause=1 | x,z) = P_1(t,x,z) = 1- exp( -x^T A(t) - t z^T \beta) } } \details{ We allow a regression structure for the indenpendent gamma distributed random effects and their variances that may depend on cluster covariates. random.design specificies the random effects for each subject within a cluster. This is a matrix of 1's and 0's with dimension n x d. With d random effects. For a cluster with two subjects, we let the random.design rows be \eqn{v_1} and \eqn{v_2}. Such that the random effects for subject 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. By construction subjects 1's random effect are Gamma distributed with mean \eqn{\lambda_1/v_1^T \lambda} and variance \eqn{\lambda_1/(v_1^T \lambda)^2}. Note that the random effect \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. The parameters \eqn{(\lambda_1,...,\lambda_d)} are related to the parameters of the model by a regression construction \eqn{pard} (d x k), that links the \eqn{d} \eqn{\lambda} parameters with the (k) underlying \eqn{\theta} parameters \deqn{ \lambda = pard \theta } } \examples{ \donttest{ ## Reduce Ex.Timings d <- simnordic.random(5000,delayed=TRUE, cordz=1.0,cormz=2,lam0=0.3,country=TRUE) times <- seq(50,90,by=10) addm<-comp.risk(Event(time,cause)~-1+factor(country)+cluster(id),data=d, times=times,cause=1,max.clust=NULL) ### making group indidcator mm <- model.matrix(~-1+factor(zyg),d) out1m<-random.cif(addm,data=d,cause1=1,cause2=1,theta=1, theta.des=mm,same.cens=TRUE) summary(out1m) ## this model can also be formulated as a random effects model ## but with different parameters out2m<-Grandom.cif(addm,data=d,cause1=1,cause2=1, theta=c(0.5,1),step=1.0, random.design=mm,same.cens=TRUE) summary(out2m) 1/out2m$theta out1m$theta #################################################################### ################### ACE modelling of twin data ##################### #################################################################### ### assume that zygbin gives the zygosity of mono and dizygotic twins ### 0 for mono and 1 for dizygotic twins. We now formulate and AC model zygbin <- d$zyg=="DZ" n <- nrow(d) ### random effects for each cluster des.rv <- cbind(mm,(zygbin==1)*rep(c(1,0)),(zygbin==1)*rep(c(0,1)),1) ### design making parameters half the variance for dizygotic components pardes <- rbind(c(1,0), c(0.5,0),c(0.5,0), c(0.5,0), c(0,1)) outacem <-Grandom.cif(addm,data=d,cause1=1,cause2=1, same.cens=TRUE,theta=c(0.35,0.15), step=1.0,theta.des=pardes,random.design=des.rv) summary(outacem) } } \references{ A Semiparametric Random Effects Model for Multivariate Competing Risks Data, Scheike, Zhang, Sun, Jensen (2010), Biometrika. Cross odds ratio Modelling of dependence for Multivariate Competing Risks Data, Scheike and Sun (2013), Biostatitistics. Scheike, Holst, Hjelmborg (2014), LIDA, Estimating heritability for cause specific hazards based on twin data } \author{ Thomas Scheike } \keyword{survival} mets/man/biprobit.Rd0000644000176200001440000001051313623061405014076 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/biprobit.R \name{biprobit} \alias{biprobit} \alias{biprobit.vector} \alias{biprobit.time} \title{Bivariate Probit model} \usage{ biprobit(x, data, id, rho = ~1, num = NULL, strata = NULL, eqmarg = TRUE, indep = FALSE, weights = NULL, biweight, samecens = TRUE, randomeffect = FALSE, vcov = "robust", pairs.only = FALSE, allmarg = samecens & !is.null(weights), control = list(trace = 0), messages = 1, constrain = NULL, table = pairs.only, p = NULL, ...) } \arguments{ \item{x}{formula (or vector)} \item{data}{data.frame} \item{id}{The name of the column in the dataset containing the cluster id-variable.} \item{rho}{Formula specifying the regression model for the dependence parameter} \item{num}{Optional name of order variable} \item{strata}{Strata} \item{eqmarg}{If TRUE same marginals are assumed (exchangeable)} \item{indep}{Independence} \item{weights}{Weights} \item{biweight}{Function defining the bivariate weight in each cluster} \item{samecens}{Same censoring} \item{randomeffect}{If TRUE a random effect model is used (otherwise correlation parameter is estimated allowing for both negative and positive dependence)} \item{vcov}{Type of standard errors to be calculated} \item{pairs.only}{Include complete pairs only?} \item{allmarg}{Should all marginal terms be included} \item{control}{Control argument parsed on to the optimization routine. Starting values may be parsed as '\code{start}'.} \item{messages}{Control amount of messages shown} \item{constrain}{Vector of parameter constraints (NA where free). Use this to set an offset.} \item{table}{Type of estimation procedure} \item{p}{Parameter vector p in which to evaluate log-Likelihood and score function} \item{...}{Optional arguments} } \description{ Bivariate Probit model } \examples{ data(prt) prt0 <- subset(prt,country=="Denmark") a <- biprobit(cancer~1+zyg, ~1+zyg, data=prt0, id="id") b <- biprobit(cancer~1+zyg, ~1+zyg, data=prt0, id="id",pairs.only=TRUE) predict(b,newdata=lava::Expand(prt,zyg=c("MZ"))) predict(b,newdata=lava::Expand(prt,zyg=c("MZ","DZ"))) \donttest{ ## Reduce Ex.Timings library(lava) m <- lvm(c(y1,y2)~x) covariance(m,y1~y2) <- "r" constrain(m,r~x+a+b) <- function(x) tanh(x[2]+x[3]*x[1]) distribution(m,~x) <- uniform.lvm(a=-1,b=1) ordinal(m) <- ~y1+y2 d <- sim(m,1000,p=c(a=0,b=-1)); d <- d[order(d$x),] dd <- fast.reshape(d) a <- biprobit(y~1+x,rho=~1+x,data=dd,id="id") summary(a, mean.contrast=c(1,.5), cor.contrast=c(1,.5)) with(predict(a,data.frame(x=seq(-1,1,by=.1))), plot(p00~x,type="l")) pp <- predict(a,data.frame(x=seq(-1,1,by=.1)),which=c(1)) plot(pp[,1]~pp$x, type="l", xlab="x", ylab="Concordance", lwd=2, xaxs="i") confband(pp$x,pp[,2],pp[,3],polygon=TRUE,lty=0,col=Col(1)) pp <- predict(a,data.frame(x=seq(-1,1,by=.1)),which=c(9)) ## rho plot(pp[,1]~pp$x, type="l", xlab="x", ylab="Correlation", lwd=2, xaxs="i") confband(pp$x,pp[,2],pp[,3],polygon=TRUE,lty=0,col=Col(1)) with(pp, lines(x,tanh(-x),lwd=2,lty=2)) xp <- seq(-1,1,length.out=6); delta <- mean(diff(xp)) a2 <- biprobit(y~1+x,rho=~1+I(cut(x,breaks=xp)),data=dd,id="id") pp2 <- predict(a2,data.frame(x=xp[-1]-delta/2),which=c(9)) ## rho confband(pp2$x,pp2[,2],pp2[,3],center=pp2[,1]) } ## Time \dontrun{ a <- biprobit.time(cancer~1, rho=~1+zyg, id="id", data=prt, eqmarg=TRUE, cens.formula=Surv(time,status==0)~1, breaks=seq(75,100,by=3),fix.censweights=TRUE) a <- biprobit.time2(cancer~1+zyg, rho=~1+zyg, id="id", data=prt0, eqmarg=TRUE, cens.formula=Surv(time,status==0)~zyg, breaks=100) a1 <- biprobit.time2(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="MZ"), eqmarg=TRUE, cens.formula=Surv(time,status==0)~1, breaks=100,pairs.only=TRUE) a2 <- biprobit.time2(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="DZ"), eqmarg=TRUE, cens.formula=Surv(time,status==0)~1, breaks=100,pairs.only=TRUE) prt0$trunc <- prt0$time*runif(nrow(prt0))*rbinom(nrow(prt0),1,0.5) a3 <- biprobit.time(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="DZ"), eqmarg=TRUE, cens.formula=Surv(trunc,time,status==0)~1, breaks=100,pairs.only=TRUE) plot(a,which=3,ylim=c(0,0.1)) } } mets/man/aalenfrailty.Rd0000644000176200001440000000312413623061405014737 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aalenfrailty.R \name{aalenfrailty} \alias{aalenfrailty} \title{Aalen frailty model} \usage{ aalenfrailty(time, status, X, id, theta, B = NULL, ...) } \arguments{ \item{time}{Time variable} \item{status}{Status variable (0,1)} \item{X}{Covariate design matrix} \item{id}{cluster variable} \item{theta}{list of thetas (returns score evaluated here), or starting point for optimization (defaults to magic number 0.1)} \item{B}{(optional) Cumulative coefficients (update theta by fixing B)} \item{...}{Additional arguments to lower level functions} } \value{ Parameter estimates } \description{ Additive hazards model with (gamma) frailty } \details{ Aalen frailty model } \examples{ library("timereg") dd <- simAalenFrailty(5000) f <- ~1##+x X <- model.matrix(f,dd) ## design matrix for non-parametric terms system.time(out<-aalen(update(f,Surv(time,status)~.),dd,n.sim=0,robust=0)) dix <- which(dd$status==1) t1 <- system.time(bb <- .Call("Bhat",as.integer(dd$status), X,0.2,as.integer(dd$id),NULL,NULL, PACKAGE="mets")) spec <- 1 ##plot(out,spec=spec) ## plot(dd$time[dix],bb$B2[,spec],col="red",type="s", ## ylim=c(0,max(dd$time)*c(beta0,beta)[spec])) ## abline(a=0,b=c(beta0,beta)[spec]) ##' \dontrun{ thetas <- seq(0.1,2,length.out=10) Us <- unlist(aalenfrailty(dd$time,dd$status,X,dd$id,as.list(thetas))) ##plot(thetas,Us,type="l",ylim=c(-.5,1)); abline(h=0,lty=2); abline(v=theta,lty=2) op <- aalenfrailty(dd$time,dd$status,X,dd$id) op } } \author{ Klaus K. Holst } mets/man/dprint.Rd0000644000176200001440000000221213623061405013561 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dprint.R \name{dprint} \alias{dprint} \alias{dlist} \alias{dhead} \alias{dtail} \title{list, head, print, tail} \usage{ dprint(data, y = NULL, n = 0, ..., x = NULL) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{n}{Index of observations to print (default c(1:nfirst, n-nlast:nlast)} \item{...}{Optional additional arguments (nfirst,nlast, and print options)} \item{x}{possible group variable} } \description{ listing for data frames } \examples{ n <- 20 m <- lava::lvm(letters) d <- lava::sim(m,n) dlist(d,~a+b+c) dlist(d,~a+b+c|a<0 & b>0) ## listing all : dlist(d,~a+b+c|a<0 & b>0,n=0) dlist(d,a+b+c~I(d>0)|a<0 & b>0) dlist(d,.~I(d>0)|a<0 & b>0) dlist(d,~a+b+c|a<0 & b>0, nlast=0) dlist(d,~a+b+c|a<0 & b>0, nfirst=3, nlast=3) dlist(d,~a+b+c|a<0 & b>0, 1:5) dlist(d,~a+b+c|a<0 & b>0, -(5:1)) dlist(d,~a+b+c|a<0 & b>0, list(1:5,50:55,-(5:1))) dprint(d,a+b+c ~ I(d>0) |a<0 & b>0, list(1:5,50:55,-(5:1))) } \author{ Klaus K. Holst and Thomas Scheike } mets/man/dtable.Rd0000644000176200001440000000411713623061405013522 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dtable.R \name{dtable} \alias{dtable} \alias{dtab} \title{tables for data frames} \usage{ dtable(data, y = NULL, x = NULL, ..., level = -1, response = NULL, flat = TRUE, total = FALSE, prop = FALSE, summary = NULL) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{name of variable, or fomula, or names of variables on data frame.} \item{...}{Optional additional arguments} \item{level}{1 for all marginal tables, 2 for all 2 by 2 tables, and null for the full table, possible versus group variable} \item{response}{For level=2, only produce tables with columns given by 'response' (index)} \item{flat}{produce flat tables} \item{total}{add total counts/proportions} \item{prop}{Proportions instead of counts (vector of margins)} \item{summary}{summary function} } \description{ tables for data frames } \examples{ data("sTRACE",package="timereg") dtable(sTRACE,~status) dtable(sTRACE,~status+vf) dtable(sTRACE,~status+vf,level=1) dtable(sTRACE,~status+vf,~chf+diabetes) dtable(sTRACE,c("*f*","status"),~diabetes) dtable(sTRACE,c("*f*","status"),~diabetes, level=2) dtable(sTRACE,c("*f*","status"),level=1) dtable(sTRACE,~"*f*"+status,level=1) dtable(sTRACE,~"*f*"+status+I(wmi>1.4)|age>60,level=2) dtable(sTRACE,"*f*"+status~I(wmi>0.5)|age>60,level=1) dtable(sTRACE,status~dcut(age)) dtable(sTRACE,~status+vf+sex|age>60) dtable(sTRACE,status+vf+sex~+1|age>60, level=2) dtable(sTRACE,.~status+vf+sex|age>60,level=1) dtable(sTRACE,status+vf+sex~diabetes|age>60) dtable(sTRACE,status+vf+sex~diabetes|age>60, flat=FALSE) dtable(sTRACE,status+vf+sex~diabetes|age>60, level=1) dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2) dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=1, total=TRUE) dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=2, total=TRUE) dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=1:2, summary=summary) } \author{ Klaus K. Holst and Thomas Scheike } mets/man/divide.conquer.timereg.Rd0000644000176200001440000000200413623061405016632 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/divide.conquer.R \name{divide.conquer.timereg} \alias{divide.conquer.timereg} \title{Split a data set and run function from timereg and aggregate} \usage{ divide.conquer.timereg(func = NULL, data, size, ...) } \arguments{ \item{func}{called function} \item{data}{data-frame} \item{size}{size of splits} \item{...}{Additional arguments to lower level functions} } \description{ Split a data set and run function of cox-aalen type and aggregate results } \examples{ library(timereg) data(TRACE) a <- divide.conquer.timereg(prop.odds,TRACE, formula=Event(time,status==9)~chf+vf+age,n.sim=0,size=200) coef(a) a2 <- divide.conquer.timereg(prop.odds,TRACE, formula=Event(time,status==9)~chf+vf+age,n.sim=0,size=500) coef(a2) if (interactive()) { par(mfrow=c(1,1)) plot(a,xlim=c(0,8),ylim=c(0,0.01)) par(new=TRUE) plot(a2,xlim=c(0,8),ylim=c(0,0.01)) } } \author{ Thomas Scheike, Klaus K. Holst } mets/man/simClaytonOakesWei.Rd0000644000176200001440000000151213623061405016035 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sim.clayton.oakes.R \name{simClaytonOakesWei} \alias{simClaytonOakesWei} \title{Simulate from the Clayton-Oakes frailty model} \usage{ simClaytonOakesWei(K, n, eta, beta, stoptime, weiscale = 1, weishape = 2, left = 0, pairleft = 0) } \arguments{ \item{K}{Number of clusters} \item{n}{Number of observations in each cluster} \item{eta}{1/variance} \item{beta}{Effect (log hazard ratio) of covariate} \item{stoptime}{Stopping time} \item{weiscale}{weibull scale parameter} \item{weishape}{weibull shape parameter} \item{left}{Left truncation} \item{pairleft}{pairwise (1) left truncation or individual (0)} } \description{ Simulate observations from the Clayton-Oakes copula model with Weibull type baseline and Cox marginals. } \author{ Klaus K. Holst } mets/man/LinSpline.Rd0000644000176200001440000000074313623061405014165 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dutils.R \name{LinSpline} \alias{LinSpline} \title{Simple linear spline} \usage{ LinSpline(x, knots, num = TRUE, name = "Spline") } \arguments{ \item{x}{variable to make into spline} \item{knots}{cut points} \item{num}{to give names x1 x2 and so forth} \item{name}{name of spline expansion name.1 name.2 and so forth} } \description{ Simple linear spline } \author{ Thomas Scheike } \keyword{survival} mets/man/mlogit.Rd0000644000176200001440000000262613623061405013565 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mutinomialreg.R \name{mlogit} \alias{mlogit} \title{Multinomial regression based on phreg regression} \usage{ mlogit(formula, data, offset = NULL, weights = NULL, ...) } \arguments{ \item{formula}{formula with outcome (see \code{coxph})} \item{data}{data frame} \item{offset}{offsets for partial likelihood} \item{weights}{for score equations} \item{...}{Additional arguments to lower level funtions} } \description{ Fits multinomial regression model \deqn{ P_i = \frac{ \exp( X^\beta_i ) }{ \sum_{j=1}^K \exp( X^\beta_j ) }} for \deqn{i=1,..,K} where \deqn{\beta_1 = 0}, such that \deqn{\sum_j P_j = 1} using phreg function. Thefore the ratio \deqn{\frac{P_i}{P_1} = \exp( X^\beta_i )} } \details{ Coefficients give log-Relative-Risk relative to baseline group (first level of factor, so that it can reset by relevel command). Standard errors computed based on sandwhich form \deqn{ DU^-1 \sum U_i^2 DU^-1}. Can also get influence functions (possibly robust) via iid() function, response should be a factor. } \examples{ data(bmt) dfactor(bmt) <- cause1f~cause drelevel(bmt,ref=3) <- cause3f~cause dlevels(bmt) mreg <- mlogit(cause1f~tcell+platelet,bmt) summary(mreg) mreg3 <- mlogit(cause3f~tcell+platelet,bmt) summary(mreg3) ## inverse information standard errors estimate(coef=mreg3$coef,vcov=mreg3$II) } \author{ Thomas Scheike } mets/man/base44cumhaz.Rd0000644000176200001440000000060013623061405014552 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{base44cumhaz} \alias{base44cumhaz} \title{rate of Occlusion/Thrombosis complication for catheter of HPN patients of Copenhagen} \source{ Estimated data } \description{ rate of Occlusion/Thrombosis complication for catheter of HPN patients of Copenhagen } \keyword{data} mets/man/drcumhaz.Rd0000644000176200001440000000047613623061405014110 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{drcumhaz} \alias{drcumhaz} \title{Rate for leaving HPN program for patients of Copenhagen} \source{ Estimated data } \description{ Rate for leaving HPN program for patients of Copenhagen } \keyword{data} mets/man/pmvn.Rd0000644000176200001440000000137013623061405013245 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pmvn.R \name{pmvn} \alias{pmvn} \alias{pbvn} \alias{loglikMVN} \alias{scoreMVN} \alias{dmvn} \alias{rmvn} \title{Multivariate normal distribution function} \usage{ pmvn(lower, upper, mu, sigma, cor = FALSE) } \arguments{ \item{lower}{lower limits} \item{upper}{upper limits} \item{mu}{mean vector} \item{sigma}{variance matrix or vector of correlation coefficients} \item{cor}{if TRUE sigma is treated as standardized (correlation matrix)} } \description{ Multivariate normal distribution function } \examples{ lower <- rbind(c(0,-Inf),c(-Inf,0)) upper <- rbind(c(Inf,0),c(0,Inf)) mu <- rbind(c(1,1),c(-1,1)) sigma <- diag(2)+1 pmvn(lower=lower,upper=upper,mu=mu,sigma=sigma) } mets/man/lifecourse.Rd0000644000176200001440000000372713623061405014435 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lifecourse.R \name{lifecourse} \alias{lifecourse} \title{Life-course plot} \usage{ lifecourse(formula, data, id = "id", group = NULL, type = "l", lty = 1, col = 1:10, alpha = 0.3, lwd = 1, recurrent.col = NULL, recurrent.lty = NULL, legend = NULL, pchlegend = NULL, by = NULL, status.legend = NULL, place.sl = "bottomright", xlab = "Time", ylab = "", add = FALSE, ...) } \arguments{ \item{formula}{Formula (Event(start,slut,status) ~ ...)} \item{data}{data.frame} \item{id}{Id variable} \item{group}{group variable} \item{type}{Type (line 'l', stair 's', ...)} \item{lty}{Line type} \item{col}{Colour} \item{alpha}{transparency (0-1)} \item{lwd}{Line width} \item{recurrent.col}{col of recurrence type} \item{recurrent.lty}{lty's of of recurrence type} \item{legend}{position of optional id legend} \item{pchlegend}{point type legends} \item{by}{make separate plot for each level in 'by' (formula, name of column, or vector)} \item{status.legend}{Status legend} \item{place.sl}{Placement of status legend} \item{xlab}{Label of X-axis} \item{ylab}{Label of Y-axis} \item{add}{Add to existing device} \item{...}{Additional arguments to lower level arguments} } \description{ Life-course plot for event life data with recurrent events } \examples{ data = data.frame(id=c(1,1,1,2,2),start=c(0,1,2,3,4),slut=c(1,2,4,4,7), type=c(1,2,3,2,3),status=c(0,1,2,1,2),group=c(1,1,1,2,2)) ll = lifecourse(Event(start,slut,status)~id,data,id="id") ll = lifecourse(Event(start,slut,status)~id,data,id="id",recurrent.col="type") ll = lifecourse(Event(start,slut,status)~id,data,id="id",group=~group,col=1:2) op <- par(mfrow=c(1,2)) ll = lifecourse(Event(start,slut,status)~id,data,id="id",by=~group) par(op) legends=c("censored","pregnant","married") ll = lifecourse(Event(start,slut,status)~id,data,id="id",group=~group,col=1:2,status.legend=legends) } \author{ Thomas Scheike, Klaus K. Holst } mets/man/ttpd.Rd0000644000176200001440000000044013623061405013235 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{ttpd} \alias{ttpd} \title{ttpd discrete survival data on interval form} \source{ Simulated data } \description{ ttpd discrete survival data on interval form } \keyword{data} mets/man/twinstut.Rd0000644000176200001440000000065413623061405014172 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{twinstut} \alias{twinstut} \title{Stutter data set} \format{tvparnr: twin-pair id zyg: zygosity, MZ:=mz, DZ(same sex):=dz, DZ(opposite sex):=os stutter: stutter status (yes/no) age: age nr: number within twin-pair} \description{ Based on nation-wide questionnaire answers from 33,317 Danish twins } \keyword{data} mets/man/simRecurrentII.Rd0000644000176200001440000000545313623061405015177 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{simRecurrentII} \alias{simRecurrentII} \title{Simulation of recurrent events data based on cumulative hazards II} \usage{ simRecurrentII(n, cumhaz, cumhaz2, death.cumhaz = NULL, gap.time = FALSE, max.recurrent = 100, dhaz = NULL, haz2 = NULL, dependence = 0, var.z = 0.22, cor.mat = NULL, cens = NULL, ...) } \arguments{ \item{n}{number of id's} \item{cumhaz}{cumulative hazard of recurrent events} \item{cumhaz2}{cumulative hazard of recurrent events of type 2} \item{death.cumhaz}{cumulative hazard of death} \item{gap.time}{if true simulates gap-times with specified cumulative hazard} \item{max.recurrent}{limits number recurrent events to 100} \item{dhaz}{rate for death hazard if it is extended to time-range of first event} \item{haz2}{rate of second cause if it is extended to time-range of first event} \item{dependence}{0:independence; 1:all share same random effect with variance var.z; 2:random effect exp(normal) with correlation structure from cor.mat; 3:additive gamma distributed random effects, z1= (z11+ z12)/2 such that mean is 1 , z2= (z11^cor.mat(1,2)+ z13)/2, z3= (z12^(cor.mat(2,3)+z13^cor.mat(1,3))/2, with z11 z12 z13 are gamma with mean and variance 1 , first random effect is z1 and for N1 second random effect is z2 and for N2 third random effect is for death} \item{var.z}{variance of random effects} \item{cor.mat}{correlation matrix for var.z variance of random effects} \item{cens}{rate of censoring exponential distribution} \item{...}{Additional arguments to lower level funtions} } \description{ Simulation of recurrent events data based on cumulative hazards } \details{ Must give hazard of death and two recurrent events. Possible with two event types and their dependence can be specified but the two recurrent events need to share random effect. Based on drawing the from cumhaz and cumhaz2 and taking the first event rather the cumulative and then distributing it out. Key advantage of this is that there is more flexibility wrt random effects } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) ###################################################################### ### simulating simple model that mimicks data ### now with two event types and second type has same rate as death rate ###################################################################### rr <- simRecurrentII(1000,base1,base4,death.cumhaz=dr) dtable(rr,~death+status) par(mfrow=c(2,2)) showfitsim(causes=2,rr,dr,base1,base4) } \author{ Thomas Scheike } mets/man/casewise.Rd0000644000176200001440000000246013623061405014071 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/casewise.R \name{casewise} \alias{casewise} \title{Estimates the casewise concordance based on Concordance and marginal estimate using prodlim but no testing} \usage{ casewise(conc, marg, cause.marg) } \arguments{ \item{conc}{Concordance} \item{marg}{Marginal estimate} \item{cause.marg}{specififes which cause that should be used for marginal cif based on prodlim} } \description{ .. content for description (no empty lines) .. } \examples{ \donttest{ ## Reduce Ex.Timings library(prodlim) data(prt); ### marginal cumulative incidence of prostate cancer##' outm <- prodlim(Hist(time,status)~+1,data=prt) times <- 60:100 cifmz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="MZ")) ## cause is 2 (second cause) cifdz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="DZ")) ### concordance for MZ and DZ twins cc <- bicomprisk(Event(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),prodlim=TRUE) cdz <- cc$model$"DZ" cmz <- cc$model$"MZ" cdz <- casewise(cdz,outm,cause.marg=2) cmz <- casewise(cmz,outm,cause.marg=2) plot(cmz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE,col=c(3,2,1)) par(new=TRUE) plot(cdz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE) summary(cdz) summary(cmz) } } \author{ Thomas Scheike } mets/man/cif.Rd0000644000176200001440000000177113623061405013033 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreg.R \name{cif} \alias{cif} \title{Cumulative incidence with robust standard errors} \usage{ cif(formula, data = data, cause = 1, cens.code = 0, ...) } \arguments{ \item{formula}{formula with 'Surv' outcome (see \code{coxph})} \item{data}{data frame} \item{cause}{NULL looks at all, otherwise specify which cause to consider} \item{cens.code}{censoring code "0" is default} \item{...}{Additional arguments to lower level funtions} } \description{ Cumulative incidence with robust standard errors } \examples{ data(TRACE) TRACE$cluster <- sample(1:100,1878,replace=TRUE) out1 <- cif(Event(time,status)~+1,data=TRACE,cause=9) out2 <- cif(Event(time,status)~+1+cluster(cluster),data=TRACE,cause=9) out1 <- cif(Event(time,status)~strata(vf,chf),data=TRACE,cause=9) out2 <- cif(Event(time,status)~strata(vf,chf)+cluster(cluster),data=TRACE,cause=9) par(mfrow=c(1,2)) bplot(out1,se=TRUE) bplot(out2,se=TRUE) } \author{ Thomas Scheike } mets/man/interval.logitsurv.discrete.Rd0000644000176200001440000000453113623061405017751 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/discrete-survival-haplo.R \name{interval.logitsurv.discrete} \alias{interval.logitsurv.discrete} \alias{Interval} \alias{dInterval} \alias{simlogitSurvd} \alias{predictlogitSurvd} \title{## uses HaploSurvival package of github install via devtools ## devtools::install_github("scheike/HaploSurvival") ## this is only used for simulations ## out <- simHaplo(1,100,tcoef,hapfreqs) Discrete time to event interval censored data} \usage{ interval.logitsurv.discrete(formula, data, beta = NULL, no.opt = FALSE, method = "NR", stderr = TRUE, weights = NULL, offsets = NULL, exp.link = 1, increment = 1, ...) } \arguments{ \item{formula}{formula} \item{data}{data} \item{beta}{starting values} \item{no.opt}{optimization TRUE/FALSE} \item{method}{NR, nlm} \item{stderr}{to return only estimate} \item{weights}{weights following id for GLM} \item{offsets}{following id for GLM} \item{exp.link}{parametrize increments exp(alpha) > 0} \item{increment}{using increments dG(t)=exp(alpha) as parameters} \item{...}{Additional arguments to lower level funtions lava::NR optimizer or nlm} } \description{ \deqn{ logit(P(T >t | x)) = log(G(t)) + x \beta } \deqn{ P(T >t | x) = \frac{1}{1 + G(t) exp( x \beta) } } } \details{ Input are intervals given by ]t_l,t_r] where t_r can be infinity for right-censored intervals When truly discrete ]0,1] will be an observation at 1, and ]j,j+1] will be an observation at j+1 Likelihood is maximized: \deqn{ \prod P(T_i >t_{il} | x) - P(T_I> t_{ir}| x) } } \examples{ data(ttpd) out <- interval.logitsurv.discrete(Interval(entry,time2)~X1+X2+X3+X4,ttpd) summary(out) n <- 100 Z <- matrix(rbinom(n*4,1,0.5),n,4) outsim <- simlogitSurvd(out$coef,Z) outsim <- transform(outsim,left=time,right=time+1) outsim <- dtransform(outsim,right=Inf,status==0) outss <- interval.logitsurv.discrete(Interval(left,right)~+X1+X2+X3+X4,outsim) Z <- matrix(0,5,4) Z[2:5,1:4] <- diag(4) pred <- predictlogitSurvd(out,se=FALSE) plotSurvd(pred) ## simulations n <- 100 Z <- matrix(rbinom(n*4,1,0.5),n,4) outsim <- simlogitSurvd(out$coef,Z) ### outsim <- transform(outsim,left=time,right=time+1) outsim <- dtransform(outsim,right=Inf,status==0) out$coef outss <- interval.logitsurv.discrete(Interval(left,right)~+X1+X2+X3+X4,outsim) summary(outss) } \author{ Thomas Scheike } mets/man/count.history.Rd0000644000176200001440000000255713623061405015125 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{count.history} \alias{count.history} \title{Counts the number of previous events of two types for recurrent events processes} \usage{ count.history(data, status = "status", id = "id", types = 1:2, names.count = "Count", lag = TRUE) } \arguments{ \item{data}{data-frame} \item{status}{name of status} \item{id}{id} \item{types}{types of the events (code) related to status} \item{names.count}{name of Counts, for example Count1 Count2 when types=c(1,2)} \item{lag}{if true counts previously observed, and if lag=FALSE counts up to know} } \description{ Counts the number of previous events of two types for recurrent events processes } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz ###################################################################### ### simulating simple model that mimicks data ### now with two event types and second type has same rate as death rate ###################################################################### rr <- simRecurrentII(1000,base1,base4,death.cumhaz=dr) rr <- count.history(rr) dtable(rr,~"Count*"+status,level=1) } \author{ Thomas Scheike } mets/man/base4cumhaz.Rd0000644000176200001440000000060613623061405014474 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{base4cumhaz} \alias{base4cumhaz} \title{rate of Mechanical (hole/defect) complication for catheter of HPN patients of Copenhagen} \source{ Estimated data } \description{ rate of Mechanical (hole/defect) complication for catheter of HPN patients of Copenhagen } \keyword{data} mets/man/Dbvn.Rd0000644000176200001440000000143613623061405013161 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Dbvn.R \name{Dbvn} \alias{Dbvn} \title{Derivatives of the bivariate normal cumulative distribution function} \usage{ Dbvn(p,design=function(p,...) { return(list(mu=cbind(p[1],p[1]), dmu=cbind(1,1), S=matrix(c(p[2],p[3],p[3],p[4]),ncol=2), dS=rbind(c(1,0,0,0),c(0,1,1,0),c(0,0,0,1))) )}, Y=cbind(0,0)) } \arguments{ \item{p}{Parameter vector} \item{design}{Design function with defines mean, derivative of mean, variance, and derivative of variance with respect to the parameter p} \item{Y}{column vector where the CDF is evaluated} } \description{ Derivatives of the bivariate normal cumulative distribution function } \author{ Klaus K. Holst } mets/man/gof.phreg.Rd0000644000176200001440000000216013623061405014142 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gof-phreg.R \name{gof.phreg} \alias{gof.phreg} \title{GOF for Cox PH regression} \usage{ \method{gof}{phreg}(object, n.sim = 1000, silent = 1, robust = NULL, ...) } \arguments{ \item{object}{is phreg object} \item{n.sim}{number of simulations for score processes} \item{silent}{to show timing estimate will be produced for longer jobs} \item{robust}{to control wether robust dM_i(t) or dN_i are used for simulations} \item{...}{Additional arguments to lower level funtions} } \description{ Cumulative score process residuals for Cox PH regression p-values based on Lin, Wei, Ying resampling. } \examples{ data(TRACE) m1 <- phreg(Surv(time,status==9)~vf+chf+diabetes,data=TRACE) gg <- gof(m1) par(mfrow=c(1,3)) plot(gg) m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+diabetes,data=TRACE) ## to get Martingale ~ dN based simulations gg <- gof(m1) ## to get Martingale robust simulations, specify cluster in call m1 <- phreg(Surv(time,status==9)~chf+diabetes+cluster(id),data=TRACE) gg <- gof(m1) } \author{ Thomas Scheike and Klaus K. Holst } mets/man/easy.survival.twostage.Rd0000644000176200001440000000673313623061405016744 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twostage.R \name{easy.survival.twostage} \alias{easy.survival.twostage} \title{Wrapper for easy fitting of Clayton-Oakes or bivariate Plackett models for bivariate survival data} \usage{ easy.survival.twostage(margsurv = NULL, data = sys.parent(), score.method = "nlminb", status = "status", time = "time", entry = NULL, id = "id", Nit = 60, detail = 0, silent = 1, weights = NULL, control = list(), theta = NULL, theta.formula = NULL, desnames = NULL, deshelp = 0, var.link = 1, iid = 1, step = 0.5, model = "plackett", marginal.surv = NULL, strata = NULL, se.clusters = NULL) } \arguments{ \item{margsurv}{model} \item{data}{data frame} \item{score.method}{Scoring method} \item{status}{Status at exit time} \item{time}{Exit time} \item{entry}{Entry time} \item{id}{name of cluster variable in data frame} \item{Nit}{Number of iterations} \item{detail}{Detail for more output for iterations} \item{silent}{Debug information} \item{weights}{Weights for log-likelihood, can be used for each type of outcome in 2x2 tables.} \item{control}{Optimization arguments} \item{theta}{Starting values for variance components} \item{theta.formula}{design for depedence, either formula or design function} \item{desnames}{names for dependence parameters} \item{deshelp}{if 1 then prints out some data sets that are used, on on which the design function operates} \item{var.link}{Link function for variance (exp link)} \item{iid}{Calculate i.i.d. decomposition} \item{step}{Step size for newton-raphson} \item{model}{plackett or clayton-oakes model} \item{marginal.surv}{vector of marginal survival probabilities} \item{strata}{strata for fitting} \item{se.clusters}{clusters for iid decomposition for roubst standard errors} } \description{ Fits two-stage model for describing depdendence in survival data using marginals that are on cox or aalen form using the twostage funcion, but call is different and easier and the data manipulation build into the function. Useful in particular for family design data. } \details{ If clusters contain more than two times, the algoritm uses a composite likelihood based on the pairwise bivariate models. The reported standard errors are based on the estimated information from the likelihood assuming that the marginals are known. } \examples{ library(mets) data("prt",package="mets") prtsam <- blocksample(prt,idvar="id",1e3,replace=FALSE) margp <- coxph(Surv(time,status==1)~factor(country),data=prtsam) fitco <- survival.twostage(margp,data=prtsam,clusters=prtsam$id) summary(fitco) des <- model.matrix(~-1+factor(zyg),data=prtsam); fitco <- survival.twostage(margp,data=prtsam,theta.des=des,clusters=prtsam$id) summary(fitco) rm(prtsam) dfam <- simSurvFam(1000) dfam <- fast.reshape(dfam,var=c("x","time","status")) desfs <- function(x,num1="num1",num2="num2") { pp <- (x[num1]=="m")*(x[num2]=="f")*1 ## mother-father pc <- (x[num1]=="m" | x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 ## mother-child cc <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 ## child-child c(pp,pc,cc) } marg <- coxph(Surv(time,status)~factor(num),data=dfam) out3 <- easy.survival.twostage(marg,data=dfam,time="time",status="status",id="id", deshelp=0, score.method="fisher.scoring",theta.formula=desfs, model="plackett", desnames=c("parent-parent","parent-child","child-cild"),iid=1) summary(out3) } \keyword{survival} \keyword{twostage} mets/man/migr.Rd0000644000176200001440000000031013623061405013214 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{migr} \alias{migr} \title{Migraine data} \description{ Migraine data } \keyword{data} mets/man/concordanceCor.Rd0000644000176200001440000000304113623061405015204 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{concordanceCor} \alias{concordanceCor} \alias{concordance.cor} \title{Concordance Computes concordance and casewise concordance} \usage{ concordanceCor(object, cif1, cif2 = NULL, messages = TRUE, model = NULL, coefs = NULL, ...) } \arguments{ \item{object}{Output from the cor.cif, rr.cif or or.cif function} \item{cif1}{Marginal cumulative incidence} \item{cif2}{Marginal cumulative incidence of other cause (cause2) if it is different from cause1} \item{messages}{To print messages} \item{model}{Specfifies wich model that is considered if object not given.} \item{coefs}{Specfifies dependence parameters if object is not given.} \item{...}{Extra arguments, not used.} } \description{ Concordance for Twins } \details{ The concordance is the probability that both twins have experienced the event of interest and is defined as \deqn{ cor(t) = P(T_1 \leq t, \epsilon_1 =1 , T_2 \leq t, \epsilon_2=1) } Similarly, the casewise concordance is \deqn{ casewise(t) = \frac{cor(t)}{P(T_1 \leq t, \epsilon_1=1) } } that is the probability that twin "2" has the event given that twins "1" has. } \references{ Estimating twin concordance for bivariate competing risks twin data Thomas H. Scheike, Klaus K. Holst and Jacob B. Hjelmborg, Statistics in Medicine 2014, 1193-1204 Estimating Twin Pair Concordance for Age of Onset. Thomas H. Scheike, Jacob V B Hjelmborg, Klaus K. Holst, 2015 in Behavior genetics DOI:10.1007/s10519-015-9729-3 } \author{ Thomas Scheike } mets/man/drelevel.Rd0000644000176200001440000000522413623061405014071 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dutils.R \name{drelevel} \alias{drelevel} \alias{dlevels} \alias{dlevel} \alias{dlev} \alias{drelev} \alias{dlev<-} \alias{dlevel<-} \alias{drelev<-} \alias{drelevel<-} \alias{dfactor} \alias{dfactor<-} \alias{dnumeric} \alias{dnumeric<-} \title{relev levels for data frames} \usage{ drelevel(data, y = NULL, x = NULL, ref = NULL, newlevels = NULL, regex = mets.options()$regex, sep = NULL, overwrite = FALSE, ...) } \arguments{ \item{data}{if x is formula or names for data frame then data frame is needed.} \item{y}{name of variable, or fomula, or names of variables on data frame.} \item{x}{name of variable, or fomula, or names of variables on data frame.} \item{ref}{new reference variable} \item{newlevels}{to combine levels of factor in data frame} \item{regex}{for regular expressions.} \item{sep}{seperator for naming of cut names.} \item{overwrite}{to overwrite variable} \item{...}{Optional additional arguments} } \description{ levels shows levels for variables in data frame, relevel relevels a factor in data.frame } \examples{ data(mena) dstr(mena) dfactor(mena) <- ~twinnum dnumeric(mena) <- ~twinnum.f dstr(mena) mena2 <- drelevel(mena,"cohort",ref="(1980,1982]") mena2 <- drelevel(mena,~cohort,ref="(1980,1982]") mena2 <- drelevel(mena,cohortII~cohort,ref="(1980,1982]") dlevels(mena) dlevels(mena2) drelevel(mena,ref="(1975,1977]") <- ~cohort drelevel(mena,ref="(1980,1982]") <- ~cohort dlevels(mena,"coh*") dtable(mena,"coh*",level=1) ### level 1 of zyg as baseline for new variable drelevel(mena,ref=1) <- ~zyg drelevel(mena,ref=c("DZ","[1973,1975]")) <- ~ zyg+cohort drelevel(mena,ref=c("DZ","[1973,1975]")) <- zygdz+cohort.early~ zyg+cohort ### level 2 of zyg and cohort as baseline for new variables drelevel(mena,ref=2) <- ~ zyg+cohort dlevels(mena) ##################### combining factor levels with newlevels argument dcut(mena,labels=c("I","II","III","IV")) <- cat4~agemena dlevels(drelevel(mena,~cat4,newlevels=1:3)) dlevels(drelevel(mena,ncat4~cat4,newlevels=3:2)) drelevel(mena,newlevels=3:2) <- ncat4~cat4 dlevels(mena) dlevels(drelevel(mena,nca4~cat4,newlevels=list(c(1,4),2:3))) drelevel(mena,newlevels=list(c(1,4),2:3)) <- nca4..2 ~ cat4 dlevels(mena) drelevel(mena,newlevels=list("I-III"=c("I","II","III"),"IV"="IV")) <- nca4..3 ~ cat4 dlevels(mena) drelevel(mena,newlevels=list("I-III"=c("I","II","III"))) <- nca4..4 ~ cat4 dlevels(mena) drelevel(mena,newlevels=list(group1=c("I","II","III"))) <- nca4..5 ~ cat4 dlevels(mena) drelevel(mena,newlevels=list(g1=c("I","II","III"),g2="IV")) <- nca4..6 ~ cat4 dlevels(mena) } \author{ Klaus K. Holst and Thomas Scheike } mets/man/gofM.phreg.Rd0000644000176200001440000000364613623061405014271 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gof-phreg.R \name{gofM.phreg} \alias{gofM.phreg} \title{GOF for Cox covariates in PH regression} \usage{ gofM.phreg(formula, data, offset = NULL, weights = NULL, modelmatrix = NULL, n.sim = 1000, silent = 1, ...) } \arguments{ \item{formula}{formula for cox regression} \item{data}{data for model} \item{offset}{offset} \item{weights}{weights} \item{modelmatrix}{matrix for cumulating residuals} \item{n.sim}{number of simulations for score processes} \item{silent}{to keep it absolutely silent, otherwise timing estimate will be prduced for longer jobs.} \item{...}{Additional arguments to lower level funtions} } \description{ Cumulative residuals after model matrix for Cox PH regression p-values based on Lin, Wei, Ying resampling. } \details{ That is, computes \deqn{ U(t) = \int_0^t M^t d \hat M } and resamples its asymptotic distribution. This will show if the residuals are consistent with the model. Typically, M will be a design matrix for the continous covariates that gives for example the quartiles, and then the plot will show if for the different quartiles of the covariate the risk prediction is consistent over time (time x covariate interaction). } \examples{ library(mets) data(TRACE) set.seed(1) TRACEsam <- blocksample(TRACE,idvar="id",replace=FALSE,100) dcut(TRACEsam) <- ~. mm <- model.matrix(~-1+factor(wmicat.4),data=TRACEsam) m1 <- gofM.phreg(Surv(time,status==9)~vf+chf+wmi,data=TRACEsam,modelmatrix=mm) summary(m1) if (interactive()) { par(mfrow=c(2,2)) plot(m1) } m1 <- gofM.phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACEsam,modelmatrix=mm) summary(m1) ## cumulative sums in covariates, via design matrix mm mm <- cumContr(TRACEsam$wmi,breaks=10,equi=TRUE) m1 <- gofM.phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACEsam, modelmatrix=mm,silent=0) summary(m1) } \author{ Thomas Scheike and Klaus K. Holst } mets/man/summary.cor.Rd0000644000176200001440000000417313623061405014550 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cor.R \name{summary.cor} \alias{summary.cor} \title{Summary for dependence models for competing risks} \usage{ \method{summary}{cor}(object, marg.cif = NULL, marg.cif2 = NULL, digits = 3, ...) } \arguments{ \item{object}{object from cor.cif rr.cif or or.cif for dependence between competing risks data for two causes.} \item{marg.cif}{a number that gives the cumulative incidence in one time point for which concordance and casewise concordance are computed.} \item{marg.cif2}{the cumulative incidence for cause 2 for concordance and casewise concordance are computed. Default is that it is the same as marg.cif.} \item{digits}{digits in output.} \item{...}{Additional arguments.} } \value{ prints summary for dependence model. \item{casewise}{gives casewise concordance that is, probability of cause 2 (related to cif2) given that cause 1 (related to cif1) has occured.} \item{concordance}{gives concordance that is, probability of cause 2 (related to cif2) and cause 1 (related to cif1).} \item{cif1}{cumulative incidence for cause1.} \item{cif2}{cumulative incidence for cause1.} } \description{ Computes concordance and casewise concordance for dependence models for competing risks models of the type cor.cif, rr.cif or or.cif for the given cumulative incidences and the different dependence measures in the object. } \examples{ library("timereg") data("multcif",package="mets") # simulated data multcif$cause[multcif$cause==0] <- 2 times=seq(0.1,3,by=0.1) # to speed up computations use only these time-points add<-comp.risk(Event(time,cause)~+1+cluster(id),data=multcif, n.sim=0,times=times,cause=1) ### out1<-cor.cif(add,data=multcif,cause1=1,cause2=1,theta=log(2+1)) summary(out1) pad <- predict(add,X=1,se=0,uniform=0) summary(out1,marg.cif=pad) } \references{ Cross odds ratio Modelling of dependence for Multivariate Competing Risks Data, Scheike and Sun (2012), Biostatistics. A Semiparametric Random Effects Model for Multivariate Competing Risks Data, Scheike, Zhang, Sun, Jensen (2010), Biometrika. } \author{ Thomas Scheike } \keyword{survival} mets/man/simRecurrent.Rd0000644000176200001440000000630213623061405014747 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{simRecurrent} \alias{simRecurrent} \alias{showfitsim} \alias{simRecurrentGamma} \alias{covIntH1dM1IntH2dM2} \alias{recurrentMarginalgam} \alias{squareintHdM} \alias{addCums} \title{Simulation of recurrent events data based on cumulative hazards} \usage{ simRecurrent(n, cumhaz, death.cumhaz = NULL, cumhaz2 = NULL, gap.time = FALSE, max.recurrent = 100, dhaz = NULL, haz2 = NULL, dependence = 0, var.z = 2, cor.mat = NULL, ...) } \arguments{ \item{n}{number of id's} \item{cumhaz}{cumulative hazard of recurrent events} \item{death.cumhaz}{cumulative hazard of death} \item{cumhaz2}{cumulative hazard of recurrent events of type 2} \item{gap.time}{if true simulates gap-times with specified cumulative hazard} \item{max.recurrent}{limits number recurrent events to 100} \item{dhaz}{rate for death hazard if it is extended to time-range of first event} \item{haz2}{rate of second cause if it is extended to time-range of first event} \item{dependence}{=0 independence, =1 all share same random effect with variance var.z =2 random effect exp(normal) with correlation structure from cor.mat, first random effect is z1 and shared for a possible second cause, second random effect is for death} \item{var.z}{variance of random effects} \item{cor.mat}{correlation matrix for var.z variance of random effects} \item{...}{Additional arguments to lower level funtions} } \description{ Simulation of recurrent events data based on cumulative hazards } \details{ Must give hazard of death and recurrent events. Possible with two event types and their dependence can be specified but the two recurrent events need to have the same random effect, simRecurrentII more flexible ! } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz ###################################################################### ### simulating simple model that mimicks data ###################################################################### rr <- simRecurrent(5,base1,death.cumhaz=dr) dlist(rr,.~id,n=0) rr <- simRecurrent(1000,base1,death.cumhaz=dr) par(mfrow=c(1,3)) showfitsim(causes=1,rr,dr,base1,base1) ###################################################################### ### simulating simple model that mimicks data ### now with two event types and second type has same rate as death rate ###################################################################### rr <- simRecurrent(1000,base1,death.cumhaz=dr,cumhaz2=base4) dtable(rr,~death+status) par(mfrow=c(2,2)) showfitsim(causes=2,rr,dr,base1,base4) ###################################################################### ### simulating simple model ### random effect for all causes (Z shared for death and recurrent) ###################################################################### rr <- simRecurrent(1000,base1,death.cumhaz=dr,dependence=1,var.gamma=0.4) ### marginals do fit after input after integrating out par(mfrow=c(2,2)) showfitsim(causes=1,rr,dr,base1,base1) } \author{ Thomas Scheike } mets/man/gofG.phreg.Rd0000644000176200001440000000203613623061405014253 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gof-phreg.R \name{gofG.phreg} \alias{gofG.phreg} \title{Stratified baseline graphical GOF test for Cox covariates in PH regression} \usage{ gofG.phreg(x, sim = 0, silent = 1, lm = TRUE, ...) } \arguments{ \item{x}{phreg object} \item{sim}{to simulate som variation from cox model to put on graph} \item{silent}{to keep it absolutely silent} \item{lm}{addd line to plot, regressing the cumulatives on each other} \item{...}{Additional arguments to lower level funtions} } \description{ Looks at stratified baseline in Cox model and plots all baselines versus each other to see if lines are straight, with 50 resample versions under the assumptiosn that the stratified Cox is correct } \examples{ data(TRACE) m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACE) m2 <- phreg(Surv(time,status==9)~vf+strata(chf)+wmi,data=TRACE) par(mfrow=c(2,2)) gofG.phreg(m1) gofG.phreg(m2) bplot(m1,log="y") bplot(m2,log="y") } \author{ Thomas Scheike and Klaus K. Holst } mets/man/haplo.surv.discrete.Rd0000644000176200001440000000762413623061405016177 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/discrete-survival-haplo.R \name{haplo.surv.discrete} \alias{haplo.surv.discrete} \alias{simTTP} \alias{predictSurvd} \alias{plotSurvd} \title{Discrete time to event haplo type analysis} \usage{ haplo.surv.discrete(X = NULL, y = "y", time.name = "time", Haplos = NULL, id = "id", desnames = NULL, designfunc = NULL, beta = NULL, no.opt = FALSE, method = "NR", stderr = TRUE, designMatrix = NULL, response = NULL, idhap = NULL, design.only = FALSE, covnames = NULL, fam = binomial, weights = NULL, offsets = NULL, idhapweights = NULL, ...) } \arguments{ \item{X}{design matrix data-frame (sorted after id and time variable) with id time response and desnames} \item{y}{name of response (binary response with logistic link) from X} \item{time.name}{to sort after time for X} \item{Haplos}{(data.frame with id, haplo1, haplo2 (haplotypes (h)) and p=P(h|G)) haplotypes given as factor.} \item{id}{name of id variale from X} \item{desnames}{names for design matrix} \item{designfunc}{function that computes design given haplotypes h=(h1,h2) x(h)} \item{beta}{starting values} \item{no.opt}{optimization TRUE/FALSE} \item{method}{NR, nlm} \item{stderr}{to return only estimate} \item{designMatrix}{gives response and designMatrix directly not implemented (mush contain: p, id, idhap)} \item{response}{gives response and design directly designMatrix not implemented} \item{idhap}{name of id-hap variable to specify different haplotypes for different id} \item{design.only}{to return only design matrices for haplo-type analyses.} \item{covnames}{names of covariates to extract from object for regression} \item{fam}{family of models, now binomial default and only option} \item{weights}{weights following id for GLM} \item{offsets}{following id for GLM} \item{idhapweights}{weights following id-hap for GLM (WIP)} \item{...}{Additional arguments to lower level funtions lava::NR optimizer or nlm} } \description{ Can be used for logistic regression when time variable is "1" for all id. } \details{ Cycle-specific logistic regression of haplo-type effects with known haplo-type probabilities. Given observed genotype G and unobserved haplotypes H we here mix out over the possible haplotypes using that P(H|G) is provided. \deqn{ S(t|x,G)) = E( S(t|x,H) | G) = \sum_{h \in G} P(h|G) S(t|z,h) } so survival can be computed by mixing out over possible h given g. Survival is based on logistic regression for the discrete hazard function of the form \deqn{ logit(P(T=t| T \geq t, x,h)) = \alpha_t + x(h) \beta } where x(h) is a regression design of x and haplotypes \eqn{h=(h_1,h_2)} Likelihood is maximized and standard errors assumes that P(H|G) is known. The design over the possible haplotypes is constructed by merging X with Haplos and can be viewed by design.only=TRUE } \examples{ ## some haplotypes of interest types <- c("DCGCGCTCACG","DTCCGCTGACG","ITCAGTTGACG","ITCCGCTGAGG") ## some haplotypes frequencies for simulations data(hapfreqs) www <-which(hapfreqs$haplotype \%in\% types) hapfreqs$freq[www] baseline=hapfreqs$haplotype[9] baseline designftypes <- function(x,sm=0) {# {{{ hap1=x[1] hap2=x[2] if (sm==0) y <- 1*( (hap1==types) | (hap2==types)) if (sm==1) y <- 1*(hap1==types) + 1*(hap2==types) return(y) }# }}} tcoef=c(-1.93110204,-0.47531630,-0.04118204,-1.57872602,-0.22176426,-0.13836416, 0.88830288,0.60756224,0.39802821,0.32706859) data(hHaplos) data(haploX) haploX$time <- haploX$times Xdes <- model.matrix(~factor(time),haploX) colnames(Xdes) <- paste("X",1:ncol(Xdes),sep="") X <- dkeep(haploX,~id+y+time) X <- cbind(X,Xdes) Haplos <- dkeep(ghaplos,~id+"haplo*"+p) desnames=paste("X",1:6,sep="") # six X's related to 6 cycles out <- haplo.surv.discrete(X=X,y="y",time.name="time", Haplos=Haplos,desnames=desnames,designfunc=designftypes) names(out$coef) <- c(desnames,types) out$coef summary(out) } \author{ Thomas Scheike } mets/man/simMultistate.Rd0000644000176200001440000000563313623061405015137 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{simMultistate} \alias{simMultistate} \alias{extendCums} \title{Simulation of illness-death model} \usage{ simMultistate(n, cumhaz, cumhaz2, death.cumhaz, death.cumhaz2, rr = NULL, rr2 = NULL, rd = NULL, rd2 = NULL, gap.time = FALSE, max.recurrent = 100, dependence = 0, var.z = 0.22, cor.mat = NULL, cens = NULL, ...) } \arguments{ \item{n}{number of id's} \item{cumhaz}{cumulative hazard of recurrent events} \item{cumhaz2}{cumulative hazard of recurrent events of type 2} \item{death.cumhaz}{cumulative hazard of death from state 1} \item{death.cumhaz2}{cumulative hazard of death from state 2} \item{rr}{relative risk adjustment for cumhaz} \item{rr2}{relative risk adjustment for cumhaz2} \item{rd}{relative risk adjustment for death.cumhaz} \item{rd2}{relative risk adjustment for death.cumhaz2} \item{gap.time}{if true simulates gap-times with specified cumulative hazard} \item{max.recurrent}{limits number recurrent events to 100} \item{dependence}{0:independence; 1:all share same random effect with variance var.z; 2:random effect exp(normal) with correlation structure from cor.mat; 3:additive gamma distributed random effects, z1= (z11+ z12)/2 such that mean is 1 , z2= (z11^cor.mat(1,2)+ z13)/2, z3= (z12^(cor.mat(2,3)+z13^cor.mat(1,3))/2, with z11 z12 z13 are gamma with mean and variance 1 , first random effect is z1 and for N1 second random effect is z2 and for N2 third random effect is for death} \item{var.z}{variance of random effects} \item{cor.mat}{correlation matrix for var.z variance of random effects} \item{cens}{rate of censoring exponential distribution} \item{...}{Additional arguments to lower level funtions} } \description{ Simulation of illness-death model } \details{ simMultistate with same death intensity from states 1 and 2 simMultistateII with different death intensities from states 1 and 2 Must give cumulative hazards on some time-range } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz dr2 <- drcumhaz dr2[,2] <- 1.5*drcumhaz[,2] base1 <- base1cumhaz base4 <- base4cumhaz cens <- rbind(c(0,0),c(2000,0.5),c(5110,3)) iddata <- simMultistate(100,base1,base1,dr,dr2,cens=cens) dlist(iddata,.~id|id<3,n=0) ### estimating rates from simulated data c0 <- phreg(Surv(start,stop,status==0)~+1,iddata) c3 <- phreg(Surv(start,stop,status==3)~+strata(from),iddata) c1 <- phreg(Surv(start,stop,status==1)~+1,subset(iddata,from==2)) c2 <- phreg(Surv(start,stop,status==2)~+1,subset(iddata,from==1)) ### par(mfrow=c(2,3)) bplot(c0) lines(cens,col=2) bplot(c3,main="rates 1-> 3 , 2->3") lines(dr,col=1,lwd=2) lines(dr2,col=2,lwd=2) ### bplot(c1,main="rate 1->2") lines(base1,lwd=2) ### bplot(c2,main="rate 2->1") lines(base1,lwd=2) } \author{ Thomas Scheike } mets/man/prob.exceed.recurrent.Rd0000644000176200001440000000614413623061405016477 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/recurrent.marginal.R \name{prob.exceed.recurrent} \alias{prob.exceed.recurrent} \alias{prob.exceedRecurrent} \alias{prob.exceedBiRecurrent} \alias{prob.exceedRecurrentStrata} \alias{prob.exceedBiRecurrentStrata} \title{Estimation of probability of more that k events for recurrent events process} \usage{ prob.exceed.recurrent(data, type, status = "status", death = "death", start = "start", stop = "stop", id = "id", times = NULL, exceed = NULL, cifmets = FALSE, strata = NULL, all.cifs = FALSE, ...) } \arguments{ \item{data}{data-frame} \item{type}{type of evnent (code) related to status} \item{status}{name of status} \item{death}{name of death indicator} \item{start}{start stop call of Hist() of prodlim} \item{stop}{start stop call of Hist() of prodlim} \item{id}{id} \item{times}{time at which to get probabilites P(N1(t) >= n)} \item{exceed}{n's for which which to compute probabilites P(N1(t) >= n)} \item{cifmets}{if true uses cif of mets package rather than prodlim} \item{strata}{to stratify according to variable, only for cifmets=TRUE, when strata is given then only consider the output in the all.cifs} \item{all.cifs}{if true then returns list of all fitted objects in cif.exceed} \item{...}{Additional arguments to lower level funtions} } \description{ Estimation of probability of more that k events for recurrent events process where there is terminal event, based on this also estimate of variance of recurrent events. The estimator is based on cumulative incidence of exceeding "k" events. In contrast the probability of exceeding k events can also be computed as a counting process integral, and this is implemented in prob.exceedRecurrent } \examples{ ######################################## ## getting some rates to mimick ######################################## data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=dr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) par(mfrow=c(1,2)) with(oo,plot(time,mu,col=2,type="l")) ### with(oo,plot(time,varN,type="l")) ### Bivariate probability of exceeding oo <- prob.exceedBiRecurrent(rr,1,2,exceed1=c(1,5,10),exceed2=c(1,2,3)) with(oo, matplot(time,pe1e2,type="s")) nc <- ncol(oo$pe1e2) legend("topleft",legend=colnames(oo$pe1e2),lty=1:nc,col=1:nc) \donttest{ ### do not test to avoid dependence on prodlim ### now estimation based on cumualative incidence, but do not test to avoid dependence on prodlim library(prodlim) pp <- prob.exceed.recurrent(rr,1,status="status",death="death",start="entry",stop="time",id="id") with(pp, matplot(times,prob,type="s")) ### with(pp, matlines(times,se.lower,type="s")) with(pp, matlines(times,se.upper,type="s")) } } \references{ Scheike, Eriksson, Tribler (2019) The mean, variance and correlation for bivariate recurrent events with a terminal event, JRSS-C } \author{ Thomas Scheike } mets/man/multcif.Rd0000644000176200001440000000050413623061405013726 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mets-package.R \docType{data} \name{multcif} \alias{multcif} \title{Multivariate Cumulative Incidence Function example data set} \source{ Simulated data } \description{ Multivariate Cumulative Incidence Function example data set } \keyword{data} mets/man/twinsim.Rd0000644000176200001440000000241213623061405013755 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/twinsim.R \name{twinsim} \alias{twinsim} \title{Simulate twin data} \usage{ twinsim(nMZ = 100, nDZ = nMZ, b1 = c(), b2 = c(), mu = 0, acde = c(1, 1, 0, 1), randomslope = NULL, threshold = 0, cens = FALSE, wide = FALSE, ...) } \arguments{ \item{nMZ}{Number of monozygotic twin pairs} \item{nDZ}{Number of dizygotic twin pairs} \item{b1}{Effect of covariates (labelled x1,x2,...) of type 1. One distinct covariate value for each twin/individual.} \item{b2}{Effect of covariates (labelled g1,g2,...) of type 2. One covariate value for each twin pair.} \item{mu}{Intercept parameter.} \item{acde}{Variance of random effects (in the order A,C,D,E)} \item{randomslope}{Logical indicating wether to include random slopes of the variance components w.r.t. x1,x2,...} \item{threshold}{Treshold used to define binary outcome y0} \item{cens}{Logical variable indicating whether to censor outcome} \item{wide}{Logical indicating if wide data format should be returned} \item{...}{Additional arguments parsed on to lower-level functions} } \description{ Simulate twin data from a linear normal ACE/ADE/AE model. } \seealso{ \code{\link{twinlm}} } \author{ Klaus K. Holst } \keyword{models} \keyword{regression} mets/man/dby.Rd0000644000176200001440000000500713623061405013044 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dby.R \name{dby} \alias{dby} \alias{dby<-} \alias{dby2} \alias{dby2<-} \alias{dbyr} \title{Calculate summary statistics grouped by} \usage{ dby(data, INPUT, ..., ID = NULL, ORDER = NULL, SUBSET = NULL, SORT = 0, COMBINE = !REDUCE, NOCHECK = FALSE, ARGS = NULL, NAMES, COLUMN = FALSE, REDUCE = FALSE, REGEX = mets.options()$regex, ALL = TRUE) } \arguments{ \item{data}{Data.frame} \item{INPUT}{Input variables (character or formula)} \item{...}{functions} \item{ID}{id variable} \item{ORDER}{(optional) order variable} \item{SUBSET}{(optional) subset expression} \item{SORT}{sort order (id+order variable)} \item{COMBINE}{If TRUE result is appended to data} \item{NOCHECK}{No sorting or check for missing data} \item{ARGS}{Optional list of arguments to functions (...)} \item{NAMES}{Optional vector of column names} \item{COLUMN}{If TRUE do the calculations for each column} \item{REDUCE}{Reduce number of redundant rows} \item{REGEX}{Allow regular expressions} \item{ALL}{if FALSE only the subset will be returned} } \description{ Calculate summary statistics grouped by variable } \details{ Calculate summary statistics grouped by dby2 for column-wise calculations } \examples{ n <- 4 k <- c(3,rbinom(n-1,3,0.5)+1) N <- sum(k) d <- data.frame(y=rnorm(N),x=rnorm(N),id=rep(seq(n),k),num=unlist(sapply(k,seq))) d2 <- d[sample(nrow(d)),] dby(d2, y~id, mean) dby(d2, y~id + order(num), cumsum) dby(d,y ~ id + order(num), dlag) dby(d,y ~ id + order(num), dlag, ARGS=list(k=1:2)) dby(d,y ~ id + order(num), dlag, ARGS=list(k=1:2), NAMES=c("l1","l2")) dby(d, y~id + order(num), mean=mean, csum=cumsum, n=length) dby(d2, y~id + order(num), a=cumsum, b=mean, N=length, l1=function(x) c(NA,x)[-length(x)]) dby(d, y~id + order(num), nn=seq_along, n=length) dby(d, y~id + order(num), nn=seq_along, n=length) d <- d[,1:4] dby(d, x<0) <- list(z=mean) d <- dby(d, is.na(z), z=1) f <- function(x) apply(x,1,min) dby(d, y+x~id, min=f) dby(d,y+x~id+order(num), function(x) x) f <- function(x) { cbind(cumsum(x[,1]),cumsum(x[,2]))/sum(x)} dby(d, y+x~id, f) ## column-wise a <- d dby2(a, mean, median, REGEX=TRUE) <- '^[y|x]'~id a ## wildcards dby2(a,'y*'+'x*'~id,mean) ## subset dby(d, x<0) <- list(z=NA) d dby(d, y~id|x>-1, v=mean,z=1) dby(d, y+x~id|x>-1, mean, median, COLUMN=TRUE) dby2(d, y+x~id|x>0, mean, REDUCE=TRUE) dby(d,y~id|x<0,mean,ALL=FALSE) a <- iris a <- dby(a,y=1) dby(a,Species=="versicolor") <- list(y=2) } \author{ Klaus K. Holst and Thomas Scheike } mets/DESCRIPTION0000644000176200001440000000245013623150473012735 0ustar liggesusersPackage: mets Type: Package Title: Analysis of Multivariate Event Times Version: 1.2.7 Date: 2020-02-18 Author: Klaus K. Holst and Thomas Scheike Maintainer: Klaus K. Holst Description: Implementation of various statistical models for multivariate event history data . Including multivariate cumulative incidence models , and bivariate random effects probit models (Liability models) . Also contains two-stage binomial modelling that can do pairwise odds-ratio dependence modelling based marginal logistic regression models. This is an alternative to the alternating logistic regression approach (ALR). License: GPL (>= 2) LazyLoad: yes URL: https://github.com/kkholst/mets BugReports: https://github.com/kkholst/mets/issues Depends: R (>= 3.5.0), timereg (>= 1.9.4), lava (>= 1.6.6) Imports: mvtnorm, numDeriv, compiler, Rcpp, splines, survival (>= 2.43-1), Suggests: prodlim, testthat (>= 0.11), ucminf, R.rsp (>= 0.40) VignetteBuilder: R.rsp ByteCompile: yes LinkingTo: Rcpp, RcppArmadillo, mvtnorm SystemRequirements: C++11 Encoding: UTF-8 RoxygenNote: 6.1.1 NeedsCompilation: yes Packaged: 2020-02-18 22:23:39 UTC; klaus Repository: CRAN Date/Publication: 2020-02-19 06:10:03 UTC mets/build/0000755000176200001440000000000013623061747012332 5ustar liggesusersmets/build/vignette.rds0000644000176200001440000000105413623061747014671 0ustar liggesusersUo0m)[Ť0..Hܦ]`M=:il'Yo)vj7NJH;`QE?E964kl(DI,425a, ('k)X *RrSȐӋIWY"j@9@۸>п^רAcIL/%M )MJ1-^䵮Ұ*deFa=خk!8)Y8H*H]Nk<\* fnAST| 6Gr$BVቂ,gp>cY!]_MͻȷzK$ީa_h[DQu|M>v˃n[d~tILSWYqD|(5{Ԙ:QjQjƸ?J_%kl+z)Zͻ\'7,\҉'%8O?Ü>G= J2rpl 3S/'4r;Щ;3lg7y>H~npmets/tests/0000755000176200001440000000000013623061405012364 5ustar liggesusersmets/tests/test-all.R0000644000176200001440000000016113623061405014232 0ustar liggesusersif (require(testthat)) { library("mets") library("lava") library("timereg") test_check("mets") } mets/tests/testthat/0000755000176200001440000000000013623061405014224 5ustar liggesusersmets/tests/testthat/test_dutils.R0000644000176200001440000000366613623061405016725 0ustar liggesuserscontext("dutils") test_that("dsort", { data("hubble",package="lava") expect_equivalent(order(dsort(hubble, ~sigma)$sigma), seq_len(nrow(hubble))) }) test_that("dsort", { data("hubble",package="lava") h1 <- hubble drename(h1,fun=toupper) <- ~. expect_equivalent(colnames(h1),toupper(names(hubble))) }) test_that("daggregate", { dd <- data.frame(a=1:20,b=20:1, g1=rep(0:1,10), g2=rep(0:1,each=10), g3=rbinom(20,1,0.5)) dd$g1[1:2] <- NA dd$g2[2:3] <- NA dd$a[3:7] <- NA ##dcor(dd,.~g1+g2) dcor(dd, "[acg][12]*$", regex=TRUE, use="pairwise") dcor(dd, "[ab]",subset=is.na(g1), regex=TRUE, use="pairwise") dcor(dd, ~.|is.na(g1)|is.na(g2)) dcor(dd, use="pairwise") }) test_that("dby", { dd <- dby2(iris, . ~ Species, mean, median, REDUCE=T) val <- dreshape(dd,varying=list(mean="mean*",median="median*"),dropid=TRUE) val$num <- gsub("mean.","",val$num) val <- dreshape(dd,varying=c("mean","median"),dropid=TRUE) val$num <- gsub("^.","",val$num) expect_true(ncol(val)==4) expect_true(nrow(val)==3*4) val0 <- subset(val, Species=="setosa" & num=="Sepal.Width") val1 <- subset(iris, Species=="setosa", select="Sepal.Width")[,1] expect_true(abs(val0[1,"mean"]-mean(val1))<1e-16) expect_true(abs(val0[1,"median"]-median(val1))<1e-16) }) test_that("dsample", { n <- 10 d <- data.frame(id=rep(0:1,5),x=seq(0,1,length.out=10),y=seq(1,0,length.out=10), id2=rep(1:5,each=2)) d1 <- dsample(d, ~id, size=3) expect_true(ncol(d1)==5) expect_true(nrow(d1)==15) d2 <- dsample(d, .~id|x>0.5, size=3) expect_true(ncol(d2)==4) expect_true(all(d2$x>0)) d3 <- dsample(d, .~id+id2, size=3) expect_true(ncol(d3)==3) d4 <- dsample(d, .~id+id2|x>0, size=3) expect_true(ncol(d4)==3) expect_true(all(d4$x>0)) }) mets/tests/testthat/test_reshape.R0000644000176200001440000000407713623061405017045 0ustar liggesuserscontext("Reshaping data") test_that("fast reshape I", { m <- lvm() regression(m,c(y1,y2,y3)~x) <- c(1,10,100) distribution(m,~x) <- f <- function(n,...) rbinom(n,1,0.5)+1 d <- sim(m,10); dd <- fast.reshape(d,var="y") d1 <- fast.reshape(dd,id="id") expect_true(sum((d[,endogenous(m)]-d1[,endogenous(m)])^2)<1e-20) d2 <- fast.reshape(dd,id="id",var="y",num="num") expect_true(sum((d-d2[,colnames(d)])^2)<1e-20) }) test_that("fast reshape II", { testdata <- data.frame(hour=c(12,13,14,11,12,14,15,16),id=c(1,1,1,2,2,3,3,3),y=round(rnorm(8),2)) widetest <- reshape(testdata,v.names="y",idvar="id",direction="wide",timevar="hour") wide <- fast.reshape(testdata,varying="y",id="id",num="hour",sep=".") expect_equivalent(widetest,wide[,colnames(widetest)]) }) test_that("fast rehape: different data types", { d <- data.frame(time1=c(1:5), time2=c(6.070311, 2.026996, 7.584480, 8.630120, 8.193392)) dd <- mets::fast.reshape(d) expect_equivalent(dd[,1],as.vector(t(d))) d <- data.frame(time1=c(TRUE,FALSE,TRUE,FALSE,TRUE), time2=c(6.070311, 2.026996, 7.584480, 8.630120, 8.193392)) dd <- mets::fast.reshape(d) expect_equivalent(dd[,1],as.vector(t(d))) }) ## fast.reshape(fast.reshape(d,var=c("y","z","w")),id="id",var=c("y","z","w")) ## library(mets) ## x <- matrix(1:10,5,2) ## x[3,2] <- 8 ## x[3,2] <- NA ## cluster <- c(1,1,2,2,3) ## x <- cbind(x,cluster) ## x ## ud <- fast.reshape(data.frame(x),"cluster") ## ud ## ### ## out=cluster.index(cluster) ## out ## ### ## ud <- faster.reshape(x,cluster) ## ud ## ud <- faster.reshape(data.frame(x),cluster) ## ud ## ### ## colnames(x) <- c("y1","y2","cluster") ## x ## ud <- fast.reshape(data.frame(x),"cluster") ## ud ## ### ## num <- c(2,1,1,2,2) ## x ## out <- faster.reshape(x,cluster) ## out ## out <- faster.reshape(x,cluster,num=num) ## out mets/tests/testthat/test_claytonoakes.R0000644000176200001440000000027113623061405020102 0ustar liggesuserscontext("Clayton-Oakes") test_that("Clayton-Oakes I", { ## expect_equivalent(coef(e)[[1]][1:2,1],coef(lm(y~x,d))) ## expect_equivalent(coef(e)[[2]][1:2,1],coef(lm(y~x,d))) }) mets/tests/testthat/test_approx.R0000644000176200001440000000103013623061405016711 0ustar liggesuserscontext("Fast.approx") test_that("fast approx I", { set.seed(1) x <- sort(rnorm(1e5)) y <- rnorm(1e3) val <- x[fast.approx(x,y)] val2 <- sapply(y, function(y) x[which.min(abs(x-y))]) expect_identical(val,val2) ##rbenchmark::benchmark(fast.approx(x,y,type="left"),replications=1000) ##rbenchmark::benchmark(prodlim::sindex(x,y),replications=1000) val <- fast.approx(x,y,type="left") # Number of observations in x less than y val3 <- prodlim::sindex(x,y) expect_identical(val,val3) }) mets/src/0000755000176200001440000000000013623061753012017 5ustar liggesusersmets/src/claytonoakes.cpp0000644000176200001440000001301713623061405015213 0ustar liggesusers#include #include #include #include #include #include using namespace arma; using namespace Rcpp; typedef std::complex cx; RcppExport SEXP claytonoakes(SEXP ds, SEXP ts, SEXP es, SEXP allcs, SEXP cs, SEXP cuts, SEXP hs, SEXP mulths, SEXP var ) { BEGIN_RCPP // {{{ // try { colvec event = Rcpp::as(ds); colvec time = Rcpp::as(ts); colvec entry = Rcpp::as(es); colvec uniqueclusters = Rcpp::as(cs); colvec clusters = Rcpp::as(allcs); NumericVector cut = Rcpp::as(cuts); colvec basehaz = Rcpp::as(hs); colvec mhaz = Rcpp::as(mulths); colvec theta0 = Rcpp::as(var); unsigned ncluster = uniqueclusters.n_rows; unsigned n = time.n_rows; unsigned ncuts = cut.size(); colvec dt(ncuts-1); for (unsigned i=1; i0) Haz1 += L1(pos-1); if (e>0) { // Truncation it = std::lower_bound(cut.begin(), cut.end(), e); epos= int(it-cut.begin())-1; Haz0 += 1/(curtheta0)*exp(curtheta0*multhaz*L00(epos))* (exp(curtheta0*multhaz*(basehaz(epos)*(e-cut(epos))))-1); if (epos>0) Haz0 += L1(epos-1); } j++; if (j==n) break; } while (clusters(j)==curcluster); logLik += -(1/curtheta0+nevent)*log(1+curtheta0*Haz1); // Survival logLik += (1/curtheta0)*log(1+curtheta0*Haz0); // Truncation logLik += nevent*log(curtheta0); logLik += lgammaratio; } return(Rcpp::List::create(Rcpp::Named("logLik")=logLik)); END_RCPP } // }}} RcppExport SEXP claytonoakes_cx(SEXP ds, SEXP ts, SEXP es, SEXP allcs, SEXP cs, SEXP cuts, SEXP hs, SEXP mulths, SEXP var ) { BEGIN_RCPP // {{{ // try { colvec event = Rcpp::as(ds); colvec time = Rcpp::as(ts); colvec entry = Rcpp::as(es); colvec uniqueclusters = Rcpp::as(cs); colvec clusters = Rcpp::as(allcs); NumericVector cut = Rcpp::as(cuts); cx_colvec basehaz = Rcpp::as(hs); cx_colvec mhaz = Rcpp::as(mulths); cx_colvec theta0 = Rcpp::as(var); unsigned ncluster = uniqueclusters.n_rows; unsigned n = time.n_rows; unsigned ncuts = cut.size(); colvec dt(ncuts-1); for (unsigned i=1; i0) Haz1 += L1(pos-1.0); if (e>0) { // Truncation it = std::lower_bound(cut.begin(), cut.end(), e); epos= int(it-cut.begin())-1.0; Haz0 += 1.0/(curtheta0)*exp(curtheta0*multhaz*L00(epos))* (exp(curtheta0*multhaz*(basehaz(epos)*(e-cut(epos))))-1.0); if (epos>0) Haz0 += L1(epos-1.0); } j++; if (j==n) break; } while (clusters(j)==curcluster); logLik += -(1.0/curtheta0+(cx)nevent)*log(1.0+curtheta0*Haz1); // Survival logLik += (1.0/curtheta0)*log(1.0+curtheta0*Haz0); // Truncation logLik += (cx)nevent*log(curtheta0); logLik += lgammaratio; } return(Rcpp::List::create(Rcpp::Named("logLik")=logLik)); END_RCPP } // }}} mets/src/biprobit.cpp0000644000176200001440000002440613623061405014335 0ustar liggesusers#include "mvn.h" using namespace std; using namespace Rcpp; using namespace arma; // {{{ uniprobit RcppExport SEXP uniprobit(SEXP m, SEXP dm, SEXP s, SEXP ds, SEXP y, SEXP w, SEXP std, SEXP eqmarg) { BEGIN_RCPP NumericMatrix mm(m); NumericMatrix dss(ds); NumericMatrix dmm(dm); NumericMatrix yy(y); double S = Rcpp::as(s); mat mu(mm.begin(), mm.nrow(), mm.ncol(), false); mat dS(dss.begin(), dss.nrow(), dss.ncol(), false); mat tdmu(dmm.begin(), dmm.nrow(), dmm.ncol(), false); mat Y(yy.begin(), yy.nrow(), yy.ncol(), false); bool weights = Rcpp::as(std); unsigned n = mm.nrow(); NumericVector W; if (weights) { NumericVector W0(w); W=W0; } double sigma = sqrt(S); colvec alpha(n), alpha0(n), M(n); for (unsigned i=0; i0) { colvec V = S*alpha0+mu%M; mat U2 = 0.5*trans(dS)*trans(-alpha0+V/S)/S; U1 = join_cols(U1,U2); } mat logLik = log(alpha); for (unsigned i=0; i(std); bool OneWeight = Rcpp::as(sameweight); mat U; mat W; List res; if (weights) { NumericMatrix ww(w); mat W0(ww.begin(), ww.nrow(), ww.ncol(), false); W = W0; // WW = trans(reshape(W1,2,N/2)); } if (OneWeight & weights) { vecmat U0 = score(Y,mu,X,S,dS,U); res["loglik"] = log(U0.V)%W.col(0); for (unsigned i=0; i(std); bool OneWeight = Rcpp::as(eqweight); bool EqMarginal = Rcpp::as(eqmarg); bool Cor = Rcpp::as(correlation); vecmat U0; mat W,U; List res; if (weights) { NumericMatrix ww(w); mat W0(ww.begin(), ww.nrow(), ww.ncol(), false); W = W0; // WW = trans(reshape(W1,2,N/2)); } if (OneWeight & weights) { if (Cor) { U0 = scorecor(Y,mu,dmu,S,dS,U,EqMarginal); } else { U0 = score2(Y,mu,dmu,S,dS,U,EqMarginal); } res["loglik"] = log(U0.V)%W.col(0); for (unsigned i=0; i #include #include using namespace Rcpp; using namespace arma; /* how many are there of the different clusters, similar to table(clusters) */ RcppExport SEXP nclust(SEXP iclusters) { // {{{ BEGIN_RCPP IntegerVector clusters(iclusters); int n = clusters.size(); int uniqueclust=0; int maxclust=0; IntegerVector nclust(n,0); for (int i=0;imaxclust) maxclust=nclust[clusters[i]]; } return(List::create(Named("maxclust")=maxclust, Named("nclust")=nclust, Named("uniqueclust")=uniqueclust)); END_RCPP } // }}} /* organize indeces to different clusters in matrix of size nclust x maxclust */ /* If optionally matrix 'mat' is supplied, the rows of mat corresponding to clusters is returned */ RcppExport SEXP clusterindexM(SEXP iclusters, SEXP imednum, SEXP inum, SEXP x, SEXP all) { // {{{ BEGIN_RCPP IntegerVector clusters(iclusters); int n = clusters.size(); bool All = Rcpp::as(all); int uniqueclust=0; int maxclust=0; IntegerVector nclust(n,0); bool hasX = !((Rf_isNull)(x)); for (int i=0;imaxclust) maxclust=nclust[clusters[i]]; } IntegerVector num(inum); int mednum = Rcpp::as(imednum); Row unum; if (mednum==1) { // unum = unique(num); // maxclust = unum.n_elem; maxclust = max(num)+1; } Mat idclust = Mat(uniqueclust,maxclust); idclust.fill(NA_INTEGER); IntegerVector clustsize(uniqueclust,0); IntegerVector firstclustid(uniqueclust,0); if (mednum==0) { for (int i=0;i(x); //if (X.n_rows!=n) mat res(uniqueclust,X.n_cols); res.fill(0); for (unsigned i=0; i(iclustmat); int uniqueclust=clustmat.n_rows; int numfamindex= Rcpp::as(inumfamindex); IntegerVector famclustindex(numfamindex,0); IntegerVector subfamilyindex(numfamindex,0); int i,j,v=0,h=0; for (i=0;i=2) for (j=0;j<(clustsize(i)-1);j++) for (int k=j+1;kmaxclust) maxclust=nclust[clusters[i]]; } IntegerVector num(inum); int mednum = Rcpp::as(imednum); Mat idclust = Mat(uniqueclust,maxclust); idclust.fill(NA_INTEGER); IntegerVector clustsize(uniqueclust,0); mat data = Rcpp::as(idata); int p= data.n_cols; mat nydata(uniqueclust,maxclust*p); nydata.fill(NA_REAL); if (mednum==0) { for (int i=0;i #include #include #include // const double epsilon=1.0e-16; using namespace std; using namespace Rcpp; // [[Rcpp::export(name = ".ApplyBy2")]] NumericMatrix ApplyBy2(NumericMatrix idata, NumericVector icluster, SEXP F, Environment Env, std::string Argument="x", int Columnwise=0, int Reduce=0, double epsilon=1.0e-16 ) { BEGIN_RCPP unsigned n = idata.nrow(); unsigned posstart=0; unsigned p = idata.ncol(); if (Columnwise==0) { Env[Argument] = idata( Range(0,0), Range(0, idata.ncol()-1) ); } else { Env[Argument] = 1; } NumericVector res1(Rf_eval(F,Env)); unsigned nf = res1.size(); unsigned P=nf; if (Columnwise!=0) { P *= idata.ncol(); } // First we get the number of clusters double curcluster=icluster[0]; double prevcluster=icluster[0]; unsigned nclusters=1; for (unsigned i=0; iepsilon) { nclusters++; } prevcluster=curcluster; } unsigned clpos=0; NumericVector clustersize(nclusters); curcluster=icluster[0]; prevcluster=icluster[0]; NumericMatrix res(n,P); for (unsigned i=0; i<=n; i++) { if (iepsilon || i==n) { if (i=(nr*nf)); } else { // Apply function on each column val = NumericVector(nr*P); valsize = 1; for (unsigned k=0; k DH and Y > DK. * Note: Prob( X < DH, Y < DK ) = BVND( -DH, -DK, R ). * * Parameters * * DH DOUBLE PRECISION, integration limit * DK DOUBLE PRECISION, integration limit * R DOUBLE PRECISION, correlation coefficient * DOUBLE PRECISION DH, DK, R, TWOPI INTEGER I, IS, LG, NG PARAMETER ( TWOPI = 6.283185307179586D0 ) DOUBLE PRECISION X(10,3), W(10,3), AS, A, B, C, D, RS, XS, BVN DOUBLE PRECISION PHID, SN, ASR, H, K, BS, HS, HK * Gauss Legendre Points and Weights, N = 6 DATA ( W(I,1), X(I,1), I = 1,3) / & 0.1713244923791705D+00,-0.9324695142031522D+00, & 0.3607615730481384D+00,-0.6612093864662647D+00, & 0.4679139345726904D+00,-0.2386191860831970D+00/ * Gauss Legendre Points and Weights, N = 12 DATA ( W(I,2), X(I,2), I = 1,6) / & 0.4717533638651177D-01,-0.9815606342467191D+00, & 0.1069393259953183D+00,-0.9041172563704750D+00, & 0.1600783285433464D+00,-0.7699026741943050D+00, & 0.2031674267230659D+00,-0.5873179542866171D+00, & 0.2334925365383547D+00,-0.3678314989981802D+00, & 0.2491470458134029D+00,-0.1252334085114692D+00/ * Gauss Legendre Points and Weights, N = 20 DATA ( W(I,3), X(I,3), I = 1, 10 ) / & 0.1761400713915212D-01,-0.9931285991850949D+00, & 0.4060142980038694D-01,-0.9639719272779138D+00, & 0.6267204833410906D-01,-0.9122344282513259D+00, & 0.8327674157670475D-01,-0.8391169718222188D+00, & 0.1019301198172404D+00,-0.7463319064601508D+00, & 0.1181945319615184D+00,-0.6360536807265150D+00, & 0.1316886384491766D+00,-0.5108670019508271D+00, & 0.1420961093183821D+00,-0.3737060887154196D+00, & 0.1491729864726037D+00,-0.2277858511416451D+00, & 0.1527533871307259D+00,-0.7652652113349733D-01/ SAVE X, W IF ( ABS(R) .LT. 0.3 ) THEN NG = 1 LG = 3 ELSE IF ( ABS(R) .LT. 0.75 ) THEN NG = 2 LG = 6 ELSE NG = 3 LG = 10 ENDIF H = DH K = DK HK = H*K BVN = 0 IF ( ABS(R) .LT. 0.925 ) THEN IF ( ABS(R) .GT. 0 ) THEN HS = ( H*H + K*K )/2 ASR = ASIN(R) DO I = 1, LG DO IS = -1, 1, 2 SN = SIN( ASR*( IS*X(I,NG) + 1 )/2 ) BVN = BVN + W(I,NG)*EXP( ( SN*HK-HS )/( 1-SN*SN ) ) END DO END DO BVN = BVN*ASR/( 2*TWOPI ) ENDIF BVN = BVN + PHID(-H)*PHID(-K) ELSE IF ( R .LT. 0 ) THEN K = -K HK = -HK ENDIF IF ( ABS(R) .LT. 1 ) THEN AS = ( 1 - R )*( 1 + R ) A = SQRT(AS) BS = ( H - K )**2 C = ( 4 - HK )/8 D = ( 12 - HK )/16 ASR = -( BS/AS + HK )/2 IF ( ASR .GT. -100 ) BVN = A*EXP(ASR) & *( 1 - C*( BS - AS )*( 1 - D*BS/5 )/3 + C*D*AS*AS/5 ) IF ( -HK .LT. 100 ) THEN B = SQRT(BS) BVN = BVN - EXP( -HK/2 )*SQRT(TWOPI)*PHID(-B/A)*B & *( 1 - C*BS*( 1 - D*BS/5 )/3 ) ENDIF A = A/2 DO I = 1, LG DO IS = -1, 1, 2 XS = ( A*( IS*X(I,NG) + 1 ) )**2 RS = SQRT( 1 - XS ) ASR = -( BS/XS + HK )/2 IF ( ASR .GT. -100 ) THEN BVN = BVN + A*W(I,NG)*EXP( ASR ) & *( EXP( -HK*( 1 - RS )/( 2*( 1 + RS ) ) )/RS & - ( 1 + C*XS*( 1 + D*XS ) ) ) END IF END DO END DO BVN = -BVN/TWOPI ENDIF IF ( R .GT. 0 ) THEN BVN = BVN + PHID( -MAX( H, K ) ) ELSE BVN = -BVN IF ( K .GT. H ) BVN = BVN + PHID(K) - PHID(H) ENDIF ENDIF BVND = BVN END mets/src/prop-odd.cpp0000644000176200001440000001061513623061405014244 0ustar liggesusers#include #include #include using namespace arma; RcppExport SEXP pBhat(SEXP ds, SEXP Xs, SEXP beta, SEXP id, SEXP ididx, SEXP idsize) { try { uvec event = Rcpp::as(ds); mat X = Rcpp::as(Xs); mat Xc = zeros(X.n_cols,X.n_cols); vec betahat = Rcpp::as(beta); unsigned stop,start = X.n_rows; uvec eventpos = find(event==1); mat dB = zeros(eventpos.n_elem,X.n_cols); uvec cluster = Rcpp::as(id); double thetahat=1; uvec clustersize, clustpos; umat clusterindex; bool doclust = (Rf_isNull)(idsize); if (!doclust) { clustersize = Rcpp::as(idsize); clusterindex = Rcpp::as(ididx); } // Obtain usual estimates of increments, dB, of the // cumulative time-varying effects in Aalens Additive Model for (unsigned ij=0; ij::from(clusterindex.submat(i,0,i,csize-1)); } uvec posL = find(clustpos=ij); // later/current events within cluster unsigned Ni = 0; // Number of events in cluster before current event,time t- double Hi = 0 ; // Sum of cum.haz. within cluster up to time t- if (posL.n_elem>0) { Ni = sum(event.elem(clustpos.elem(posL))); Hi = sum(Hij.elem(clustpos.elem(posL))); } uvec pos; if (posR.n_elem>0 && k>0) { pos = clustpos.elem(posR); mat Xi = X.rows(pos); Hij.elem(pos) = Xi*trans(B2.row(k-1)); Hi += sum(Hij.elem(pos)); } double psi = (1/thetahat+Ni)/(1/thetahat+fmax(0,Hi)); B2.row(k) = dB.row(k)/psi; if (k>0) { B2.row(k) += B2.row(k-1); } } return(Rcpp::List::create(Rcpp::Named("dB")=dB, Rcpp::Named("B2")=B2 )); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } RcppExport SEXP UhatPropOdd(SEXP ds, SEXP H, SEXP theta, SEXP id, SEXP idsize) { try { uvec event = Rcpp::as(ds); vec Hij = Rcpp::as(H); double thetahat = Rcpp::as(theta); umat cluster = Rcpp::as(id); uvec clustersize, ucluster, clustpos; unsigned nclust; bool doclust = (Rf_isNull)(idsize); //bool doclust = (cluster.n_cols==1); if (doclust) { ucluster = unique(cluster); nclust = ucluster.n_elem; } else { clustersize = Rcpp::as(idsize); nclust = cluster.n_rows; } vec res(nclust); for (unsigned i=0; i::from(cluster.submat(i,0,i,csize-1)); //cluster(span(i,i),span(0,csize-1)); } double Ni = sum(event.elem(clustpos)); double Hi = sum(Hij.elem(clustpos)); double thetaH = thetahat*Hi+1; double R = (log(thetaH)/thetahat + (Ni-Hi)/(thetaH)); for (unsigned h=0; h #include /* required by R */ #include #include int _mvt_maxpts=25000; double _mvt_abseps=0.001; double _mvt_releps=0; int _mvt_df = 0; int _mvt_inform; double _mvt_error[3]; double mvtdst(int* n, int* nu, // Degrees of freedom (0=MVN) double* lower, // Lower integration bounds double* upper, // Upper integration bounds int* infin, // Infinity argument, ith element 0: ]-inf,up[i]], 1: [lo[i],inf[, 2: [lo[i],up[i]], 3: ]-inf,inf[ double* correl, // Correlation coefficients (upper-tri) double* delta, // non-central parameter int* maxpts, // Max function evalutions (quasi-mc) double* abseps, // Tolerance absolute error double* releps, // Tolerance relative error double* error, // estimated abs. error. with 99% confidence interval double* value, // result int* inform) // Message (0 success) { // *value = 1; // return(*value); if (*n==1 && *nu==0) { // 0: right, 1: left, 2: interval switch (*infin) { case 0: *value = Rf_pnorm5(*upper,0.0,1.0,1,0); break; case 1: *value = 1-Rf_pnorm5(*lower,0.0,1.0,1,0); break; case 2: *value = Rf_pnorm5(*upper,0.0,1.0,1,0)-Rf_pnorm5(*lower,0.0,1,1,0); break; // default: *value = 0; } //cerr << "infin=" << *infin << " value=" << *value << " upper=" << *upper << " lower=" << *lower << endl; return(*value); } // cerr << "fortran to be called...\n"; // mvtdst_(n, nu, // lower, upper, infin, correl, delta, // maxpts, abseps, releps, // error, value, inform); int rnd=1; /* mvtnorm_C_mvtdst is defined in mvtnorm/inst/include/mvtnormAPI.h */ mvtnorm_C_mvtdst(n, nu, lower, upper, infin, correl, delta, maxpts, abseps, releps, error, value, inform, &rnd); switch (*inform) { case 0: return *value; case 1: case 2: case 3: return -1.0; }; return *value; } double dmvn(const vec &y, const mat &W, bool log=true, double logdet=datum::inf) { int n = W.n_rows; double res = -0.5*n*log2pi; if (logdet!=datum::inf) { res += -0.5*(logdet + as_scalar(trans(y)*W*y)); } else { double sign=0; mat iW = inv(W); log_det(logdet,sign,W); res += -0.5*(logdet + as_scalar(trans(y)*iW*y)); } if (!log) res = exp(res); return(res); } double cdfmvn(mat &upper, mat &cor) { double val=0; int n = cor.n_cols; rowvec _mvt_delta(n); _mvt_delta.fill(0); unsigned ncor = n*(n-1)/2; rowvec Cor(ncor); int j = 0; for (int r=0; r infin(n); infin.fill(0); // mvtdst(&n, &_mvt_df, &upper[0], // Lower, ignored &upper[0], &infin[0], // Infinity argument (all 0 since CDF) &Cor[0], &_mvt_delta[0], &_mvt_maxpts, &_mvt_abseps, &_mvt_releps, &_mvt_error[0], &val, &_mvt_inform); return(val); } RcppExport SEXP Dpmvn (SEXP lower, SEXP upper, SEXP mu, SEXP sigma, SEXP std) { BEGIN_RCPP colvec y = Rcpp::as(upper); NumericVector Lower(lower); bool Std = Rcpp::as(std); mat S = Rcpp::as(sigma); colvec Mu = Rcpp::as(mu); int n = S.n_cols; vec L(n); for (int j=0; j1); // uvec NonObs = find(Status>0); // int nObs = Obs.size(); // int nNonObs = NonObs.size(); // int nOrd = Ord.size(); // int nu = Su.n_cols; // bool nonconstvar = (nu>0); // double sign, logdetS0; // mat Se,S0,iS0; // vec loglik(n); loglik.fill(0); // // return(loglik); // if (nObs>0) { // mat Y0 = Yl.cols(Obs)-Mu.cols(Obs); // Se = S0 = S.submat(Obs,Obs); // iS0 = inv(S0); // log_det(logdetS0,sign,S0); // double normconst = -0.5*nObs*log2pi; // for (int i=0; i1); uvec NonObs = find(Status>0); int nObs = Obs.size(); int nNonObs = NonObs.size(); int nOrd = Ord.size(); int nu = Su.n_cols; bool nonconstvar = (nu>0); double sign, logdetS0; mat Se,S0,iS0; vec loglik(n); loglik.fill(0); // return(loglik); if (nObs>0) { mat Y0 = Yl.cols(Obs)-Mu.cols(Obs); Se = S0 = S.submat(Obs,Obs); iS0 = inv(S0); log_det(logdetS0,sign,S0); double normconst = -0.5*nObs*log2pi; for (int i=0; i0) { rowvec _mvt_delta(nNonObs); _mvt_delta.fill(0); mat MuNonObs = Mu.cols(NonObs); mat SNonObs = S.submat(NonObs,NonObs); if ((nObs>0) & (!nonconstvar)) { // Calculate conditional on observed mat S01 = S.submat(NonObs,Obs); mat iS1 = inv(S.submat(Obs,Obs)); MuNonObs = MuNonObs + trans(S01*iS1*trans(Yl.cols(Obs)-Mu.cols(Obs))); // MuNonObs.each_row() += Mu.(NonObs); SNonObs = SNonObs - S01*iS1*trans(S01); } vec il = 1/sqrt(diagvec(SNonObs)); mat iL = diagmat(il); Se = S0 = iL*SNonObs*iL; // Correlation matrix int ncor = nNonObs*(nNonObs-1)/2; rowvec Cor(ncor); if (ncor>0) { int j = 0; for (int r=0; r0) { OrdNonObs = find(Status.elem(NonObs)>1); Thres = Threshold.rows(Ord); } rowvec lower(nNonObs); rowvec upper(nNonObs); Row infin(nNonObs); // 0: right, 1: left, 2: interval uvec currow(1); for (int i=0; i0) { S0 = SS.submat(NonObs,NonObs); mat S01 = SS.submat(NonObs,Obs); mat iS1 = inv(SS.submat(Obs,Obs)); Mi = Mi + trans(S01*iS1*trans(Yl.submat(currow,Obs)-Mu.submat(currow,Obs))); SNonObs = S0 - S01*iS1*trans(S01); } else { SNonObs = SS; } il = 1/sqrt(diagvec(SNonObs)); iL = diagmat(il); Se = S0 = iL*SNonObs*iL; // Correlation matrix if (ncor>0) { int j = 0; for (int r=0; r0) { infin.elem(infplus) -= 1; } // if (infminus.size()>0) { infin.elem(infminus) -= 2; } if (nOrd>0) { for (int j=0; j1 if (yval>=nthresmax) { // Y=k (last) double val = Thres(j,yval-1); infin(jj) = 1; // Integrate over right tail lower(jj) = val; } else { double val = Thres(j,yval-1); double val2 = Thres(j,yval); if (val>=val2) { // Also Y=k (last) infin(jj) = 1; lower(jj) = val; } else { //Y=k-i (in between) lower(jj) = val; upper(jj) = val2; } } } } } lower = (lower-Mi)%trans(il); upper = (upper-Mi)%trans(il); double val; val = mvtdst(&nNonObs, &_mvt_df, &lower[0], &upper[0], &infin[0], &Cor[0], &_mvt_delta[0], &_mvt_maxpts, &_mvt_abseps, &_mvt_releps, &_mvt_error[0], &val, &_mvt_inform); // if (isnan(val)) { // cerr << "***i=" << i << endl; // cerr << "Threshold=" << Threshold << endl; // cerr << "Thres=" << Thres << endl; // cerr << "status=" << Status; // cerr << "yl=" << Yl.row(i); // cerr << "yu=" << Yu.row(i); // cerr << "lower=" << lower; // cerr << "upper=" << upper; // cerr << "infin=" << infin; // cerr << "Cor=\n" << Cor; // cerr << " val=" << val << endl; // // } // cerr << " 1:loglik(i)=" << loglik(i) << endl; loglik(i) += log(val); // cerr << " 2:loglik(i)=" << loglik(i) << endl; // } } } return(loglik); } // RcppExport SEXP loglikMVN(SEXP yl, SEXP yu, // SEXP status, // SEXP mu, SEXP dmu, // SEXP s, SEXP ds, // SEXP z, SEXP su, SEXP dsu, // SEXP threshold, SEXP dthreshold, SEXP score) { // [[Rcpp::export(name = ".loglikMVN")]] arma::mat loglikMVN(arma::mat Yl, SEXP yu, SEXP status, arma::mat Mu, SEXP dmu, arma::mat S, SEXP ds, SEXP z, SEXP su, SEXP dsu, SEXP threshold, SEXP dthreshold, bool Score) { // mat Yl = Rcpp::as(yl); // mat Mu = Rcpp::as(mu); // mat S = Rcpp::as(s); // bool Score = Rcpp::as(score); if (Score) { mat dS = Rcpp::as(ds); mat dMu = Rcpp::as(dmu); mat U = scoremvn(Yl, Mu, dMu, S, dS); // Z, Su, dSu, // Threshold, dThreshold) { return(U); } uvec Status = Rcpp::as(status); mat Yu = Rcpp::as(yu); if ((Mu.n_cols!=Yl.n_cols) || (Mu.n_rows!=Yl.n_rows)) throw(Rcpp::exception("Dimension of 'mu' and 'yl' did not agree","mvn.cpp",1)); if (Status.size()!=Yl.n_cols) throw(Rcpp::exception("Dimension of 'status' and 'yl' did not agree","mvn.cpp",1)); uvec Cens = find(Status==1); uvec Obs = find(Status==0); uvec NonObs = find(Status>0); uvec Ord = find(Status>1); // int nObs = Obs.size(); // int nNonObs = NonObs.size(); int nOrd = Ord.size(); int nCens = Cens.size(); unsigned n = Yl.n_rows; mat Z,Zsub; mat Su; if (!Rf_isNull(z)) { Z = Rcpp::as(z); Su = Rcpp::as(su); if (Z.n_cols!=(Yl.n_cols/Su.n_cols)) throw(Rcpp::exception("Dimension of 'z' and 'su' did not agree","mvn.cpp",1)); if (Z.n_rows!=n) throw(Rcpp::exception("Dimension of 'z' and 'yl' did not agree","mvn.cpp",1)); } mat Threshold; if (nOrd>0) { Threshold = Rcpp::as(threshold); if (Threshold.n_rows!=Yl.n_cols) throw(Rcpp::exception("Dimension of 'threshold' and 'yl' did not agree","mvn.cpp",1)); } vec loglik(n); loglik.fill(0); if (nCens>0) { if ((Yl.n_cols!=Yu.n_cols) || (Yl.n_rows!=Yu.n_rows)) throw(Rcpp::exception("Dimension of 'yl' and 'yu' did not agree","mvn.cpp",1)); umat stat = (Yl.cols(Cens)==Yu.cols(Cens)); uvec group(n); umat pattern; fastpattern(stat,pattern,group); uvec NewStatus = Status; unsigned K = pattern.n_rows; for (unsigned i=0; i(sigma); bool asCor = Rcpp::as(cor); mat Mu = Rcpp::as(mu); mat Lower = Rcpp::as(lower); mat Upper = Rcpp::as(upper); unsigned n = Mu.n_rows; int p = Mu.n_cols; unsigned ncor = p*(p-1)/2; bool nSigma = false; if ((asCor && Sigma.n_rows>1) || (!asCor && Sigma.n_cols==unsigned(p*p) && Sigma.n_rows>1)) { nSigma = true; n = Sigma.n_rows; } rowvec _mvt_delta(p); _mvt_delta.fill(0); // Non-centrality par. rowvec Cor(ncor); // Vector of correlation coefficients (upper-tri, colwise) rowvec L(p); // Std.deviations //bool nSigma = Sigma.n_rows==n && Sigma.n_cols!=(unsigned)p; if (!nSigma) { if (!asCor) { cov2cor0(Sigma,Cor,L,true); } else { Cor = Sigma.row(0); } } Row infin(p); infin.fill(2); // for (unsigned j=0; j<(unsigned)p; j++) { if (Upper(0,j)==datum::inf) infin(j) = 1; if (Lower(0,j)==-datum::inf) infin(j) = 0; } rowvec Lower0(p); rowvec Upper0(p); rowvec Mu0 = Mu.row(0); vec res(n); for (unsigned i=0; i1) Mu0 = Mu.row(i); if (Lower.n_rows==n) { Lower0 = Lower.row(i)-Mu0; Upper0 = Upper.row(i)-Mu0; infin.fill(2); // (a,b) for (unsigned j=0; j<(unsigned)p; j++) { if (Upper0(0,j)==datum::inf) infin(j) = 1; // (a,Inf) if (Lower0(0,j)==-datum::inf) { if (infin(j)==1) infin(j) = -1; // (-Inf,Inf) else infin(j) = 0; // (-Inf,b) } } } else { Lower0 = Lower.row(0)-Mu0; Upper0 = Upper.row(0)-Mu0; } // We use that Phi(a,b,S,mu) = Phi(L(a-mu),L(b-mu),R,0); R=LSL if (nSigma) { if (asCor) { Cor = Sigma.row(i); } else { // p*p row mat Sigma0 = Sigma.row(i); Sigma0.reshape(p,p); cov2cor0(Sigma0,Cor,L,true); } } if (!asCor) { Lower0 = Lower0%L; Upper0 = Upper0%L; } // std::cerr << "Lower" << Lower0; // std::cerr << "Upper" << Upper0; // std::cerr << "Infin" << infin; // std::cerr << "Cor" << Cor; // std::cerr << "mvtdelta" << _mvt_delta; // std::cerr << "mvt_df" << _mvt_df; mvtdst(&p, &_mvt_df, &Lower0[0], &Upper0[0], &infin[0], &Cor[0], &_mvt_delta[0], &_mvt_maxpts, &_mvt_abseps, &_mvt_releps, &_mvt_error[0], &val, &_mvt_inform); res(i) = val; } return(Rcpp::wrap(res)); END_RCPP } ////////////////////////////////////////////////// // Bivariate case ////////////////////////////////////////////////// RcppExport SEXP bvncdf(SEXP a, SEXP b, SEXP r) { // double u[2]; // u[0] = Rcpp::as(a); // u[1] = Rcpp::as(b); // double cr = Rcpp::as(r); // double val; // int n = 2; // int inttype[2]; // inttype[0] = 0; // inttype[1] = 0; // double _mvt_delta[2]; // Non-centrality parameter // void C_bvtlr (int *NU, double *DH, double *DK, double *R, double *BVTL); // _mvt_delta[0] = 0; // _mvt_delta[1] = 0; // val = mvtdst(&n, &_mvt_df, // &u[0], &u[0], // &inttype[0], &cr, // &_mvt_delta[0], &_mvt_maxpts, // &_mvt_abseps, &_mvt_releps, // &_mvt_error[0], &val, &_mvt_inform); double u1 = -Rcpp::as(a); double u2 = -Rcpp::as(b); double rho = Rcpp::as(r); double val = bvnd_(&u1, &u2, &rho); NumericVector res(1); res[0] = val; return(res); } double dbvnorm(double y1, double y2, double R) { double detR = 1-R*R; // inv(R) = [1 -r; -r 1]/detR (prove by gauss elim.) double res = 1/(2*M_PI*sqrt(detR))*exp(-0.5/detR*(y1*y1+y2*y2-2*R*y1*y2)); return(res); } vecmat Dbvn(double y1, double y2, double R) { vec DP(2); double R2 = R*R; DP(0) = Rf_dnorm4(y1,0.0,1.0,0)*Rf_pnorm5(y2-R*y1,0.0,sqrt(1-R2),1,0); DP(1) = Rf_dnorm4(y2,0.0,1.0,0)*Rf_pnorm5(y1-R*y2,0.0,sqrt(1-R2),1,0); mat HP(2,2); HP(1,0) = HP(0,1) = dbvnorm(y1,y2,R); HP(0,0) = -y1*DP(0) - R*HP(1,0); HP(1,1) = -y2*DP(1) - R*HP(1,0); vecmat res; res.V = DP; res.M= HP; return(res); } double Sbvn(double &l1, double &l2, double &r) { // int n = 2; // double l[] = {l1, l2}; // int inttype[] = {1, 1}; // double _mvt_delta[] {0.0, 0.0}; // Non-centrality parameter // double val; // val = mvtdst(&n, &_mvt_df, // &l[0], &l[0], // &inttype[0], &r, // &_mvt_delta[0], &_mvt_maxpts, // &_mvt_abseps, &_mvt_releps, // &_mvt_error[0], &val, &_mvt_inform); double val = bvnd_(&l1, &l2, &r); return(val); } ////////////////////////////////////////////////// // Density with varying correlation structure ////////////////////////////////////////////////// // [[Rcpp::export(name = ".dmvn")]] NumericVector dmvn(arma::mat u, arma::mat mu, arma::mat rho) { unsigned n = u.n_rows; unsigned p = u.n_cols; NumericVector res(n); arma::mat R = arma::eye(p,p); double logdetR = 0; arma::mat invR = R; arma::rowvec mu_i(p); for (unsigned i=0; i #include #include // for NULL #include /* .Call calls */ extern SEXP Bhat(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP BhatAddGam(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP BhatAddGamCC(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP biprobit0(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP biprobit2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP bvncdf(SEXP, SEXP, SEXP); extern SEXP claytonoakes(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP claytonoakesbinRV(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP claytonoakesR(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP clusterindexdata(SEXP, SEXP, SEXP, SEXP); extern SEXP clusterindexM(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP cor(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP familypairindex(SEXP, SEXP, SEXP); extern SEXP FastApprox(SEXP, SEXP, SEXP, SEXP); extern SEXP FastCluster(SEXP); extern SEXP FastCoxPL(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP FastCoxPLstrata(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP FastCoxPLstrataPO(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP FastCoxPLstrataAddGam(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP,SEXP,SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP ); extern SEXP FastCoxPrep(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP FastCoxPrepStrata(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP,SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP FastLong2(SEXP, SEXP, SEXP, SEXP); extern SEXP FastPattern(SEXP, SEXP, SEXP); extern SEXP MatxCube(SEXP, SEXP, SEXP); extern SEXP _mets_ApplyBy(SEXP, SEXP, SEXP); extern SEXP _mets_ApplyBy2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP _mets_loglikMVN(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP _mets_RcppExport_registerCCallable(); extern SEXP pBhat(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP pmvn0(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Dpmvn(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP survivalRV(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP RsurvivalRVCmarg(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP survivalRV2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP survivalloglikeRVpairs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP twostageloglikebin(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP twostageloglikebinpairs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP twostageloglikeRV(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP twostageloglikeRVpairs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Uhat(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP uniprobit(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP CubeVec(SEXP, SEXP); extern SEXP vecMatMat(SEXP, SEXP); extern SEXP OutCov(SEXP, SEXP); extern SEXP MatxCube(SEXP, SEXP, SEXP); extern SEXP Matdoubleindex(SEXP, SEXP, SEXP,SEXP,SEXP,SEXP); extern SEXP CubeMat(SEXP, SEXP); extern SEXP PropTestCox(SEXP, SEXP,SEXP,SEXP); extern SEXP PropTestCoxClust(SEXP, SEXP, SEXP, SEXP,SEXP,SEXP, SEXP, SEXP, SEXP, SEXP,SEXP,SEXP, SEXP); extern SEXP ModelMatrixTestCox(SEXP,SEXP,SEXP,SEXP,SEXP); //extern SEXP simBandCumHazCox(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP revcumsumR(SEXP); extern SEXP revcumsumstrataR(SEXP,SEXP, SEXP); extern SEXP tailstrataR(SEXP,SEXP, SEXP); extern SEXP revcumsumstratasumR(SEXP,SEXP, SEXP); extern SEXP revcumsumidstratasumR(SEXP,SEXP, SEXP,SEXP, SEXP); extern SEXP revcumsumidstratasumCovR(SEXP,SEXP,SEXP, SEXP,SEXP, SEXP); extern SEXP cumsumstrataR(SEXP,SEXP, SEXP); extern SEXP cumsumstrataPOR(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP DLambetaR(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP riskstrataR(SEXP,SEXP,SEXP); extern SEXP meanriskR(SEXP,SEXP,SEXP,SEXP,SEXP); extern SEXP wherestrataR(SEXP,SEXP,SEXP,SEXP); extern SEXP maxminidR(SEXP,SEXP,SEXP); extern SEXP cumsumstratasumR(SEXP,SEXP, SEXP); extern SEXP cumsumidstratasumR(SEXP,SEXP, SEXP,SEXP, SEXP); extern SEXP cumsumASR(SEXP,SEXP, SEXP); extern SEXP cumsumidstratasumCovR(SEXP, SEXP,SEXP, SEXP,SEXP, SEXP); extern SEXP covrfR( SEXP,SEXP,SEXP, SEXP); extern SEXP covrfstrataR( SEXP,SEXP,SEXP,SEXP,SEXP, SEXP); extern SEXP covrfstrataCovR(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP, SEXP); extern SEXP sumstrataR(SEXP,SEXP, SEXP); extern SEXP XBmindex(SEXP,SEXP, SEXP); //extern SEXP backfitEaEt(SEXP,SEXP, SEXP,SEXP,SEXP, SEXP, SEXP, SEXP,SEXP); static const R_CallMethodDef CallEntries[] = { {"Bhat", (DL_FUNC) &Bhat, 6}, {"BhatAddGam", (DL_FUNC) &BhatAddGam, 14}, {"BhatAddGamCC", (DL_FUNC) &BhatAddGamCC, 17}, // {"backfitEaEt", (DL_FUNC) &backfitEaEtt, 9}, {"biprobit0", (DL_FUNC) &biprobit0, 8}, {"biprobit2", (DL_FUNC) &biprobit2, 10}, {"bvncdf", (DL_FUNC) &bvncdf, 3}, {"claytonoakes", (DL_FUNC) &claytonoakes, 9}, {"claytonoakesbinRV", (DL_FUNC) &claytonoakesbinRV, 10}, {"claytonoakesR", (DL_FUNC) &claytonoakesR, 6}, {"clusterindexdata", (DL_FUNC) &clusterindexdata, 4}, {"clusterindexM", (DL_FUNC) &clusterindexM, 5}, {"cor", (DL_FUNC) &cor, 40}, {"CubeVec", (DL_FUNC) &CubeVec, 2}, {"CubeMat", (DL_FUNC) &CubeMat, 2}, {"familypairindex", (DL_FUNC) &familypairindex, 3}, {"FastApprox", (DL_FUNC) &FastApprox, 4}, {"FastCluster", (DL_FUNC) &FastCluster, 1}, {"FastCoxPL", (DL_FUNC) &FastCoxPL, 5}, {"FastCoxPLstrata", (DL_FUNC) &FastCoxPLstrata, 11}, {"FastCoxPLstrataPO", (DL_FUNC) &FastCoxPLstrataPO, 11}, {"FastCoxPLstrataAddGam", (DL_FUNC) &FastCoxPLstrataAddGam, 18}, {"FastCoxPrep", (DL_FUNC) &FastCoxPrep, 6}, {"FastCoxPrepStrata", (DL_FUNC) &FastCoxPrepStrata, 11}, {"FastLong2", (DL_FUNC) &FastLong2, 4}, {"FastPattern", (DL_FUNC) &FastPattern, 3}, {"MatxCube", (DL_FUNC) &MatxCube, 3}, {"meanriskR", (DL_FUNC) &meanriskR, 5}, {"wherestrataR", (DL_FUNC) &wherestrataR, 4}, {"maxminidR", (DL_FUNC) &maxminidR, 3}, {"Matdoubleindex", (DL_FUNC) &Matdoubleindex, 6}, {"_mets_ApplyBy", (DL_FUNC) &_mets_ApplyBy, 3}, {"_mets_ApplyBy2", (DL_FUNC) &_mets_ApplyBy2, 8}, {"_mets_loglikMVN", (DL_FUNC) &_mets_loglikMVN, 13}, {"_mets_RcppExport_registerCCallable", (DL_FUNC) &_mets_RcppExport_registerCCallable,0}, {"pBhat", (DL_FUNC) &pBhat, 6}, {"PropTestCox", (DL_FUNC) &PropTestCox, 4}, {"PropTestCoxClust", (DL_FUNC) &PropTestCoxClust, 13}, {"ModelMatrixTestCox", (DL_FUNC) &ModelMatrixTestCox, 5}, {"pmvn0", (DL_FUNC) &pmvn0, 5}, {"revcumsumR", (DL_FUNC) &revcumsumR, 1}, {"revcumsumstrataR", (DL_FUNC) &revcumsumstrataR, 3}, {"riskstrataR", (DL_FUNC) &riskstrataR, 3}, {"revcumsumstratasumR", (DL_FUNC) &revcumsumstratasumR, 3}, {"cumsumstratasumR", (DL_FUNC) &cumsumstratasumR, 3}, {"cumsumstrataPOR", (DL_FUNC) &cumsumstrataPOR, 6}, {"DLambetaR", (DL_FUNC) &DLambetaR, 8}, {"cumsumidstratasumR", (DL_FUNC) &cumsumidstratasumR, 5}, {"cumsumASR", (DL_FUNC) &cumsumidstratasumR, 3}, {"tailstrataR", (DL_FUNC) &tailstrataR, 3}, {"cumsumidstratasumCovR", (DL_FUNC) &cumsumidstratasumCovR, 6}, {"revcumsumidstratasumR", (DL_FUNC) &revcumsumidstratasumR, 5}, {"revcumsumidstratasumCovR", (DL_FUNC) &revcumsumidstratasumCovR, 6}, {"covrfR", (DL_FUNC) &covrfR, 4}, {"covrfstrataR", (DL_FUNC) &covrfstrataR, 6}, {"covrfstrataCovR", (DL_FUNC) &covrfstrataCovR, 8}, {"cumsumstrataR", (DL_FUNC) &cumsumstrataR, 3}, {"sumstrataR", (DL_FUNC) &sumstrataR, 3}, {"Dpmvn", (DL_FUNC) &Dpmvn, 5}, // {"simBandCumHazCox", (DL_FUNC) &simBandCumHazCox, 5}, {"RsurvivalRVCmarg", (DL_FUNC) &RsurvivalRVCmarg, 7}, {"survivalRV", (DL_FUNC) &survivalRV, 10}, {"survivalRV2", (DL_FUNC) &survivalRV2, 10}, {"survivalloglikeRVpairs", (DL_FUNC) &survivalloglikeRVpairs, 25}, {"twostageloglikebin", (DL_FUNC) &twostageloglikebin, 24}, {"twostageloglikebinpairs", (DL_FUNC) &twostageloglikebinpairs, 28}, {"twostageloglikeRV", (DL_FUNC) &twostageloglikeRV, 22}, {"twostageloglikeRVpairs", (DL_FUNC) &twostageloglikeRVpairs, 25}, {"Uhat", (DL_FUNC) &Uhat, 5}, {"uniprobit", (DL_FUNC) &uniprobit, 8}, {"vecMatMat", (DL_FUNC) &vecMatMat, 2}, {"OutCov", (DL_FUNC) &OutCov, 2}, {"XBmindex", (DL_FUNC) &XBmindex, 3}, {NULL, NULL, 0} }; void R_init_mets(DllInfo *dll) { R_registerRoutines(dll, NULL, /* slot for .C */ CallEntries, /* slot for .Call */ NULL, /* slot for .Fortran */ NULL); /* slot for .External */ R_useDynamicSymbols(dll, TRUE); /* visibility */ } mets/src/quadrule.h0000644000176200001440000001731113623061405014007 0ustar liggesusers#ifndef GAUSSHERMITE_H #define GAUSSHERMITE_H #include #include class QuadRule { private: arma::vec x; arma::vec w; public: arma::vec Weight() { return(w); } arma::vec Abscissa() { return(x); } QuadRule(int n=1) : x(std::min(n+(n%2==0),21)), w(std::min(n+(n%2==0),21)) { switch(n) { case 0: break; case 1: x[0] = 0; w[0] = 1.77245385090552; break; case 2: case 3: x[0] = 1.22474487139159; x[1] = 8.88178419700125e-16; x[2] = -1.22474487139159; w[0] = 0.29540897515092; w[1] = 1.18163590060368; w[2] = 0.295408975150921; break; case 4: case 5: x[0] = 2.02018287045609; x[1] = 0.95857246461382; x[2] = 8.88178419700125e-16; x[3] = -0.958572464613816; x[4] = -2.02018287045608; w[0] = 0.0199532420590458; w[1] = 0.39361932315224; w[2] = 0.945308720482942; w[3] = 0.393619323152242; w[4] = 0.0199532420590459; break; case 6: case 7: x[0] = 2.65196135683523; x[1] = 1.67355162876747; x[2] = 0.816287882858967; x[3] = 1.33226762955019e-15; x[4] = -0.816287882858962; x[5] = -1.67355162876746; x[6] = -2.65196135683523; w[0] = 0.000971781245099515; w[1] = 0.0545155828191268; w[2] = 0.425607252610126; w[3] = 0.810264617556808; w[4] = 0.425607252610129; w[5] = 0.0545155828191272; w[6] = 0.000971781245099528; break; case 8: case 9: x[0] = 3.19099320178153; x[1] = 2.26658058453184; x[2] = 1.46855328921667; x[3] = 0.723551018752838; x[4] = 0; x[5] = -0.723551018752837; x[6] = -1.46855328921667; x[7] = -2.26658058453184; x[8] = -3.19099320178153; w[0] = 3.96069772632642e-05; w[1] = 0.00494362427553695; w[2] = 0.088474527394377; w[3] = 0.432651559002555; w[4] = 0.720235215606052; w[5] = 0.432651559002555; w[6] = 0.0884745273943762; w[7] = 0.00494362427553692; w[8] = 3.96069772632637e-05; break; case 10: case 11: x[0] = 3.66847084655958; x[1] = 2.78329009978165; x[2] = 2.02594801582575; x[3] = 1.32655708449493; x[4] = 0.6568095668821; x[5] = 8.88178419700125e-16; x[6] = -0.656809566882099; x[7] = -1.32655708449493; x[8] = -2.02594801582576; x[9] = -2.78329009978165; x[10] = -3.66847084655958; w[0] = 1.43956039371425e-06; w[1] = 0.000346819466323343; w[2] = 0.0119113954449115; w[3] = 0.117227875167709; w[4] = 0.429359752356122; w[5] = 0.654759286914593; w[6] = 0.429359752356126; w[7] = 0.117227875167708; w[8] = 0.0119113954449111; w[9] = 0.000346819466323334; w[10] = 1.43956039371421e-06; break; case 12: case 13: x[0] = 4.10133759617864; x[1] = 3.24660897837241; x[2] = 2.51973568567824; x[3] = 1.85310765160151; x[4] = 1.22005503659075; x[5] = 0.605763879171061; x[6] = 8.88178419700125e-16; x[7] = -0.605763879171056; x[8] = -1.22005503659075; x[9] = -1.85310765160151; x[10] = -2.51973568567824; x[11] = -3.24660897837241; x[12] = -4.10133759617864; w[0] = 4.82573185007318e-08; w[1] = 2.04303604027071e-05; w[2] = 0.00120745999271939; w[3] = 0.02086277529617; w[4] = 0.140323320687024; w[5] = 0.42161629689854; w[6] = 0.604393187921162; w[7] = 0.421616296898545; w[8] = 0.140323320687024; w[9] = 0.0208627752961696; w[10] = 0.00120745999271937; w[11] = 2.04303604027065e-05; w[12] = 4.82573185007304e-08; break; case 14: case 15: x[0] = 4.49999070730939; x[1] = 3.66995037340445; x[2] = 2.96716692790561; x[3] = 2.32573248617386; x[4] = 1.71999257518649; x[5] = 1.13611558521092; x[6] = 0.565069583255578; x[7] = 3.5527136788005e-15; x[8] = -0.565069583255571; x[9] = -1.13611558521092; x[10] = -1.71999257518648; x[11] = -2.32573248617385; x[12] = -2.9671669279056; x[13] = -3.66995037340444; x[14] = -4.49999070730938; w[0] = 1.52247580425353e-09; w[1] = 1.05911554771107e-06; w[2] = 0.0001000044412325; w[3] = 0.00277806884291275; w[4] = 0.0307800338725461; w[5] = 0.158488915795935; w[6] = 0.412028687498897; w[7] = 0.564100308726416; w[8] = 0.412028687498902; w[9] = 0.158488915795936; w[10] = 0.0307800338725457; w[11] = 0.00277806884291278; w[12] = 0.0001000044412325; w[13] = 1.05911554771112e-06; w[14] = 1.52247580425367e-09; break; case 16: case 17: x[0] = 4.8713451936744; x[1] = 4.06194667587547; x[2] = 3.37893209114149; x[3] = 2.75776291570389; x[4] = 2.17350282666662; x[5] = 1.61292431422123; x[6] = 1.06764872574345; x[7] = 0.531633001342657; x[8] = 8.88178419700125e-16; x[9] = -0.531633001342652; x[10] = -1.06764872574345; x[11] = -1.61292431422123; x[12] = -2.17350282666662; x[13] = -2.75776291570389; x[14] = -3.37893209114149; x[15] = -4.06194667587547; x[16] = -4.8713451936744; w[0] = 4.58057893079867e-11; w[1] = 4.97707898163089e-08; w[2] = 7.11228914002143e-06; w[3] = 0.000298643286697756; w[4] = 0.00506734995762757; w[5] = 0.0409200341497567; w[6] = 0.172648297670097; w[7] = 0.401826469470411; w[8] = 0.530917937624859; w[9] = 0.401826469470415; w[10] = 0.172648297670098; w[11] = 0.0409200341497562; w[12] = 0.00506734995762745; w[13] = 0.000298643286697756; w[14] = 7.11228914002152e-06; w[15] = 4.97707898163081e-08; w[16] = 4.58057893079847e-11; break; case 18: case 19: x[0] = 5.22027169053748; x[1] = 4.42853280660378; x[2] = 3.76218735196402; x[3] = 3.1578488183476; x[4] = 2.59113378979454; x[5] = 2.04923170985062; x[6] = 1.52417061939354; x[7] = 1.01036838713431; x[8] = 0.503520163423889; x[9] = 0; x[10] = -0.503520163423885; x[11] = -1.01036838713431; x[12] = -1.52417061939353; x[13] = -2.04923170985062; x[14] = -2.59113378979454; x[15] = -3.1578488183476; x[16] = -3.76218735196401; x[17] = -4.42853280660377; x[18] = -5.22027169053748; w[0] = 1.32629709449852e-12; w[1] = 2.16305100986354e-09; w[2] = 4.48824314722315e-07; w[3] = 2.72091977631616e-05; w[4] = 0.000670877521407184; w[5] = 0.00798886677772307; w[6] = 0.0508103869090527; w[7] = 0.183632701306996; w[8] = 0.391608988613028; w[9] = 0.502974888276183; w[10] = 0.391608988613033; w[11] = 0.183632701306998; w[12] = 0.0508103869090517; w[13] = 0.00798886677772294; w[14] = 0.000670877521407195; w[15] = 2.72091977631622e-05; w[16] = 4.48824314722318e-07; w[17] = 2.1630510098636e-09; w[18] = 1.32629709449851e-12; break; default: x[0] = 5.55035187326468; x[1] = 4.77399234341122; x[2] = 4.12199554749184; x[3] = 3.53197287713768; x[4] = 2.9799912077046; x[5] = 2.45355212451284; x[6] = 1.94496294918625; x[7] = 1.44893425065073; x[8] = 0.96149963441837; x[9] = 0.479450707079108; x[10] = 0; x[11] = -0.479450707079105; x[12] = -0.961499634418367; x[13] = -1.44893425065073; x[14] = -1.94496294918625; x[15] = -2.45355212451284; x[16] = -2.9799912077046; x[17] = -3.53197287713767; x[18] = -4.12199554749184; x[19] = -4.77399234341122; x[20] = -5.55035187326468; w[0] = 3.72036507013603e-14; w[1] = 8.81861124205004e-11; w[2] = 2.5712301800593e-08; w[3] = 2.17188489805666e-06; w[4] = 7.47839886731003e-05; w[5] = 0.00125498204172641; w[6] = 0.0114140658374345; w[7] = 0.0601796466589129; w[8] = 0.192120324066999; w[9] = 0.381669073613499; w[10] = 0.479023703120173; w[11] = 0.381669073613504; w[12] = 0.192120324067; w[13] = 0.0601796466589117; w[14] = 0.0114140658374341; w[15] = 0.0012549820417264; w[16] = 7.47839886730978e-05; w[17] = 2.17188489805664e-06; w[18] = 2.57123018005922e-08; w[19] = 8.81861124204988e-11; w[20] = 3.72036507013564e-14; break; } } }; #endif /* GAUSSHERMITE_H */ mets/src/pch.cpp0000644000176200001440000000174513623061405013276 0ustar liggesusers// [[Rcpp::interfaces(cpp)]] // [[Rcpp::plugins(cpp11)]] #include #include using namespace Rcpp; using arma::datum; // [[Rcpp::export(name = ".rpch")]] arma::vec rpch(unsigned n, std::vector lambda, std::vector time) { auto K = lambda.size(); arma::vec res = -log(runif(n))/lambda[0] + time[0]; for (unsigned i=0; i lambda, std::vector time) { auto K = lambda.size(); auto n = x.size(); arma::vec res(n); res.fill(0); for (unsigned k=0; k= time[k]); for (unsigned i=0; i0) { double t0 = std::fmin(x[i]-time[k], time[k+1]-time[k]); res[i] += lambda[k]*t0; } } } return ( res ); } mets/src/tools.cpp0000644000176200001440000002446313623061405013666 0ustar liggesusers// [[Rcpp::interfaces(r, cpp)]] #include "tools.h" #include SEXP FastLong2(SEXP idata, SEXP inclust, SEXP infixed, SEXP invarying) { BEGIN_RCPP unsigned nvarying = Rcpp::as(invarying); // Number of varying var unsigned nfixed = Rcpp::as(infixed); // Number of non-varying unsigned nclust = Rcpp::as(inclust); // Number within cluster Rcpp::DataFrame d = Rcpp::as(idata); // Wide data //bool Missing = Rcpp::as(missing); unsigned n= d.nrows(); unsigned M = nclust*n; unsigned K = nvarying+nfixed+2; Row idx(nvarying); uvec mis(M); mis.fill(0); for (unsigned k=0; k(d[k]); myList[k] = Rcpp::rep_each(mm,nclust); } else if (Rf_isInteger(d[k])) { IntegerVector mm = Rcpp::as(d[k]); myList[k] = Rcpp::rep_each(mm,nclust); } else if (Rf_isNumeric(d[k])) { NumericVector mm = Rcpp::as(d[k]); myList[k] = Rcpp::rep_each(mm,nclust); } else if (Rf_isComplex(d[k])) { ComplexVector mm = Rcpp::as(d[k]); myList[k] = Rcpp::rep_each(mm,nclust); } else if (Rf_isString(d[k]) || Rf_isFactor(d[k])) { CharacterVector mm = Rcpp::as(d[k]); myList[k] = Rcpp::rep_each(mm,nclust); } } for (unsigned k=0; k(d[idx[k]+i]); myList[nfixed+k] = Rcpp::LogicalVector(mm.begin(),mm.end()); } else if (type==2) { IntegerMatrix mm(nclust,n); for (unsigned i=0; i(d[idx[k]+i]); myList[nfixed+k] = Rcpp::IntegerVector(mm.begin(),mm.end()); } else if (type==3) { NumericMatrix mm(nclust,n); for (unsigned i=0; i(d[idx[k]+i]); //myList[nfixed+k] = Rcpp::NumericMatrix(M,1,mm.begin()); myList[nfixed+k] = Rcpp::NumericVector(mm.begin(),mm.end()); } else if (type==4) { ComplexMatrix mm(nclust,n); for (unsigned i=0; i(d[idx[k]+i]); myList[nfixed+k] = Rcpp::ComplexVector(mm.begin(),mm.end()); } else if (type==5) { CharacterMatrix mm(nclust,n); for (unsigned i=0; i(d[idx[k]+i]); myList[nfixed+k] = Rcpp::CharacterVector(mm.begin(),mm.end()); } } // IntegerVector Id = Rcpp::seq_len(n); IntegerVector Id = Rcpp::rep_each(Rcpp::seq_len(n),nclust); IntegerVector Num = Rcpp::rep(Rcpp::seq_len(nclust),n); myList[K-2] = Id; myList[K-1] = Num; myList.attr("names") = Rcpp::seq_len(K); myList.attr("row.names") = Rcpp::seq_len(M); myList.attr("class") = "data.frame"; return(Rcpp::wrap(myList)); END_RCPP } SEXP FastLong(SEXP idata, SEXP inclust, SEXP infixed, SEXP invarying, SEXP missing) { BEGIN_RCPP unsigned nvarying = Rcpp::as(invarying); // Number of varying var unsigned nfixed = Rcpp::as(infixed); // Number of non-varying unsigned nclust = Rcpp::as(inclust); // Number within cluster mat d = Rcpp::as(idata); // Wide data bool Missing = Rcpp::as(missing); unsigned M = nclust*d.n_rows; unsigned K = nvarying+nfixed+2; mat dd(M,K); // Long data uvec idx(nvarying); uvec mis(M); mis.fill(0); // NA_INTEGER for (unsigned k=0; k0); k(y1); unsigned n = Y1.n_rows; unsigned k = Y1.n_cols; unsigned Cat = Rcpp::as(cat); umat stat; if (!Rf_isNull(y2)) { mat Y2 = Rcpp::as(y2); if ((Y2.n_rows!=n) || (Y2.n_cols!=k)) throw(Rcpp::exception("Dimension did not agree","tools.cpp",1)); stat = (Y1==Y2); } else { stat = conv_to::from(Y1); } uvec group(n); // unsigned npattern = (unsigned) pow(2,(double) k); umat pattern; //(npattern,k); fastpattern(stat,pattern,group,Cat); return(Rcpp::List::create( Rcpp::Named("pattern")=pattern, Rcpp::Named("group")=wrap(group) )); END_RCPP } RcppExport SEXP FastCluster(const SEXP x) { BEGIN_RCPP arma::Row xx = as >(x); vector cpos, csize; unsigned val=0, prev=0, cursize=0; for (unsigned i=0; i >::from(xx), Rcpp::Named("cluster.first")=cpos, Rcpp::Named("cluster.size")=csize )); // return( wrap(list(xx,) ); END_RCPP } RcppExport SEXP FastApprox(const SEXP time, const SEXP newtime, const SEXP equal, const SEXP type // (0: nearest, 1: right, 2: left) ) {/*{{{*/ BEGIN_RCPP unsigned Type = Rcpp::as(type); NumericVector NewTime(newtime); NumericVector Sorted(time); // IntegerVector Order; // NumericVector Sorted = Time; // std::sort(Sorted.begin(), Sorted.end()); // // .sort(); // IntegerVector Order = match(Sorted, Time); // return(Rcpp::wrap(Time)); bool Equal = Rcpp::as(equal); vector idx(NewTime.size()); vector eq(NewTime.size()); double vmax = Sorted[Sorted.size()-1]; NumericVector::iterator it; double upper=0.0; int pos=0; for (int i=0; ivmax) { pos = Sorted.size()-1; } else { it = lower_bound(Sorted.begin(), Sorted.end(), NewTime[i]); upper = *it; if (it == Sorted.begin()) { pos = 0; if (Equal && (NewTime[i]==upper)) { eq[i] = 1; } } // else if (int(it-Sorted.end())==0) { // pos = Sorted.size()-1; // } else { pos = int(it-Sorted.begin()); if (Type==0 && fabs(NewTime[i]-Sorted[pos-1])(type); // NumericVector NewTime(newtime); // NumericVector Sorted(time); // // IntegerVector Order; // // NumericVector Sorted = Time; // // std::sort(Sorted.begin(), Sorted.end()); // // // .sort(); // // IntegerVector Order = match(Sorted, Time); // // return(Rcpp::wrap(Time)); // unsigned Equal = Rcpp::as(equal); //// bool Equal = Rcpp::as(equal); // vector eq(NewTime.size()); // // vector idx(NewTime.size()); //// IntegerVector idx(NewTime.size(),0); // // double vmax = Sorted[Sorted.size()-1]; // NumericVector::iterator it; // double upper=0.0; int pos=0; // for (int i=0; ivmax) { // pos = Sorted.size()-1; // } else { // it = lower_bound(Sorted.begin(), Sorted.end(), NewTime[i]); // upper = *it; // if (it == Sorted.begin()) { // pos = 0; // if ((Equal==1) && (NewTime[i]==upper)) { eq[i] = 1; } // } // // else if (int(it-Sorted.end())==0) { // // pos = Sorted.size()-1; // // } // else { // pos = int(it-Sorted.begin()); // if (Type==0 && fabs(NewTime[i]-Sorted[pos-1]) #include #include /* #include */ /* #include */ /* #include */ using namespace std; using namespace Rcpp; using namespace arma; const double twopi = 2*M_PI; //datum::pi; const double itwopi = 0.5/M_PI; //datum::pi; const double log2pi = log(twopi); struct vecmat { vec V; mat M; }; RcppExport SEXP pmvn(SEXP lower, SEXP upper, SEXP mu, SEXP sigma, SEXP cor); RcppExport SEXP Dpmvn(SEXP lower, SEXP upper, SEXP mu, SEXP sigma, SEXP std); /* RcppExport SEXP loglikMVN(SEXP yl, SEXP yu, */ /* SEXP status, */ /* SEXP mu, SEXP dmu, */ /* SEXP s, SEXP ds, */ /* SEXP z, SEXP su, SEXP dsu, */ /* SEXP threshold, SEXP dthreshold, */ /* SEXP score); */ RcppExport SEXP bvncdf(SEXP a, SEXP b, SEXP r); double Sbvn(double &l1, double &l2,double &r); inline double Fbvn(double u1, double u2, double r) { u1 *= -1; u2 *= -1; return(Sbvn(u1,u2,r)); } vecmat Dbvn(double y1, double y2, double R); double dbvnorm(double y1, double y2, double R); double mvtdst(int* n, int* nu, double* lower, double* upper, int* infin, double* correl, double* delta, int* maxpts, double* abseps, double* releps, double* error, double* value, int* inform); extern "C" double bvnd_(const double *dh, const double *dk, const double *r); #endif /* MVN_H */ mets/src/Makevars0000644000176200001440000000032513623061405013505 0ustar liggesusers## Use the R_HOME indirection to support installations of multiple R version PKG_CPPFLAGS = -I../inst/include -DNDEBUG PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) mets/src/cor.cpp0000644000176200001440000011556313623061405013313 0ustar liggesusers #include #include #include #include #include #include using namespace arma; using namespace Rcpp; // {{{ laplace and derivatives for structured random cif double lapgam(double alpha,double beta,double t) { double val; val=exp(alpha*(log(beta)-log(beta+t))); return(val); } double ilapgam(double alpha,double beta,double y) { double val; val=beta*(exp(-log(y)/alpha)-1); return(val); } double Dilapgam(double alpha,double beta,double y) { double val; val=beta*exp(-log(y)/alpha)*(log(y)/(alpha*alpha)); return(val); } double Dbetailapgam(double alpha,double beta,double y) { double val; val=(exp(-log(y)/alpha)-1); return(val); } double Dalphalapgam(double alpha,double beta,double t) { double val; val=exp(alpha*(log(beta)-log(beta+t))); val=(log(beta)-log(beta+t))*val; return(val); } double Dbetalapgam(double alpha,double beta,double t) { double val; val=exp(alpha*(log(beta)-log(beta+t))); val=alpha*(1/beta-1/(beta+t))*val; return(val); } double Dtlapgam(double alpha,double beta,double t) { double val; val=exp(alpha*(log(beta)-log(beta+t))); val=-alpha*(1/(beta+t))*val; return(val); } // }}} // {{{ Complex laplace and derivatives for structured random cif cx_double Clapgam(cx_double alpha,cx_double beta,cx_double t) { cx_double val; val=exp(alpha*(log(beta)-log(beta+t))); return(val); } cx_double Cilapgam(cx_double alpha,cx_double beta,cx_double y) { cx_double val; val=beta*(exp(-log(y)/alpha)- (cx_double) 1); return(val); } cx_double CDilapgam(cx_double alpha,cx_double beta,cx_double y) { cx_double val; val=beta*exp(-log(y)/alpha)*(log(y)/(alpha*alpha)); return(val); } cx_double CDbetailapgam(cx_double alpha,cx_double beta,cx_double y) { cx_double val; val=(exp(-log(y)/alpha)-(cx_double) 1); return(val); } cx_double CDalphalapgam(cx_double alpha,cx_double beta,cx_double t) { cx_double val; val=exp(alpha*(log(beta)-log(beta+t))); val=(log(beta)-log(beta+t))*val; return(val); } //cx_double CDbetalapgam(cx_double alpha,cx_double beta,cx_double t) //{ //cx_double val; //val=exp(alpha*(log(beta)-log(beta+t))); //val=alpha*(1/beta-1/(beta+t))*val; //return(val); //} // // //cx_double CDtlapgam(cx_double alpha,cx_double beta,cx_double t) //{ //cx_double val; //val=exp(alpha*(log(beta)-log(beta+t))); //val=-alpha*(1/(beta+t))*val; //return(val); //} // }}} void ckrvdes(vec &alphai,vec &alphak, // {{{ double beta, double x,double y, vec &ckij, vec &dckij,vec &rvi,vec &rvk) { double val,val1,val2,val3,alphi=0,alphk=0,alph=0; double test=1; // lapgam(),ilapgam(),Dtlapgam(),Dalphalapgam(),Dilapgam(); int prv,k; if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } // fix denne i CPP version //alphi=trans(rvi) * alphai; alphk= trans(rvk) * alphak; //if (test<1) Rprintf("=============================ckr %lf %lf \n",alphi,alphk); prv=rvi.n_rows; vec Dphi(prv),Dphk(prv); val=1; for (k=0;k0) { val1=rvi(k)*ilapgam(alphi,beta,exp(-x))+ rvk(k)*ilapgam(alphk,beta,exp(-y)); if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val1=lapgam(alph,beta,val1); val=val*val1; } ckij(0)=1-exp(-x)-exp(-y)+val; if (test<1) Rprintf(" %lf ckij \n",ckij(0)); val1=0; for (k=0;k0) { if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val2=rvi(k)*ilapgam(alphi,beta,exp(-x))+rvk(k)*ilapgam(alphk,beta,exp(-y)); val1= Dtlapgam(alph,beta,val2); val3= lapgam(alph,beta,val2); dckij(k)=dckij(k)+Dalphalapgam(alph,beta,val2)/val3; Dphi=Dphi+(val1*rvi(k)*Dilapgam(alphi,beta,exp(-x))/val3)*rvi; //scl_vec_mult(val1*rvi(k)*Dilapgam(alphi,beta,exp(-x))/val3,rvi,Dphi); Dphk=Dphk+(val1*rvk(k)*Dilapgam(alphk,beta,exp(-y))/val3)*rvk; dckij=dckij+Dphi+Dphk; //vec_add(Dphi,dckij,dckij); vec_add(Dphk,dckij,dckij); }; dckij=val*dckij; //scl_vec_mult(val,dckij,dckij); val2=rvi(k)*ilapgam(alphi,beta,exp(-x))+rvk(k)*ilapgam(alphk,beta,exp(-y)); val1= Dtlapgam(alph,beta,val2); val3= lapgam(alph,beta,val2); dckij(k)=dckij(k)+Dalphalapgam(alph,beta,val2)/val3; Dphi=val1*rvi*rvi(k)*Dilapgam(alphi,beta,exp(-x))/val3; Dphk=val1*rvk*rvk(k)*Dilapgam(alphk,beta,exp(-y))/val3; dckij=(dckij+Dphi+Dphk); dckij=val*dckij; //if (test<1) print_vec(dckij); //free_vecs(&Dphi,&Dphk,NULL); if (test<1) Rprintf("=============================================== ude af cvrks \n"); } // }}} void funkdes2(vec &alphai,vec &alphak, // {{{ double beta, double x,double y, vec &ckij, vec &dckij,vec &rvi,vec &rvk) { double val,val1,alphi,alphk,alph,betai,betak; double test=1; // lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int prv,k; if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } alphi=dot(rvi,alphai); alphk=dot(rvk,alphak); betai=alphi; betak=alphk; if (test<1) Rprintf("=============================ckr %lf %lf \n",alphi,alphk); prv=rvk.n_rows; val=1; for (k=0;k0) { val1=rvi(k)*ilapgam(alphi,betai,exp(-x))+ rvk(k)*ilapgam(alphk,betak,exp(-y)); if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val1=lapgam(alph,betai,val1); val=val*val1; } ckij(0)=1-exp(-x)-exp(-y)+val; } // }}} void ckrvdes2(vec &alphai,vec &alphak, // {{{ double beta, double x,double y, vec &ckij, vec &dckij,vec &rvi,vec &rvk) { double val,val1,alphi=0,alphk=0,alph,betai,betak; double test=1; //lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int prv,k,nn,i; //void funkdes2(); if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } // fix denne i CPP version //rvi.print("ckrv rvi"); //alphai.print("alph ckrv rvi"); nn=rvi.n_rows; for (k=0;k< nn;k++) { alphi=alphi+rvi(k)*alphai(k); alphk=alphk+rvk(k)*alphak(k); } //alphi=sum(rvi % alphai); alphk=sum(rvk% alphak); //alphi=trans(rvi) * alphai; alphk=trans(rvk) * alphak; betai=alphi; betak=alphk; prv=rvi.n_rows; vec Dphi(prv),Dphk(prv); Dphi.fill(0); Dphk.fill(0); val=1; for (k=0;k0) { val1=rvi(k)*ilapgam(alphi,betai,exp(-x))+ rvk(k)*ilapgam(alphk,betak,exp(-y)); if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val1=lapgam(alph,betai,val1); val=val*val1; } ckij(0)=1-exp(-x)-exp(-y)+val; // computation of derivatives using cx_double numbers and cx_double functions // goes through the values and adds epislon*i //double epsilon=0; double epsilon=1E-20; epsilon=1E-6; //double Calpht,Calphit,Calphkt,Cbetait,Cbetakt; //vec Calphait(prv),Calphakt(prv); // //nn=prv; //for (i=0;i< prv;i++) { // {{{ // for (k=0;k< prv;k++) { // Calphait(k)=alphai(k); // Calphakt(k)=alphak(k); // } //// if ((alphai(i)!=0)) // Calphait(i)=alphai(i)+epsilon; //// if ((alphak(i)!=0)) // Calphakt(i)=alphak(i)+epsilon; // // Calphit=0; Calphkt=0; // for (k=0;k< nn;k++) { // Calphit=Calphit+rvi(k)*Calphait(k); // Calphkt=Calphit+rvk(k)*Calphakt(k); // } // Cbetait=Calphit; Cbetakt=Calphkt; // // double Cval1t,Cvalt=1,Cft; // for (k=0;k0) // { // Cval1t=rvi(k)*ilapgam(Calphit,Cbetait,exp(-x))+rvk(k)*ilapgam(Calphkt,Cbetakt,exp(-y)); // if (rvi(k)>0) Calpht=Calphait(k); else Calpht=Calphakt(k); // Cval1t=lapgam(Calpht,Cbetait,Cval1t); // Cvalt=Cvalt*Cval1t; // } // Cft=1-exp(-x)-exp(-y); // Cft=Cft+Cvalt; // dckij(i)= (Cft-ckij(0))/epsilon; // printf(" %d %lf \n",i,dckij(i)); //} // }}} // // computation of derivatives using cx_double numbers and cx_double functions // goes through the values and adds epislon*i //double epsilon=0; //double epsilon=1E-20; epsilon=1E-20; cx_double Calph,Calphi,Calphk,Cbetai,Cbetak; cx_vec Calphai(prv),Calphak(prv); nn=prv; for (i=0;i< prv;i++) { for (k=0;k< prv;k++) { Calphai(k)=cx_double(alphai(k),0); Calphak(k)=cx_double(alphak(k),0); } Calphai(i)=cx_double(alphai(i),epsilon); Calphak(i)=cx_double(alphak(i),epsilon); // sum af alpha'er Calphi=0; Calphk=0; for (k=0;k< nn;k++) { Calphi=Calphi+rvi(k)*Calphai(k); Calphk=Calphk+rvk(k)*Calphak(k); } Cbetai=Calphi; Cbetak=Calphk; cx_double Cval1,Cval=1,Cf; for (k=0;k0) { Cval1=rvi(k)*Cilapgam(Calphi,Cbetai,exp(-x))+rvk(k)*Cilapgam(Calphk,Cbetak,exp(-y)); if (rvi(k)>0) Calph=Calphai(k); else Calph=Calphak(k); Cval1=Clapgam(Calph,Cbetai,Cval1); Cval=Cval*Cval1; } Cf=(cx_double) 1-exp(-x)-exp(-y); Cf=Cf+Cval; dckij(i)= imag(Cf)/epsilon; } } // }}} void ckrvdestheta(mat &thetades,vec &theta, // {{{ int inverse, double x,double y, vec &ckij, vec &dckij,vec &rvi,vec &rvk) { double val,val1,alphi=0,alphk=0,alph,betai,betak; double test=1; //lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int ntheta,prv,k,nn,i; //void funkdes2(); if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } nn=rvi.n_rows; prv=nn; ntheta=theta.n_rows; vec theta2(ntheta); if (inverse==1) theta2=exp(theta); else theta2=theta; vec alphai(prv),alphak(prv); alphai= thetades * theta2; alphak= thetades * theta2; // fix denne i CPP version //rvi.print("ckrv rvi"); //alphai.print("alph ckrv rvi"); nn=rvi.n_rows; for (k=0;k< nn;k++) { alphi=alphi+rvi(k)*alphai(k); alphk=alphk+rvk(k)*alphak(k); } //alphi=sum(rvi % alphai); alphk=sum(rvk% alphak); //alphi=trans(rvi) * alphai; alphk=trans(rvk) * alphak; betai=alphi; betak=alphk; prv=rvi.n_rows; vec Dphi(prv),Dphk(prv); Dphi.fill(0); Dphk.fill(0); val=1; for (k=0;k0) { val1=rvi(k)*ilapgam(alphi,betai,exp(-x))+rvk(k)*ilapgam(alphk,betak,exp(-y)); if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val1=lapgam(alph,betai,val1); val=val*val1; } ckij(0)=1-exp(-x)-exp(-y)+val; // computation of derivatives using cx_double numbers and cx_double functions // goes through the values and adds epislon*i double epsilon=1E-20; cx_double Calph,Calphi,Calphk,Cbetai,Cbetak; cx_vec Calphai(prv),Calphak(prv); cx_vec Ctheta(ntheta),Ctheta2(ntheta); nn=prv; for (i=0;i< ntheta;i++) { for (k=0;k< ntheta;k++) Ctheta(k)=cx_double(theta(k),0); Ctheta(i)=cx_double(theta(i),epsilon); if (inverse==1) Ctheta2=exp(Ctheta); else Ctheta2=Ctheta; Calphai= thetades * Ctheta2; Calphak= thetades * Ctheta2; // sum af alpha'er Calphi=0; Calphk=0; for (k=0;k< nn;k++) { Calphi=Calphi+rvi(k)*Calphai(k); Calphk=Calphk+rvk(k)*Calphak(k); } Cbetai=Calphi; Cbetak=Calphk; cx_double Cval1,Cval=1,Cf; for (k=0;k0) { Cval1=rvi(k)*Cilapgam(Calphi,Cbetai,exp(-x))+rvk(k)*Cilapgam(Calphk,Cbetak,exp(-y)); if (rvi(k)>0) Calph=Calphai(k); else Calph=Calphak(k); Cval1=Clapgam(Calph,Cbetai,Cval1); Cval=Cval*Cval1; } Cf=(cx_double) 1-exp(-x)-exp(-y); Cf=Cf+Cval; dckij(i)= imag(Cf)/epsilon; } } // }}} RcppExport SEXP ckrvdesthetaR(SEXP ithetades,SEXP itheta, SEXP iinverse, SEXP isx,SEXP isy, // SEXP ickij,SEXP idckij, SEXP irvi,SEXP irvk) { // {{{ mat thetades = Rcpp::as(ithetades); colvec theta = Rcpp::as(itheta); // colvec cif2 = Rcpp::as(icif2); // colvec istatus1 = Rcpp::as(iistatus1); // colvec istatus2 = Rcpp::as(iistatus2); int inverse=Rcpp::as(iinverse); double sx =Rcpp::as(isx); double sy =Rcpp::as(isy); double x=-log(1-sx); double y=-log(1-sy); // printf(" %lf %lf %lf %lf \n",x,y,exp(-x),exp(-y)); colvec rvi = Rcpp::as(irvi); colvec rvk = Rcpp::as(irvk); // thetades.print("kj"); rvi.print("kj"); rvk.print("kj"); // printf(" %lf %lf \n",x,y); double ckij = 0; colvec dckij =theta; double val,val1,alphi=0,alphk=0,alph,betai,betak; double test=1; //lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int ntheta,prv,k,nn,i; //void funkdes2(); if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } nn=rvi.n_rows; prv=nn; ntheta=theta.n_rows; vec theta2(ntheta); vec laps(nn); vec ilaps(nn); laps.fill(1); ilaps.fill(0); if (inverse==1) theta2=exp(theta); else theta2=theta; vec alphai(prv),alphak(prv); alphai= thetades * theta2; alphak= thetades * theta2; //alphai.print("pari rvi"); //alphak.print("park rvi"); // fix denne i CPP version //rvi.print("ckrv rvi"); //alphai.print("alph ckrv rvi"); nn=rvi.n_rows; for (k=0;k< nn;k++) { alphi=alphi+rvi(k)*alphai(k); alphk=alphk+rvk(k)*alphak(k); } //alphi=sum(rvi % alphai); alphk=sum(rvk% alphak); //alphi=trans(rvi) * alphai; alphk=trans(rvk) * alphak; betai=alphi; betak=alphk; prv=rvi.n_rows; vec Dphi(prv),Dphk(prv); Dphi.fill(0); Dphk.fill(0); //printf(" %lf %lf %lf %lf \n",alphi,alphk,betai,betak); //printf(" %lf %lf \n",exp(-x),exp(-y)); double ii1=ilapgam(alphi,betai,exp(-x)); double ii2=ilapgam(alphk,betak,exp(-y)); val=1; for (k=0;k0) { val1=rvi(k)*ii1+rvk(k)*ii2; if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); //printf("%d %lf %lf %lf %lf \n",k,alph,val1,rvi(k),rvk(k)); ilaps(k)=val1; val1=lapgam(alph,betai,val1); laps(k)=val1; val=val*val1; } ckij=1-exp(-x)-exp(-y)+val; // computation of derivatives using cx_double numbers and cx_double functions // goes through the values and adds epislon*i double epsilon=1E-20; cx_double Calph,Calphi,Calphk,Cbetai,Cbetak; cx_vec Calphai(prv),Calphak(prv); cx_vec Ctheta(ntheta),Ctheta2(ntheta); nn=prv; for (i=0;i< ntheta;i++) { // {{{ for (k=0;k< ntheta;k++) Ctheta(k)=cx_double(theta(k),0); Ctheta(i)=cx_double(theta(i),epsilon); if (inverse==1) Ctheta2=exp(Ctheta); else Ctheta2=Ctheta; Calphai= thetades * Ctheta2; Calphak= thetades * Ctheta2; // sum af alpha'er Calphi=0; Calphk=0; for (k=0;k< nn;k++) { Calphi=Calphi+rvi(k)*Calphai(k); Calphk=Calphk+rvk(k)*Calphak(k); } Cbetai=Calphi; Cbetak=Calphk; cx_double Cval1,Cval=1,Cf; for (k=0;k0) { Cval1=rvi(k)*Cilapgam(Calphi,Cbetai,exp(-x))+rvk(k)*Cilapgam(Calphk,Cbetak,exp(-y)); if (rvi(k)>0) Calph=Calphai(k); else Calph=Calphak(k); Cval1=Clapgam(Calph,Cbetai,Cval1); Cval=Cval*Cval1; } Cf=(cx_double) 1-exp(-x)-exp(-y); Cf=Cf+Cval; dckij(i)= imag(Cf)/epsilon; } // }}} List res; res["like"]=ckij; res["ssdob"]=val; res["sx"]=sx; res["sy"]=sy; res["par"]=alphai; res["laps"]=laps; res["ilaps"]=ilaps; res["rv1"]=rvi; res["rv2"]=rvk; res["lamtot"]=betai; res["ii1"]=ii1; res["ii2"]=ii2; res["dlike"]=dckij; return(res); } // }}} double ckrvdesp11t(vec &theta,mat &thetades,int inverse, // {{{ double x,double y, vec &rvi,vec &rvk) { double p11,val,val1,alphi=0,alphk=0,alph,betai,betak; double test=1; //lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int prv,k,nn; nn=rvi.n_rows; colvec alphai(nn),alphak(nn),vtheta2(nn); // if (inverse==1) vtheta2=exp(theta); else vtheta2=theta; alphai= thetades * vtheta2; alphak= thetades * vtheta2; if (test<1) { Rprintf("ckr \n"); //print_vec(dckij); print_vec(rvk); print_vec(rvi); print_vec(alphai); print_vec(alphak); } for (k=0;k< nn;k++) { alphi=alphi+rvi(k)*alphai(k); alphk=alphk+rvk(k)*alphak(k); } //alphi=sum(rvi % alphai); alphk=sum(rvk% alphak); //alphi=trans(rvi) * alphai; alphk=trans(rvk) * alphak; betai=alphi; betak=alphk; prv=rvi.n_rows; vec Dphi(prv),Dphk(prv); Dphi.fill(0); Dphk.fill(0); val=1; for (k=0;k0) { val1=rvi(k)*ilapgam(alphi,betai,exp(-x))+ rvk(k)*ilapgam(alphk,betak,exp(-y)); if (rvi(k)>0) alph=alphai(k); else alph=alphak(k); val1=lapgam(alph,betai,val1); val=val*val1; } p11=1-exp(-x)-exp(-y)+val; return(p11); } // }}} void ckrvdes3(vec &theta,mat &thetades, // {{{ int inverse, double x,double y, vec &ckij, vec &dckij,vec &rvi,vec &rvk) { //double val,val1,val2,val3,alphi=0,alphk=0,alph,betai,betak; //double lapgam(),ilapgam(),Dtlapgam(), Dalphalapgam(),Dilapgam(),Dbetalapgam(),Dbetailapgam(); int k,nn; //void funkdes2(); // ckij(0)= ckrvdesp11t(theta,thetades,inverse,x,y,rvi,rvk); nn=theta.n_rows; for (k=0;k< nn;k++) { colvec thetad=theta; thetad(k)+=0.01; dckij(k)=(ckrvdesp11t(thetad,thetades,inverse,x,y,rvi,rvk)-ckij(0))/0.01; } } // }}} // {{{ Laplace for random-cif model double laplace(double t,double x) { // {{{ double val,val1; val=(1+x*t); if (val<0) val=0; //if (fabs(t)< 0.000000000000001) val1=0; else val1=exp(-log(val)*(1/t)); val1=exp(-log(val)*(1/t)); // Rprintf("laplace %lf %lf \n",val,val3); return(val1); } // }}} double ilaplace(double t,double y) { // {{{ double val; //,laplace(); val=exp(-log(y)*t); val= (val-1)/t; // Rprintf("ilaplace y^(1/t) %lf %lf \n",exp(log(y)/t),pow(y,1.0/t)); // Rprintf("ilaplace %lf %lf \n",val,val1); return(val); } // }}} double Dilaplace(double theta,double y) { // {{{ double val4,val2,val,val1; val=exp(log(y)/theta); val2=-log(y)*val/(theta*theta); val4=(1-val)+theta*val2; val1=(val4+log(y)*(1-val)/theta)/val; return(val1); } // }}} double Dlaplace(double theta,double t) { // {{{ double val,val1; val=1+t/theta; val1=theta*val-log(val); val=val1*laplace(theta,t); return(val); } // }}} double D2laplace(double theta,double t) { // {{{ double val,val1,val2,val3; val=1+t/theta; val1=theta*val-log(val); val3=(t/(theta*theta))/val+(val+t/theta)/(val*val); val2=Dlaplace(theta,t)*val1+laplace(theta,t)*val3; return(val2); } // }}} // }}} void ckf(double t,double x,double y,vec &ckij,vec &dckij) { // {{{ double val,val2,val3,val4; //double laplace(),ilaplace(),Dilaplace(),Dlaplace(),D2laplace(); double t0; if (x<0) x=0.0001; if (y<0) y=0.0001; val=ilaplace(t,exp(-x))+ilaplace(t,exp(-y)); val2=laplace(t,val); ckij(0)=1-exp(-x)-exp(-y)+val2; val3=exp(x*t)+exp(y*t)-1; val4=val3*log(val3)+exp(x*t)*(-x*t)+exp(y*t)*(-y*t); // t0 =exp(-log(t)*2)*exp(log(val3)*(-1/t-1))*val4; t0 =pow(1/t,2)*exp(log(val3)*(-1/t-1))*val4; dckij(0)=t0; } // }}} void DUetagamma(double t, double x,double y,vec &xi,vec &xk) { // {{{ double y1,y2,t1,val3,val4; y1=exp(-x); y2=exp(-y); val3=exp(x*t)+exp(y*t)-1; val4 =exp(log(val3)*(-1/t)); t1=val4/(val3); //if (isnan(t1)) { //Rprintf(" missing values in DUetagamma \n"); //Rprintf(" t x y val3=exp(x*t)+exp(y*t)-1 %lf %lf %lf %lf \n",t,x,y,val3); ////print_vec(xi); ////print_vec(xk); //}; xi= (y1-t1*exp(t*x))*xi; xk= (y2-t1*exp(t*y))*xk; xi=xi+xk; } // }}} double plack(double theta,double cif1,double cif2,vec &dp) { // {{{ double valr,valn,val1,cifs, thetad,val1d,valnd,valrd,d, cif1d, cif2d, cifsd; cifs=cif1+cif2; // {{{ if (theta!=1) { valn=2*(theta-1); val1=(1+(theta-1)*(cifs))-pow( pow((1+(theta-1)*cifs),2)-4*cif1*cif2*theta*(theta-1),0.5); valr=val1/valn; } else { valr=cif1*cif2; } // }}} d=0.000001; thetad=theta+d; // {{{ if (thetad!=1) { valnd=2*(thetad-1); val1d=(1+(thetad-1)*(cifs))-pow( pow((1+(thetad-1)*cifs),2)-4*cif1*cif2*thetad*(thetad-1),0.5); valrd=val1d/valnd; } else { valrd=cif1*cif2; } // }}} dp(0)=(valrd-valr)/d; cif1d=cif1+d; cifsd=cif1d+cif2; // {{{ if (theta!=1) { valnd=2*(theta-1); val1d=(1+(theta-1)*(cifsd))-pow( pow((1+(theta-1)*cifsd),2)-4*cif1d*cif2*theta*(theta-1),0.5); valrd=val1d/valnd; } else { valrd=cif1d*cif2; } // }}} dp(1)=(valrd-valr)/d; cif2d=cif2+d; cifsd=cif1+cif2d; // {{{ if (theta!=1) { valnd=2*(theta-1); val1d=(1+(theta-1)*(cifsd))-pow( pow((1+(theta-1)*cifsd),2)-4*cif1d*cif2*theta*(theta-1),0.5); valrd=val1d/valnd; } else { valrd=cif1d*cif2; } // }}} dp(2)=(valrd-valr)/d; //if (theta!=1) { //dval1= cifs-(2*(1+(theta-1)*cifs)*cifs-4*2*cif1*cif2*theta+4*cif1*cif2)/ // (2*pow( pow((1+(theta-1)*cifs),2)-4*cif1*cif2*theta*(theta-1),0.5)); //val=valn*dval1-val1*2; //dp(0)= val/pow(valn,2); //dp(0)=(valrd-valr)/0.000001; //} else { //dp(0)=1; //} return(valr); } // }}} double min(double a, double b) { if (ab) return(a); else return(b); } RcppExport SEXP cor(SEXP itimes,SEXP iy,SEXP icause, SEXP iCA1, SEXP iKMc, SEXP iz, SEXP iest,SEXP iZgamma, SEXP isemi,SEXP izsem, // detail,biid,gamiid,timepow,theta,vartheta, SEXP itheta, SEXP iXtheta, SEXP iDXtheta, SEXP idimDX, SEXP ithetades, SEXP icluster,SEXP iclustsize,SEXP iclusterindex, SEXP iinverse,SEXP iCA2, SEXP ix2, // SEXP iz2, SEXP isemi2, SEXP iest2,SEXP iZ2gamma2, // b2iid, gam2iid, SEXP htheta,SEXP dhtheta,SEXP rhoR, SEXP iflexfunc, SEXP iiid, SEXP isym,SEXP iweights, SEXP isamecens, SEXP istabcens,SEXP iKMtimes,SEXP isilent,SEXP icifmodel, SEXP idepmodel, SEXP iestimator, SEXP ientryage,SEXP icif1entry,SEXP icif2entry,SEXP itrunkp, SEXP irvdes ) // {{{ { // {{{ setting matrices and vectors, and exporting to armadillo matrices //mat z2 = Rcpp::as(iz2); mat est = Rcpp::as(iest); mat est2 = Rcpp::as(iest2); mat z = Rcpp::as(iz); mat zsem = Rcpp::as(izsem); mat z2 = Rcpp::as(ix2); mat thetades = Rcpp::as(ithetades); mat clusterindex = Rcpp::as(iclusterindex); mat rvdes= Rcpp::as(irvdes); colvec theta = Rcpp::as(itheta); colvec y = Rcpp::as(iy); colvec clustsize = Rcpp::as(iclustsize); int antclust = clusterindex.n_rows; colvec times = Rcpp::as(itimes); int Ntimes=times.n_rows; colvec cause = Rcpp::as(icause); colvec cluster = Rcpp::as(icluster); colvec Zgamma = Rcpp::as(iZgamma); colvec KMtimes = Rcpp::as(iKMtimes ); colvec Z2gamma2 = Rcpp::as(iZ2gamma2); colvec KMc= Rcpp::as(iKMc); colvec weights = Rcpp::as(iweights); colvec entryage = Rcpp::as(ientryage); colvec cif1entry = Rcpp::as(icif1entry); colvec cif2entry = Rcpp::as(icif2entry); colvec trunkp = Rcpp::as(itrunkp); vec cif1lin=-log(1-cif1entry); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); int samecens = Rcpp::as(isamecens); int inverse= Rcpp::as(iinverse); int semi = Rcpp::as(isemi); int semi2 = Rcpp::as(isemi2); int flexfunc = Rcpp::as(iflexfunc); int stabcens = Rcpp::as(istabcens); int silent = Rcpp::as(isilent); int cifmodel = Rcpp::as(icifmodel); int CA1 = Rcpp::as(iCA1); int CA2 = Rcpp::as(iCA2); int sym = Rcpp::as(isym); int depmodel= Rcpp::as(idepmodel); int estimator= Rcpp::as(iestimator); int iid= Rcpp::as(iiid); mat Xtheta = Rcpp::as(iXtheta); int udtest=0; if (udtest==1) { // {{{ Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); est.print("est"); est2.print("est2"); z.print("z"); zsem.print("zsemi"); z2.print("z2"); thetades.print("theta.des"); clusterindex.print("clusterindex"); rvdes.print("rvdes"); theta.print("theta"); Xtheta.print("Xtheta"); y.print("y-times"); clustsize.print("clustsize"); times.print("times"); cause.print("cause"); cluster.print("cluster"); Zgamma.print("zgam"); Z2gamma2.print("zgam2"); KMtimes.print("KMtimes"); KMc.print("KMc"); weights.print("weights"); entryage.print("entryage"); cif1entry.print("cif1entry"); cif2entry.print("cif2entry"); trunkp.print("trunkp"); } else if (udtest==2) { Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); Rprintf("est %lf \n",mean(mean(est))); Rprintf("est2 %lf \n",mean(mean(est2))); Rprintf("z %lf \n",mean(mean(z))); Rprintf("zsem %lf \n",mean(mean(zsem))); Rprintf("z2 %lf \n",mean(mean(z2))); mat mt=mean(thetades); mt.print("meancol thetades"); Rprintf("ci %lf \n",mean(mean(clusterindex))); Rprintf("rvdes %lf \n",mean(mean(rvdes))); Rprintf("theta %lf \n",mean(theta)); Rprintf("Xtheta %lf \n",mean(mean(Xtheta))); Rprintf("y %lf \n",mean(y)); Rprintf("ci %lf \n",mean(clustsize)); Rprintf("times %lf \n",mean(times)); Rprintf("cause %lf \n",mean(cause)); Rprintf("cluster %lf \n",mean(cluster)); Rprintf("Zgamma %lf \n",mean(Zgamma)); Rprintf("Z2gamma2 %lf \n",mean(Z2gamma2)); Rprintf("KMtimes %lf \n",mean(KMtimes)); Rprintf("KMc %lf \n",mean(KMc)); Rprintf("weights %lf \n",mean(weights)); Rprintf("entry %lf \n",mean(entryage)); Rprintf("cif1entry %lf \n",mean(cif1entry)); Rprintf("cif2entry %lf \n",mean(cif2entry)); Rprintf("trunkp %lf \n",mean(trunkp)); } // }}} int nr,ci,ck,i,j,c,s,k,v,c1,v1; double Li,Lk,weight=0,p11t,ormarg=0,sdj,diff,cweight2,time,resp1,resp2; // double resp3; double Dinverse=1,DDinverse=1,ddd,edd,ssf=0,response=0,thetak=0,respst=0; // double plack(); vec dplack(4); dplack.fill(0); int pt=theta.n_rows; vec ckij(4),dckij(4),ckijvv(4),dckijvv(4),ckijtv(4),dckijtv(4),ckijvt(4),dckijvt(4); i=silent+1; mat thetiid(antclust,pt); if (iid==1) thetiid.fill(0); colvec p11tvec(antclust); // p11tvec=0; // Rprintf(" %d \n",pt); colvec Utheta(pt); colvec vthetascore(pt); colvec pthetavec(pt); vec vtheta2(pt); mat DUtheta(pt,pt); DUtheta.fill(0); Utheta.fill(0); if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } rowvec bhatt2 = est.row(est2.n_cols-1); colvec pbhat2(z.n_rows); // depmodel=5 // rvdes.print("rvdes"); // thetades.print("ttt"); nr=rvdes.n_cols; vec alphaj(nr),alphai(nr),alpha(nr), rvvec(nr),rvvec1(nr),rvvec2vv(nr),rvvec2vt(nr),rvvec2tv(nr); vec rvvec2(nr); // }}} for (s=0;s0) { R_CheckUserInterrupt(); time=times(s); rowvec bhatt = est.row(s); vec pbhat = z * trans(bhatt); if ((semi==1) & (cifmodel==1)) pbhat = pbhat + Zgamma*time; if ((semi==1) & (cifmodel==2)) pbhat=pbhat%exp(Zgamma); if ((CA1!=CA2)) { bhatt2 = est2.row(s); pbhat2 = z2 * trans(bhatt2); if ((semi2==1) & (cifmodel==1)) pbhat2 = pbhat2 + Z2gamma2*time; if ((semi2==1) & (cifmodel==2)) pbhat2=pbhat2%exp(Z2gamma2); } for (j=0;j=2) { diff=0; sdj=0; if (depmodel==5) { // {{{ if (inverse==1) vtheta2=exp(theta); else vtheta2=theta; alphai= thetades * vtheta2; alphaj= thetades * vtheta2; } // }}} for (c=0;c 0) && (KMc(k) > 0)) { ci=cause(i); ck=cause(k); resp1= ((y(k)<=time) && (ck==CA2)); resp2= ((y(i)<=time) && (ci==CA1))* ((y(k)<=time) && (ck==CA2)); respst=((y(i)<=entryage(i)) && (ci==CA1))* ((y(k)<=time) && (ck==CA2)) + ((y(i)<=time) && (ci==CA1))* ((y(k)<=entryage(k)) && (ck==CA2)) ; if (depmodel!=5) { // {{{ if (flexfunc==0) { thetak=Xtheta(i,0); pthetavec= trans(thetades.row(i)); } else { thetak=Xtheta(i,s); // pthetavec = DXtheta(span(s),span(i),span(0,pt-1)); pthetavec = DXtheta(span(s),span(i),span::all); // if (j==1) { printf(" %lf %d \n",time,i); pthetavec.print("pt"); } } } // }}} Li=pbhat(i); Lk=pbhat(k); if (CA1!=CA2) { // if (c>v) { // if (ci==CA1) Li=pbhat(i); else Li=pbhat2(i); // if (ck==CA1) Lk=pbhat(k); else Lk=pbhat2(k); // } else Lk=pbhat2(k); // if (j< 10) printf("s=%d i=%d k=%d %lf %lf \n",s,i,k,Lk,pbhat2(k)); Lk=pbhat2(k); } if (depmodel==1) ormarg=(1-exp(-Li))/exp(-Li); else if (depmodel==2) ormarg=(1-exp(-Li))*(1-exp(-Lk)); else if (depmodel==3) ormarg=(1-exp(-Li))*(1-exp(-Lk)); int nocens= (ci!=0)+(ck!=0); nocens=min(nocens,2); if (depmodel==1) { // cor model // {{{ if (stabcens==0) { // {{{ responses if (samecens==1) { resp2=resp2/min(KMc(i),KMc(k)); respst=respst/min(KMc(i),KMc(k)); } else { resp2=resp2/(KMc(i)*KMc(k)); respst=respst/(KMc(i)*KMc(k)); } resp1=resp1/KMtimes(k); } else { // cweight1= max(KMtimes[s],KMc(k)); cweight2= max(KMtimes[s],KMc(i)); if (samecens==1) { resp2=resp2/min(cweight2,cweight2); respst=respst/min(cweight2,cweight2); } resp1=resp1/KMtimes(k); } // }}} if (trunkp(i)<1) { // DENNE skal tilpasse COR modellen FIXES response=weight*(resp2- exp(thetak)*(ormarg+cif1entry(i)*cif2entry(k) -(1-exp(-Li))*cif2entry(k)-(1-exp(-Lk))*cif1entry(i))/trunkp(i)); diff=diff+response; sdj=sdj- weight*exp(thetak)*(ormarg+cif1entry(i)*cif2entry(k)- (1-exp(-Li))*cif2entry(k)- (1-exp(-Lk))*cif1entry(i))/trunkp(i); //resp3=-exp(thetak); } else { double nn=(exp(-Li)+exp(thetak)*(1-exp(-Li))); double nt=(1-exp(-Li))*(1-exp(-Lk))*exp(thetak); p11t=nt/nn; p11tvec(j)=p11t; ssf+=weights(i)*pow(resp2-p11t,2); if (inverse==1) { double dp11t=(nn*(1-exp(-Li))*(1-exp(-Lk))*exp(thetak)-nt*exp(thetak)*(1-exp(-Li)))/pow(nn,2); response= 2*dp11t*(resp2-p11t); sdj=sdj-2*pow(dp11t,2); //resp3=0; } else { response=exp(thetak)*(exp(thetak)*ormarg*(resp1-resp2)-resp2); sdj=sdj+2*exp(2*thetak)*ormarg*(resp1-resp2)-exp(thetak)*resp2; //resp3=exp(2*thetak)*(resp1-resp2)*exp(Li); } diff=diff+response; } // }}} } else if (depmodel==2) { // RR model // {{{ if (estimator==1) { if (samecens==1) { resp2=resp2/min(KMc(i),KMc(k)); respst=respst/min(KMc(i),KMc(k)); } else { resp2=resp2/(KMc(i)*KMc(k)); respst=respst/(KMc(i)*KMc(k)); } weight=1; } else if (estimator==0){ if (samecens==1) weight=1/min(KMc(i),KMc(k)); else weight=1/(KMc(i)*KMc(k)); } else { weight=(time #include #include #include #include #include using namespace std; using namespace Rcpp; using namespace arma; RcppExport SEXP FastLong2(SEXP idata, SEXP inclust, SEXP infixed, SEXP invarying); RcppExport SEXP FastLong(SEXP idata, SEXP inclust, SEXP infixed, SEXP invarying, SEXP missing); RcppExport SEXP FastApprox(const SEXP time, const SEXP newtime, const SEXP equal, const SEXP type); RcppExport SEXP FastPattern(SEXP y1,SEXP y2, SEXP cat); RcppExport SEXP FastCluster(SEXP x); void fastpattern(const umat &y, umat &pattern, uvec &group, unsigned categories=2); template string numStr(T x) { ostringstream nmbstr; nmbstr << x; string ss = nmbstr.str(); return ss; } #endif /* TOOLS_H */ mets/src/fastcox.cpp0000644000176200001440000014356613623061405014203 0ustar liggesusers// [[Rcpp::depends("RcppArmadillo")]] #include #include #include "twostage.h" //#include "fastcox.h" using namespace Rcpp; using namespace arma; RcppExport SEXP FastCoxPrep(SEXP EntrySEXP, SEXP ExitSEXP, SEXP StatusSEXP, SEXP XSEXP, SEXP IdSEXP, SEXP TruncationSEXP) { BEGIN_RCPP arma::vec Entry = Rcpp::as(EntrySEXP); arma::vec Exit = Rcpp::as(ExitSEXP); arma::Col Status= Rcpp::as >(StatusSEXP); arma::mat X = Rcpp::as(XSEXP); try { arma::Col Id = Rcpp::as >(IdSEXP); } catch(...) {} //bool haveId = Rcpp::as(haveIdSEXP); bool Truncation = Rcpp::as(TruncationSEXP); // vec Exit = Rcpp::as(exit); // ivec Status = Rcpp::as(status); // mat X = Rcpp::as(x); // bool haveId = (Rf_isNull)(id); // bool Truncation = !((Rf_isNull)(entry)); // bool Truncation = Entry.n_elem>0; // bool haveId = Id.n_elem>0; // unsigned p = X.n_cols; unsigned n = Exit.n_elem; if (Truncation) n *= 2; //Rcout << "n=" << X.n_rows << ", p=" << X.n_cols << std::endl; mat XX(n, X.n_cols*X.n_cols); // Calculate XX' at each time-point for (unsigned i=0; i Sign; if (Truncation) { // vec Entry = Rcpp::as(entry); Exit.insert_rows(0,Entry); X.insert_rows(0,X); Status.insert_rows(0,Status); Sign.reshape(n,1); Sign.fill(1); for (unsigned i=0; i<(n/2); i++) Sign(i) = -1; Status = Status%(1+Sign); } //Rcout << "Status=" << Status << std::endl; arma::uvec idx0 = sort_index(Status,"descend"); arma::uvec idx = stable_sort_index(Exit.elem(idx0),"ascend"); idx = idx0.elem(idx); //Rcout << "idx=" << idx << std::endl; if (Truncation) { Sign = Sign.elem(idx); } if (X.n_rows>0) { XX = XX.rows(idx); X = X.rows(idx); } Status = Status.elem(idx); arma::uvec jumps = find(Status>0); //Rprintf("jumps"); arma::Col newId; // if (haveId) { // // uvec Id = Rcpp::as(id); // if (Truncation) { // Id.insert_rows(0,Id); // } // newId = Id.elem(idx); // } return(Rcpp::wrap(Rcpp::List::create(Rcpp::Named("XX")=XX, Rcpp::Named("X")=X, Rcpp::Named("jumps")=jumps, Rcpp::Named("sign")=Sign, Rcpp::Named("ord")=idx, Rcpp::Named("time")=Exit, Rcpp::Named("id")=newId ))); END_RCPP } RcppExport SEXP FastCoxPrepStrata(SEXP EntrySEXP, SEXP ExitSEXP, SEXP StatusSEXP, SEXP XSEXP, SEXP IdSEXP, SEXP TruncationSEXP, SEXP strataSEXP, SEXP weightsSEXP, SEXP offsetsSEXP, SEXP ZSEXP, SEXP caseweightsSEXP ) {/*{{{*/ BEGIN_RCPP arma::vec Entry = Rcpp::as(EntrySEXP); arma::vec Exit = Rcpp::as(ExitSEXP); arma::Col Status= Rcpp::as >(StatusSEXP); arma::mat X = Rcpp::as(XSEXP); arma::mat Z = Rcpp::as(ZSEXP); arma::Col strata= Rcpp::as >(strataSEXP); arma::Col Id= Rcpp::as >(IdSEXP); // arma::uvec idx = Rcpp::as >(sortid); // try { // arma::Col Id = Rcpp::as >(IdSEXP); // } // catch(...) {} colvec weights = Rcpp::as(weightsSEXP); colvec offsets = Rcpp::as(offsetsSEXP); colvec caseweights = Rcpp::as(caseweightsSEXP); //bool haveId = Rcpp::as(haveIdSEXP); bool Truncation = Rcpp::as(TruncationSEXP); // vec Exit = Rcpp::as(exit); // ivec Status = Rcpp::as(status); // mat X = Rcpp::as(x); // bool haveId = (Rf_isNull)(id); // bool Truncation = !((Rf_isNull)(entry)); // bool Truncation = Entry.n_elem>0; // bool haveId = Id.n_elem>0; // unsigned p = X.n_cols; unsigned n = Exit.n_elem; if (Truncation) n *= 2; //Rcout << "n=" << X.n_rows << ", p=" << X.n_cols << std::endl; mat XX(n, X.n_cols*X.n_cols); // Calculate XX' at each time-point for (unsigned i=0; i Sign; Sign.reshape(n,1); Sign.fill(1); if (Truncation) { // vec Entry = Rcpp::as(entry); Exit.insert_rows(0,Entry); X.insert_rows(0,X); Z.insert_rows(0,Z); Status.insert_rows(0,Status); Id.insert_rows(0,Id); strata.insert_rows(0,strata); weights.insert_rows(0,weights); caseweights.insert_rows(0,caseweights); offsets.insert_rows(0,offsets); for (unsigned i=0; i<(n/2); i++) Sign(i) = -1; Status = Status%(1+Sign); } //Rcout << "Status=" << Status << std::endl; // also sorting after id to use multiple phregs together // ts 20/3-2018 arma::uvec idx00 = sort_index(Id,"ascend"); arma::uvec idx0 = stable_sort_index(Status.elem(idx00),"descend"); idx0 = idx00.elem(idx0); arma::uvec idx = stable_sort_index(Exit.elem(idx0),"ascend"); idx = idx0.elem(idx); // arma::uvec idx0 = stable_sort_index(Status.elem(idx00),"descend"); // arma::uvec idx0 = sort_index(Status,"descend"); // arma::uvec idx = stable_sort_index(Exit.elem(idx0),"ascend"); // idx = idx0.elem(idx); // arma::uvec idx00 = stable_sort_index(Id.elem(idx),"ascend"); // idx = idx00.elem(idx); //Rcout << "idx=" << idx << std::endl; if (Truncation) { Sign = Sign.elem(idx); } if (X.n_rows>0) { XX = XX.rows(idx); X = X.rows(idx); } if (Z.n_rows==X.n_rows) { Z = Z.rows(idx); } if ((ZX.n_rows==XX.n_rows) & (XX.n_rows>0)) { ZX = ZX.rows(idx); } Exit = Exit.elem(idx); weights = weights.elem(idx); caseweights = caseweights.elem(idx); offsets = offsets.elem(idx); Status = Status.elem(idx); Id = Id.elem(idx); strata = strata.elem(idx); arma::uvec jumps = find(Status>0); //Rprintf("jumps"); // arma::Col newId; // if (haveId) { // // uvec Id = Rcpp::as(id); // if (Truncation) { // Id.insert_rows(0,Id); // } // newId = Id.elem(idx); // } return(Rcpp::wrap(Rcpp::List::create(Rcpp::Named("XX")=XX, Rcpp::Named("X")=X, Rcpp::Named("jumps")=jumps, Rcpp::Named("sign")=Sign, Rcpp::Named("ord")=idx, Rcpp::Named("time")=Exit, Rcpp::Named("id")=Id, Rcpp::Named("weights")=weights, Rcpp::Named("caseweights")=caseweights, Rcpp::Named("offset")=offsets, Rcpp::Named("strata")=strata, Rcpp::Named("ZX")=ZX, Rcpp::Named("Z")=Z ))); END_RCPP }/*}}}*/ colvec whichi(IntegerVector a,int n, int j) { colvec res(n); for (int i=0; i(ia); unsigned n = a.n_rows; colvec res = a; double prev=0; for (unsigned i=0; i(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); for (unsigned i=0; i=0)) tmpsum(ss) += a(i); } List rres; rres["res"]=tmpsum; return(rres); } colvec sumstrata(colvec a,IntegerVector strata,int nstrata) { unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); tmpsum.zeros(); for (unsigned i=0; i=0)) tmpsum(ss) += a(i); } return(tmpsum); } RcppExport SEXP cumsumstrataR(SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec res = a; for (unsigned i=0; i=0)) { tmpsum(ss) += a(i); res(i) = tmpsum(ss); } } List rres; rres["res"]=res; return(rres); } RcppExport SEXP tailstrataR(SEXP in, SEXP istrata, SEXP instrata) { IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); int n = Rcpp::as(in); int nfound=0; colvec tmpsum(nstrata); tmpsum.zeros(); colvec foundss(nstrata); foundss.zeros(); colvec wheress(nstrata); foundss.zeros(); for (signed i=0; i=0)) { tmpsum(ss) += a(i); res(i) = tmpsum(ss); } } return(res); } colvec cumsumstrataPO(colvec w,colvec S0,IntegerVector strata,int nstrata,double propodds,colvec exb) { unsigned n = S0.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec res = S0; colvec pow = S0; for (unsigned i=0; i=0)) { if (propodds>0) pow(i)=(1+propodds*exb(i)*tmpsum(ss)); tmpsum(ss) += pow(i)*w(i)/S0(i); res(i) = tmpsum(ss); } } return(pow); } RcppExport SEXP cumsumstrataPOR(SEXP iw,SEXP iS0,SEXP istrata,SEXP instrata,SEXP ipropodds,SEXP iexb) { colvec w = Rcpp::as(iw); colvec S0 = Rcpp::as(iS0); colvec exb = Rcpp::as(iexb); IntegerVector strata(istrata); int nstrata = Rcpp::as(instrata); double propodds = Rcpp::as(ipropodds); colvec pow= cumsumstrataPO(w,S0,strata,nstrata,propodds,exb); List rres; rres["pow"]=pow; return(rres); } mat DLambeta(colvec weights,colvec S0,mat E,mat Xi,IntegerVector strata,int nstrata,double propodds,colvec exb) { unsigned n = S0.n_rows; unsigned p = E.n_cols; colvec tmpsum(nstrata); tmpsum.zeros(); mat dLbetatminus(nstrata,p); dLbetatminus.zeros(); colvec res = S0; colvec pow = S0; mat dLbeta(n,p); dLbeta.zeros(); for (unsigned i=0; i0) pow(i)=(1+propodds*exb(i)*tmpsum(ss)); dLbeta.row(i) = dLbetatminus.row(ss)+weights(i)* ( (dLbetatminus.row(ss)*exb(i)+Xi.row(i)*(pow(i)-1))/S0(i)-E.row(i)*pow(i)/S0(i)); tmpsum(ss) += weights(i)*pow(i)/S0(i); res(i) = tmpsum(ss); dLbetatminus.row(ss) = dLbeta.row(i); } return(dLbeta); } RcppExport SEXP DLambetaR(SEXP iweights,SEXP iS0,SEXP iE,SEXP iXi,SEXP istrata,SEXP instrata,SEXP ipropodds,SEXP iexb) { colvec weights = Rcpp::as(iweights); colvec S0 = Rcpp::as(iS0); colvec exb = Rcpp::as(iexb); mat E = Rcpp::as(iE); mat Xi = Rcpp::as(iXi); IntegerVector strata(istrata); int nstrata = Rcpp::as(instrata); double propodds = Rcpp::as(ipropodds); mat dLam= DLambeta(weights,S0,E,Xi,strata,nstrata,propodds,exb); List rres; rres["res"]=dLam; return(rres); } colvec cumsumstrataAddGam(colvec a,IntegerVector strata,int nstrata, colvec exb,colvec etheta,cube thetades,cube rv,mat ags, uvec Jumps) { unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); tmpsum.zeros(); colvec res = a; colvec pow = a; vec allvec(6); vec DthetaS(etheta.n_elem),DthetaDtS(etheta.n_elem); colvec exbs(2); for (unsigned i=0; i=0)) { tmpsum(ss) += pow(i)/a(i); res(i) = tmpsum(ss); } } return(pow); } RcppExport SEXP revcumsumstrataR(SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec res = a; for (unsigned i=0; i=0)) { tmpsum(ss) += a(n-i-1); res(n-i-1) = tmpsum(ss); } } List rres; rres["res"]=res; return(rres); } RcppExport SEXP wherestrataR(SEXP ir,SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); colvec r = Rcpp::as(ir); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec nsum(nstrata); nsum.zeros(); colvec maxv(nstrata); maxv.zeros(); colvec minv(nstrata); minv.zeros(); for (unsigned i=0; i maxv(ss)) | (nsum(ss)==0)) maxv(ss)=a(i); if ((a(i) < minv(ss)) | (nsum(ss)==0)) minv(ss)=a(i); if (irs>a(i)) tmpsum(ss)=nsum(ss); nsum(ss)+=1; } List rres; rres["where"]=tmpsum; rres["max"]=maxv; rres["min"]=minv; rres["nstrata"]=nsum; return(rres); } RcppExport SEXP maxminidR(SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec nsum(nstrata); nsum.zeros(); colvec maxv(nstrata); maxv.zeros(); colvec minv(nstrata); minv.zeros(); for (unsigned i=0; i maxv(ss)) | (nsum(ss)==0)) maxv(ss)=a(i); if ((a(i) < minv(ss)) | (nsum(ss)==0)) minv(ss)=a(i); nsum(ss)+=1; } List rres; rres["max"]=maxv; rres["min"]=minv; rres["nstrata"]=nsum; return(rres); } RcppExport SEXP riskstrataR(SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); // colvec res = a; mat res(n,nstrata); res.zeros(); for (unsigned i=0; i(ia); // IntegerVector intstrata(istrata); // int nstrata = Rcpp::as(instrata); // unsigned n = a.n_rows; // int nid = Rcpp::as(inid); // IntegerVector id(iid); // int ss,lid; // // mat tmpsuma(nstrata,nid); tmpsuma.zeros(); //// colvec res = a; // mat res(n,nid); res.zeros(); // for (unsigned i=0; i=0)) { tmpsum(ss) += a(n-i-1); res(n-i-1) = tmpsum(ss); } } return(res); }// colvec revcumsumstrata1(const colvec &a,const colvec &v1,const colvec &v2, IntegerVector strata,int nstrata) { return(revcumsumstrata(a%v1,strata,nstrata)/v2); } colvec revcumsumstratalag(const colvec &a,IntegerVector strata,int nstrata) { unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec res = a; for (unsigned i=0; i(ia); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec ressum = a; colvec lagressum = a; colvec ressqu = a; double cumsum=0; int first=0,ss; for (unsigned i=0; i0.1) & (i>=1)& (ss=0)) ressqu(i)=ressqu(i-1)+pow(a(i),2)+2*a(i)*tmpsum(ss); if ((ss=0)) { lagressum(i)=tmpsum(ss); tmpsum(ss) += a(i); cumsum+=a(i); if (first<0.1) ressqu(i) = pow(a(i),2); first=1; } ressum(i) = cumsum; } List rres; rres["sumsquare"]=ressqu; rres["sum"]=ressum; rres["lagsum"]=lagressum; return(rres); } RcppExport SEXP revcumsumstratasumR(SEXP ia,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsum(nstrata); tmpsum.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); colvec cumsum(nstrata); cumsum.zeros(); colvec ressum = a; colvec lagressum = a; colvec ressqu = a; colvec lagressqu(n); int ss; for (unsigned i=0; i(ia); colvec b = Rcpp::as(ib); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; colvec tmpsumrev(nstrata); tmpsumrev.zeros(); colvec ressqu = a; int ss; for (unsigned i=0; i=0)) tmpsumrev(ss) += b(n-i-1); } colvec tmpsum(nstrata); tmpsum.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec first(nstrata); first.zeros(); for (unsigned i=0; i=0))) { ressqu(i)=tmpsqr(ss)-a(i)*tmpsumrev(ss)+b(i)*tmpsum(ss)+a(i)*b(i); tmpsumrev(ss) -= b(i); tmpsum(ss) += a(i); tmpsqr(ss)=ressqu(i); } } List rres; rres["covs"]=ressqu; return(rres); } RcppExport SEXP cumsumidstratasumCovR(SEXP ia,SEXP ib,SEXP iid,SEXP inid,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); colvec b = Rcpp::as(ib); // mat b = Rcpp::as(ib); IntegerVector id(iid); int nid = Rcpp::as(inid); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; int lid,ss; mat tmpsuma(nstrata,nid); tmpsuma.zeros(); mat tmpsumb(nstrata,nid); tmpsumb.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec ressqu = a; colvec ressumu = a; colvec ressuma = a; colvec ressumb = b; colvec ressqu = a; colvec cumsuma(nstrata); cumsuma.zeros(); colvec cumsumb(nstrata); cumsumb.zeros(); colvec first(nstrata); first.zeros(); for (unsigned i=0; i=0)) { ressqu(i)=tmpsqr(ss)+a(i)*b(i)+a(i)*tmpsumb(ss,lid)+b(i)*tmpsuma(ss,lid); tmpsuma(ss,lid) += a(i); tmpsumb(ss,lid) += b(i); cumsuma(ss) += a(i); cumsumb(ss) += b(i); ressuma(i) = cumsum(ss); ressumb(i) = cumsum(ss); tmpsqr(ss)=ressqu(i); } } List rres; rres["sumsquare"]=ressqu; rres["suma"]=ressuma; rres["sumb"]=ressumb; return(rres); } RcppExport SEXP cumsumidstratasumR(SEXP ia,SEXP iid,SEXP inid,SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); // mat b = Rcpp::as(ib); IntegerVector id(iid); int nid = Rcpp::as(inid); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; int lid,ss; mat tmpsum(nstrata,nid); tmpsum.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec ressqu = a; colvec ressumu = a; colvec ressum = a; colvec ressumid = a; colvec lagressumid = a; colvec lagressum = a; colvec ressqu = a; colvec cumsum(nstrata); cumsum.zeros(); colvec first(nstrata); first.zeros(); for (unsigned i=0; i(ia); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; a.print("a"); colvec tmpsum(nstrata); tmpsum.zeros(); colvec ressum = a; double sums=0; for (unsigned i=0; i(ia); // IntegerVector a = Rcpp::as(ia); // IntegerVector a(ia); // int n = a1.n_rows; int n = a.n_rows; IntegerVector id(iid); int nid = Rcpp::as(inid); IntegerVector strata(istrata); int nstrata = Rcpp::as(instrata); colvec res=a; colvec mean(n); mean.zeros(); colvec tot(n); tot.zeros(); for (int i=0; i0) mean=mean+i*res; tot=tot+res; } mean=mean/tot; List rres; rres["meanrisk"]=mean; rres["risk"]=tot; return(rres); } RcppExport SEXP revcumsumidstratasumR(SEXP ia,SEXP iid, SEXP inid, SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; IntegerVector id(iid); int nid = Rcpp::as(inid); int lid,ss; mat tmpsum(nstrata,nid); tmpsum.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec ressqu = a; colvec ressumu = a; colvec ressum = a; colvec ressumid = a; colvec lagressum(n); colvec ressqu = a; colvec lagressqu(n); // lagressqu.zeros colvec cumsum(nstrata); cumsum.zeros(); colvec first(nstrata); first.zeros(); for (unsigned i=0; i(ia); colvec b = Rcpp::as(ib); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; IntegerVector id(iid); int nid = Rcpp::as(inid); int lid,ss; mat tmpsuma(nstrata,nid); tmpsuma.zeros(); mat tmpsumb(nstrata,nid); tmpsumb.zeros(); colvec cumsuma(nstrata); cumsuma.zeros(); colvec cumsumb(nstrata); cumsumb.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec ressqu = a; colvec ressumu = a; colvec ressum = a; colvec lagressum(n); colvec ressqu = a; colvec lagressqu(n); // lagressqu.zeros colvec first(nstrata); first.zeros(); for (unsigned i=0; i=0)) { // if ((first(ss)>0.1)) { lagressqu(n-i-1)=tmpsqr(ss); // previous from lagressum(n-i-1)=cumsum(ss); // previous sum from ressqu(n-i-1)=tmpsqr(ss)+a(n-i-1)*b(n-i-1)+a(n-i-1)*tmpsumb(ss,lid)+b(n-i-1)*tmpsuma(ss,lid); // } tmpsuma(ss,lid) += a(n-i-1); tmpsumb(ss,lid) += b(n-i-1); // cumsuma(ss)+=a(n-i-1); // cumsumb(ss)+=b(n-i-1); // first // if (first(ss)<0.1) {ressqu(n-i-1)=a(n-i-1)*b(n-i-1); first(ss)=1; lagressqu(n-i-1)=0; lagressum(n-i-1)=0; } // ressqu(n-i-1) = sum(tmpsum%tmpsum); // tmpsum.print("pp"); // ressuma(n-i-1)=cumsum(ss); // ressumb(n-i-1)=cumsum(ss); tmpsqr(ss)=ressqu(n-i-1); } } List rres; rres["sumsquare"]=ressqu; rres["lagsumsquare"]=lagressqu; return(rres); } RcppExport SEXP covrfstrataR(SEXP ia,SEXP ib, SEXP iid,SEXP inid, SEXP istrata, SEXP instrata) { colvec a = Rcpp::as(ia); colvec b = Rcpp::as(ib); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; IntegerVector id(iid); int nid = Rcpp::as(inid); int lid,ss; mat tmpsumrev(nstrata,nid); tmpsumrev.zeros(); mat tmpsum(nstrata,nid); tmpsum.zeros(); colvec tmpcov(nstrata); tmpcov.zeros(); colvec ressum = a; colvec rescov = a; colvec cumsum(nstrata); cumsum.zeros(); colvec first(nstrata); first.zeros(); for (unsigned i=0; i(ia); colvec b = Rcpp::as(ib); colvec a2 = Rcpp::as(ia2); colvec b2 = Rcpp::as(ib2); // mat b = Rcpp::as(ib); IntegerVector intstrata(istrata); int nstrata = Rcpp::as(instrata); unsigned n = a.n_rows; IntegerVector id(iid); int nid = Rcpp::as(inid); int lid,ss; mat tmpsumrev(nstrata,nid); tmpsumrev.zeros(); mat tmpsumrev2(nstrata,nid); tmpsumrev2.zeros(); mat tmpsum(nstrata,nid); tmpsum.zeros(); mat tmpsum2(nstrata,nid); tmpsum2.zeros(); colvec tmpsqr(nstrata); tmpsqr.zeros(); // colvec ressqu = a; colvec ressumu = a; colvec ressum = a; colvec ressqu = a; colvec cumsum(nstrata); cumsum.zeros(); colvec first(nstrata); first.zeros(); for (unsigned i=0; i(betaSEXP); mat X = Rcpp::as(XSEXP); mat XX = Rcpp::as(XXSEXP); arma::uvec Jumps = Rcpp::as(JumpsSEXP); arma::Col Sign = Rcpp::as >(SignSEXP); // unsigned n = X.n_rows; unsigned p = X.n_cols; colvec Xb = X*beta; colvec eXb = exp(Xb); if (Sign.n_rows==eXb.n_rows) { // Truncation eXb = Sign%eXb; } colvec S0 = revcumsum(eXb); mat E(X.n_rows,p); // S1/S0(s) for (unsigned j=0; j(betaSEXP); mat X = Rcpp::as(XSEXP); mat XX = Rcpp::as(XXSEXP); mat ZX = Rcpp::as(ZXSEXP); arma::uvec Jumps = Rcpp::as(JumpsSEXP); arma::Col Sign = Rcpp::as >(SignSEXP); IntegerVector strata(strataSEXP); int nstrata = Rcpp::as(nstrataSEXP); // unsigned n = X.n_rows; unsigned p = X.n_cols; colvec weights = Rcpp::as(weightsSEXP); colvec offsets = Rcpp::as(offsetsSEXP); colvec caseweights = Rcpp::as(caseweightsSEXP); colvec Xb = X*beta+offsets; colvec eXb = exp(Xb)%weights; if (Sign.n_rows==eXb.n_rows) { // Truncation eXb = Sign%eXb; } colvec S0 = revcumsumstrata(eXb,strata,nstrata); mat E=revcumsumstrataMatCols(X,eXb,S0,strata,nstrata); E = E.rows(Jumps); mat E2(E.n_rows, E.n_cols*E.n_cols); // Calculate E' E at each time-point for (unsigned i=0; i(betaSEXP); mat X = Rcpp::as(XSEXP); mat XX = Rcpp::as(XXSEXP); mat ZX = Rcpp::as(ZXSEXP); arma::uvec Jumps = Rcpp::as(JumpsSEXP); arma::Col Sign = Rcpp::as >(SignSEXP); IntegerVector strata(strataSEXP); int nstrata = Rcpp::as(nstrataSEXP); double propodds = Rcpp::as(propoddsSEXP); // unsigned n = X.n_rows; unsigned p = X.n_cols; colvec weights = Rcpp::as(weightsSEXP); colvec offsets = Rcpp::as(offsetsSEXP); colvec Xb = X*beta+offsets; colvec eXbnow = exp(Xb); colvec eXb = exp(Xb)%weights; if (Sign.n_rows==eXb.n_rows) { // Truncation eXb = Sign%eXb; } colvec S0 = revcumsumstrata(eXb,strata,nstrata); mat E=revcumsumstrataMatCols(X,eXb,S0,strata,nstrata); E = E.rows(Jumps); mat E2(E.n_rows, E.n_cols*E.n_cols); // Calculate E' E at each time-point for (unsigned i=0; i(betaSEXP); mat X = Rcpp::as(XSEXP); mat XX = Rcpp::as(XXSEXP); mat ZX = Rcpp::as(ZXSEXP); arma::uvec Jumps = Rcpp::as(JumpsSEXP); arma::Col Sign = Rcpp::as >(SignSEXP); IntegerVector strata(strataSEXP); int nstrata = Rcpp::as(nstrataSEXP); // double propodds = Rcpp::as(propoddsSEXP); // unsigned n = X.n_rows; unsigned p = X.n_cols; colvec weights = Rcpp::as(weightsSEXP); colvec offsets = Rcpp::as(offsetsSEXP); // reading in matrices and cubes for AddGam cause is in strata vec theta = Rcpp::as(itheta); mat ags = Rcpp::as(iags); int varlink = Rcpp::as(ivarlink); // array for xjump covariates of jump subject, for all causes // NumericVector vxjump(ixjump); // IntegerVector arrayDims(idimxjump); // arma::cube xjump(vxjump.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vecthetades(ithetades); IntegerVector arrayDims1(idimthetades); arma::cube thetades(vecthetades.begin(), arrayDims1[0], arrayDims1[1], arrayDims1[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vrv(ijumprv); IntegerVector arrayDims2(idimjumprv); arma::cube rv(vrv.begin(), arrayDims2[0], arrayDims2[1], arrayDims2[2], false); // indeces of the causes relatd to the two jumps arma::umat JumpsCauses = Rcpp::as(iJumpsCauses); // arma::uvec ij1 = JumpsCauses.col(0); // arma::uvec ij2 = JumpsCauses.col(1); // vec etheta=theta; if (varlink==1) etheta=exp(theta); colvec Xb = X*beta+offsets; colvec eXb = exp(Xb)%weights; if (Sign.n_rows==eXb.n_rows) { // Truncation eXb = Sign%eXb; } colvec S0 = revcumsumstrata(eXb,strata,nstrata); mat E=revcumsumstrataMatCols(X,eXb,S0,strata,nstrata); // for (unsigned j=0; j(im); IntegerVector rows(irow); IntegerVector cols(icols); colvec xvec = Rcpp::as(ixvec); unsigned l = Rcpp::as(ilength); unsigned assign = Rcpp::as(iassign); vec res(l); vec where(l); List rres; int mn = m.n_rows; int mp = m.n_cols; for (unsigned i=0; i -1) & (rows(i)< mn)) * ((cols(i) > -1) & (cols(i)< mp)) ; if (assign==0) { for (unsigned i=0; i0) { res(i)=m(rows(i),cols(i)); } else res(i)=0; rres["mat"]=res; } else { for (unsigned i=0; i0) { m(rows(i),cols(i))=xvec(i); } rres["mat"]=m; } return(rres); } mat CubeVecC(mat XX, vec beta,int dim1) { unsigned p = beta.n_rows; unsigned n = XX.n_rows; mat XXbeta(n,dim1); for (unsigned j=0; j(betaSEXP); mat XX = Rcpp::as(XXSEXP); mat beta = Rcpp::as(betaSEXP); unsigned p = beta.n_cols; unsigned n = XX.n_rows; mat XXbeta(n,p); mat iXXbeta(n,p*p); for (unsigned j=0; j(XXSEXP); mat X = Rcpp::as(XSEXP); unsigned p = X.n_cols; unsigned n = XX.n_rows; mat XXX(n,p*p); for (unsigned j=0; j(iX); mat Z = Rcpp::as(iZ); mat res=vecmatmat(X,Z); return(Rcpp::List::create(Rcpp::Named("vXZ")=res)); END_RCPP } RcppExport SEXP OutCov(SEXP XSEXP, SEXP ZSEXP) { BEGIN_RCPP mat X = Rcpp::as(XSEXP); mat Z = Rcpp::as(ZSEXP); // unsigned px = X.n_cols; // unsigned pz = Z.n_cols; unsigned nx = X.n_rows; unsigned nz = Z.n_rows; mat XoZ(nx,nz); for (unsigned j=0; j(iU); mat dUt = Rcpp::as(idUt); arma::vec osup = Rcpp::as(iobssup); unsigned nsim = Rcpp::as(insim); unsigned p = U.n_cols; unsigned n = U.n_rows; vec pval(p); pval.zeros(); mat Uti(n,p); mat sup(nsim,p); mat simUti(n,50*p); GetRNGstate(); /* to use R random normals */ for (unsigned j=0; j=osup(k))) { pval(k)++; } if (j<50) { simUti.col(j*p+k)=Uthati.col(k); } } } pval=pval/nsim; PutRNGstate(); /* to use R random normals */ return(Rcpp::List::create(Rcpp::Named("supUsim")=sup, Rcpp::Named("simUt")=simUti, Rcpp::Named("pval")=pval)); END_RCPP } RcppExport SEXP PropTestCoxClust(SEXP iU, SEXP idUt, SEXP iwrr, SEXP iZ, SEXP iLam, SEXP iEdLam, SEXP insim, SEXP iobssup, SEXP inclust,SEXP iid, SEXP istrata,SEXP instrata, SEXP iJumps) { BEGIN_RCPP mat U = Rcpp::as(iU); mat dUt = Rcpp::as(idUt); arma::vec wrr = Rcpp::as(iwrr); arma::vec Lam = Rcpp::as(iLam); mat EdLam = Rcpp::as(iEdLam); mat Z = Rcpp::as(iZ); IntegerVector id(iid); arma::vec osup = Rcpp::as(iobssup); unsigned nsim = Rcpp::as(insim); unsigned nclust = Rcpp::as(inclust); unsigned p = U.n_cols; unsigned n = U.n_rows; IntegerVector strata(istrata); arma::uvec Jumps = Rcpp::as(iJumps); int nstrata = Rcpp::as(instrata); vec pval(p); pval.zeros(); mat Uti(n,p); mat E1(n,p); mat E2(n,p); mat sup(nsim,p); int nj=dUt.n_rows; mat simUti(nj,50*p); vec nr(n); GetRNGstate(); /* to use R random normals */ // vec vvv=revcumsumstratalag(wrr,strata,nstrata); // vvv.print("vvv"); for (unsigned j=0; j=osup(k))) { pval(k)++; } if (j<50) { simUti.col(j*p+k)=Uthati.col(k); } } } pval=pval/nsim; PutRNGstate(); /* to use R random normals */ return(Rcpp::List::create(Rcpp::Named("supUsim")=sup, Rcpp::Named("simUt")=simUti, Rcpp::Named("pval")=pval)); END_RCPP } RcppExport SEXP ModelMatrixTestCox(SEXP iU, SEXP idUt,SEXP ibetaiid, SEXP insim, SEXP iobssup) { BEGIN_RCPP mat U = Rcpp::as(iU); mat dUt = Rcpp::as(idUt); mat betaiid = Rcpp::as(ibetaiid); arma::vec osup = Rcpp::as(iobssup); unsigned nsim = Rcpp::as(insim); unsigned mp = U.n_cols; unsigned p = betaiid.n_cols; unsigned n = U.n_rows; vec pval(mp); pval.zeros(); // mat Uthati(n,mp); mat Uti(n,mp); mat betati(n,p); mat sup(nsim,mp); mat last(nsim,mp); mat simUti(n,50*mp); GetRNGstate(); /* to use R random normals */ colvec nr(Uti.n_rows); for (unsigned j=0;j=osup(k))) {pval(k)++;} if (j<50) { simUti.col(j*mp+k)=Uthati.col(k); } } } pval=pval/nsim; PutRNGstate(); /* to use R random normals */ return(Rcpp::List::create(Rcpp::Named("supUsim")=sup, Rcpp::Named("last")=last, Rcpp::Named("simUt")=simUti, Rcpp::Named("pval")=pval)); END_RCPP } //RcppExport SEXP simBandCumHazCox(SEXP iU, SEXP idUt,SEXP ibetaiid, SEXP insim, SEXP isecum) { //BEGIN_RCPP // mat U = Rcpp::as(iU); // mat dUt = Rcpp::as(idUt); // mat betaiid = Rcpp::as(ibetaiid); // arma::vec secum = Rcpp::as(isecum); // unsigned nsim = Rcpp::as(insim); // unsigned mp = U.n_cols; // unsigned p = betaiid.n_cols; // unsigned n = U.n_rows; // //// vec pval(mp); pval.zeros(); mat Uthati(n,mp); mat simUti(n,50*mp); // mat Uti(n,mp); // mat betati(n,p); // mat sup(nsim,mp); // mat simUti(n,50*mp); // // GetRNGstate(); /* to use R random normals */ // colvec nr(Uti.n_rows); // // for (unsigned j=0;j #include void F77_SUB(rndstart)(void) { GetRNGstate(); } void F77_SUB(rndend)(void) { PutRNGstate(); } double F77_SUB(unifrnd)(void) { return unif_rand(); } double F77_SUB(phid)(double *x){ return pnorm(*x, 0.0, 1.0, 1, 0); } double F77_SUB(studnt)(int *nu, double *x){ return pt(*x, *nu, 1, 0); } mets/src/Makevars.win0000644000176200001440000000050113623061405014275 0ustar liggesusers## This assumes that we can call Rscript to ask Rcpp about its locations ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()") PKG_CPPFLAGS = -I../inst/include -I. PKG_LIBS += $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) mets/src/fastcox.h0000644000176200001440000000053713623061405013636 0ustar liggesusers#ifndef FASTCOX_H #define FASTCOX_H #include #include using namespace Rcpp; using namespace arma; RcppExport SEXP FastCoxPrep( SEXP entry, SEXP exit, SEXP status, SEXP X, SEXP id, SEXP haveid, SEXP truncation); RcppExport SEXP FastCoxPL( SEXP b, SEXP x, SEXP xx, SEXP sgn, SEXP jumps); #endif /* FASTCOX_H */ mets/src/binomial-twostage.cpp0000644000176200001440000011230413623061405016143 0ustar liggesusers#include #include #include #include #include #include #include "twostage.h" using namespace arma; using namespace Rcpp; double claytonoakesP(double theta,int status1,int status2,double cif1,double cif2,vec &dp,vec &ps,vec &dp00) { // {{{ double valr=1,x,y,z; double p00,p10,p01,p11; //double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); x=theta; y=cif1; z=cif2; valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); p11=valr; p10=cif1-p11; p01=cif2-p11; p00=1-cif1-cif2+p11; ps(0)=p00; ps(1)=p10; ps(2)=p01; ps(3)=p11; dp00(0)=dp(0); //printf(" %lf %lf %lf %lf %lf %lf %lf \n",theta,y,z,p11,p10,p01,p00); if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } //printf(" %lf \n",valr); //if (status1==0 && status2==0) { // {{{ //valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); //dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); //} // }}} // //if (status1==1 && status2==0) { // {{{ //valr=pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(y))/pow(x,2) + pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==0 && status2==1) { // {{{ //valr=pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(z))/pow(x,2) + pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==1 && status2==1) { // {{{ //valr= -(((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x); //dp(0)=((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/pow(x,2) + (pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(y))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(z))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*(((-2 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))))/x; //} // }}} return(valr); } // }}} double placklikeP(double theta,int status1,int status2,double cif1,double cif2,vec &dp,vec &ps,vec &dp00) { // {{{ //double S,S2,a; //S=1+cifs*(theta-1); S2=4*cif1*cif2*theta*(theta-1); double x,y,z,valr=1,p11,p10,p01,p00; //double cifs=cif1+cif2; //a=(1+(theta-1)*(cifs)); x=theta; y=cif1; z=cif2; dp(0)=0; if (theta!=1) { p11=(1+(y+z)*(x-1)-sqrt(pow(1+(y+z)*(x-1),2)-4*x*(x-1)*y*z))/(2*(x-1)); dp(0)= (y + z - (-4*(-1 + x)*y*z - 4*x*y*z + 2*(y + z)*(1 + (-1 + x)*(y + z)))/(2.*sqrt(-4*(-1 + x)*x*y*z + pow(1 + ( -1 + x)*(y + z),2))))/(2.*(-1 + x)) - (1 + (-1 + x)*(y + z) - sqrt(-4*(-1 + x)*x*y*z + pow(1 + (-1 + x)*(y + z ),2)))/(2.*pow(-1 + x,2)); } else p11=cif1*cif2; p10=y-p11; p01=z-p11; p00=1-y-z+p11; ps(0)=p00; ps(1)=p10; ps(2)=p01; ps(3)=p11; dp00(0)=dp(0); if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } return(valr); } // }}} //RcppExport SEXP claytonoakesPR(SEXP itheta,SEXP istatus1,SEXP istatus2,SEXP icif1,SEXP icif2) //{ // {{{ // colvec theta = Rcpp::as(itheta); // colvec cif1 = Rcpp::as(icif1); // colvec cif2 = Rcpp::as(icif2); // colvec status1 = Rcpp::as(iistatus1); // colvec status2 = Rcpp::as(iistatus2); // // colvec L=theta; // colvec dL=theta; // int n=cif1.size(); // //double valr=1,x,y,z; //double p00,p10,p01,p11; // ////double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); //x=theta; y=cif1; z=cif2; // //valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); //dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); // //p11=valr; //p10=x-p11; //p01=y-p11; //p00=1-x-y+p11; // //if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } //if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } //if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } //if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } // //if (status1==0 && status2==0) { // {{{ //valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); //dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); //} // }}} // //if (status1==1 && status2==0) { // {{{ //valr=pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(y))/pow(x,2) + pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==0 && status2==1) { // {{{ //valr=pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(z))/pow(x,2) + pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==1 && status2==1) { // {{{ //valr= -(((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x); //dp(0)=((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/pow(x,2) + (pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(y))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(z))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*(((-2 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))))/x; //} // }}} // //return(valr); //} // }}} // //RcppExport SEXP placklikePR(SEXP itheta,SEXP istatus1,SEXP istatus2,SEXP icif1,SEXP icif2) //{ // {{{ ////double S,S2,a; ////S=1+cifs*(theta-1); S2=4*cif1*cif2*theta*(theta-1); //double x,y,z,valr=1,p11,p10,p01,p00; ////double cifs=cif1+cif2; ////a=(1+(theta-1)*(cifs)); //x=theta; y=cif1; z=cif2; // //dp(0)=0; // //if (theta!=1) { //p11=(1+(y+z)*(x-1)-sqrt(pow(1+(y+z)*(x-1),2)-4*x*(x-1)*y*z))/(2*(x-1)); //dp(0)= (y + z - (-4*(-1 + x)*y*z - 4*x*y*z + 2*(y + z)*(1 + (-1 + x)*(y + z)))/(2.*sqrt(-4*(-1 + x)*x*y*z + pow(1 + ( -1 + x)*(y + z),2))))/(2.*(-1 + x)) - (1 + (-1 + x)*(y + z) - sqrt(-4*(-1 + x)*x*y*z + pow(1 + (-1 + x)*(y + z ),2)))/(2.*pow(-1 + x,2)); //} else p11=cif1*cif2; // //p11=p11; //p10=y-p11; //p01=z-p11; //p00=1-y-z+p11; // //if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } //if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } //if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } //if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } // //return(valr); //} // }}} // double CclaytonoakesP(double theta,int status1,int status2,double cif1,double cif2,vec &dp) //{ // {{{ //double valr=1,x,y,z; //double p00,p10,p01,p11; // ////double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); //x=theta; y=cif1; z=cif2; // //valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); //dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); // //p11=valr; //p10=x-p11; //p01=y-p11; //p00=1-x-y+p11; // //double epsilon=1E-20; //cx_double Ctheta,Cvalr,Cy,Cz; //Ctheta=cx_double(theta,epsilon); //Cy=cx_double(y,0); //Cz=cx_double(z,0); // //printf(" mig \n"); ////Cvalr= pow((1/pow(Cy,1/Ctheta) + 1/pow(Cz,1/Ctheta)) - 1,-Ctheta); //double dd=imag(Cvalr)/epsilon; // //printf("complex %lf ",dd); // //if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } //if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } //if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } //if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } // //if (status1==0 && status2==0) { // {{{ //valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); //dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); //} // }}} // //if (status1==1 && status2==0) { // {{{ //valr=pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(y))/pow(x,2) + pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==0 && status2==1) { // {{{ //valr=pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); //dp(0)=(pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(z))/pow(x,2) + pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); //} // }}} // //if (status1==1 && status2==1) { // {{{ //valr= -(((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x); //dp(0)=((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/pow(x,2) + (pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(y))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(z))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*(((-2 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))))/x; //} // }}} // //printf(" %lf \n",dp(0)); //return(valr); //} // }}} cx_double Cpij(cx_double x, cx_double y, cx_double z,int status1, int status2) { // {{{ cx_double p11,one,two,four; one=cx_double(1,0); two=cx_double(2,0); four=cx_double(4,0); //p11=(1+(y+z)*(x-1)-sqrt(exp(ln(1+(y+z)*(x-1))*2)-4*x*(x-1)*y*z))/(2*(x-1)); p11=(one+(y+z)*(x-one)-sqrt(pow((one+(y+z)*(x-one)),two)-four*x*(x-one)*y*z)); //p11=one+(y+z)*(x-one); p11=p11/(two*(x-one)); // calculates probs depending on status if (status1==1 && status2==0) p11=y-p11; if (status1==0 && status2==1) p11=z-p11; if (status1==0 && status2==0) p11=one-y-z+p11; return(p11); } // }}} double CplacklikeP(double theta,int status1,int status2,double cif1,double cif2,vec &dp) { // {{{ //double S,S2,a; //S=1+cifs*(theta-1); S2=4*cif1*cif2*theta*(theta-1); double x,y,z,valr=1,p11,p10,p01,p00; //double cifs=cif1+cif2; //a=(1+(theta-1)*(cifs)); x=theta; y=cif1; z=cif2; dp(0)=0; if (theta!=1) { p11=(1+(y+z)*(x-1)-sqrt(pow(1+(y+z)*(x-1),2)-4*x*(x-1)*y*z))/(2*(x-1)); dp(0)= (y + z - (-4*(-1 + x)*y*z - 4*x*y*z + 2*(y + z)*(1 + (-1 + x)*(y + z)))/(2.*sqrt(-4*(-1 + x)*x*y*z + pow(1 + ( -1 + x)*(y + z),2))))/(2.*(-1 + x)) - (1 + (-1 + x)*(y + z) - sqrt(-4*(-1 + x)*x*y*z + pow(1 + (-1 + x)*(y + z ),2)))/(2.*pow(-1 + x,2)); } else p11=cif1*cif2; ////det komplekse trick, derivative wrt y og zi, dvs D_1 P(y,z,theta) og D_2 P //cx_double CCp11,Ctheta,Cy,Cz; //Ctheta=cx_double(theta,0); //Cy=cx_double(y,1E-20); //Cz=(cx_double) z; //CCp11=Cpij(Ctheta,Cy,Cz,status1,status2); //dp(1)=imag(CCp11)/1E-20; //Cz=cx_double(z,1E-20); //Cy=(cx_double) y; //CCp11=Cpij(Ctheta,Cy,Cz,status1,status2); //dp(2)=imag(CCp11)/1E-20; //printf(" %lf ",imag(CCp11)/1E-20); p10=y-p11; p01=z-p11; p00=1-y-z+p11; if (status1==1 && status2==1) { valr=p11; dp(0)= dp(0); } if (status1==1 && status2==0) { valr=p10; dp(0)=-dp(0); } if (status1==0 && status2==1) { valr=p01; dp(0)=-dp(0); } if (status1==0 && status2==0) { valr=p00; dp(0)= dp(0); } //printf(" %lf \n",dp(0)); return(valr); } // }}} //double min(double a, double b) { if (ab) return(a); else return(b); } RcppExport SEXP twostageloglikebin( SEXP icause, SEXP ipmargsurv, SEXP itheta, SEXP iXtheta, SEXP iDXtheta, SEXP idimDX, SEXP ithetades, SEXP icluster,SEXP iclustsize,SEXP iclusterindex, SEXP ivarlink, SEXP iiid, SEXP iweights, SEXP isilent, SEXP idepmodel, // SEXP ientryage, SEXP itrunkp , SEXP istrata, SEXP isecluster, SEXP iantiid , SEXP irvdes, SEXP iags, SEXP ibetaiid, SEXP ipairascertained, SEXP itwostage ) // {{{ { try { // {{{ setting matrices and vectors, and exporting to armadillo matrices mat thetades = Rcpp::as(ithetades); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); mat ags= Rcpp::as(iags); int pt=theta.n_rows; colvec clustsize = Rcpp::as(iclustsize); int antclust = clusterindex.n_rows; colvec cause = Rcpp::as(icause); colvec pmargsurv = Rcpp::as(ipmargsurv); colvec cluster = Rcpp::as(icluster); colvec weights = Rcpp::as(iweights); // colvec entryage = Rcpp::as(ientryage); colvec trunkp = Rcpp::as(itrunkp); colvec secluster = Rcpp::as(isecluster); mat rvdes= Rcpp::as(irvdes); int depmodel= Rcpp::as(idepmodel); int twostage= Rcpp::as(itwostage); int pairascertained = Rcpp::as(ipairascertained); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); IntegerVector strata(istrata); int varlink= Rcpp::as(ivarlink); int silent = Rcpp::as(isilent); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); double loglikecont=0; mat Xtheta = Rcpp::as(iXtheta); int udtest=0; if (udtest==1) { // {{{ // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // est.print("est"); // est2.print("est2"); // z.print("z"); // zsem.print("zsemi"); // z2.print("z2"); thetades.print("theta.des"); clusterindex.print("clusterindex"); // rvdes.print("rvdes"); theta.print("theta"); Xtheta.print("Xtheta"); // y.print("y-times"); clustsize.print("clustsize"); pmargsurv.print("margsurv"); cause.print("cause"); cluster.print("cluster"); // Zgamma.print("zgam"); // Z2gamma2.print("zgam2"); // KMtimes.print("KMtimes"); // KMc.print("KMc"); weights.print("weights"); // entryage.print("entryage"); // cif1entry.print("cif1entry"); // cif2entry.print("cif2entry"); trunkp.print("trunkp"); } else if (udtest==2) { // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // Rprintf("est %lf \n",mean(mean(est))); // Rprintf("est2 %lf \n",mean(mean(est2))); // Rprintf("z %lf \n",mean(mean(z))); // Rprintf("zsem %lf \n",mean(mean(zsem))); // Rprintf("z2 %lf \n",mean(mean(z2))); mat mt=mean(thetades); mt.print("meancol thetades"); // Rprintf("theatdes %lf \n",mean(mean(thetades))); Rprintf("ci %lf \n",mean(mean(clusterindex))); // Rprintf("rvdes %lf \n",mean(mean(rvdes))); Rprintf("theta %lf \n",mean(theta)); Rprintf("Xtheta %lf \n",mean(mean(Xtheta))); // Rprintf("y %lf \n",mean(y)); Rprintf("ci %lf \n",mean(clustsize)); // Rprintf("times %lf \n",mean(times)); Rprintf("cause %lf \n",mean(cause)); Rprintf("cluster %lf \n",mean(cluster)); // Rprintf("Zgamma %lf \n",mean(Zgamma)); // Rprintf("Z2gamma2 %lf \n",mean(Z2gamma2)); // Rprintf("KMtimes %lf \n",mean(KMtimes)); // Rprintf("KMc %lf \n",mean(KMc)); Rprintf("weights %lf \n",mean(weights)); // Rprintf("entry %lf \n",mean(entryage)); // Rprintf("cif1entry %lf \n",mean(cif1entry)); // Rprintf("cif2entry %lf \n",mean(cif2entry)); Rprintf("trunkp %lf \n",mean(trunkp)); } // }}} int ci,ck,i,j,c,s=0,k,v,c1; double ll=1,llt=1,Li,Lk,diff=0; //double sdj=0; // double Lit=1,Lkt=1,llt=1; double deppar=1,ssf=0,thetak=0; // double plack(); vec dplack(pt); dplack.fill(pt); vec dp00(pt); vec ps(8); vec ckij(4),dckij(4),ckijvv(4),dckijvv(4),ckijtv(4),dckijtv(4),ckijvt(4),dckijvt(4); i=silent+1; mat betaiid= Rcpp::as(ibetaiid); int dimbeta=betaiid.n_cols; // printf("%d %d \n",pt,dimbeta); mat DbetaDtheta(pt,dimbeta); vec vDbetaDtheta(2*pt); DbetaDtheta.fill(0); vec Du1(pt),Du2(pt); colvec p11tvec(antclust); // p11tvec=0; // Rprintf(" %d \n",pt); int scoredim; if (twostage==1) scoredim=pt; else scoredim=pt+dimbeta; // printf("========= %d %d \n",pt,scoredim); colvec Utheta(scoredim); colvec vthetascore(scoredim); colvec pthetavec(scoredim); vec vtheta2(scoredim); mat DUtheta(scoredim,scoredim); DUtheta.fill(0); Utheta.fill(0); mat thetiid(antiid,scoredim); colvec loglikeiid(antiid); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); } int nr=rvdes.n_cols; // if (depmodel==3) nr=arrayDD[2]; vec rv2(nr),rv1(nr); vec etheta=theta; // if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } // if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } // }}} // double claytonoakesbinRVC(); colvec likepairs(antclust); for (j=0;j=2) { R_CheckUserInterrupt(); diff=0; //sdj=0; for (c=0;c(ithetades); IntegerVector nrvs(inrvs); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); mat ags= Rcpp::as(iags); int pt=theta.n_rows; colvec clustsize = Rcpp::as(iclustsize); // this is number of pairs (rather than clusters) int antclust = clusterindex.n_rows; colvec cause = Rcpp::as(icause); colvec pmargsurv = Rcpp::as(ipmargsurv); colvec cluster = Rcpp::as(icluster); colvec weights = Rcpp::as(iweights); // colvec entryage = Rcpp::as(ientryage); colvec trunkp = Rcpp::as(itrunkp); colvec secluster = Rcpp::as(isecluster); // mat rvdes= Rcpp::as(irvdes); int depmodel= Rcpp::as(idepmodel); IntegerVector strata(istrata); // uvec cause = Rcpp::as(icause); uvec pairascertained = Rcpp::as(ipairascertained); uvec casecontrol = Rcpp::as(icasecontrol); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); // mat thetades = Rcpp::as(ithetades); // array for parameter restrictions (one for each pair) pairs * (ant random effects)* (ant par) NumericVector thetadesvec(ithetades); IntegerVector arrayDims1(idimthetades); IntegerVector arrayDD(3); //printf(" mig thetades 222222\n"); if (depmodel==3) { arrayDD[0]=arrayDims1[0]; arrayDD[1]=arrayDims1[1]; arrayDD[2]=arrayDims1[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } arma::cube thetadesi(thetadesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); //printf(" mig cube thetades 222222\n"); mat thetades=mat(thetadesvec.begin(),arrayDims1[0],arrayDims1[1]*arrayDD[2],false); // array for pairwise random effects (two vectors for each pair) pairs * 2* (ant random effects) NumericVector rvdesvec(irvdes); IntegerVector arrayDims2(idimrvdes); if (depmodel==3) { arrayDD[0]=arrayDims2[0]; arrayDD[1]=arrayDims2[1]; arrayDD[2]=arrayDims2[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } // printf(" %d %d %d \n",arrayDD[0], arrayDD[1], arrayDD[2]); arma::cube rvdesC(rvdesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); mat rvdes=mat(rvdesvec.begin(),arrayDims2[0],arrayDims2[1]*arrayDD[2],false); // mat rvdes= Rcpp::as(irvdes); int varlink= Rcpp::as(ivarlink); int silent = Rcpp::as(isilent); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); double loglikecont=0; mat Xtheta = Rcpp::as(iXtheta); int twostage= Rcpp::as(itwostage); int udtest=0; if (udtest==1) { // {{{ // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // est.print("est"); // est2.print("est2"); // z.print("z"); // zsem.print("zsemi"); // z2.print("z2"); thetades.print("theta.des"); clusterindex.print("clusterindex"); // rvdes.print("rvdes"); theta.print("theta"); Xtheta.print("Xtheta"); // y.print("y-times"); clustsize.print("clustsize"); pmargsurv.print("margsurv"); cause.print("cause"); cluster.print("cluster"); // Zgamma.print("zgam"); // Z2gamma2.print("zgam2"); // KMtimes.print("KMtimes"); // KMc.print("KMc"); weights.print("weights"); // entryage.print("entryage"); // cif1entry.print("cif1entry"); // cif2entry.print("cif2entry"); trunkp.print("trunkp"); } else if (udtest==2) { // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // Rprintf("est %lf \n",mean(mean(est))); // Rprintf("est2 %lf \n",mean(mean(est2))); // Rprintf("z %lf \n",mean(mean(z))); // Rprintf("zsem %lf \n",mean(mean(zsem))); // Rprintf("z2 %lf \n",mean(mean(z2))); mat mt=mean(thetades); mt.print("meancol thetades"); // Rprintf("theatdes %lf \n",mean(mean(thetades))); Rprintf("ci %lf \n",mean(mean(clusterindex))); // Rprintf("rvdes %lf \n",mean(mean(rvdes))); Rprintf("theta %lf \n",mean(theta)); Rprintf("Xtheta %lf \n",mean(mean(Xtheta))); // Rprintf("y %lf \n",mean(y)); Rprintf("ci %lf \n",mean(clustsize)); // Rprintf("times %lf \n",mean(times)); Rprintf("cause %lf \n",mean(cause)); Rprintf("cluster %lf \n",mean(cluster)); // Rprintf("Zgamma %lf \n",mean(Zgamma)); // Rprintf("Z2gamma2 %lf \n",mean(Z2gamma2)); // Rprintf("KMtimes %lf \n",mean(KMtimes)); // Rprintf("KMc %lf \n",mean(KMc)); Rprintf("weights %lf \n",mean(weights)); // Rprintf("entry %lf \n",mean(entryage)); // Rprintf("cif1entry %lf \n",mean(cif1entry)); // Rprintf("cif2entry %lf \n",mean(cif2entry)); Rprintf("trunkp %lf \n",mean(trunkp)); } // }}} int sss=1,ci,ck,i,j,s=0,k,c1; double llt=1,ll=1,Li,Lk,diff=0; double deppar=1,ssf=0,thetak=0; vec dplack(pt); dplack.fill(0); vec dp00(pt); dp00.fill(0); vec ps(8); ps.fill(0); vec ckij(4),dckij(4),ckijvv(4),dckijvv(4),ckijtv(4),dckijtv(4),ckijvt(4),dckijvt(4); i=silent+1; colvec p11tvec(antclust); // p11tvec=0; // Rprintf(" %d \n",pt); int scoredim; mat betaiid= Rcpp::as(ibetaiid); int dimbeta=betaiid.n_cols; if (twostage==1) scoredim=pt; else scoredim=pt+dimbeta; colvec Utheta(scoredim); colvec vthetascore(scoredim); colvec pthetavec(scoredim); vec vtheta2(scoredim); mat DUtheta(scoredim,scoredim); DUtheta.fill(0); Utheta.fill(0); mat thetiid(antiid,scoredim); colvec loglikeiid(antiid); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); } int nr=1; if (depmodel==3) nr=arrayDD[2]; vec rv2(nr),rv1(nr); mat DbetaDtheta(pt,dimbeta); vec vDbetaDtheta(2*pt); DbetaDtheta.fill(0); vec Du1(pt),Du2(pt); vec etheta=theta; // if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } // if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } // }}} colvec likepairs(antclust); // double claytonoakesbinRVC(); // Rprintf("--------%d \n",antclust); for (j=0;j #include #include #include "twostage.h" using namespace arma; RcppExport SEXP Bhat(SEXP ds, SEXP Xs, SEXP theta, SEXP id, SEXP ididx, SEXP idsize) { // {{{ try { uvec event = Rcpp::as(ds); mat X = Rcpp::as(Xs); mat Xc = zeros(X.n_cols,X.n_cols); double thetahat = Rcpp::as(theta); unsigned stop,start = X.n_rows; uvec eventpos = find(event==1); mat dB = zeros(eventpos.n_elem,X.n_cols); uvec cluster = Rcpp::as(id); uvec clustersize, clustpos; umat clusterindex; bool doclust = (Rf_isNull)(idsize); if (!doclust) { clustersize = Rcpp::as(idsize); clusterindex = Rcpp::as(ididx); } // Obtain usual estimates of increments, dB, of the // cumulative time-varying effects in Aalens Additive Model for (unsigned ij=0; ij::from(clusterindex.submat(i,0,i,csize-1)); } uvec posL = find(clustpos=ij); // later/current events within cluster unsigned Ni = 0; // Number of events in cluster before current event,time t- double Hi = 0 ; // Sum of cum.haz. within cluster up to time t- if (posL.n_elem>0) { Ni = sum(event.elem(clustpos.elem(posL))); Hi = sum(Hij.elem(clustpos.elem(posL))); } uvec pos; if (posR.n_elem>0 && k>0) { pos = clustpos.elem(posR); mat Xi = X.rows(pos); Hij.elem(pos) = Xi*trans(B2.row(k-1)); Hi += sum(Hij.elem(pos)); } double psi = (1/thetahat+Ni)/(1/thetahat+fmax(0,Hi)); B2.row(k) = dB.row(k)/psi; if (k>0) { B2.row(k) += B2.row(k-1); } } return(Rcpp::List::create(Rcpp::Named("dB")=dB, //Increments of marg. aalen Rcpp::Named("B2")=B2 // Cum.coef of frailty aalen )); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} RcppExport SEXP Uhat(SEXP ds, SEXP H, SEXP theta, SEXP id, SEXP idsize) { try { // {{{ uvec event = Rcpp::as(ds); vec Hij = Rcpp::as(H); double thetahat = Rcpp::as(theta); umat cluster = Rcpp::as(id); uvec clustersize, ucluster, clustpos; unsigned nclust; bool doclust = (Rf_isNull)(idsize); //bool doclust = (cluster.n_cols==1); if (doclust) { ucluster = unique(cluster); nclust = ucluster.n_elem; } else { clustersize = Rcpp::as(idsize); nclust = cluster.n_rows; } vec res(nclust); for (unsigned i=0; i::from(cluster.submat(i,0,i,csize-1)); //cluster(span(i,i),span(0,csize-1)); } double Ni = sum(event.elem(clustpos)); double Hi = sum(Hij.elem(clustpos)); double thetaH = thetahat*Hi+1; double R = (log(thetaH)/thetahat + (Ni-Hi)/(thetaH)); for (unsigned h=0; h(imat); NumericVector vDBhat(iDBhat); IntegerVector arrayDims(idim); arma::cube DBhat(vDBhat.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); mat X(arrayDims[2],arrayDims[0]); for (int k=0; k(idBaalen); uvec cause = Rcpp::as(icause); vec theta = Rcpp::as(itheta); mat ags = Rcpp::as(iags); int varlink = Rcpp::as(ivarlink); int it = Rcpp::as(iit); int recursive = Rcpp::as(irecursive); mat Bit = Rcpp::as(iBit); if (recursive==1) it=1; // array for xjump covariates of jump subject, for all causes NumericVector vxjump(ixjump); IntegerVector arrayDims(idimxjump); arma::cube xjump(vxjump.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vecthetades(ithetades); IntegerVector arrayDims1(idimthetades); arma::cube thetades(vecthetades.begin(), arrayDims1[0], arrayDims1[1], arrayDims1[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vrv(ijumprv); IntegerVector arrayDims2(idimjumprv); arma::cube rv(vrv.begin(), arrayDims2[0], arrayDims2[1], arrayDims2[2], false); // }}} // double nt = timer.toc(); // printf("timer-ind %lf \n",nt); vec casev(cause.n_elem); vec etheta=theta; if (varlink==1) etheta=exp(theta); // xjump for each jump contains matrix of covariates such that vec cumhaz1= xjump.slice(s) * Bhat mat Bhat(dBaalen.n_rows, dBaalen.n_cols); // mat Bhatmarg(dBaalen.n_rows, dBaalen.n_cols); // cube DthetaBhat(theta.n_elem, dBaalen.n_cols,dBaalen.n_rows); // vec dBB(theta.n_elem); // Bhat.fill(0); // initialize // vec DthetaS(theta.n_elem),DthetaDtS(theta.n_elem),DthetaW(theta.n_elem); vec allvec(6); int ncr=rv.n_rows; vec cumhaz(ncr); cumhaz.fill(0); vec Dcumhaz1(ncr); // vec cumhaz2(ncr); cumhaz2.fill(0); double caseweight=1,ll; // mat rv2=0*rv.slice(0); mat rv1=rv.slice(0); // rv1.print("rv1"); // cumhaz1.print("ch1"); // ags.print("ags"); // wall_clock timer; // timer.tic(); for (int i=0; i0) { Bhat.row(k) += Bhat.row(k-1); } // if (k>0) { DthetaBhat.slice(k)+= DthetaBhat.slice(k-1)+ // (dBB * dBaalen.row(k)); // } // mat xj=xjump.slice(k); // xj.print("xj"); // vec bb=trans(Bhat.row(k)); // bb.print("bb"); // cumulative hazard at time t- for all causes if (recursive==1) cumhaz=xjump.slice(k) * trans(Bhat.row(k)); // update Bit Bit.row(k)=Bhat.row(k); // mat pp=DthetaBhat.slice(k); // pp.print("pp"); Dcumhaz1.print("Dcumhaz1"); } // }}} } // double nt2 = timer.toc(); // printf("Bhat-profile timer-loop %lf \n",nt2); return(Rcpp::List::create(Rcpp::Named("B")=Bhat, Rcpp::Named("caseweights")=casev) // Rcpp::Named("DthetaBhat")=-1*DthetaBhat) ); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} // marginal hazard estimation via iterative estimator // pairs where we condition on second subjects // ascertainment correction is equivalent to case-control sampling // (except for delayed entry) RcppExport SEXP BhatAddGamCC(SEXP itwostage,SEXP idBaalen,SEXP icause, SEXP idimxjump,SEXP ixjump, // cube SEXP itheta, SEXP idimthetades,SEXP ithetades, // cube SEXP iags, SEXP ivarlink, SEXP idimjumprv,SEXP ijumprv, SEXP inrvs, SEXP iit, SEXP iBit, SEXP iBcaseit, SEXP icausecase) // cube { // {{{ try { // wall_clock timer; // timer.tic(); // {{{ reading in matrices and cubes int twostage = Rcpp::as(itwostage); mat dBaalen = Rcpp::as(idBaalen); uvec cause = Rcpp::as(icause); vec theta = Rcpp::as(itheta); mat ags = Rcpp::as(iags); //int varlink = Rcpp::as(ivarlink); uvec nrvs = Rcpp::as(inrvs); int it = Rcpp::as(iit); mat Bit = Rcpp::as(iBit); mat Bcaseit = Rcpp::as(iBcaseit); uvec causecase = Rcpp::as(icausecase); // if it>=1 then uses iterative estimator rather than recursive // for baseline, case/proband is handled via iterative int recursive=1;int ascertainment=1; if (twostage==-2) { recursive=1; ascertainment=1;it=1;} // not two stage model if (twostage==-1) { recursive=0; ascertainment=0; } // not two stage model if (twostage==0) { recursive=1; ascertainment=0;it=1;} // not two stage model if (twostage==1) { recursive=1; ascertainment=0;it=1;} // two-stage if (twostage==2) { recursive=0; ascertainment=0; } // two-stage if (twostage==3) { recursive=1; ascertainment=1;it=1;} // two-stage it=1; // xjump for each jump contains matrix of covariates such that vec cumhaz1= xjump.slice(s) * Bhat // array for xjump covariates of jump subject, for all causes NumericVector vxjump(ixjump); IntegerVector arrayDims(idimxjump); arma::cube xjump(vxjump.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vecthetades(ithetades); IntegerVector arrayDims1(idimthetades); arma::cube thetades(vecthetades.begin(), arrayDims1[0], arrayDims1[1], arrayDims1[2], false); // array for xjump covariates of jump subject, for all causes NumericVector vrv(ijumprv); IntegerVector arrayDims2(idimjumprv); arma::cube rv(vrv.begin(), arrayDims2[0], arrayDims2[1], arrayDims2[2], false); // }}} // double nt = timer.toc(); printf("timer-ind %lf \n",nt); vec casev(cause.n_elem); vec etheta=theta; // if (varlink==1) etheta=exp(theta); mat Bhat(dBaalen.n_rows, dBaalen.n_cols); // cube DthetaBhat(theta.n_elem, dBaalen.n_cols,dBaalen.n_rows); // vec dBB(theta.n_elem); // Bhat.fill(0); // initialize vec DthetaS(theta.n_elem); // ,DthetaDtS(theta.n_elem),DthetaW(theta.n_elem); vec allvec(6), allvect(6); int ncr=rv.n_rows/2; // printf(" %d \n",ncr); vec cumhaz(ncr); cumhaz.fill(0); vec cumhazt(ncr); cumhazt.fill(0); // vec Dcumhaz1(ncr); // vec cumhaz2(ncr); cumhaz2.fill(0); double s1=1,s2=1,caseweight=1,ll=1; double llt=1; //s1t=1, // mat rv2=0*rv.slice(0); // mat rv1=rv.slice(0); // rv1.print("rv1"); cumhaz1.print("ch1"); ags.print("ags"); // wall_clock timer; // timer.tic(); mat rrv1,rrv2; vec rv1,rv2; for (int i=0; i0)) cumhaz=xjump.slice(k)*trans(Bit.row(k)); cumhazt=xjump.slice(k)*trans(Bit.row(k)); //int lnrv= nrvs(k)-1; // number of random effects for this cluster mat rvm=rv.slice(k); int nnn=rvm.n_rows; // rvm.print("rvm"); // first half of rows for person1 and second half for subject 2 // nn number of competing risks if (twostage<=0) { rrv1= rvm.rows(0,nnn/2-1); rrv2= rvm.rows(nnn/2,nnn-1); } else { rv1= trans(rvm.row(0)); rv2= trans(rvm.row(1)); // rv1.print("rv1"); rv2.print("rv2"); // rv1.print("rv1"); thetadesv.print("thetades"); } mat thetadesv=thetades.slice(k); if (twostage<=0) { ll=survivalRVC2all(etheta,thetadesv,ags,cause(k),causecase(k),cumhaz,cumhazcase,rrv1,rrv2,DthetaS,allvec); if (ascertainment==0) caseweight=allvec(4)/(ll); if (ascertainment==1) { // s1t=exp(-cumhazt(0)); llt=survivalRVC2all(etheta,thetadesv,ags,0,causecase(k),cumhaz,cumhazcase,rrv1,rrv2,DthetaS,allvect); caseweight=(allvec(4)+llt)/(ll); } } else { s1=exp(-cumhaz(0)); // survival to clayton-oakes s2=exp(-cumhazcase(0)); // cases via iterative, one-dimensional only (survival) // printf(" %d %d %lf %lf \n",cause(k),causecase(k),s1,s2); // etheta.print("hlj"); ags.print("ags"); ll=claytonoakesRVC(etheta,thetadesv,ags,cause(k),causecase(k),s1,s2,rv1,rv2,DthetaS,allvec); if (ascertainment==0) caseweight=allvec(0)/(s1*ll); if (ascertainment==1) { // s1t=exp(-cumhazt(0)); llt=claytonoakesRVC(etheta,thetadesv,ags,0,causecase(k),s1,s2,rv1,rv2,DthetaS,allvect); caseweight=(s1*allvec(0)+s2*llt)/(s2*s1*ll); } // printf("caseweight %lf %lf \n",caseweight,ll); } // either S / D1 S, when cause2=0, or D2 S / D1D2S, when cause2=1 casev(k)=caseweight; // increments Bhat.row(k)=dBaalen.row(k)*caseweight; // DthetaBhat.slice(k)= DthetaW * dBaalen.row(k); // derivative of baseline wrt theta // mat dBthetamat=xjump.slice(k) * trans(DthetaBhat.slice(k)); // dBB = trans(dBthetamat) *Dcumhaz1; // cumulative for all causes if (k>0) { Bhat.row(k) += Bhat.row(k-1); } // if (k>0) { DthetaBhat.slice(k)+= DthetaBhat.slice(k-1)+ // (dBB * dBaalen.row(k)); // } mat xj=xjump.slice(k); // vec bb=trans(Bhat.row(k)); // bb.print("bb"); // cumulative hazard at time t- for all causes if (recursive==1) cumhaz=xjump.slice(k)*trans(Bhat.row(k)); // else { // printf("sono qui \n"); // update Bit Bit.row(k)=Bhat.row(k); // } // mat pp=DthetaBhat.slice(k); // pp.print("pp"); Dcumhaz1.print("Dcumhaz1"); // trans(sum(dBthetamat,0)); } // }}} } // double nt2 = timer.toc(); // printf("Bhat-profile timer-loop %lf \n",nt2); return(Rcpp::List::create(Rcpp::Named("B")=Bhat, Rcpp::Named("caseweights")=casev) // Rcpp::Named("DthetaBhat")=-1*DthetaBhat) ); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} RcppExport SEXP XBmindex(SEXP imindex,SEXP iX,SEXP icumt) { // {{{ try { mat index = Rcpp::as(imindex); mat cumt = Rcpp::as(icumt); mat X = Rcpp::as(iX); int n=index.n_rows; int p=X.n_cols; mat XBmindex(n,n); vec vcumt(p); // XBmindex.print("XB"); for (int r=0; r0) { vcumt=trans(cumt.row(ii)); // vcumt.print("vcum"); // Xvec.print("Xv"); // printf(" %d %d \n",r,c); mat out = Xvec*vcumt; XBmindex(r,c)= out(0,0); } } } return(Rcpp::List::create(Rcpp::Named("XBmindex")=XBmindex)); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} //RcppExport SEXP backfitEaEt(SEXP iYt,SEXP iage0, SEXP iagenull, SEXP iage, // SEXP itime0, SEXP itime, SEXP iajumps, SEXP itjumps,SEXP ia0) //{ // {{{ //try { // // vec Yt = Rcpp::as(iYt); // vec age = Rcpp::as(iage); // vec age0 = Rcpp::as(iage0); // vec agenull = Rcpp::as(iagenull); // vec time = Rcpp::as(itime); // vec time0 = Rcpp::as(itime0); // vec ajumps = Rcpp::as(iajumps); // vec tjumps = Rcpp::as(itjumps); // double a0= Rcpp::as(ia0); // // int n=Yt.n_rows; // mat Ea(n,n); Ea.zeros(); // mat Et(n,n); Et.zeros(); // double ao,to,nn,ttt; // // for (int i=0; iage0)*(to+agenull<=age); // vec top=who*(a0-agenull0) Et(i,j)=ttt; // vec aaa=ao-agenull; //// ### aaa[aaa<0] <- 0 //// arma::uvec fff = FastApproxC(jumps,aaa,TRUE,2); //// vec yaai=Yt.elem(fff); // vec yaai=(top>0); // vec ww=(yaai>0); //// ### at risk at time a // who=(ao-agenull>time0)*(ao-agenull0) ttt+=top(k)/yaai(k); // Ea(j,i) = ttt; // } // } // // return(Rcpp::List::create(Rcpp::Named("Et")=Et, Rcpp::Named("Ea")=Ea)); // } catch( std::exception &ex ) { // forward_exception_to_r( ex ); // } catch(...) { // ::Rf_error( "c++ exception (unknown reason)" ); // } // return R_NilValue; // -Wall //} // }}} //arma::uvec FastApproxC(vec time, vec newtime,int equal,int type // // (0: nearest, 1: right, 2: left) // ) {/*{{{*/ // int Type = Rcpp::as(type); // NumericVector NewTime(newtime); // NumericVector Sorted(time); // // IntegerVector Order; // // NumericVector Sorted = Time; // // std::sort(Sorted.begin(), Sorted.end()); // // // .sort(); // // IntegerVector Order = match(Sorted, Time); // // return(Rcpp::wrap(Time)); // int Equal = Rcpp::as(equal); //// bool Equal = Rcpp::as(equal); // vector eq(NewTime.size()); // vector idx(NewTime.size()); //// IntegerVector idx(NewTime.size(),0); // // double vmax = Sorted[Sorted.size()-1]; // NumericVector::iterator it; // double upper=0.0; int pos=0; // for (int i=0; ivmax) { // pos = Sorted.size()-1; // } else { // it = lower_bound(Sorted.begin(), Sorted.end(), NewTime[i]); // upper = *it; // if (it == Sorted.begin()) { // pos = 0; // if ((Equal==1) && (NewTime[i]==upper)) { eq[i] = 1; } // } // // else if (int(it-Sorted.end())==0) { // // pos = Sorted.size()-1; // // } // else { // pos = int(it-Sorted.begin()); // if (Type==0 && fabs(NewTime[i]-Sorted[pos-1]) #include using namespace arma; using namespace Rcpp; RcppExport SEXP claytonoakesR(SEXP itheta,SEXP iistatus1,SEXP iistatus2,SEXP icif1,SEXP icif2); RcppExport SEXP claytonoakesbinRV(SEXP itheta,SEXP istatus1,SEXP istatus2,SEXP icif1,SEXP icif2, SEXP irv1, SEXP irv2,SEXP ithetades,SEXP iags, SEXP ivarlink); double claytonoakesbinRVC(vec theta,mat thetades,mat ags,int status1,int status2,double cif1,double cif2,vec x1, vec x2, vec &dp,vec &DbetaDtheta,vec &ps,vec &dp00) ; double survivalRVC(vec theta,mat thetades,mat ags,int cause1,int cause2,vec cif1,vec cif2,mat x1, mat x2, vec &dp, vec &alllike); double survivalRVCmarg(vec theta,mat thetades,mat ags,int cause1,vec cif1,mat x1, vec &dp,vec &ddp, vec &alllike); double survivalRVC2all(vec theta,mat thetades,mat ags,int cause1,int cause2,vec cif1,vec cif2,mat x1, mat x2, vec &dp, vec &alllike); double claytonoakesRVC(vec theta,mat thetades,mat ags, int status1,int status2, double cif1,double cif2,vec x1, vec x2, vec &dp,vec &ccw); double ilapsf(double y, double x, double z); double lapsf(double y,double x, double z) ; vec Dlapsf(double y, double x, double z); vec D2lapsf(double y, double x, double z) ; vec Dilapsf(double y, double x, double z) ; vec D2ilapsf(double y, double x, double z) ; mets/src/RcppExports.cpp0000644000176200001440000002621213623061405015011 0ustar liggesusers// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include "../inst/include/mets.h" #include #include #include #include using namespace Rcpp; // ApplyBy2 NumericMatrix ApplyBy2(NumericMatrix idata, NumericVector icluster, SEXP F, Environment Env, std::string Argument, int Columnwise, int Reduce, double epsilon); RcppExport SEXP _mets_ApplyBy2(SEXP idataSEXP, SEXP iclusterSEXP, SEXP FSEXP, SEXP EnvSEXP, SEXP ArgumentSEXP, SEXP ColumnwiseSEXP, SEXP ReduceSEXP, SEXP epsilonSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< NumericMatrix >::type idata(idataSEXP); Rcpp::traits::input_parameter< NumericVector >::type icluster(iclusterSEXP); Rcpp::traits::input_parameter< SEXP >::type F(FSEXP); Rcpp::traits::input_parameter< Environment >::type Env(EnvSEXP); Rcpp::traits::input_parameter< std::string >::type Argument(ArgumentSEXP); Rcpp::traits::input_parameter< int >::type Columnwise(ColumnwiseSEXP); Rcpp::traits::input_parameter< int >::type Reduce(ReduceSEXP); Rcpp::traits::input_parameter< double >::type epsilon(epsilonSEXP); rcpp_result_gen = Rcpp::wrap(ApplyBy2(idata, icluster, F, Env, Argument, Columnwise, Reduce, epsilon)); return rcpp_result_gen; END_RCPP } // ApplyBy NumericMatrix ApplyBy(NumericMatrix idata, IntegerVector icluster, Function f); RcppExport SEXP _mets_ApplyBy(SEXP idataSEXP, SEXP iclusterSEXP, SEXP fSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< NumericMatrix >::type idata(idataSEXP); Rcpp::traits::input_parameter< IntegerVector >::type icluster(iclusterSEXP); Rcpp::traits::input_parameter< Function >::type f(fSEXP); rcpp_result_gen = Rcpp::wrap(ApplyBy(idata, icluster, f)); return rcpp_result_gen; END_RCPP } // loglikMVN arma::mat loglikMVN(arma::mat Yl, SEXP yu, SEXP status, arma::mat Mu, SEXP dmu, arma::mat S, SEXP ds, SEXP z, SEXP su, SEXP dsu, SEXP threshold, SEXP dthreshold, bool Score); static SEXP _mets_loglikMVN_try(SEXP YlSEXP, SEXP yuSEXP, SEXP statusSEXP, SEXP MuSEXP, SEXP dmuSEXP, SEXP SSEXP, SEXP dsSEXP, SEXP zSEXP, SEXP suSEXP, SEXP dsuSEXP, SEXP thresholdSEXP, SEXP dthresholdSEXP, SEXP ScoreSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::traits::input_parameter< arma::mat >::type Yl(YlSEXP); Rcpp::traits::input_parameter< SEXP >::type yu(yuSEXP); Rcpp::traits::input_parameter< SEXP >::type status(statusSEXP); Rcpp::traits::input_parameter< arma::mat >::type Mu(MuSEXP); Rcpp::traits::input_parameter< SEXP >::type dmu(dmuSEXP); Rcpp::traits::input_parameter< arma::mat >::type S(SSEXP); Rcpp::traits::input_parameter< SEXP >::type ds(dsSEXP); Rcpp::traits::input_parameter< SEXP >::type z(zSEXP); Rcpp::traits::input_parameter< SEXP >::type su(suSEXP); Rcpp::traits::input_parameter< SEXP >::type dsu(dsuSEXP); Rcpp::traits::input_parameter< SEXP >::type threshold(thresholdSEXP); Rcpp::traits::input_parameter< SEXP >::type dthreshold(dthresholdSEXP); Rcpp::traits::input_parameter< bool >::type Score(ScoreSEXP); rcpp_result_gen = Rcpp::wrap(loglikMVN(Yl, yu, status, Mu, dmu, S, ds, z, su, dsu, threshold, dthreshold, Score)); return rcpp_result_gen; END_RCPP_RETURN_ERROR } RcppExport SEXP _mets_loglikMVN(SEXP YlSEXP, SEXP yuSEXP, SEXP statusSEXP, SEXP MuSEXP, SEXP dmuSEXP, SEXP SSEXP, SEXP dsSEXP, SEXP zSEXP, SEXP suSEXP, SEXP dsuSEXP, SEXP thresholdSEXP, SEXP dthresholdSEXP, SEXP ScoreSEXP) { SEXP rcpp_result_gen; { Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = PROTECT(_mets_loglikMVN_try(YlSEXP, yuSEXP, statusSEXP, MuSEXP, dmuSEXP, SSEXP, dsSEXP, zSEXP, suSEXP, dsuSEXP, thresholdSEXP, dthresholdSEXP, ScoreSEXP)); } Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error"); if (rcpp_isInterrupt_gen) { UNPROTECT(1); Rf_onintr(); } bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen); if (rcpp_isLongjump_gen) { Rcpp::internal::resumeJump(rcpp_result_gen); } Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error"); if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); Rf_error(CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; } // dmvn NumericVector dmvn(arma::mat u, arma::mat mu, arma::mat rho); static SEXP _mets_dmvn_try(SEXP uSEXP, SEXP muSEXP, SEXP rhoSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::traits::input_parameter< arma::mat >::type u(uSEXP); Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP); Rcpp::traits::input_parameter< arma::mat >::type rho(rhoSEXP); rcpp_result_gen = Rcpp::wrap(dmvn(u, mu, rho)); return rcpp_result_gen; END_RCPP_RETURN_ERROR } RcppExport SEXP _mets_dmvn(SEXP uSEXP, SEXP muSEXP, SEXP rhoSEXP) { SEXP rcpp_result_gen; { Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = PROTECT(_mets_dmvn_try(uSEXP, muSEXP, rhoSEXP)); } Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error"); if (rcpp_isInterrupt_gen) { UNPROTECT(1); Rf_onintr(); } bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen); if (rcpp_isLongjump_gen) { Rcpp::internal::resumeJump(rcpp_result_gen); } Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error"); if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); Rf_error(CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; } // rmvn arma::mat rmvn(unsigned n, arma::mat mu, arma::mat rho); static SEXP _mets_rmvn_try(SEXP nSEXP, SEXP muSEXP, SEXP rhoSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::traits::input_parameter< unsigned >::type n(nSEXP); Rcpp::traits::input_parameter< arma::mat >::type mu(muSEXP); Rcpp::traits::input_parameter< arma::mat >::type rho(rhoSEXP); rcpp_result_gen = Rcpp::wrap(rmvn(n, mu, rho)); return rcpp_result_gen; END_RCPP_RETURN_ERROR } RcppExport SEXP _mets_rmvn(SEXP nSEXP, SEXP muSEXP, SEXP rhoSEXP) { SEXP rcpp_result_gen; { Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = PROTECT(_mets_rmvn_try(nSEXP, muSEXP, rhoSEXP)); } Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error"); if (rcpp_isInterrupt_gen) { UNPROTECT(1); Rf_onintr(); } bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen); if (rcpp_isLongjump_gen) { Rcpp::internal::resumeJump(rcpp_result_gen); } Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error"); if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); Rf_error(CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; } // rpch arma::vec rpch(unsigned n, std::vector lambda, std::vector time); static SEXP _mets_rpch_try(SEXP nSEXP, SEXP lambdaSEXP, SEXP timeSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::traits::input_parameter< unsigned >::type n(nSEXP); Rcpp::traits::input_parameter< std::vector >::type lambda(lambdaSEXP); Rcpp::traits::input_parameter< std::vector >::type time(timeSEXP); rcpp_result_gen = Rcpp::wrap(rpch(n, lambda, time)); return rcpp_result_gen; END_RCPP_RETURN_ERROR } RcppExport SEXP _mets_rpch(SEXP nSEXP, SEXP lambdaSEXP, SEXP timeSEXP) { SEXP rcpp_result_gen; { Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = PROTECT(_mets_rpch_try(nSEXP, lambdaSEXP, timeSEXP)); } Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error"); if (rcpp_isInterrupt_gen) { UNPROTECT(1); Rf_onintr(); } bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen); if (rcpp_isLongjump_gen) { Rcpp::internal::resumeJump(rcpp_result_gen); } Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error"); if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); Rf_error(CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; } // cpch arma::vec cpch(arma::vec& x, std::vector lambda, std::vector time); static SEXP _mets_cpch_try(SEXP xSEXP, SEXP lambdaSEXP, SEXP timeSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::traits::input_parameter< arma::vec& >::type x(xSEXP); Rcpp::traits::input_parameter< std::vector >::type lambda(lambdaSEXP); Rcpp::traits::input_parameter< std::vector >::type time(timeSEXP); rcpp_result_gen = Rcpp::wrap(cpch(x, lambda, time)); return rcpp_result_gen; END_RCPP_RETURN_ERROR } RcppExport SEXP _mets_cpch(SEXP xSEXP, SEXP lambdaSEXP, SEXP timeSEXP) { SEXP rcpp_result_gen; { Rcpp::RNGScope rcpp_rngScope_gen; rcpp_result_gen = PROTECT(_mets_cpch_try(xSEXP, lambdaSEXP, timeSEXP)); } Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error"); if (rcpp_isInterrupt_gen) { UNPROTECT(1); Rf_onintr(); } bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen); if (rcpp_isLongjump_gen) { Rcpp::internal::resumeJump(rcpp_result_gen); } Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error"); if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); Rf_error(CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; } // validate (ensure exported C++ functions exist before calling them) static int _mets_RcppExport_validate(const char* sig) { static std::set signatures; if (signatures.empty()) { signatures.insert("arma::mat(*.loglikMVN)(arma::mat,SEXP,SEXP,arma::mat,SEXP,arma::mat,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,bool)"); signatures.insert("NumericVector(*.dmvn)(arma::mat,arma::mat,arma::mat)"); signatures.insert("arma::mat(*.rmvn)(unsigned,arma::mat,arma::mat)"); signatures.insert("arma::vec(*.rpch)(unsigned,std::vector,std::vector)"); signatures.insert("arma::vec(*.cpch)(arma::vec&,std::vector,std::vector)"); } return signatures.find(sig) != signatures.end(); } // registerCCallable (register entry points for exported C++ functions) RcppExport SEXP _mets_RcppExport_registerCCallable() { R_RegisterCCallable("mets", "_mets_.loglikMVN", (DL_FUNC)_mets_loglikMVN_try); R_RegisterCCallable("mets", "_mets_.dmvn", (DL_FUNC)_mets_dmvn_try); R_RegisterCCallable("mets", "_mets_.rmvn", (DL_FUNC)_mets_rmvn_try); R_RegisterCCallable("mets", "_mets_.rpch", (DL_FUNC)_mets_rpch_try); R_RegisterCCallable("mets", "_mets_.cpch", (DL_FUNC)_mets_cpch_try); R_RegisterCCallable("mets", "_mets_RcppExport_validate", (DL_FUNC)_mets_RcppExport_validate); return R_NilValue; } mets/src/survival-twostage.cpp0000644000176200001440000032624013623061405016232 0ustar liggesusers#include #include #include #include #include using namespace arma; using namespace Rcpp; double claytonoakes(double theta,int status1,int status2,double cif1,double cif2,vec &dp) { // {{{ double valr=1,x,y,z; //double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); // theta is 1/variance, which is how this function is called x=theta; y=cif1; z=cif2; if (status1==0 && status2==0) { // {{{ valr= pow((1/pow(y,1/x) + 1/pow(z,1/x)) - 1,-x); dp(0)= (-((x*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x))) - log(-1 + pow(y,-1/x) + pow(z,-1/x)))/pow(-1 + pow(y,-1/x) + pow(z,-1/x),x); } // }}} if (status1==1 && status2==0) { // {{{ valr=pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); dp(0)=(pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(y))/pow(x,2) + pow(y,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); } // }}} if (status1==0 && status2==1) { // {{{ valr=pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x); dp(0)=(pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*log(z))/pow(x,2) + pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-1 - x)*(((-1 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))); } // }}} if (status1==1 && status2==1) { // {{{ valr= -(((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x); dp(0)=((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/pow(x,2) + (pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x))/x - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(y))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*log(z))/pow(x,3) - ((-1 - x)*pow(y,-1 - 1/x)*pow(z,-1 - 1/x)*pow(-1 + pow(y,-1/x) + pow(z,-1/x),-2 - x)*(((-2 - x)*(log(y)/(pow(x,2)*pow(y,1/x)) + log(z)/(pow(x,2)*pow(z,1/x))))/(-1 + pow(y,-1/x) + pow(z,-1/x)) - log(-1 + pow(y,-1/x) + pow(z,-1/x))))/x; } // }}} return(valr); } // }}} //extern "C" double RcppExport SEXP claytonoakesR(SEXP itheta,SEXP iistatus1,SEXP iistatus2,SEXP icif1,SEXP icif2,SEXP ivarlink) { // {{{ colvec theta = Rcpp::as(itheta); colvec cif1 = Rcpp::as(icif1); colvec cif2 = Rcpp::as(icif2); colvec istatus1 = Rcpp::as(iistatus1); colvec istatus2 = Rcpp::as(iistatus2); int varlink = Rcpp::as(ivarlink); // parametrization of Clayton-Oakes model if (varlink==1) theta=1/exp(theta); else theta=1/theta; colvec L=theta; colvec dL=theta; colvec logL=theta; colvec dlogL=theta; int n=cif1.size(); double valr=1; double x,y,z; int status1,status2; colvec vdp(1); // theta.print("theta"); // istatus1.print("theta"); istatus2.print("theta"); cif1.print("cif1 "); cif2.print("cif2 "); for (int i=0;ib) return(a); else return(b); } // {{{ laplace and derivatives double ilapsf(double y, double x, double z) { return( exp((y*log(x)-log(z))/y)-x ); } double lapsf(double y,double x, double z) { return( pow(x,y)/pow((z + x),y)); } //double lapsf(double y,double x, double z) //{ //return( exp(log(x)*y)/exp(log(z + x)*y)); //} vec DlapsfOrig(double y, double x, double z) { vec dL(3); dL(0) =(pow(z+x,y)*log(x)*pow(x,y) - pow(x,y)*log(x+z)*pow(z+x,y))/pow((z + x),(2*y)); dL(1) =(pow(z+x,y)*(y/x)*pow(x,y) - pow(x,y)*(y/(x+z))*pow(z+x,y))/pow((z+x),(2*y)); dL(2) =(- pow(x,y)*(y/(x+z))*pow(z+x,y))/pow(z+x,(2*y)); return(dL); } vec D2lapsfOrig(double y, double x, double z) { vec dL(6); // D13 dL(0)= pow(x,y)* pow(x+z,(-y-1))* (y* log(x+z)-y* log(x)-1) ; // D23 dL(1)= y* pow(x,(y-1))* pow(x+z,(-y-2))*(x-y* z) ; // D33 dL(2)= y* (y+1)* pow(x,y)*pow((x+z),(-y-2)); // D133 dL(4)= pow(y,2)* (y+1)* pow(x,(y-1))* pow(x+z,(-y-2))+(-y-2)* y* (y+1)* pow(x,y)* pow(x+z,(-y-3)); // D233 dL(3)= y* pow(x,y)* pow(x+z,(-y-2))+(y+1)*pow(x,y)* pow(x+z,(-y-2))+y* (y+1)* pow(x,y) *log(x)* pow(x+z,(-y-2))-y *(y+1)* pow(x,y)* pow(x+z,(-y-2))* log(x+z); // D333 dL(5)= y* (y+1)* (y+2)* (-pow(x,y))* pow(x+z,(-y-3)); return(dL); } vec Dlapsf(double y, double x, double z) { vec dL(3); double zxiy=pow(z+x,y),xiy=pow(x,y),zxi2y=pow((z + x),(2*y)); double ydxz=y/(x+z); //printf("%lf %lf %lf %lf %lf \n",y,x,z,ydxz,zxi2y); double p2=xiy*zxiy; //if (zxi2y>0.000000000001) { dL(0) =p2*(log(x) - log(x+z))/zxi2y; dL(1) =p2*((y/x) - ydxz)/zxi2y; dL(2) =p2*(-ydxz)/zxi2y; //} return(dL); } vec D2lapsf(double y, double x, double z) { vec dL(6); double zximym2=pow(z+x,-y-2), zximym1=pow(z+x,-y-1), zximym3=pow(z+x,-y-3), xiym1=pow(x,y-1), xiy=pow(x,y), lxz=log(x+z), lx=log(x),yp1=y+1, ygyp1=y*(y+1); double p3=ygyp1*xiy; // D13 dL(0)= xiy* zximym1* (y* lxz-y* lx-1) ; // D23 dL(1)= y* xiym1* zximym2*(x-y* z) ; // D33 dL(2)= y* yp1*xiy*zximym2; // D133 dL(4)= pow(y,2)* yp1* xiym1* zximym2+(-y-2)* p3* zximym3; // D233 dL(3)= zximym2*( y* xiy+(y+1)*xiy + p3 *lx - p3 * lxz); // D333 dL(5)= ygyp1 * (y+2)* (-xiy* zximym3); return(dL); } vec Dilapsf(double y, double x, double z) { vec dL(3); dL(0) = (x* pow(z,(-1/y))* log(z))/pow(y,2); dL(1) = pow(z,(-1/y))-1; dL(2) = -(x* pow(z,(-(y+1)/y)))/y; return(dL); } vec D2ilapsf(double y, double x, double z) { vec dL(6); dL(0)=(x* pow(z,(-(y+1)/y))* (y-log(z)))/pow(y,3); dL(1)= - pow(z,(-(y+1)/y))/y; dL(2)= (x* (y+1)* pow(z,(-1/y-2)))/pow(y,2); dL(4)= ((y+1)* pow(z,(-1/y-2)))/pow(y,2); dL(3)= -(x* pow(z,(-1/y-2))* (y* (y+2)-(y+1)* log(z)))/pow(y,4); dL(5)= -(x*(y+1)* (2* y+1)* pow(z,(-1/y-3)))/pow(y,3); return(dL); } // }}} cube vcrossmat(vec d, mat x1x2) { // {{{ cube dd(d.n_elem,x1x2.n_rows,2); dd.slice(0)=d * trans(x1x2.col(0)); dd.slice(1)=d * trans(x1x2.col(1)); return(dd); } // }}} double survivalRVC(vec theta,mat thetades,mat ags,int cause1,int cause2,vec cif1,vec cif2,mat x1, mat x2, vec &dp, vec &alllike) { // {{{ double lamtot1=1,valr=1; // index variable som angiver cause, men hvis cause==0 er index -1 int icause1,icause2; icause1=cause1; icause2=cause2; if (cause1==0) icause1=1; if (cause2==0) icause2=1; int test=0,itest=0; if (itest==1) { // {{{ theta.print("theta"); thetades.print("theta-des"); Rprintf(" %d %d \n",cause1,cause2); cif1.print("ci1"); cif2.print("ci1"); x1.print("x1"); x2.print("x2"); ags.print("ags"); } // }}} vec dL=theta; dL.fill(0); vec par = thetades * theta; if (test==1) { cif1.print("c1"); x1.print("x1"); } if (test==1) { theta.print("theta"); thetades.print("t-des "); par.print("pp"); } // nn number of parameters, ncr number of competing risks, lpar number of parameters pars=thetades * theta int nn=thetades.n_rows,lpar=thetades.n_cols; // x1 = ncr x nrvs , Dcif1=ntheta x ncr vec sumtheta=ags * theta; // test=3; // wall_clock timer; // timer.tic(); // {{{ first basic laplace derivatives vec resv(nn); // resv.fill(0); //if (test==1) { x1.print("x1"); cif1.print("cif1"); } // x1 = ncr x nrvs , cif1=ncr vec x1f1, x2f2; x1f1= trans(x1) * cif1; x2f2= trans(x2) * cif2; //if (test==1) { x1f1.print("x1f1"); } //ags.print("ags"); theta.print("par"); vec D1(nn),D2(nn),D3(nn); vec D13(nn),D23(nn),D33(nn),D133(nn),D233(nn),D333(nn); vec res(6),res0(6); res.fill(0); res0.fill(0); //double x,y,z; double like=1,iisum; int i; for (i=0;i(itheta); mat thetades = Rcpp::as(ithetades); mat x1= Rcpp::as(irv1); mat ags= Rcpp::as(iags); vec cif1 = Rcpp::as(icif1); int varlink = Rcpp::as(ivarlink); int status1 = Rcpp::as(istatus1); // IntegerVector status1(istatus1); // int nn=status1.n_rows(); // int nn2=cif1.n_rows(); // printf(" %d %d \n",nn,nn2); int test=0; if (test==1) { theta.print("the"); thetades.print("the"); ags.print("ags"); x1.print("x1 "); cif1.print("cif"); } int lpar=thetades.n_cols; vec dp(lpar); dp.fill(0); vec ddp(lpar); ddp.fill(0); vec all(6); //vec like(nn); //for (int i=0; i(itheta); mat thetades = Rcpp::as(ithetades); mat x1= Rcpp::as(irv1); mat x2= Rcpp::as(irv2); mat ags= Rcpp::as(iags); // colvec x2= Rcpp::as(irv2); vec cif1 = Rcpp::as(icif1); vec cif2 = Rcpp::as(icif2); int varlink = Rcpp::as(ivarlink); int status1 = Rcpp::as(istatus1); int status2 = Rcpp::as(istatus2); int test=0; if (test==1) { theta.print("the"); thetades.print("the"); ags.print("ags"); x1.print("x1 "); x2.print("x2 "); cif1.print("cif"); cif2.print("cif"); } List ressl; ressl["par"]=theta; if (varlink==1) theta=exp(theta); colvec dL=theta; dL.fill(0); // double f1,f2; //double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); colvec par = thetades * theta; int lpar=thetades.n_cols; vec dp(lpar); dp.fill(0); vec all(6); double like=0; if (status1==0 && status2==0) { // {{{ like=survivalRVC(theta,thetades,ags,0,0,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1==0 && status2!=0) { // {{{ like=survivalRVC(theta,thetades,ags,0,status2,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1!=0 && status2==0) { // {{{ like=survivalRVC(theta,thetades,ags,status1,0,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1!=0 && status2!=0) { // {{{ like=survivalRVC(theta,thetades,ags,status1,status2,cif1,cif2,x1,x2,dp,all); } // }}} ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; ressl["theta"]=theta; ressl["par.des"]=thetades; ressl["varlink"]=varlink; ressl["alllike"]=all; return(ressl); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} RcppExport SEXP survivalRV2(SEXP itheta,SEXP istatus1,SEXP istatus2, SEXP icif1,SEXP icif2, SEXP irv1, SEXP irv2,SEXP ithetades, SEXP iags, SEXP ivarlink) { // {{{ try { colvec theta = Rcpp::as(itheta); mat thetades = Rcpp::as(ithetades); mat x1= Rcpp::as(irv1); mat x2= Rcpp::as(irv2); mat ags= Rcpp::as(iags); // colvec x2= Rcpp::as(irv2); vec cif1 = Rcpp::as(icif1); vec cif2 = Rcpp::as(icif2); int varlink = Rcpp::as(ivarlink); int status1 = Rcpp::as(istatus1); int status2 = Rcpp::as(istatus2); // int test=1; // if (test==1) { // theta.print("the"); // thetades.print("the"); // ags.print("ags"); // x1.print("x1 "); // x2.print("x2 "); // cif1.print("cif"); // cif2.print("cif"); // } List ressl; ressl["par"]=theta; if (varlink==1) theta=exp(theta); colvec dL=theta; dL.fill(0); // double f1,f2; //double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); colvec par = thetades * theta; int lpar=thetades.n_cols; vec dp(lpar); dp.fill(0); vec all(6); double like=0; if (status1==0 && status2==0) { // {{{ like=survivalRVC2(theta,thetades,ags,0,0,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1==0 && status2!=0) { // {{{ like=survivalRVC2(theta,thetades,ags,0,status2,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1!=0 && status2==0) { // {{{ like=survivalRVC2(theta,thetades,ags,status1,0,cif1,cif2,x1,x2,dp,all) ; } // }}} if (status1!=0 && status2!=0) { // {{{ like=survivalRVC2(theta,thetades,ags,status1,status2,cif1,cif2,x1,x2,dp,all); } // }}} ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; ressl["theta"]=theta; ressl["par.des"]=thetades; ressl["varlink"]=varlink; ressl["alllike"]=all; return(ressl); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} double claytonoakesRVC(vec theta,mat thetades,mat ags, int status1,int status2,double cif1,double cif2,vec x1,vec x2,vec &dp,vec &ccw) { // {{{ double valr=1; colvec dL=theta; dL.fill(0); double f1,f2; f1=cif1; f2=cif2; colvec par = thetades * theta; int nn=thetades.n_rows; int lpar=thetades.n_cols; // {{{ first basic laplace derivatives //double lamtot1= trans(ags.row(0)) * par; // changed to the below 17-08-2018 double lamtot1= sum(x1 % par); // lamtot same within cluster double ii1 = ilapsf(lamtot1,lamtot1,f1); double ii2 = ilapsf(lamtot1,lamtot1,f2); // printf(" lamtot %lf ",lamtot1); vec part = trans( x1.t() * thetades); // part.print("pp"); // ags.row(0)=part.t(); // ags.row(1)=part.t(); vec resv(nn); resv.fill(0); vec iresv(nn); iresv.fill(0); double like=1,iisum; int i; for (i=0;i(itheta); mat thetades = Rcpp::as(ithetades); mat ags= Rcpp::as(iags); colvec x1= Rcpp::as(irv1); colvec x2= Rcpp::as(irv2); double cif1 = Rcpp::as(icif1); double cif2 = Rcpp::as(icif2); int varlink = Rcpp::as(ivarlink); int status1 = Rcpp::as(istatus1); int status2 = Rcpp::as(istatus2); vec ccw= Rcpp::as(iccw); List ressl; ressl["par"]=theta; if (varlink==1) theta=exp(theta); colvec dL=theta; dL.fill(0); double f1,f2; f1=cif1; f2=cif2; colvec par = thetades * theta; //int nn=thetades.n_rows; int lpar=thetades.n_cols; vec dp(lpar); dp.fill(0); vec DbetaDtheta(2*lpar); if (status1==0 && status2==0) { // {{{ double like=claytonoakesRVC(theta,thetades,ags,0,0,f1,f2,x1,x2,dp,ccw) ; ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; } // }}} if (status1==0 && status2==1) { // {{{ double like=claytonoakesRVC(theta,thetades,ags,0,1,f1,f2,x1,x2,dp,ccw) ; ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; } // }}} if (status1==1 && status2==0) { // {{{ double like=claytonoakesRVC(theta,thetades,ags,1,0,f1,f2,x1,x2,dp,ccw) ; ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; } // }}} if (status1==1 && status2==1) { // {{{ double like=claytonoakesRVC(theta,thetades,ags,1,1,f1,f2,x1,x2,dp,ccw) ; ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; } // }}} ressl["theta"]=theta; ressl["par.des"]=thetades; vec obs(4); obs(0)=status1; obs(1)=f1; obs(2)=status2; obs(3)=f2; ressl["obs"]=obs; ressl["varlink"]=varlink; return(ressl); } // }}} // for binary case, additive gamma from twostage survival double claytonoakesbinRVC(vec theta,mat thetades,mat ags,int status1,int status2,double cif1,double cif2,vec x1, vec x2, vec &dp,vec &DbetaDtheta,vec &ps,vec &dp00) { // {{{ double f1,f2,valr=1; colvec dL=theta; dL.fill(0); f1=cif1; f2=cif2; colvec par = thetades * theta; int nn=thetades.n_rows; int lpar=thetades.n_cols; // {{{ first basic laplace derivatives double lamtot1= sum(x1 % par); double ii1 = ilapsf(lamtot1,lamtot1,f1); double ii2 = ilapsf(lamtot1,lamtot1,f2); vec part = trans( x1.t() * thetades); vec resv(nn); resv.fill(0); vec iresv(nn); iresv.fill(0); double like=1,iisum; int i; for (i=0;i(itheta); mat thetades = Rcpp::as(ithetades); mat ags = Rcpp::as(iags); colvec x1= Rcpp::as(irv1); colvec x2= Rcpp::as(irv2); double cif1 = Rcpp::as(icif1); double cif2 = Rcpp::as(icif2); int varlink = Rcpp::as(ivarlink); int status1 = Rcpp::as(istatus1); int status2 = Rcpp::as(istatus2); List ressl; ressl["par"]=theta; if (varlink==1) theta=exp(theta); colvec dL=theta; dL.fill(0); double f1,f2; //double cifs=cif1+cif2; //double S=1+(cifs*(theta-1)); f1=cif1; f2=cif2; colvec par = thetades * theta; //int nn=thetades.n_rows; int lpar=thetades.n_cols; vec dp(lpar); dp.fill(0); vec dp00(lpar); dp00.fill(0); vec ps(8); dp.fill(0); vec DbetaDtheta(2*lpar); double like; if (status1==0 && status2==0) { // {{{ like=claytonoakesbinRVC(theta,thetades,ags,0,0,f1,f2,x1,x2,dp,DbetaDtheta,ps,dp00) ; } // }}} if (status1==0 && status2==1) { // {{{ like=claytonoakesbinRVC(theta,thetades,ags,0,1,f1,f2,x1,x2,dp,DbetaDtheta,ps,dp00) ; } // }}} if (status1==1 && status2==0) { // {{{ like=claytonoakesbinRVC(theta,thetades,ags,1,0,f1,f2,x1,x2,dp,DbetaDtheta,ps,dp00) ; } // }}} if (status1==1 && status2==1) { // {{{ like=claytonoakesbinRVC(theta,thetades,ags,1,1,f1,f2,x1,x2,dp,DbetaDtheta,ps,dp00) ; } // }}} ressl["like"]=like; if (varlink==1) dp=dp % theta; ressl["dlike"]=dp; ressl["ps"]=ps; ressl["dp00"]=dp00; ressl["theta"]=theta; ressl["par.des"]=thetades; vec obs(4); obs(0)=status1; obs(1)=f1; obs(2)=status2; obs(3)=f2; ressl["obs"]=obs; ressl["varlink"]=varlink; return(ressl); } catch( std::exception &ex ) { forward_exception_to_r( ex ); } catch(...) { ::Rf_error( "c++ exception (unknown reason)" ); } return R_NilValue; // -Wall } // }}} RcppExport SEXP twostageloglike( SEXP icause, SEXP ipmargsurv, SEXP itheta, SEXP iXtheta, SEXP iDXtheta, SEXP idimDX, SEXP ithetades, SEXP icluster,SEXP iclustsize,SEXP iclusterindex, SEXP ivarlink, SEXP iiid, SEXP iweights, SEXP isilent, SEXP idepmodel, // SEXP ientryage, SEXP itrunkp , SEXP istrata, SEXP isecluster, SEXP iantiid ) // {{{ { try { // {{{ setting matrices and vectors, and exporting to armadillo matrices mat thetades = Rcpp::as(ithetades); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); colvec clustsize = Rcpp::as(iclustsize); int antclust = clusterindex.n_rows; colvec cause = Rcpp::as(icause); colvec pmargsurv = Rcpp::as(ipmargsurv); colvec cluster = Rcpp::as(icluster); colvec weights = Rcpp::as(iweights); // colvec entryage = Rcpp::as(ientryage); colvec trunkp = Rcpp::as(itrunkp); colvec secluster = Rcpp::as(isecluster); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); IntegerVector strata(istrata); int varlink= Rcpp::as(ivarlink); int silent = Rcpp::as(isilent); int depmodel= Rcpp::as(idepmodel); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); mat Xtheta = Rcpp::as(iXtheta); int udtest=0; if (udtest==1) { // {{{ // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // est.print("est"); // est2.print("est2"); // z.print("z"); // zsem.print("zsemi"); // z2.print("z2"); thetades.print("theta.des"); clusterindex.print("clusterindex"); // rvdes.print("rvdes"); theta.print("theta"); Xtheta.print("Xtheta"); // y.print("y-times"); clustsize.print("clustsize"); pmargsurv.print("margsurv"); cause.print("cause"); cluster.print("cluster"); // Zgamma.print("zgam"); // Z2gamma2.print("zgam2"); // KMtimes.print("KMtimes"); // KMc.print("KMc"); weights.print("weights"); // entryage.print("entryage"); // cif1entry.print("cif1entry"); // cif2entry.print("cif2entry"); trunkp.print("trunkp"); } else if (udtest==2) { // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // Rprintf("est %lf \n",mean(mean(est))); // Rprintf("est2 %lf \n",mean(mean(est2))); // Rprintf("z %lf \n",mean(mean(z))); // Rprintf("zsem %lf \n",mean(mean(zsem))); // Rprintf("z2 %lf \n",mean(mean(z2))); mat mt=mean(thetades); mt.print("meancol thetades"); // Rprintf("theatdes %lf \n",mean(mean(thetades))); Rprintf("ci %lf \n",mean(mean(clusterindex))); // Rprintf("rvdes %lf \n",mean(mean(rvdes))); Rprintf("theta %lf \n",mean(theta)); Rprintf("Xtheta %lf \n",mean(mean(Xtheta))); // Rprintf("y %lf \n",mean(y)); Rprintf("ci %lf \n",mean(clustsize)); // Rprintf("times %lf \n",mean(times)); Rprintf("cause %lf \n",mean(cause)); Rprintf("cluster %lf \n",mean(cluster)); // Rprintf("Zgamma %lf \n",mean(Zgamma)); // Rprintf("Z2gamma2 %lf \n",mean(Z2gamma2)); // Rprintf("KMtimes %lf \n",mean(KMtimes)); // Rprintf("KMc %lf \n",mean(KMc)); Rprintf("weights %lf \n",mean(weights)); // Rprintf("entry %lf \n",mean(entryage)); // Rprintf("cif1entry %lf \n",mean(cif1entry)); // Rprintf("cif2entry %lf \n",mean(cif2entry)); Rprintf("trunkp %lf \n",mean(trunkp)); } // }}} int ci,ck,i,j,c,s=0,k,v,c1; // double asign=-1; if (ascertained==2) asign=1; // double ll=1,Li,Lk,sdj=0,diff=0,loglikecont=0; // double Lit=1,Lkt=1,llt=1,deppar=1,ssf=0,thetak=0; double dl1,dl2,ll1,ll2,ll=1,Li,Lk,sdj=0,diff=0,loglikecont=0; double Lit=1,Lkt=1,llt=1,deppar=1,ssf=0,thetak=0,dddl=0.000001; double d2=0,asign=-1; // double plack(); int pt=theta.n_rows; vec dplack(pt); dplack.fill(pt); vec dplackt(pt); dplackt.fill(pt); vec dplackt1(pt); dplackt1.fill(0); vec dplackt2(pt); dplackt2.fill(0); // mat dp1(pmargsurv.n_rows,2); dp1.fill(0); mat dp1(pmargsurv.n_rows,pt); dp1.fill(0); mat dp2(pmargsurv.n_rows,pt); dp2.fill(0); // vec ckij(pt),dckij(pt),ckijvv(pt),dckijvv(pt),ckijtv(pt),dckijtv(pt),ckijvt(pt),dckijvt(pt); i=silent+1; mat thetiid(antiid,pt); colvec loglikeiid(antiid); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); } colvec p11tvec(antclust); // p11tvec=0; // Rprintf(" %d \n",pt); colvec Utheta(pt); colvec vthetascore(pt); colvec pthetavec(pt); vec vtheta2(pt); mat DUtheta(pt,pt); DUtheta.fill(0); Utheta.fill(0); // if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } // if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } // rowvec bhatt2 = est.row(est2.n_cols); // colvec pbhat2(z.n_rows); // depmodel=5 // rvdes.print("rvdes"); // thetades.print("ttt"); // nr=rvdes.n_cols; // vec alphaj(nr),alphai(nr),alpha(nr), // rvvec(nr),rvvec1(nr),rvvec2vv(nr),rvvec2vt(nr),rvvec2tv(nr); // vec rvvec2(nr); // }}} for (j=0;j=2) { R_CheckUserInterrupt(); diff=0; sdj=0; for (c=0;c(ithetades); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); colvec clustsize = Rcpp::as(iclustsize); int antclust = clusterindex.n_rows; IntegerVector cause(icause); colvec pmargsurv = Rcpp::as(ipmargsurv); IntegerVector cluster(icluster); colvec weights = Rcpp::as(iweights); // colvec entryage = Rcpp::as(ientryage); colvec trunkp = Rcpp::as(itrunkp); colvec secluster = Rcpp::as(isecluster); mat rvdes= Rcpp::as(irvdes); mat ags = Rcpp::as(iags); int ascertained= Rcpp::as(iascertained); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); IntegerVector strata(istrata); int varlink= Rcpp::as(ivarlink); int silent = Rcpp::as(isilent); int depmodel= Rcpp::as(idepmodel); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); mat Xtheta = Rcpp::as(iXtheta); int udtest=0; if (udtest==1) { // {{{ // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // est.print("est"); // est2.print("est2"); // z.print("z"); // zsem.print("zsemi"); // z2.print("z2"); thetades.print("theta.des"); clusterindex.print("clusterindex"); // rvdes.print("rvdes"); theta.print("theta"); Xtheta.print("Xtheta"); // y.print("y-times"); clustsize.print("clustsize"); pmargsurv.print("margsurv"); // cause.print("cause"); // cluster.print("cluster"); // Zgamma.print("zgam"); // Z2gamma2.print("zgam2"); // KMtimes.print("KMtimes"); // KMc.print("KMc"); weights.print("weights"); // entryage.print("entryage"); // cif1entry.print("cif1entry"); // cif2entry.print("cif2entry"); trunkp.print("trunkp"); } else if (udtest==2) { // Rprintf(" %d %d %d %d %d %d %d \n",samecens,inverse,semi,semi2,flexfunc,stabcens,silent); // Rprintf(" %d %d %d %d %d %d %d \n",cifmodel,CA1,CA2,sym,depmodel,estimator,iid); // Rprintf("est %lf \n",mean(mean(est))); // Rprintf("est2 %lf \n",mean(mean(est2))); // Rprintf("z %lf \n",mean(mean(z))); // Rprintf("zsem %lf \n",mean(mean(zsem))); // Rprintf("z2 %lf \n",mean(mean(z2))); mat mt=mean(thetades); mt.print("meancol thetades"); // Rprintf("theatdes %lf \n",mean(mean(thetades))); Rprintf("ci %lf \n",mean(mean(clusterindex))); // Rprintf("rvdes %lf \n",mean(mean(rvdes))); Rprintf("theta %lf \n",mean(theta)); Rprintf("Xtheta %lf \n",mean(mean(Xtheta))); // Rprintf("y %lf \n",mean(y)); Rprintf("ci %lf \n",mean(clustsize)); // Rprintf("times %lf \n",mean(times)); // Rprintf("cause %lf \n",mean(cause)); // Rprintf("cluster %lf \n",mean(cluster)); // Rprintf("Zgamma %lf \n",mean(Zgamma)); // Rprintf("Z2gamma2 %lf \n",mean(Z2gamma2)); // Rprintf("KMtimes %lf \n",mean(KMtimes)); // Rprintf("KMc %lf \n",mean(KMc)); Rprintf("weights %lf \n",mean(weights)); // Rprintf("entry %lf \n",mean(entryage)); // Rprintf("cif1entry %lf \n",mean(cif1entry)); // Rprintf("cif2entry %lf \n",mean(cif2entry)); Rprintf("trunkp %lf \n",mean(trunkp)); } // }}} int ci,ck,i,j,c,s=0,k,v,c1; // double ll=1,Li,Lk,diff=0,loglikecont=0,sdj=0; double dl1,dl2,ll1,ll2,ll=1,Li,Lk,diff=0,loglikecont=0,sdj; double Lit=1,Lkt=1,llt=1,deppar=1,ssf=0,thetak=0,dddl=0.000001; // double plack(); int pt=theta.n_rows; double d2=0,asign=-1; if (ascertained==2) asign=1; vec dplack(pt); dplack.fill(0); vec dplackt(pt); dplackt.fill(0); vec dplackt1(pt); dplackt1.fill(0); vec dplackt2(pt); dplackt2.fill(0); // mat dp1(pmargsurv.n_rows,2); dp1.fill(0); mat dp1(pmargsurv.n_rows,pt); dp1.fill(0); mat dp2(pmargsurv.n_rows,pt); dp2.fill(0); // vec ckij(pt),dckij(4),ckijvv(4),dckijvv(4),ckijtv(4),dckijtv(4),ckijvt(4),dckijvt(4); i=silent+1; mat thetiid(antiid,pt); colvec loglikeiid(antclust); colvec trunclikeiid(antclust); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); trunclikeiid.fill(0); } vec p11tvec(antclust); vec Utheta(pt); vec vthetascore(pt); vec pthetavec(pt); vec vtheta2(pt); mat DUtheta(pt,pt); DUtheta.fill(0); Utheta.fill(0); // if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } // if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } int nr=rvdes.n_cols; vec rv2(nr),rv1(nr); vec etheta=theta; vec wwc(4); // }}} for (j=0;j=2) { R_CheckUserInterrupt(); diff=0; for (c=0;c(inrvs); IntegerVector nrvs(inrvs); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); int pt=theta.n_rows; mat ags = Rcpp::as(iags); colvec clustsize = Rcpp::as(iclustsize); // this is number of pairs (rather than clusters) int antclust= clusterindex.n_rows; colvec cause = Rcpp::as(icause); colvec pmargsurv = Rcpp::as(ipmargsurv); colvec cluster = Rcpp::as(icluster); colvec weights = Rcpp::as(iweights); // colvec entryage = Rcpp::as(ientryage); colvec trunkp = Rcpp::as(itrunkp); colvec secluster = Rcpp::as(isecluster); // mat rvdes= Rcpp::as(irvdes); int depmodel= Rcpp::as(idepmodel); int ascertained= Rcpp::as(iascertained); IntegerVector strata(istrata); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); //printf(" mig thetades 222222\n"); // array for parameter restrictions (one for each pair) pairs * (ant random effects)* (ant par) NumericVector thetadesvec(ithetades); IntegerVector arrayDims1(idimthetades); IntegerVector arrayDD(3); //printf(" mig thetades 222222\n"); //printf(" %d %d %d \n",arrayDims1[0],arrayDims1[1],arrayDims1[2]); arrayDD[2]=1; if (depmodel==3) { arrayDD[0]=arrayDims1[0]; arrayDD[1]=arrayDims1[1]; arrayDD[2]=arrayDims1[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } arma::cube thetadesi(thetadesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); //printf(" mig cube thetades 222222\n"); // mat thetades(arrayDD[0],arrayDD[1]); // if (depmodel!=3) // mat thetades=mat(arrayDims1[0],arrayDims1[1]*arrayDD[2],thetadesvec.begin()); mat thetades=mat(thetadesvec.begin(),arrayDims1[0],arrayDims1[1]*arrayDD[2],false); //printf(" mig rvdes \n"); // array for parameter restrictions (one for each pair) pairs * (ant random effects)* (ant par) // array for pairwise random effects (two vectors for each pair) pairs * 2* (ant random effects) // mat rvdes= Rcpp::as(irvdes); NumericVector rvdesvec(irvdes); IntegerVector arrayDims2(idimrvdes); if (depmodel==3) { arrayDD[0]=arrayDims2[0]; arrayDD[1]=arrayDims2[1]; arrayDD[2]=arrayDims2[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } // printf("rvdesC %d %d %d \n",arrayDD[0], arrayDD[1], arrayDD[2]); arma::cube rvdesC(rvdesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); // mat B=rvdesC.slice(1); B.print("rv.1"); // mat A=rvdesC.slice(0); A.print("rv.1"); // printf(" her er lidt knas\n"); mat rvdes=mat(rvdesvec.begin(),arrayDims2[0],arrayDims2[1]*arrayDD[2],false); // if (depmodel!=3) { // mat rvdes = Rcpp::as(irvdes); // } else mat rvdes(arrayDims2[1],arrayDims2[2]); // printf(" not !\n"); // thetades.fill(0); int varlink= Rcpp::as(ivarlink); int silent = Rcpp::as(isilent); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); mat Xtheta = Rcpp::as(iXtheta); int ci,ck,i,j,s=0,k,c1; double dl1,dl2,ll1,ll2,ll=1,Li,Lk,sdj=0,diff=0,loglikecont=0; double Lit=1,Lkt=1,llt=1,deppar=1,ssf=0,thetak=0,dddl=0.000001; double d2=0,asign=-1; if (ascertained==2) asign=1; // double plack(); vec dplack(pt); dplack.fill(0); vec dplackt(pt); dplackt.fill(0); vec dplackt1(pt); dplackt1.fill(0); vec dplackt2(pt); dplackt2.fill(0); mat dp1(pmargsurv.n_rows,pt); dp1.fill(0); mat dp2(pmargsurv.n_rows,pt); dp2.fill(0); i=silent+1; mat thetiid(antiid,pt); colvec loglikeiid(antclust); colvec trunclikeiid(antclust); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); trunclikeiid.fill(0); } colvec p11tvec(antclust); colvec Utheta(pt); colvec vthetascore(pt); colvec pthetavec(pt); vec vtheta2(pt); mat DUtheta(pt,pt); DUtheta.fill(0); Utheta.fill(0); // if (!Utheta.is_finite()) { Rprintf(" NA's i def U\n"); Utheta.print("U"); } // if (!DUtheta.is_finite()) { Rprintf(" NA's i def DU\n"); DUtheta.print("DU"); } int nr=1; if (depmodel==3) nr=arrayDD[2]; vec rv2(nr),rv1(nr); vec etheta=theta; vec wwc(2); // // // }}} colvec likepairs(antclust); for (j=0;jT2, // since T2 is the first jump) // we handle this by giving the cumulatives of ascertainment // pairs/controls appropriately RcppExport SEXP survivalloglikeRVpairs( SEXP icause, SEXP ipmargsurv, SEXP itheta, SEXP iXtheta, SEXP iDXtheta, SEXP idimDX, SEXP ithetades,SEXP icluster,SEXP iclustsize,SEXP iclusterindex, SEXP iiid, SEXP iweights, SEXP isilent, SEXP idepmodel, // SEXP ientryage, SEXP itrunkp , SEXP istrata, SEXP isecluster, SEXP iantiid, SEXP irvdes, SEXP idimthetades, SEXP idimrvdes, SEXP inrvs , SEXP iags,SEXP ientrycause, SEXP iascertained ) { // {{{ try { // {{{ // setting matrices and vectors, and exporting to armadillo matrices // // {{{ // colvec nrvs = Rcpp::as(inrvs); int ascertained= Rcpp::as(iascertained); // 1= ascertained or casecontrol, controlled via trunkp IntegerVector nrvs(inrvs); IntegerVector entrycause(ientrycause); IntegerVector cause(icause); mat clusterindex = Rcpp::as(iclusterindex); colvec theta = Rcpp::as(itheta); int pt=theta.n_rows; colvec clustsize = Rcpp::as(iclustsize); // this is number of pairs (rather than clusters) int antclust = clusterindex.n_rows; mat pmargsurv = Rcpp::as(ipmargsurv); mat trunkp = Rcpp::as(itrunkp); mat ags = Rcpp::as(iags); colvec cluster = Rcpp::as(icluster); colvec weights = Rcpp::as(iweights); colvec secluster = Rcpp::as(isecluster); // mat rvdes= Rcpp::as(irvdes); // colvec entryage = Rcpp::as(ientryage); int depmodel = Rcpp::as(idepmodel); IntegerVector strata(istrata); vec all(4); // array for derivative of flexible design NumericVector DXthetavec(iDXtheta); IntegerVector arrayDims(idimDX); arma::cube DXtheta(DXthetavec.begin(), arrayDims[0], arrayDims[1], arrayDims[2], false); // array for parameter restrictions (one for each pair) pairs * (ant random effects)* (ant par) NumericVector thetadesvec(ithetades); IntegerVector arrayDims1(idimthetades); IntegerVector arrayDD(3); //printf(" %d %d %d \n",arrayDims1[0],arrayDims1[1],arrayDims1[2]); if (depmodel==3) { arrayDD[0]=arrayDims1[0]; arrayDD[1]=arrayDims1[1]; arrayDD[2]=arrayDims1[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } arma::cube thetadesi(thetadesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); //printf(" mig cube thetades 222222\n"); // mat thetades(arrayDD[0],arrayDD[1]); // if (depmodel!=3) // mat thetades=mat(arrayDims1[0],arrayDims1[1]*arrayDD[2],thetadesvec.begin()); mat thetades=mat(thetadesvec.begin(),arrayDims1[0],arrayDims1[1]*arrayDD[2],false); //printf(" %d %d %d \n",arrayDD[0], arrayDD[1], arrayDD[2]); //printf(" mig rvdes \n"); // array for parameter restrictions (one for each pair) pairs * (ant random effects)* (ant par) // array for pairwise random effects (two vectors for each pair) pairs * 2* (ant random effects) // mat rvdes= Rcpp::as(irvdes); NumericVector rvdesvec(irvdes); IntegerVector arrayDims2(idimrvdes); if (depmodel==3) { arrayDD[0]=arrayDims2[0]; arrayDD[1]=arrayDims2[1]; arrayDD[2]=arrayDims2[2]; } else { arrayDD[0]=1; arrayDD[1]=1; arrayDD[2]=1; } // printf(" %d %d %d \n",arrayDD[0], arrayDD[1], arrayDD[2]); arma::cube rvdesC(rvdesvec.begin(), arrayDD[0], arrayDD[1], arrayDD[2], false); mat rvdes=mat(rvdesvec.begin(),arrayDims2[0],arrayDims2[1]*arrayDD[2],false); int silent = Rcpp::as(isilent); int iid= Rcpp::as(iiid); int antiid = Rcpp::as(iantiid); mat Xtheta = Rcpp::as(iXtheta); int ci,ck,i,j,s=0,k,c1; double ll=1,loglikecont=0; double llt=1,ssf=0,thetak; vec dplack(pt); dplack.fill(0); vec dplackt(pt); dplackt.fill(0); i=silent+1; mat thetiid(antiid,pt); colvec loglikeiid(antiid); colvec trunclikeiid(antiid); if (iid==1) { thetiid.fill(0); loglikeiid.fill(0); trunclikeiid.fill(0); } colvec p11tvec(antclust); // colvec Utheta(pt); colvec vthetascore(pt); colvec pthetavec(pt); vec vtheta2(pt); mat DUtheta(pt,pt); DUtheta.fill(0); Utheta.fill(0); // printf("2 her er lidt knas\n"); vec etheta=theta; mat Dcif(arrayDims2[0]/2,pt); // Dcif.print("Dcif"); // // }}} colvec likepairs(antclust); mat matlikepairs(antclust,6); vec allvec(6); // wall_clock timer; timer.tic(); //printf(" thomas \n"); for (j=0;j0) || any(trunkp.row(k)>0)) { // /*{{{*/ vec Lit=trans(trunkp.row(i)); vec Lkt=trans(trunkp.row(k)); if (j<-10) { Rprintf(" så betinges der ! %d %d %d %d \n",entrycause(i),entrycause(k),cause(i),cause(k)); Lit.print("Lit"); Lkt.print("Lkt"); Lk.print("Lk"); } if (ascertained==0) // standard left truncation, both surviving Lit, Lkt llt=survivalRVC2(etheta,thetadesv,ags,0,0,Lit,Lkt,rv1,rv2,dplackt,allvec); if (ascertained==1) // ascertainment correction depending on cumulative hazards of proband Lkt // case control adjustment depending on cumulative hazards of proband Lkt llt=survivalRVC2(etheta,thetadesv,ags,0,cause(k),Lit,Lkt,rv1,rv2,dplackt,allvec); ll=survivalRVC2(etheta,thetadesv,ags,cause(i),cause(k),Li,Lk,rv1,rv2,dplack,allvec); // printf("%d %lf %lf \n",j,ll,llt); // printf(" så betinges der ! %d %d %d %d \n",entrycause(i),entrycause(k),cause(i),cause(k)); // Li.print("Li"); Lk.print("Lk"); Lit.print("Lit"); Lkt.print("Lkt"); ssf+=weights(i)*(log(ll)-log(llt)); loglikecont=(log(ll)-log(llt)); vthetascore=dplack/ll-dplackt/llt; /*}}}*/ } else {/*{{{*/ // printf("hhhhh %d %d %d %d %d \n",ascertained,i,k,(int) ci,(int) ck); ll=survivalRVC2(etheta,thetadesv,ags,cause(i),cause(k),Li,Lk,rv1,rv2,dplack,allvec); ssf+=weights(i)*log(ll); loglikecont=log(ll); if (j<-10) { etheta.print("theta"); Li.print("Li"); Lk.print("Lk"); Rprintf("%d %d %lf %lf \n",cause(i),cause(k),weights(i),ll); allvec.print("allvec"); dplack.print("dll"); } vthetascore=dplack/ll; } /*}}}*/ // }}} } else if (depmodel==2) { // not possible only additive gamma model } if (depmodel!=3) { } else { // additive gamma structure DUtheta+=weights(i)*vthetascore*trans(vthetascore); vthetascore=weights(i)*vthetascore; Utheta=Utheta+vthetascore; } if (iid==1) { for (c1=0;c1]@!<Śg=sZnKT}<ɴ0m9FIJ(/WWҮH-B[H6Y xZQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@)o/%[2A8ry VG&\E'V0?4(C(M~. "M4?)imu,ڶ;C' 8z*)e1-@qhC#<[ F?M~_~ZPG%?7&J4oMk@h?(5ERլu6-.R봩Ps5vri.kb ( ( Okq) R*z?-jPhO&Jo'[4P7%Z7?~Ig_~p]K"9O0UsQ V?O~$hF5okJ-Nwc\^ c@He9 89 s(Jo'H-gKX+9 Nrq8 M4?)?4*MFL捷(z}ޥZҥ1;72Χ{qQ.F +GRQߗi4 x#xkb2?(4Qߗk^G/ F?M~_z(#~G%?7& 7{I(H`Ҭ>_I(((({wek[57067E4ad:W![ ŀ-*pA)WUD<3BQ5jDtM?KwY2АjG((ExV]IU/(lXsY VFR1{1v_:Ǹ,@ wfu_ ?GG(V θFc 0GSEǁ win72\0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+.B DW10@e#+ZP3o}:eACnۼSVZ~men%0'jOTPEP7P}I o>\xL$..4(͆@@l(|WQEaXV.cvt^w!ƒVPEPN]uپc7{6m 1`9k(dzdsiA$Ws0EA@utW ( ( ( ( ( ( aEKʯ[FG5EqmiM* 0>O ɔ ПW_߼k?_c]0mݐsӌVQEQEQEQEQEQEQEQEQEQE{}JKUҤ.U'ɑP n܂{g%V\7 PXc2r~WEaxuuMɸZqnU+݃+v(((((((((gWϴ||۸ٟ3{;~nZP("eY>|둿s?'\~,)x'HE[89~$b(-rs 3-iFvXq _:^5F'[.75@wQu{=J{k2;nhRTF;qwf;ǵY.a,Џ1dJuIEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEmets/vignettes/binomial-twin.ltx0000644000176200001440000010207413623061405016540 0ustar liggesusers%\VignetteIndexEntry{Analysis of bivariate binomial data: Twin analysis} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of bivariate binomial data: Twin analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of bivariate binomial data: Twin analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgc699b56} When looking at bivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible in our models. To be concrete about the model structure assume that we have paired binomial data \(Y_1, Y_2, X_1, X_2\) where the responses are \(Y_1, Y_2\) and we have covariates \(X_1, X_2\). We start by giving a brief description of these different models. First we for bivariate data one can specify the marginal probability using logistic regression models \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2. \] These model can be estimated under working independence \cite{zeger-liang-86}. A typical twin analysis will typically consist of looking at both \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \end{itemize} The additive gamma can be used for the same as the bivariate probit model but is more restrictive in terms of dependence structure, but is nevertheless still valuable to have also as a check of results of the bivariate probit model. \subsection*{Biprobit with random effects} \label{sec:org86402a4} For these model we assume that given random effects \(Z\) and a covariate vector \(V_{12}\) we have independent logistic regression models \[ probit(P(Y_i=1|X_i, Z)) = \alpha_i + X_i^T \beta + V_{12}^T Z i=1,2. \] where \(Z\) is a bivariate normal distribution with some covariance \(\Sigma\). The general covariance structure \(\Sigma\) makes the model very flexible. We note that \begin{itemize} \item Paramters \(\beta\) are subject specific \item The \(\Sigma\) will reflect dependence \end{itemize} The more standard link function \(logit\) rather than the \(probit\) link is often used and implemented in for example \cite{mm}. The advantage is that one now gets an odds-ratio interpretation of the subject specific effects, but one then needs numerical integration to fit the model. \#We note that \subsection*{Pairwise odds ratio model} \label{sec:orgf29d361} Now the pairwise odds ratio model the specifies that given \(X_1, X_2\) the marginal models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] The primary object of interest are the odds ratio between \(Y_{1}\) and \(Y_{2}\) \[ \gamma_{12} = \frac{ P( Y_{ki} =1 , Y_{kj} =1) P( Y_{ki} =0 , Y_{kj} =0) }{ P( Y_{ki} =1 , Y_{kj} =0) P( Y_{ki} =0 , Y_{kj} =1) } \] given \(X_{ki}\), \(X_{kj}\), and \(Z_{kji}\). We model the odds ratio with the regression \[ \gamma_{12} = \exp( Z_{12}^T \lambda) \] Where \(Z_{12}\) are some covarites that may influence the odds-ratio between between \(Y_{1}\) and \(Y_{2}\) and contains the marginal covariates, \cite{carey-1993,dale1986global,palmgren1989,molenberghs1994marginal}. This odds-ratio is given covariates as well as marginal covariates. The odds-ratio and marginals specify the joint bivariate distribution via the so-called Placckett-distribution. One way of fitting this model is the ALR algoritm, the alternating logistic regression ahd this has been described in several papers \cite{kuk2004permutation,kuk2007hybrid,qaqish2012orthogonalized}. We here simply estimate the parameters in a two stage-procedure \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} This gives efficient estimates of the dependence parameters because of orthogonality, but some efficiency may be gained for the marginal parameters by using the full likelihood or iterative fitting such as for the ALR. The pairwise odds-ratio model is very useful, but one do not have a random effects model. \subsection*{Additive gamma model} \label{sec:orgdb54e35} Again we operate under marginal logistic regression models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] First with just one random effect \(Z\) we assume that conditional on \(Z\) the responses are independent and follow the model \[ logit(P(Y_i=1|X_i,Z)) = exp( -Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) \] where \(\Psi\) is the laplace transform of \(Z\) where we assume that \(Z\) is gamma distributed with variance \(\lambda_{\bullet}^{-1}\) and mean 1. In general \(\Psi(\lambda_1,\lambda_2)\) is the laplace transform of a Gamma distributed random effect with \(Z\) with mean \(\lambda_1/\lambda_2\) and variance \(\lambda_1/\lambda_2^2\). We fit this model by \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} To deal with multiple random effects we consider random effects \(Z_i i=1,...,d\) such that \(Z_i\) is gamma distributed with mean \(\lambda_j/\lambda_{\bullet}\) and variance \(\lambda_j/\lambda_{\bullet}^2\), where we define the scalar \(\lambda_{\bullet}\) below. Now given a cluster-specific design vector \(V_{12}\) we assume that \[ V_{12}^T Z \] is gamma distributed with mean 1 and variance \(\lambda_{\bullet}^{-1}\) such that critically the random effect variance is the same for all clusters. That is \[ \lambda_{\bullet} = V_{12}^T (\lambda_1,...,\lambda_d)^T \] We return to some specific models below, and show how to fit the ACE and AE model using this set-up. One last option in the model-specification is to specify how the parameters \(\lambda_1,...,\lambda_d\) are related. We thus can specify a matrix \(M\) of dimension \(p \times d\) such that \[ (\lambda_1,...,\lambda_d)^T = M \theta \] where \(\theta\) is d-dimensional. If \(M\) is diagonal we have no restrictions on parameters. This parametrization is obtained with the var.par=0 option that thus estimates \(\theta\). The DEFAULT parametrization instead estimates the variances of the random effecs (var.par=1) via the parameters \(\nu\) \[ M \nu = ( \lambda_1/\lambda_{\bullet}^2, ...,\lambda_d/\lambda_{\bullet}^2)^T \] The basic modelling assumption is now that given random effects \(Z=(Z_1,...,Z_d)\) we have independent probabilites \[ logit(P(Y_i=1|X_i,Z)) = exp( -V_{12,i}^T Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) i=1,2 \] We fit this model by \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} Even though the model not formaly in this formulation allows negative correlation in practice the paramters can be negative and this reflects negative correlation. An advanatage is that no numerical integration is needed. \section*{The twin-stutter data} \label{sec:orgf3a7afd} We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinsall <- twinstut twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace tvparnr zyg stutter sex age nr binstut 1 2001005 mz no female 71 1 0 2 2001005 mz no female 71 2 0 3 2001006 dz no female 71 1 0 8 2001012 mz no female 71 1 0 9 2001012 mz no female 71 2 0 11 2001015 dz no male 71 1 0 \end{verbatim} \section*{Pairwise odds ratio model} \label{sec:orgbf74e81} We start by fitting an overall dependence OR for both MZ and DZ even though the dependence is expected to be different across zygosity. The first step is to fit the marginal model adjusting for marginal covariates. We here note that there is a rather strong gender effect in the risk of stuttering. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) summary(margbin) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ factor(sex) + age, family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4419 -0.4078 -0.2842 -0.2672 2.6395 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.027625 0.104012 -29.108 < 2e-16 *** factor(sex)male 0.869826 0.062197 13.985 < 2e-16 *** age -0.005983 0.002172 -2.754 0.00588 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9117.0 on 21285 degrees of freedom AIC: 9123 Number of Fisher Scoring iterations: 6 \end{verbatim} Now estimating the OR parameter. We see a strong dependence with an OR at around 8 that is clearly significant. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,detail=0) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dependence1 2.085347 0.1274536 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 8.05 1.03 6.04 10.1 4.3e-15 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now, and more interestingly, we consider an OR that depends on zygosity and note that MZ have a much larger OR than DZ twins. This type of trait is somewhat complicated to interpret, but clearly, one option is that that there is a genetic effect, alternatively there might be a stronger environmental effect for MZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # design for OR dependence theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5221651 0.2401355 factor(zyg)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We now consider further regression modelling of the OR structure by considering possible interactions between sex and zygozsity. We see that MZ has a much higher dependence and that males have a much lower dependence. We tested for interaction in this model and these were not significant. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinstut$cage <- scale(twinstut$age) theta.des <- model.matrix( ~-1+factor(zyg)+factor(sex),data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.8098841 0.3138423 factor(zyg)mz 3.7318076 0.2632250 factor(sex)male -0.4075409 0.3055349 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 2.248 0.705 0.865 3.63 0.001441 factor(zyg)mz 41.755 10.991 20.213 63.30 0.000145 factor(sex)male 0.665 0.203 0.267 1.06 0.001064 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Alternative syntax} \label{sec:org3f01206} We now demonstrate how the models can fitted jointly and with anohter syntax, that ofcourse just fits the marginal model and subsequently fits the pairwise OR model. First noticing as before that MZ twins have a much higher dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's) out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, response="binstut",id="tvparnr",var.link=1, theta.formula=~-1+factor(zyg1)) summary(out) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg1)dz 0.5221651 0.2401355 factor(zyg1)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg1)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg1)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now considering all data and estimating separate effects for the OR for opposite sex DZ twins and same sex twins. We here find that os twins are not markedly different from the same sex DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's)) desfs<-function(x,num1="zyg1",num2="zyg2") c(x[num1]=="dz",x[num1]=="mz",x[num1]=="os")*1 margbinall <- glm(binstut~factor(sex)+age,data=twinsall,family=binomial()) out3 <- easy.binomial.twostage(binstut~factor(sex)+age, data=twinsall,response="binstut",id="tvparnr",var.link=1, theta.formula=desfs,desnames=c("dz","mz","os")) summary(out3) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dz 0.5278527 0.2396796 mz 3.4850037 0.1864190 os 0.7802940 0.2894394 $or Estimate Std.Err 2.5% 97.5% P-value dz 1.70 0.406 0.899 2.49 3.02e-05 mz 32.62 6.081 20.703 44.54 8.13e-08 os 2.18 0.632 0.944 3.42 5.50e-04 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \section*{Bivariate Probit model} \label{sec:org1b646d8} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut <- subset(twinstut,zyg%in%c("mz","dz")) twinstut$binstut <- 1*(twinstut$stutter=="yes") head(twinstut) \end{lstlisting} \begin{verbatim} tvparnr zyg stutter sex age nr binstut 1 2001005 mz no female 71 1 0 2 2001005 mz no female 71 2 0 3 2001006 dz no female 71 1 0 8 2001012 mz no female 71 1 0 9 2001012 mz no female 71 2 0 11 2001015 dz no male 71 1 0 \end{verbatim} First testing for same dependence in MZ and DZ that we recommend doing by comparing the correlations of MZ and DZ twins. Apart from regression correction in the mean this is an un-structured model, and the useful concordance and casewise concordance estimates can be reported from this analysis. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="un") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -1.794823 0.023289 -77.066728 0.0000 sexmale 0.401432 0.030179 13.301813 0.0000 atanh(rho) MZ 1.096916 0.073574 14.909087 0.0000 atanh(rho) DZ 0.132458 0.062516 2.118800 0.0341 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.79939 0.74101 0.84577 Tetrachoric correlation DZ 0.13169 0.00993 0.24960 MZ: Estimate 2.5% 97.5% Concordance 0.01698 0.01411 0.02042 Casewise Concordance 0.46730 0.40383 0.53185 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 12.85882 10.87510 14.84253 log(OR) 3.75632 3.37975 4.13289 DZ: Estimate 2.5% 97.5% Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 1.77662 0.92746 2.62577 log(OR) 0.63527 0.09013 1.18040 Estimate 2.5% 97.5% Broad-sense heritability 1 NaN NaN \end{verbatim} \subsection*{Polygenic modelling} \label{sec:org8788a7d} We now turn attention to specific polygenic modelling where special random effects are used to specify ACE, AE, ADE models and so forth. This is very easy with the bptwin function. The key parts of the output are the sizes of the genetic component A and the environmental component, and we can compare with the results of the unstructed model above. Also formally we can test if this submodel is acceptable by a likelihood ratio test. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ace") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 log(var(C)) -29.99519 NA NA NA Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 C 0.00000 0.00000 0.00000 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b0 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ae") summary(b0) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 \end{verbatim} \section*{Additive gamma random effects} \label{sec:orgff761d3} Fitting first a model with different size random effects for MZ and DZ. We note that as before in the OR and biprobit model the dependence is much stronger for MZ twins. We also test if these are the same by parametrizing the OR model with an intercept. This clearly shows a significant difference. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) # test for same dependence in MZ and DZ theta.des <- model.matrix( ~factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se factor(zyg)dz -2.61194495 0.4854454 factor(zyg)mz -0.01817181 0.1030735 $vargam Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 0.0734 0.0356 0.00356 0.143 3.94e-02 factor(zyg)mz 0.9820 0.1012 0.78361 1.180 2.96e-22 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se (Intercept) -2.611945 0.4854454 factor(zyg)mz 2.593773 0.4962675 $vargam Estimate Std.Err 2.5% 97.5% P-value (Intercept) 0.0734 0.0356 0.00356 0.143 0.0394 factor(zyg)mz 13.3802 6.6401 0.36573 26.395 0.0439 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Polygenic modelling} \label{sec:orgc97abc0} First setting up the random effects design for the random effects and the the relationship between variance parameters. We see that the genetic random effect has size one for MZ and 0.5 for DZ subjects, that have shared and non-shared genetic components with variance 0.5 such that the total genetic variance is the same for all subjects. The shared environmental effect is the samme for all. Thus two parameters with these bands. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ace") head(cbind(out$des.rv,twinstut$tvparnr),10) out$pardes \end{lstlisting} \begin{verbatim} MZ DZ DZns1 DZns2 env 1 1 0 0 0 1 2001005 2 1 0 0 0 1 2001005 3 0 1 1 0 1 2001006 8 1 0 0 0 1 2001012 9 1 0 0 0 1 2001012 11 0 1 1 0 1 2001015 12 0 1 1 0 1 2001016 13 0 1 0 1 1 2001016 15 0 1 1 0 1 2001020 18 0 1 1 0 1 2001022 [,1] [,2] [1,] 1.0 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.5 0 [5,] 0.0 1 \end{verbatim} Now, fitting the ACE model, we see that the variance of the genetic, component, is 1.5 and the environmental variance is -0.5. Thus suggesting that the ACE model does not fit the data. When the random design is given we automatically use the gamma fralty model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin1 <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.5261839 0.2475041 dependence2 -0.5447955 0.1942159 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1.555 0.187 1.189 1.922 9.11e-17 dependence2 -0.555 0.187 -0.922 -0.189 2.99e-03 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.981 0.102 0.781 1.18 8.29e-22 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} For this model we estimate the concordance and casewise concordance as well as the marginal rates of stuttering for females. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} concordanceTwinACE(bintwin1,type="ace") \end{lstlisting} \begin{verbatim} $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0182 0.00147 0.0153 0.0211 2.61e-35 casewise concordance 0.5033 0.03256 0.4395 0.5672 6.49e-54 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00235 0.000589 0.0012 0.00351 6.45e-05 casewise concordance 0.06501 0.015836 0.0340 0.09604 4.04e-05 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 \end{verbatim} The E component was not consistent with the fit of the data and we now consider instead the AE model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.909 0.0954 0.723 1.1 1.47e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Again, the concordance can be computed: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} concordanceTwinACE(bintwin,type="ae") \end{lstlisting} \begin{verbatim} $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0174 0.00143 0.0146 0.0202 5.00e-34 casewise concordance 0.4795 0.03272 0.4154 0.5437 1.20e-48 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00477 0.000393 0.0040 0.00554 5.94e-34 casewise concordance 0.13175 0.005417 0.1211 0.14237 1.14e-130 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 \end{verbatim} \end{document}mets/vignettes/mets.bib0000644000176200001440000007276413623061405014700 0ustar liggesusers@Article{hjelmborg_bmi_2008, Title = {{{G}enetic influences on growth traits of {B}{M}{I}: a longitudinal study of adult twins}}, Author = {Hjelmborg, J. v. and Fagnani, C. and Silventoinen, K. and McGue, M. and Korkeila, M. and Christensen, K. and Rissanen, A. and Kaprio, J. }, Journal = {Obesity (Silver Spring)}, Year = {2008}, Month = {Apr}, Number = {4}, Pages = {847--852}, Volume = {16} } @Article{korkeila_bmi_1991, Title = {{{E}ffects of gender and age on the heritability of body mass index}}, Author = {Korkeila, M. and Kaprio, J. and Rissanen, A. and Koskenvuo, M. }, Journal = {Int J Obes}, Year = {1991}, Month = {Oct}, Number = {10}, Pages = {647--654}, Volume = {15} } @article{twinstutter, author = {Corrado Fagnani and Steen Fibiger and Axel Skytthe and Jacob V. B. Hjelmborg}, title = {Heritability and environmental effects for self-reported periods with stuttering: A twin study from Denmark}, journal = {Logopedics Phoniatrics Vocology}, volume = {36}, number = {3}, pages = {114-120}, year = {2011}, doi = {10.3109/14015439.2010.534503}, abstract = { AbstractGenetic influence for stuttering was studied based on adult self-reporting. Using nation-wide questionnaire answers from 33,317 Danish twins, a univariate biometric analysis based on the liability threshold model was performed in order to estimate the heritability of stuttering. The self-reported incidences for stuttering were from less than 4\% for females to near 9\% for males. Both probandwise concordance rate and tetrachoric correlation were substantially higher for monozygotic compared to dizygotic pairs, indicating substantial genetic influence on individual liability. Univariate biometric analyses showed that additive genetic and unique environmental factors best explained the observed concordance patterns. Heritability estimates for males/females were 0.84/0.81. Moderate unique environmental effects were also found. } } @Article{TRACE, Title = {Does in-hospital ventricular fibrillation affect prognosis after myocardial infarction?}, Author = {Jensen, G.V. and Torp-Pedersen, C. and Hildebrandt, P. and Kober, L. and Nielsen, F. E. and Melchior, T. and Joen, T. and P. K. Andersen}, Journal = {European Heart Journal}, Year = {1997}, Pages = {919-924}, Volume = {18} } @Article{Cederkvist2018, author = {Cederkvist, Luise and Holst, Klaus K and Andersen, Klaus K and Scheike, Thomas H}, title = {Modeling the cumulative incidence function of multivariate competing risks data allowing for within-cluster dependence of risk and timing}, journal = {Biostatistics}, year = {2018}, __markedentry = {[bhd252:6]}, } @Article{Cederkvist2017, author = {Luise Cederkvist and Holst, {Klaus K.} and Andersen, {Klaus K.} and Glidden, {David V.} and Kirsten Frederiksen and Kjaer, {Susanne K.} and Scheike, {Thomas H.}}, title = {Incorporation of the time aspect into the liability-threshold model for case-control-family data}, journal = {Statistics in Medicine}, year = {2017}, month = {1}, note = {Copyright © 2017 John Wiley \& Sons, Ltd.}, issn = {0277-6715}, doi = {10.1002/sim.7229}, abstract = {Familial aggregation and the role of genetic and environmental factors can be investigated through family studies analysed using the liability-threshold model. The liability-threshold model ignores the timing of events including the age of disease onset and right censoring, which can lead to estimates that are difficult to interpret and are potentially biased. We incorporate the time aspect into the liability-threshold model for case-control-family data following the same approach that has been applied in the twin setting. Thus, the data are considered as arising from a competing risks setting and inverse probability of censoring weights are used to adjust for right censoring. In the case-control-family setting, recognising the existence of competing events is highly relevant to the sampling of control probands. Because of the presence of multiple family members who may be censored at different ages, the estimation of inverse probability of censoring weights is not as straightforward as in the twin setting but requires consideration. We propose to employ a composite likelihood conditioning on proband status that markedly simplifies adjustment for right censoring. We assess the proposed approach using simulation studies and apply it in the analysis of two Danish register-based case-control-family studies: one on cancer diagnosed in childhood and adolescence, and one on early-onset breast cancer. Copyright © 2017 John Wiley & Sons, Ltd.}, publisher = {JohnWiley \& Sons Ltd.}, } @Article{Hjelmborg2016, author = {Jacob Hjelmborg and Tellervo Korhonen and Klaus Holst and Axel Skytthe and Eero Pukkala and Julia Kutschke and Harris, {Jennifer R.} and Mucci, {Lorelei A.} and Kaare Christensen and Kamila Czene and Adami, {Hans Olov} and Thomas Scheike and Jaakko Kaprio}, title = {Lung cancer, genetic predisposition and smoking: The Nordic Twin Study of Cancer}, journal = {Thorax}, year = {2016}, month = {11}, pages = {1--7}, issn = {0040-6376}, doi = {10.1136/thoraxjnl-2015-207921}, abstract = {Background: We aimed to disentangle genetic and environmental causes in lung cancer while considering smoking status. Methods: Four Nordic twin cohorts (43 512 monozygotic (MZ) and 71 895 same sex dizygotic (DZ) twin individuals) had smoking data before cancer diagnosis. We used time-to-event analyses accounting for censoring and competing risk of death to estimate incidence, concordance risk and heritability of liability to develop lung cancer by smoking status. Results: During a median of 28.5 years of follow-up, we recorded 1508 incident lung cancers. Of the 30 MZ and 28 DZ pairs concordant for lung cancer, nearly all were current smokers at baseline and only one concordant pair was seen among never smokers. Among ever smokers, the case-wise concordance of lung cancer, that is the risk before a certain age conditional on lung cancer in the co-twin before that age, was significantly increased compared with the cumulative incidence for both MZ and DZ pairs. This ratio, the relative recurrence risk, significantly decreased by age for MZ but was constant for DZ pairs. Heritability of lung cancer was 0.41 (95% CI 0.26 to 0.56) for currently smoking and 0.37 (95% CI 0.25 to 0.49) for ever smoking pairs. Among smoking discordant pairs, the pairwise HR for lung cancer of the ever smoker twin compared to the never smoker co-twin was 5.4 (95% CI 2.1 to 14.0) in MZ pairs and 5.0 (95% CI 3.2 to 7.9) in DZ pairs. Conclusions: The contribution of familial effects appears to decrease by age. The discordant pair analysis confirms that smoking causes lung cancer.}, publisher = {B M J Group}, } @Article{Holst2016, author = {Holst, {Klaus K.} and Thomas Scheike and Hjelmborg, {Jacob B.}}, title = {The liability threshold model for censored twin data}, journal = {Computational Statistics \& Data Analysis}, year = {2016}, volume = {93}, month = {1}, pages = {324–335}, issn = {0167-9473}, doi = {10.1016/j.csda.2015.01.014}, abstract = {Family studies provide an important tool for understanding etiology of diseases, with the key aim of discovering evidence of family aggregation and to determine if such aggregation can be attributed to genetic components. Heritability and concordance estimates are routinely calculated in twin studies of diseases, as a way of quantifying such genetic contribution. The endpoint in these studies are typically defined as occurrence of a disease versus death without the disease. However, a large fraction of the subjects may still be alive at the time of follow-up without having experienced the disease thus still being at risk. Ignoring this right-censoring can lead to severely biased estimates. The classical liability threshold model can be extended with inverse probability of censoring weighting of complete observations. This leads to a flexible way of modelling twin concordance and obtaining consistent estimates of heritability. The method is demonstrated in simulations and applied to data from the population based Danish twin cohort to describe the dependence in prostate cancer occurrence in twins.}, keywords = {Competing risks, Cumulative incidence, Heritability, Liability-threshold, Polygenic model, Probit model, Random effects, Right censoring, Twins}, publisher = {Elsevier BV}, } @Article{Martinussen2016, author = {Torben Martinussen and Holst, {Klaus K.} and Scheike, {Thomas H.}}, title = {Cox regression with missing covariate data using a modified partial likelihood method}, journal = {Lifetime Data Analysis}, year = {2016}, volume = {22}, number = {4}, month = {10}, pages = {570–588}, issn = {1380-7870}, doi = {10.1007/s10985-015-9351-y}, abstract = {Missing covariate values is a common problem in survival analysis. In this paper we propose a novel method for the Cox regression model that is close to maximum likelihood but avoids the use of the EM-algorithm. It exploits that the observed hazard function is multiplicative in the baseline hazard function with the idea being to profile out this function before carrying out the estimation of the parameter of interest. In this step one uses a Breslow type estimator to estimate the cumulative baseline hazard function. We focus on the situation where the observed covariates are categorical which allows us to calculate estimators without having to assume anything about the distribution of the covariates. We show that the proposed estimator is consistent and asymptotically normal, and derive a consistent estimator of the variance-covariance matrix that does not involve any choice of a perturbation parameter. Moderate sample size performance of the estimators is investigated via simulation and by application to a real data example.}, publisher = {Springer New York LLC}, } @Article{Mucci2016, author = {Mucci, {Lorelei A.} and Hjelmborg, {Jacob B.} and Harris, {Jennifer R.} and Kamila Czene and Havelick, {David J.} and Thomas Scheike and Graff, {Rebecca E.} and Klaus Holst and Søren Møller and Unger, {Robert H.} and Christina McIntosh and Elizabeth Nuttall and Ingunn Brandt and Penney, {Kathryn L.} and Mikael Hartman and Peter Kraft and Giovanni Parmigiani and Kaare Christensen and Markku Koskenvuo and Holm, {Niels V.} and Kauko Heikkila and Eero Pukkala and Axel Skytthe and Hans-Olov Adami and Jaakko Kaprio}, title = {Familial Risk and Heritability of Cancer Among Twins in Nordic Countries}, journal = {J A M A: The Journal of the American Medical Association}, year = {2016}, volume = {315}, number = {1}, month = {1}, pages = {68--76}, issn = {0098-7484}, doi = {10.1001/jama.2015.17703}, abstract = {Importance: Estimates of familial cancer risk from population-based studies are essential components of cancer risk prediction.Objective: To estimate familial risk and heritability of cancer types in a large twin cohort.Design, Setting, and Participants: Prospective study of 80 309 monozygotic and 123 382 same-sex dizygotic twin individuals (N = 203 691) within the population-based registers of Denmark, Finland, Norway, and Sweden. Twins were followed up a median of 32 years between 1943 and 2010. There were 50 990 individuals who died of any cause, and 3804 who emigrated and were lost to follow-up.Exposures: Shared environmental and heritable risk factors among pairs of twins.Main Outcomes and Measures: The main outcome was incident cancer. Time-to-event analyses were used to estimate familial risk (risk of cancer in an individual given a twin’s development of cancer) and heritability (proportion of variance in cancer risk due to interindividual genetic differences) with follow-up via cancer registries. Statistical models adjusted for age and follow-up time, and accounted for censoring and competing risk of death.Results: A total of 27 156 incident cancers were diagnosed in 23 980 individuals, translating to a cumulative incidence of 32%. Cancer was diagnosed in both twins among 1383 monozygotic (2766 individuals) and 1933 dizygotic (2866 individuals) pairs. Of these, 38% of monozygotic and 26% of dizygotic pairs were diagnosed with the same cancer type. There was an excess cancer risk in twins whose co-twin was diagnosed with cancer, with estimated cumulative risks that were an absolute 5% (95% CI, 4%-6%) higher in dizygotic (37%; 95% CI, 36%-38%) and an absolute 14% (95% CI, 12%-16%) higher in monozygotic twins (46%; 95% CI, 44%-48%) whose twin also developed cancer compared with the cumulative risk in the overall cohort (32%). For most cancer types, there were significant familial risks and the cumulative risks were higher in monozygotic than dizygotic twins. Heritability of cancer overall was 33% (95% CI, 30%-37%). Significant heritability was observed for the cancer types of skin melanoma (58%; 95% CI, 43%-73%), prostate (57%; 95% CI, 51%-63%), nonmelanoma skin (43%; 95% CI, 26%-59%), ovary (39%; 95% CI, 23%-55%), kidney (38%; 95% CI, 21%-55%), breast (31%; 95% CI, 11%-51%), and corpus uteri (27%; 95% CI, 11%-43%).Conclusions and Relevance: In this long-term follow-up study among Nordic twins, there was significant excess familial risk for cancer overall and for specific types of cancer, including prostate, melanoma, breast, ovary, and uterus. This information about hereditary risks of cancers may be helpful in patient education and cancer risk counseling.}, publisher = {American Medical Association}, } @Article{Moeller2016, author = {Sören Möller and Mucci, {Lorelei A} and Harris, {Jennifer R} and Thomas Scheike and Klaus Holst and Ulrich Halekoh and Hans-Olov Adami and Kamila Czene and Kaare Christensen and Holm, {Niels V} and Eero Pukkala and Axel Skytthe and Jaakko Kaprio and Hjelmborg, {Jacob B}}, title = {The Heritability of Breast Cancer among women in the Nordic Twin Study of Cancer.}, journal = {Cancer Epidemiology, Biomarkers \& Prevention}, year = {2016}, volume = {25}, month = {1}, pages = {145--150}, issn = {1055-9965}, doi = {10.1158/1055-9965.EPI-15-0913}, abstract = {Background Family history is an established risk factor for breast cancer. Although some important genetic factors have been identified, the extent to which familial risk can be attributed to genetic factors versus common environment remains unclear. Methods We estimated the familial concordance and heritability of breast cancer among 21,054 monozygotic and 30,939 dizygotic female twin pairs from the Nordic Twin Study of Cancer, the largest twin study of cancer in the world. We accounted for left-censoring, right-censoring, as well as the competing risk of death. Results From 1943 through 2010, 3,933 twins were diagnosed with breast cancer. The cumulative lifetime incidence of breast cancer taking competing risk of death into account was 8.1% for both zygosities, while the cumulative risk for twins whose co-twins had breast cancer was 28% among monozygotic and 20% among dizygotic twins. The heritability of liability to breast cancer was 31% (95% CI 10% - 51%) and the common environmental component was 16% (95% CI 10% - 32%). For pre-menopausal breast cancer these estimates were 27% and 12%, respectively and for postmenopausal breast cancer 22% and 16%, respectively. The relative contributions of genetic and environmental factors were constant between ages 50 and 96. Our results are compatible with the Peto-Mack hypothesis. Conclusion Our findings indicate that familial factors explain almost half of the variation in liability to develop breast cancer, and results were similar for pre- and post-menopausal breast cancer. Impact We estimate heritability of breast cancer, taking until now ignored sources of bias into account.}, publisher = {American Association for Cancer Research (A A C R)}, } @Article{holst-hjelmborg-scheike-2014, author = {Holst, Klaus K. and Scheike, Thomas H. and Hjelmborg, Jacob B.}, title = {The Liability Threshold Model for Censored Twin Data}, journal = {Computational Statistics and Data Analysis}, year = {2015}, volume = {to appear}, doi = {10.1016/j.csda.2015.01.014}, url = {http://dx.doi.org/10.1016/j.csda.2015.01.014}, } @Article{behav-scheike-hjelmborg-holst-2015, author = {Scheike, {Thomas H} and Hjelmborg, {Jacob B} and Holst, {Klaus K}}, title = {Estimating Twin Pair Concordance for Age of Onset}, journal = {Behavior Genetics}, year = {2015}, issn = {0001-8244}, doi = {10.1007/s10519-015-9729-3}, keywords = {FIRST}, owner = {first}, publisher = {Springer New York LLC}, } @Article{Scheike2015, author = {Thomas Scheike and Holst, {Klaus K} and Hjelmborg, {Jacob B}}, title = {Measuring early or late dependence for bivariate lifetimes of twins}, journal = {Lifetime Data Analysis}, year = {2015}, volume = {21}, number = {2}, month = {4}, pages = {280--299}, issn = {1380-7870}, doi = {10.1007/s10985-014-9309-5}, abstract = {We consider data from the Danish twin registry and aim to study in detail how lifetimes for twin-pairs are correlated. We consider models where we specify the marginals using a regression structure, here Cox's regression model or the additive hazards model. The best known such model is the Clayton-Oakes model. This model can be extended in several directions. One extension is to allow the dependence parameter to depend on covariates. Another extension is to model dependence via piecewise constant cross-hazard ratio models. We show how both these models can be implemented for large sample data, and suggest a computational solution for obtaining standard errors for such models for large registry data. In addition we consider alternative models that have some computational advantages and with different dependence parameters based on odds ratios of the survival function using the Plackett distribution. We also suggest a way of assessing how and if the dependence is changing over time, by considering either truncated or right-censored versions of the data to measure late or early dependence. This can be used for formally testing if the dependence is constant, or decreasing/increasing. The proposed procedures are applied to Danish twin data to describe dependence in the lifetimes of the twins. Here we show that the early deaths are more correlated than the later deaths, and by comparing MZ and DZ associations we suggest that early deaths might be more driven by genetic factors. This conclusion requires models that are able to look at more local dependence measures. We further show that the dependence differs for MZ and DZ twins and appears to be the same for males and females, and that there are indications that the dependence increases over calendar time.}, owner = {first}, publisher = {Springer New York LLC}, } @Article{Eriksen2015, author = {Eriksen, Marie and Jensen, David H and Tribler, Siri and Holst, Jens J and Madsbad, Sten and Krarup, Thure}, title = {Reduction of insulinotropic properties of GLP-1 and GIP after glucocorticoid-induced insulin resistance}, journal = {Diabetologia}, year = {2015}, volume = {58}, number = {5}, pages = {920--928}, publisher = {Springer}, } @InProceedings{Hvistendahl2015, author = {Hvistendahl, Mark and Brandt, Christopher F and Tribler, Siri and Naimi, Rahim and Hartmann, Bolette and Holst, Jens Juul and Rehfeld, Jens Frederik and Hornum, Mads and Andersen, Jens Rikardt and Mortensen, Per B and others}, title = {The glucagon-like peptide-1 receptor agonist liraglutide reduces jejunostomy output and improves intestinal absorption in short bowel syndrome patients with intestinal failure: A pilot study}, booktitle = {{\AA}rsm{\o}de i Dansk Selskab for Klinisk Ern{\ae}ring}, year = {2015}, } @Article{hjelmborg-prostate-et-al-2013, author = {Hjelmborg, Jacob B. and Scheike, Thomas and Holst, Klaus and Skytthe, Axel and Penney, Kathryn L. and Graff, Rebecca E. and Pukkala, Eero and Christensen, Kaare and Adami, Hans-Olov and Holm, Niels V. and Nuttall, Elizabeth and Hansen, Steinbjorn and Hartman, Mikael and Czene, Kamila and Harris, Jennifer R. and Kaprio, Jaakko and Mucci, Lorelei A.}, title = {The Heritability of Prostate Cancer in the Nordic Twin Study of Cancer}, journal = {Cancer Epidemiology Biomarkers \& Prevention}, year = {2014}, doi = {10.1158/1055-9965.EPI-13-0568}, eprint = {http://cebp.aacrjournals.org/content/early/2014/05/08/1055-9965.EPI-13-0568.full.pdf+html}, url = {http://cebp.aacrjournals.org/content/early/2014/05/08/1055-9965.EPI-13-0568.abstract}, abstract = {Background: Prostate cancer is thought to be the most heritable cancer, although little is known about how this genetic contribution varies across age. Methods: To address this question, we undertook the world's largest prospective study in the Nordic Twin Study of Cancer cohort, including 18,680 monozygotic and 30,054 dizygotic same sex male twin pairs. We incorporated time-to-event analyses to estimate the risk concordance and heritability while accounting for censoring and competing risks of death, essential sources of biases that have not been accounted for in previous twin studies modeling cancer risk and liability. Results: The cumulative risk of prostate cancer was similar to that of the background population. The cumulative risk for twins whose co-twin was diagnosed with prostate cancer was greater for MZ than for DZ twins across all ages. Among concordantly affected pairs, the time between diagnoses was significantly shorter for MZ than DZ pairs (median 3.8 versus 6.5 years, respectively). Genetic differences contributed substantially to variation in both the risk and the liability (heritability=58% (95% CI 52%-63%) of developing prostate cancer. The relative contribution of genetic factors was constant across age through late life with substantial genetic heterogeneity even when diagnosis and screening procedures vary. Conclusions: Results from the population based twin cohort, indicate a greater genetic contribution to the risk of developing prostate cancer when addressing sources of bias. The role of genetic factors is consistently high across age Impact: Findings impact the search for genetic and epigenetic markers and frame prevention efforts.}, bdsk-url-1 = {http://cebp.aacrjournals.org/content/early/2014/05/08/1055-9965.EPI-13-0568.abstract}, bdsk-url-2 = {http://dx.doi.org/10.1158/1055-9965.EPI-13-0568}, } @Manual{metsR, author = {Klaus K. Holst and Thomas Scheike}, title = {mets: Analysis of Multivariate Event Times}, year = {2014}, note = {R package version 1.2.4}, url = {http://lava.r-forge.r-project.org/}, bdsk-url-1 = {http://lava.r-forge.r-project.org/}, } @Article{scheike-holst-hjelmborg-2010, author = {Scheike, T. H. and Holst, K. and Hjelmborg, J. V.}, title = {Estimating heritability for cause specific mortality based on twin studies}, journal = {Lifetime Data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mFyeaIiIF8QD05TS2V5ZWRBcmNoaXZlctEmJ1Ryb290gAEACAARABoAIwAtADIANwBAAEYATQBUAFwAZwBpAGwAbgBwAHMAdQB3AIQAjgC+AMMAywDNAr0CwgLNAtYC5ALoAu8C+AL9AwoDDQMfAyIDJwAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAAMp}, booktitle = {Estimating heritability for cause specific mortality based on twin studies}, date-added = {2013-04-24 11:08:06 +0000}, date-modified = {2013-04-24 11:08:06 +0000}, keywords = {teoretisk statistik peer review}, own = {first}, owner = {first}, } @Article{scheike-holst-hjelmborg-2011, author = {Scheike, Thomas H and Holst, Klaus K and Hjelmborg, Jacob B}, title = {Estimating twin concordance for bivariate competing risks twin data}, journal = {Statistics in Medicine}, year = {2014}, volume = {33}, pages = {1193-204}, date-added = {2013-10-27 18:17:17 +0000}, date-modified = {2013-10-27 18:18:14 +0000}, keywords = {teoretisk statistik peer review}, own = {first}, owner = {first}, publisher = {Wiley Online Library}, } @Article{Hjelmborg2014, author = {Hjelmborg, {Jacob B} and Thomas Scheike and Klaus Holst and Axel Skytthe and Penney, {Kathryn L} and Graff, {Rebecca E} and Eero Pukkala and Kaare Christensen and Hans-Olov Adami and Holm, {Niels V} and Elizabeth Nuttall and Steinbjorn Hansen and Mikael Hartman and Kamila Czene and Harris, {Jennifer R} and Jaakko Kaprio and Mucci, {Lorelei a}}, title = {The Heritability of Prostate Cancer in the Nordic Twin Study of Cancer.}, journal = {Cancer Epidemiology, Biomarkers \& Prevention}, year = {2014}, volume = {23}, number = {11}, month = {11}, pages = {2303--2310}, issn = {1055-9965}, doi = {10.1158/1055-9965.EPI-13-0568}, abstract = {Background: Prostate cancer is thought to be the most heritable cancer, although little is known about how this genetic contribution varies across age. Methods: To address this question, we undertook the world's largest prospective study in the Nordic Twin Study of Cancer cohort, including 18,680 monozygotic and 30,054 dizygotic same sex male twin pairs. We incorporated time-to-event analyses to estimate the risk concordance and heritability while accounting for censoring and competing risks of death, essential sources of biases that have not been accounted for in previous twin studies modeling cancer risk and liability. Results: The cumulative risk of prostate cancer was similar to that of the background population. The cumulative risk for twins whose co-twin was diagnosed with prostate cancer was greater for MZ than for DZ twins across all ages. Among concordantly affected pairs, the time between diagnoses was significantly shorter for MZ than DZ pairs (median 3.8 versus 6.5 years, respectively). Genetic differences contributed substantially to variation in both the risk and the liability (heritability=58% (95% CI 52%-63%) of developing prostate cancer. The relative contribution of genetic factors was constant across age through late life with substantial genetic heterogeneity even when diagnosis and screening procedures vary. Conclusions: Results from the population based twin cohort, indicate a greater genetic contribution to the risk of developing prostate cancer when addressing sources of bias. The role of genetic factors is consistently high across age Impact: Findings impact the search for genetic and epigenetic markers and frame prevention efforts.}, publisher = {American Association for Cancer Research (A A C R)}, } @Article{Scheike2014, author = {Thomas Scheike and Holst, {Klaus K.} and Hjelmborg, {Jacob B.}}, title = {Estimating heritability for cause specific mortality based on twin studies}, journal = {Lifetime Data Analysis}, year = {2014}, volume = {20}, number = {2}, month = {4}, pages = {210--233}, issn = {1380-7870}, doi = {10.1007/s10985-013-9244-x}, keywords = {Cause specific hazards, Competing risks, Delayed entry, Left truncation, Heritability, Survival analysis}, owner = {first}, publisher = {Springer New York LLC}, } @Comment{jabref-meta: databaseType:biblatex;} @Article{, title={The Liability Threshold Model for Censored Twin Data}, author={Holst, Klaus K. and Scheike, Thomas H. and Hjelmborg, Jacob B.}, year={2015}, doi={10.1016/j.csda.2015.01.014}, url={http://dx.doi.org/10.1016/j.csda.2015.01.014}, journal={Computational Statistics and Data Analysis} } @Article{, title={Estimating heritability for cause specific mortality based on twin studies}, author={Scheike, Thomas H. and Holst, Klaus K. and Hjelmborg, Jacob B.}, year={2013}, issn={1380-7870}, journal={Lifetime Data Analysis}, doi={10.1007/s10985-013-9244-x}, url={http://dx.doi.org/10.1007/s10985-013-9244-x}, publisher={Springer US}, keywords={Cause specific hazards; Competing risks; Delayed entry; Left truncation; Heritability; Survival analysis}, pages={1-24}, language={English} } mets/vignettes/twostage-survival.org0000644000176200001440000012127713623061405017463 0ustar liggesusers#+TITLE: Analysis of multivariate survival data #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Analysis of multivariate survival data}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package - Binary models and adjust for censoring with inverse probabilty of censoring weighting - biprobit model - Bivariate surival models of Clayton-Oakes type - With regression structure on dependence parameter - With additive gamma distributed random effects - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. - Plackett OR model model - With regression structure on OR dependence parameter - Cluster stratified Cox Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \( T_1, \delta_1, T_2, \delta_2, X_1, X_2 \) where the censored survival responses are \( T_1, \delta_1, T_2, \delta_2 \) and we have covariates \( X_1, X_2 \). The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{s(k,i)}(t) \exp( X_{ki}^T \beta) \] where $s(k,i)$ is a strata variable. ** Gamma distributed frailties The focus of this vignette is describe how to work on bivariate survival data using the addtive gamma-random effects models. We present two different ways of specifying different dependence structures. - Univariate models with a single random effect for each cluster and with a regression design on the variance. - Multivariate models with multiple random effects for each cluster. The univariate models are then given a given cluster random effects $Z_k$ with parameter $\theta$ the joint survival function is given by the Clayton copula and on the form \[ \psi(\theta, \psi^{-1}(\theta,S_1(t,X_{k1}) ) + \psi^{-1}(\theta, S_1(t,X_{k1}) ) \] where \( \psi \) is the Laplace transform of a gamma distributed random variable with mean 1 and variance $\theta$. We then model the variance within clusters by a cluster specific regression design such that \[ \theta = z_j^T \alpha \] where $z$ is the regression design (specified by theta.des in the software). This model can be fitted using a pairwise likelihood or the pseudo-likelihood using either - twostage - twostageMLE To make the twostage approach possible we need a model with specific structure for the marginals. Therefore given the random effect of the clusters the survival distributions within a cluster are independent and on the form \[ P(T_j > t| X_j,Z) = exp( -Z \cdot \Psi^{-1}(\nu^{-1},S(t|X_j)) ) \] with $\Psi$ the laplace of the gamma distribution with mean 1 and variance $1/\nu$. ** Additive Gamma frailties For the multivariate models we are given a multivarite random effect each cluster \(Z=(Z_1,...,Z_d) \) with d random effects. The total random effect for each subject $j$ in a cluster is then specified using a regression design on these random effects, with a regression vector \( V_j \) such that the total random effect is \( V_j^T (Z_1,...,Z_d) \). The elements of $V_J$ are 1/0. The random effects \( (Z_1,...,Z_d) \) has associated parameters \( (\lambda_1,...,\lambda_d) \) and \( Z_j \) is Gamma distributed with - mean \( \lambda_j/V_1^T \lambda \) - variance \( \lambda_j/(V_1^T \lambda)^2 \) The key assumption to make the two-stage fitting possible is that \[ \nu =V_j^T \lambda \] is constant within clusters. The consequence of this is that the total random effect for each subject within a cluster, \( V_j^T (Z_1,...,Z_d) \) , is gamma distributed with variance $1/\nu$. The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \[ \theta_j = \lambda_j/\nu^2 \] For alternative parametrizations one can specify that the parameters are $\theta_j=\lambda_j$ with the argument var.par=0. Finally the parameters \( (\theta_1,...,\theta_d) \) are related to the parameters of the model by a regression construction \( M \) (d x k), that links the \( d \) \( \theta \) parameters with the \( k \) underlying \( \alpha \) parameters \[ \theta = M \alpha. \] The default is a diagonal matrix for $M$. This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. In the software \( M \) is called theta.des # We consider $K$ independent clusters, with $n_k$ subject within each cluster. # For each cluster we are given a set of independent random effects $Z = (Z_1,\dots , Z_d)^T$. # We let $(Z_1,\dots,Z_d)^T$ be independent Gamma distributed # with $Z_l \sim \Gamma(\eta_l , \nu_l), l = 1,\dots,p$ independent gamma distributed random variables # such that $E(V_l) = \eta_l /\nu$ and $Var(V_l ) = \eta_l /\nu^2$. # To facilitate our two-stage construction we also assume that # $\nu=Q_i^T \eta$ for all $i=1,\dots,n_k$ such that # $Q_i^T V$ is also Gamma distributed with $\Gamma(1, \nu)$, that is has variance $\nu^{-1}$ and mean 1. # Let $\Psi(\eta_l,\nu,\cdot)$ denote the Laplace transform of the # Gamma distribution $\Gamma(\eta_l,\nu)$, and let its inverse be $\Psi^{-1}(\eta_l,\nu,\cdot)$. # For simplicity we also assume that $\eta$ is the same across clusters. Assume that the marginal survival distribution for subject $i$ within cluster $k$ is given by $S_{X_{k,i}}(t)$ given covariates $X_{k,i}$. Now given the random effects of the cluster $Z_k$ and the covariates$X_{k,i}$ $i=1,\dots,n_k$ we assume that subjects within the cluster are independent with survival distributions \begin{align*} \exp(- ( V_{k,i} Z_k) \Psi^{-1} (\nu,S_{X_{k,i}}(t)) ). \end{align*} A consequence of this is that the hazards given the covariates $X_{k,i}$ and the random effects $Z_k$ are given by \begin{align} \lambda_{k,i}(t;X_{k,i},Z_{k,i}) = ( V_{k,i} V_k) D_3 \Psi^{-1} (\nu,S_{X_{k,i}}(t)) D_t S_{X_{k,i}}(t) \label{eq-cond-haz} \end{align} where $D_t$ and $D_3$ denotes the partial derivatives with respect to $t$ and the third argument, respectively. Further, we can express the multivariate survival distribution as \begin{align} S(t_1,\dots,t_m) & = \exp( -\sum_{i=1}^m (V_i Z) \Psi^{-1}(\eta_l,\nu_l,S_{X_{k,i}}(t_i)) ) \nonumber \\ & = \prod_{l=1}^p \Psi(\eta_l,\eta , \sum_{i=1}^m Q_{k,i} \Psi^{-1}(\eta,\eta,S_{X_{k,i}}(t_i))). \label{eq-multivariate-surv} \end{align} In the case of considering just pairs, we write this function as $C(S_{k,i}(t),S_{k,j}(t))$. In addition to survival times from this model, we assume that we independent right censoring present $U_{k,i}$ such that the given $V_k$ and the covariates$X_{k,i}$ $i=1,\dots,n_k$ $(U_{k,1},\dots,U_{k,n_k})$ of $(T_{k,1},\dots,T_{k,n_k})$, and the conditional censoring distribution do not depend on $V_k$. # We can also express this via counting processes $N_{k,i}(t)=I(T_{k,i}t,U_{k,i}>t)$, and the censoring indicators # $\delta_{k,i}=I(T_{k,i} 16f32e6bd553427d5e9e74660b682f6b63e39c2d]: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava mets version 1.2.4 Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.04849523 0.330665 -0.1466597 0.8834006 0.3226451 0.07226526 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9527 0.315 0.3352 1.57 0.002493 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526619 0.3150119 3.024209 0.002492843 0.3226451 0.07226526 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" #+end_example The marginal models can be either structured Cox model or as here with a baseline for each strata. This gives quite similar results to those before. #+BEGIN_SRC R :results output :exports both :session *R* :cache no # without covariates but marginal model stratified marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) #+END_SRC #+RESULTS[<2018-09-11 09:09:49> 79897f72f7b29f3a6df3a880f92ed9c05a6ce060]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" #+end_example ** Piecewise constant Clayton-Oakes model Let the cross-hazard ratio (CHR) be defined as \begin{align} \eta(t_1,t_2) = \frac{ \lambda_1(t_1| T_2=t_2)}{ \lambda_1(t_1| T_2 \ge t_2)} = \frac{ \lambda_2(t_2| T_1=t_1)}{ \lambda_2(t_2| T_1 \ge t_1)} \end{align} where $\lambda_1$ and $\lambda_2$ are the conditional hazard functions of $T_1$ and $T_2$ given covariates. For the Clayton-Oakes model this ratio is $\eta(t_1,t_2) = 1+\theta$, and as a consequence we see that if the co-twin is dead at any time we would increase our risk assessment on the hazard scale with the constant $\eta(t_1,t_2)$. The Clayton-Oakes model also has the nice property that Kendall's tau is linked directly to the dependence parameter $\theta$ and is $1/(1+2/\theta)$. A very useful extension of the model the constant cross-hazard ratio (CHR) model is the piecewise constant cross-hazard ratio (CHR) for bivariate survival data \cite{nan2006piecewise}, and this model was extended to competing risks in \cite{shih2010modeling}. In the survival setting we let the CHR \begin{align} \eta(t_1,t_2) & = \sum \eta_{i,j} I(t_1 \in I_i, t_2 \in I_j) \end{align} The model lets the CHR by constant in different part of the plane. This can be thought of also as having a separate Clayton-Oakes model for each of the regions specified in the plane here by the cut-points \( c(0,0.5,2) \) thus defining 9 regions. This provides a constructive goodness of fit test for the whether the Clayton-Oakes model is valid. Indeed if valid the parameter should be the same in all regions. First we generate some data from the Clayton-Oakes model with variance $0.5$ and 2000 pairs. And fit the related model. #+BEGIN_SRC R :results output :exports both :session *R* :cache no d <- simClaytonOakes(2000,2,0.5,0,3) margph <- phreg(Surv(time,status)~x+cluster(cluster),data=d) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=d) summary(fitco1) #+END_SRC #+RESULTS: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.01888 0.08970192 22.50654 0 0.5023489 0.01110764 $type NULL attr(,"class") [1] "summary.mets.twostage" #+end_example Now we cut the region at the cut-points \( c(0,0.5,2) \) thus defining 9 regions and fit a separate model for each region. We see that the parameter is indeed rather constant over the 9 regions. A formal test can be constructed. #+BEGIN_SRC R :results output :exports both :session *R* :cache no udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="clayton.oakes",silent=0) summary(udp) #+END_SRC #+RESULTS[<2018-09-11 09:09:50> 7d2ab8fcfa35afc8358eb1426f471ba00efa1d47]: #+begin_example Data-set 1 out of 4 Number of joint events: 518 of 2000 Data-set 2 out of 4 Number of joint events: 274 of 1232 Data-set 3 out of 4 Number of joint events: 247 of 1203 Data-set 4 out of 4 Number of joint events: 594 of 953 [1] 1 Dependence parameter for Clayton-Oakes model Score of log-likelihood for parameter estimates (too large?) 0 - 0.5 0.5 - 2 0 - 0.5 0.0019673733 0.001451886 0.5 - 2 0.0007297083 0.003142920 log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.687 (0.069) 0.677 (0.093) 0.5 - 2 0.733 (0.100) 0.718 (0.060) Kendall's tau (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.498 (0.017) 0.496 (0.023) 0.5 - 2 0.51 (0.025) 0.506 (0.015) #+end_example ** Multivariate gamma twostage models To illustrate how the multivariate models can be used, we first set up some twin data with ACE structure. That is two shared random effects, one being the genes $\sigma_g^2$ and one the environmental effect $\sigma_e^2$. Monozygotic twins share all genes whereas the dizygotic twins only share half the genes. This can be expressed via 5 random effect for each twin pair (for example). We start by setting this up. The pardes matrix tells how the the parameters of the 5 random effects are related, and the matrix her first has one random effect with parameter $\theta_1$ (here the $\sigma_g^2$), then the next 3 random effects have parameters $0.5 \theta_1$ (here $0.5 \sigma_g^2$), and the last random effect that is given by its own parameter $\theta_2$ (here $\sigma_e^2$). #+BEGIN_SRC R :results output :exports both :session *R* :cache no data <- simClaytonOakes.twin.ace(2000,2,1,0,3) out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes pardes #+END_SRC #+RESULTS: : [,1] [,2] : [1,] 1.0 0 : [2,] 0.5 0 : [3,] 0.5 0 : [4,] 0.5 0 : [5,] 0.0 1 The last part of the model structure is to decide how the random effects are shared for the different pairs (MZ and DZ), this is specfied by the random effects design ($V_1$ and $V_2$) for each pair. This is here specified by an overall designmatrix for each subject (since they enter all pairs with the same random effects design). For an MZ pair the two share the full gene random effect and the full environmental random effect. In contrast the DZ pairs share the 2nd random effect with half the gene-variance and have both a non-shared gene-random effect with half the variance, and finally a fully shared environmental random effect. #+BEGIN_SRC R :results output :exports both :session *R* :cache no des.rv <- out$des.rv # MZ head(des.rv,2) # DZ tail(des.rv,2) #+END_SRC #+RESULTS: : MZ DZ DZns1 DZns2 env : 1 1 0 0 0 1 : 2 1 0 0 0 1 : MZ DZ DZns1 DZns2 env : 3999 0 1 1 0 1 : 4000 0 1 0 1 1 Now we call the twostage function. We see that we essentially recover the true values, and note that the output also compares the sizes of the genetic and environmental random effect. This number is sometimes called the heritability. In addition the total variance for each subject is also computed and is here around $3$, as we indeed constructed. #+BEGIN_SRC R :results output :exports both :session *R* :cache no aa <- phreg(Surv(time,status)~x+cluster(cluster),data=data) ts <- twostage(aa,data=data,clusters=data$cluster,detail=0, theta=c(2,1),var.link=0,step=0.5, random.design=des.rv,theta.des=pardes) summary(ts) #+END_SRC #+RESULTS[<2018-09-11 09:09:52> 3f8f687ca867317f3f1fb6d33c650e6c5d9aa5c7]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.2111163 0.2219525 9.962113 0.000000e+00 0.5250665 0.02503201 dependence2 0.7431872 0.1706430 4.355217 1.329349e-05 0.2709211 0.04535315 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.7484 0.05898 0.6328 0.8640 6.669e-37 dependence2 0.2516 0.05898 0.1360 0.3672 1.995e-05 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.954 0.1426 2.675 3.234 2.514e-95 attr(,"class") [1] "summary.mets.twostage" #+end_example The estimates can be transformed into Kendall's tau estimates for MZ and DZ twins. The Kendall's tau in the above output reflects how a gamma distributed random effect in the normal Clayton-Oakes model is related to the Kendall's tau. In this setting the Kendall's of MZ and DZ, however, should reflect both random effects. We do this based on simulations. The Kendall's tau of the MZ is around 0.60, and for DZ around 0.33. Both are quite high and this is due to a large shared environmental effect and large genetic effect. #+BEGIN_SRC R :results output :exports both :session *R* :cache no kendall.ClaytonOakes.twin.ace(ts$theta[1],ts$theta[2],K=10000) #+END_SRC #+RESULTS: : $mz.kendall : [1] 0.5984888 : : $dz.kendall : [1] 0.3257834 ** Family data For family data, things are quite similar since we use only the pairwise structure. We show how the designs are specified. First we simulate data from an ACE model. 2000 families with two-parents that share only the environment, and two-children that share genes with their parents. #+BEGIN_SRC R :results output :exports both :session *R* :cache no library(mets) set.seed(1000) data <- simClaytonOakes.family.ace(2000,2,1,0,3) head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) #+END_SRC #+RESULTS: : time status x cluster type mintime lefttime truncated : 1 0.26343780 1 1 1 mother 0.26343780 0 0 : 2 1.14490828 1 1 1 father 0.26343780 0 0 : 3 0.86649229 1 1 1 child 0.26343780 0 0 : 4 0.30843425 1 0 1 child 0.26343780 0 0 : 5 3.00000000 0 0 2 mother 0.07739746 0 0 : 6 0.07739746 1 0 2 father 0.07739746 0 0 To set up the random effects some functions can be used. We here set up the ACE model that has 9 random effects with one shared environmental effect (the last random effect) and 4 genetic random effects for each parent, with variance $\sigma_g^2/4$. The random effect is again set-up with an overall designmatrix because it is again the same for each subject for all comparisons across family members. We below demonstrate how the model can be specified in various other ways. Each child share 2 genetic random effects with each parent, and also share 2 genetic random effects with his/her sibling. #+BEGIN_SRC R :results output :exports both :session *R* :cache no out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) #+END_SRC #+RESULTS: #+begin_example [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 #+end_example Then we fit the model #+BEGIN_SRC R :results output :exports both :session *R* :cache no pa <- phreg(Surv(time,status)~+1+cluster(cluster),data=data) aa <- aalen(Surv(time,status)~+1,data=data,robust=0) # make ace random effects design ts <- twostage(pa,data=data,clusters=data$cluster, var.par=1,var.link=0,theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) #+END_SRC #+RESULTS[<2018-09-11 10:11:08> c274b904f15c48471f5830235a45bd9c6327b662]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.19164670 11.40623 0 0.5222132 0.02187458 dependence2 0.947110 0.07648339 12.38321 0 0.3213691 0.01761183 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.02997 0.6390 0.7564 7.182e-120 dependence2 0.3023 0.02997 0.2436 0.3610 6.359e-24 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1737 2.793 3.474 1.074e-72 attr(,"class") [1] "summary.mets.twostage" #+end_example The model can also be fitted by specifying the pairs that one wants for the pairwise likelhood. This is done by specifying the pairs argument. We start by considering all pairs as we also did before. All pairs can be written up by calling the familycluster.index function. There are 12000 pairs to consider and the last 12 pairs for the last family is written out here. #+BEGIN_SRC R :results output :exports both :session *R* :cache no # now specify fitting via specific pairs # first all pairs mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) #+END_SRC #+RESULTS: #+begin_example [1] 1 2 1 3 1 4 2 3 2 4 [,1] [,2] [11989,] 7993 7994 [11990,] 7993 7995 [11991,] 7993 7996 [11992,] 7994 7995 [11993,] 7994 7996 [11994,] 7995 7996 [11995,] 7997 7998 [11996,] 7997 7999 [11997,] 7997 8000 [11998,] 7998 7999 [11999,] 7998 8000 [12000,] 7999 8000 #+end_example Then fitting the model using only specified pairs #+BEGIN_SRC R :results output :exports both :session *R* :cache no ts <- twostage(pa,data=data,clusters=data$cluster, theta=c(2,1),var.link=0,step=1.0, random.design=out$des.rv, theta.des=out$pardes,pairs=pairs) summary(ts) #+END_SRC #+RESULTS: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.18986604 11.51321 0 0.5222132 0.02167133 dependence2 0.947110 0.07929082 11.94476 0 0.3213691 0.01825829 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.03044 0.6381 0.7574 2.659e-116 dependence2 0.3023 0.03044 0.2426 0.3619 3.010e-23 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1713 2.797 3.469 1.057e-74 attr(,"class") [1] "summary.mets.twostage" #+end_example Now we only use a random sample of the pairs by sampling these. The pairs picked still refers to the data given in the data argument, and clusters (families) are also specified as before. #+BEGIN_SRC R :results output :exports both :session *R* :cache no ssid <- sort(sample(1:12000,2000)) tsd <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$des.rv,iid=1, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) #+END_SRC #+RESULTS: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" #+end_example Sometimes one only has the data from the pairs in addition to for example a cohort estimate of the marginal surival models. We now demonstrate how this is dealt with. Everything is essentially as before but need to organize the design differently compared to before we specified the design for everybody in the cohort. #+BEGIN_SRC R :results output :exports both :session *R* :cache no ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) # this requires that pair.new refers to id's in dataid (survival, status and so forth) # random.design and theta.des are constructed to be the array 3 dims via individual specfication from ace.family.design dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) #+END_SRC #+RESULTS: #+begin_example [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 1 1 0 0 0 0 1 [4,] 0 0 0 0 1 1 1 1 1 [5,] 1 1 0 0 1 1 0 0 1 [6,] 1 0 1 0 1 0 1 0 1 #+end_example Now fitting the model using only the pair data. #+BEGIN_SRC R :results output :exports both :session *R* :cache no tsdid <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=outid$des.rv,iid=1, theta.des=outid$pardes,pairs=pair.new) summary(tsdid) coef(tsdid) coef(tsd) #+END_SRC #+RESULTS[<2018-09-11 10:11:09> 91163f7afe117aad70174aad4fa38fb55c0a98ba]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 #+end_example Now we illustrate how one can also directly specify the random.design and theta.design for each pair, rather than taking the rows of the des.rv for the relevant pairs. This can be much simpler in some situations. #+BEGIN_SRC R :results output :exports both :session *R* :cache no pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new) head(pair.types) # here makes pairwise design , simpler random.design og pardes, parameters # stil varg, varc # mother, child, share half rvm=c(1,1,0) rvc=c(1,0,1), # thetadesmcf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # father, child, share half rvf=c(1,1,0) rvc=c(1,0,1), # thetadescf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # child, child, share half rvc=c(1,1,0) rvc=c(1,0,1), # thetadesmf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # mother, father, share 0 rvm=c(1,0) rvf=c(0,1), # thetadesmf=rbind(c(1,0),c(1,0),c(0,1)) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } # 3 rvs here random.des[,,7] theta.des[,,7] # 4 rvs here random.des[,,1] theta.des[,,1] head(rvs) #+END_SRC #+RESULTS[<2018-09-11 09:10:41> 001e65d71cb0632d0a202ea875e6794f628fd8ba]: #+begin_example [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] "mother" "father" [2,] "mother" "father" [3,] "mother" "child" [4,] "father" "child" [5,] "child" "child" [6,] "child" "child" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [1] 3 3 4 4 4 4 #+end_example And fitting again the same model as before #+BEGIN_SRC R :results output :exports both :session *R* :cache no tsdid2 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) tsd$theta tsdid2$theta tsdid$theta #+END_SRC #+RESULTS[<2018-09-11 10:18:07> c05cfac52e5637e7068a37c12499455107563f9b]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 #+end_example Finally the same model structure can be setup based on a Kinship coefficient. #+BEGIN_SRC R :results output :exports both :session *R* :cache no # simpler specification via kinship coefficient for each pair kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) # 4 rvs here , here independence since shared component has variance 0 ! out$random.des[,,9] out$theta.des[,,9] #+END_SRC #+RESULTS: #+begin_example [1] 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 #+end_example Same same #+BEGIN_SRC R :results output :exports both :session *R* :cache no tsdid3 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) coef(tsdid3) #+END_SRC #+RESULTS[<2018-09-11 09:10:44> 3a0beff321d7e6151d20d574d3ea93a51dfb7919]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 #+end_example ** Univariate plackett model twostage models The copula known as the Plackett distribution, see \cite{plackett1965,anderson1992time,ghosh2006sjs}, is on the form \begin{align} C(u,v; \theta) = \begin{cases} \frac{ S - (S^2 - 4 u v \theta (\theta-a))}{2 (\theta -1)} & \mbox{ if } \theta \ne 1 \\ u v & \mbox{ if } \theta = 1 \end{cases} \end{align} with $S=1+(\theta-1) (u + v)$. With marginals $S_i$ we now define the bivariate survival function as $C(u_1,u_2)=H(S_1(t_1),S_2(t_2))$ with $u_i=S_i(t_i)$. The dependence parameter $\theta$ has the nice interpretation that the it is equivalent to the odds-ratio of all $2 \times 2$ tables for surviving past any cut of the plane $(t_1,t_2)$, that is $$ \theta = \frac{ P(T_1 > t_1 | T_2 >t_2) P(T_1 \leq t_1 | T_2>t_2) }{P(T_1 > t_1 | T_2 \leq t_2) P(T_1 \leq t_1 | T_2 \leq t_2 ) }. $$ One additional nice feature of the odds-ratio measure it that it is directly linked to the Spearman correlation, $\rho$, that can be computed as \begin{align} \frac{\theta+1}{\theta -1} - \frac{2 \theta}{(\theta-1)^2} \log(\theta) \end{align} when $\theta \ne 1$, if $\theta=1$ then $\rho=0$. This model has a more free parameter than the Clayton-Oakes model. #+BEGIN_SRC R :results output :exports both :session *R* :cache no library(mets) data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) # Plackett model mph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett") summary(fitp) # without covariates but with stratafied marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitpa <- survival.twostage(marg,data=diabetes,theta=1.0, clusters=diabetes$id,score.method="optimize") summary(fitpa) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) #+END_SRC #+RESULTS: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. SE dependence1 1.14188 0.2784057 4.101497 4.104867e-05 0.3648217 0.08158643 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 3.133 0.8721 1.423 4.842 0.0003283 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683487 0.3239422 -0.1754476 0.8607279 0.3208252 0.07058583 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9448 0.306 0.3449 1.545 0.002022 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" #+end_example With a regression design #+BEGIN_SRC R :results output :exports both :session *R* :cache no mm <- model.matrix(~-1+factor(adult),diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett", theta.des=mm) summary(fitp) #+END_SRC #+RESULTS: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. factor(adult)1 1.098333 0.3436264 3.196298 0.001392032 0.3519988 factor(adult)2 1.231962 0.4938132 2.494794 0.012603018 0.3909505 SE factor(adult)1 0.1016635 factor(adult)2 0.1417283 $or Estimate Std.Err 2.5% 97.5% P-value factor(adult)1 2.999 1.031 0.9792 5.019 0.003613 factor(adult)2 3.428 1.693 0.1102 6.746 0.042861 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no # Piecewise constant cross hazards ratio modelling d <- subset(simClaytonOakes(2000,2,0.5,0,stoptime=2,left=0),!truncated) udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="plackett",silent=0) summary(udp) #+END_SRC #+RESULTS[<2018-09-11 09:10:44> 317374c26093d716d9ba134f652d6b5470e9dbe9]: #+begin_example Data-set 1 out of 4 Number of joint events: 529 of 2000 Data-set 2 out of 4 Number of joint events: 248 of 1212 Data-set 3 out of 4 Number of joint events: 254 of 1219 Data-set 4 out of 4 Number of joint events: 633 of 960 [1] 1 Dependence parameter for Plackett model log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 1.761 (0.083) 1.628 (0.128) 0.5 - 2 1.74 (0.128) 2.017 (0.092) Spearman Correlation (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.532 (0.020) 0.499 (0.033) 0.5 - 2 0.527 (0.032) 0.593 (0.021) #+end_example mets/vignettes/twostage-survival.ltx0000644000176200001440000013131313623061405017473 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate survival data} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate survival data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate survival data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org3befec5} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \begin{itemize} \item biprobit model \end{itemize} \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \(T_1, \delta_1, T_2, \delta_2, X_1, X_2\) where the censored survival responses are \(T_1, \delta_1, T_2, \delta_2\) and we have covariates \(X_1, X_2\). The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{s(k,i)}(t) \exp( X_{ki}^T \beta) \] where \(s(k,i)\) is a strata variable. \subsection*{Gamma distributed frailties} \label{sec:org3bb9661} The focus of this vignette is describe how to work on bivariate survival data using the addtive gamma-random effects models. We present two different ways of specifying different dependence structures. \begin{itemize} \item Univariate models with a single random effect for each cluster and with a regression design on the variance. \item Multivariate models with multiple random effects for each cluster. \end{itemize} The univariate models are then given a given cluster random effects \(Z_k\) with parameter \(\theta\) the joint survival function is given by the Clayton copula and on the form \[ \psi(\theta, \psi^{-1}(\theta,S_1(t,X_{k1}) ) + \psi^{-1}(\theta, S_1(t,X_{k1}) ) \] where \(\psi\) is the Laplace transform of a gamma distributed random variable with mean 1 and variance \(\theta\). We then model the variance within clusters by a cluster specific regression design such that \[ \theta = z_j^T \alpha \] where \(z\) is the regression design (specified by theta.des in the software). This model can be fitted using a pairwise likelihood or the pseudo-likelihood using either \begin{itemize} \item twostage \item twostageMLE \end{itemize} To make the twostage approach possible we need a model with specific structure for the marginals. Therefore given the random effect of the clusters the survival distributions within a cluster are independent and on the form \[ P(T_j > t| X_j,Z) = exp( -Z \cdot \Psi^{-1}(\nu^{-1},S(t|X_j)) ) \] with \(\Psi\) the laplace of the gamma distribution with mean 1 and variance \(1/\nu\). \subsection*{Additive Gamma frailties} \label{sec:orge7e6b98} For the multivariate models we are given a multivarite random effect each cluster \(Z=(Z_1,...,Z_d)\) with d random effects. The total random effect for each subject \(j\) in a cluster is then specified using a regression design on these random effects, with a regression vector \(V_j\) such that the total random effect is \(V_j^T (Z_1,...,Z_d)\). The elements of \(V_J\) are 1/0. The random effects \((Z_1,...,Z_d)\) has associated parameters \((\lambda_1,...,\lambda_d)\) and \(Z_j\) is Gamma distributed with \begin{itemize} \item mean \(\lambda_j/V_1^T \lambda\) \item variance \(\lambda_j/(V_1^T \lambda)^2\) \end{itemize} The key assumption to make the two-stage fitting possible is that \[ \nu =V_j^T \lambda \] is constant within clusters. The consequence of this is that the total random effect for each subject within a cluster, \(V_j^T (Z_1,...,Z_d)\) , is gamma distributed with variance \(1/\nu\). The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \[ \theta_j = \lambda_j/\nu^2 \] For alternative parametrizations one can specify that the parameters are \(\theta_j=\lambda_j\) with the argument var.par=0. Finally the parameters \((\theta_1,...,\theta_d)\) are related to the parameters of the model by a regression construction \(M\) (d x k), that links the \(d\) \(\theta\) parameters with the \(k\) underlying \(\alpha\) parameters \[ \theta = M \alpha. \] The default is a diagonal matrix for \(M\). This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. In the software \(M\) is called theta.des Assume that the marginal survival distribution for subject \(i\) within cluster \(k\) is given by \(S_{X_{k,i}}(t)\) given covariates \(X_{k,i}\). Now given the random effects of the cluster \(Z_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) we assume that subjects within the cluster are independent with survival distributions \begin{align*} \exp(- ( V_{k,i} Z_k) \Psi^{-1} (\nu,S_{X_{k,i}}(t)) ). \end{align*} A consequence of this is that the hazards given the covariates \(X_{k,i}\) and the random effects \(Z_k\) are given by \begin{align} \lambda_{k,i}(t;X_{k,i},Z_{k,i}) = ( V_{k,i} V_k) D_3 \Psi^{-1} (\nu,S_{X_{k,i}}(t)) D_t S_{X_{k,i}}(t) \label{eq-cond-haz} \end{align} where \(D_t\) and \(D_3\) denotes the partial derivatives with respect to \(t\) and the third argument, respectively. Further, we can express the multivariate survival distribution as \begin{align} S(t_1,\dots,t_m) & = \exp( -\sum_{i=1}^m (V_i Z) \Psi^{-1}(\eta_l,\nu_l,S_{X_{k,i}}(t_i)) ) \nonumber \\ & = \prod_{l=1}^p \Psi(\eta_l,\eta , \sum_{i=1}^m Q_{k,i} \Psi^{-1}(\eta,\eta,S_{X_{k,i}}(t_i))). \label{eq-multivariate-surv} \end{align} In the case of considering just pairs, we write this function as \(C(S_{k,i}(t),S_{k,j}(t))\). In addition to survival times from this model, we assume that we independent right censoring present \(U_{k,i}\) such that the given \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) \((U_{k,1},\dots,U_{k,n_k})\) of \((T_{k,1},\dots,T_{k,n_k})\), and the conditional censoring distribution do not depend on \(V_k\). One consequence of the model strucure is that the Kendall's can be computed for two-subjects \((i,j)\) across two clusters ``1'' and ``2'' as \begin{align} E( \frac{( V_{1i} Z_1- V_{1j}Z_2)( V_{2i}Z_1 - V_{2j}Z_2 )}{( V_{1i}Z_1 + V_{2i}Z_2 ) ( V_{1j}Z_1 + V_{2j}Z_2 )} ) \end{align} under the assumption that that we compare pairs with equivalent marginals, \(S_{X_{1,i}}(t)= S_{X_{2,i}}(t)\) and \(S_{X_{1,j}}(t)= S_{X_{2,j}}(t)\), and that \(S_{X_{1,i}}(\infty)= S_{X_{1,j}}(\infty)=0\). Here we also use that \(\eta\) is the same across clusters. The Kendall's tau would be the same for \eqref{frailty-model} due to the same additive structure for the frailty terms, and the random effects thus have the same interpretation in terms of Kendall's tau. \subsection*{Univariate gamma (clayton-oakes) model twostage models} \label{sec:org138bf8c} We start by fitting simple Clayton-Oakes models for the data, that is with an overall random effect that is Gamma distrubuted with variance \(\theta\). We can fit the model by a pseudo-MLE (twostageMLE) and a pairwise composite likelihood approach (twostage). The pseudo-liklihood and the composite pairwise likelhood gives quite similar results in this case. In addition the log-parametrization is illustrated with the var.link=1 option. In addition it is specified that we want a "clayton.oakes" model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) # Clayton-Oakes fitco2 <- survival.twostage(margph,data=diabetes,theta=0.0,detail=0, clusters=diabetes$id,var.link=1,model="clayton.oakes") summary(fitco2) fitco3 <- survival.twostage(margph,data=diabetes,theta=1.0,detail=0, clusters=diabetes$id,var.link=0,model="clayton.oakes") summary(fitco3) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava mets version 1.2.4 Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.04849523 0.330665 -0.1466597 0.8834006 0.3226451 0.07226526 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9527 0.315 0.3352 1.57 0.002493 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526619 0.3150119 3.024209 0.002492843 0.3226451 0.07226526 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The marginal models can be either structured Cox model or as here with a baseline for each strata. This gives quite similar results to those before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # without covariates but marginal model stratified marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Piecewise constant Clayton-Oakes model} \label{sec:orgedb6727} Let the cross-hazard ratio (CHR) be defined as \begin{align} \eta(t_1,t_2) = \frac{ \lambda_1(t_1| T_2=t_2)}{ \lambda_1(t_1| T_2 \ge t_2)} = \frac{ \lambda_2(t_2| T_1=t_1)}{ \lambda_2(t_2| T_1 \ge t_1)} \end{align} where \(\lambda_1\) and \(\lambda_2\) are the conditional hazard functions of \(T_1\) and \(T_2\) given covariates. For the Clayton-Oakes model this ratio is \(\eta(t_1,t_2) = 1+\theta\), and as a consequence we see that if the co-twin is dead at any time we would increase our risk assessment on the hazard scale with the constant \(\eta(t_1,t_2)\). The Clayton-Oakes model also has the nice property that Kendall's tau is linked directly to the dependence parameter \(\theta\) and is \(1/(1+2/\theta)\). A very useful extension of the model the constant cross-hazard ratio (CHR) model is the piecewise constant cross-hazard ratio (CHR) for bivariate survival data \cite{nan2006piecewise}, and this model was extended to competing risks in \cite{shih2010modeling}. In the survival setting we let the CHR \begin{align} \eta(t_1,t_2) & = \sum \eta_{i,j} I(t_1 \in I_i, t_2 \in I_j) \end{align} The model lets the CHR by constant in different part of the plane. This can be thought of also as having a separate Clayton-Oakes model for each of the regions specified in the plane here by the cut-points \(c(0,0.5,2)\) thus defining 9 regions. This provides a constructive goodness of fit test for the whether the Clayton-Oakes model is valid. Indeed if valid the parameter should be the same in all regions. First we generate some data from the Clayton-Oakes model with variance \(0.5\) and 2000 pairs. And fit the related model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} d <- simClaytonOakes(2000,2,0.5,0,3) margph <- phreg(Surv(time,status)~x+cluster(cluster),data=d) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=d) summary(fitco1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.01888 0.08970192 22.50654 0 0.5023489 0.01110764 $type NULL attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now we cut the region at the cut-points \(c(0,0.5,2)\) thus defining 9 regions and fit a separate model for each region. We see that the parameter is indeed rather constant over the 9 regions. A formal test can be constructed. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="clayton.oakes",silent=0) summary(udp) \end{lstlisting} \begin{verbatim} Data-set 1 out of 4 Number of joint events: 518 of 2000 Data-set 2 out of 4 Number of joint events: 274 of 1232 Data-set 3 out of 4 Number of joint events: 247 of 1203 Data-set 4 out of 4 Number of joint events: 594 of 953 [1] 1 Dependence parameter for Clayton-Oakes model Score of log-likelihood for parameter estimates (too large?) 0 - 0.5 0.5 - 2 0 - 0.5 0.0019673733 0.001451886 0.5 - 2 0.0007297083 0.003142920 log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.687 (0.069) 0.677 (0.093) 0.5 - 2 0.733 (0.100) 0.718 (0.060) Kendall's tau (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.498 (0.017) 0.496 (0.023) 0.5 - 2 0.51 (0.025) 0.506 (0.015) \end{verbatim} \subsection*{Multivariate gamma twostage models} \label{sec:org1b5ea9b} To illustrate how the multivariate models can be used, we first set up some twin data with ACE structure. That is two shared random effects, one being the genes \(\sigma_g^2\) and one the environmental effect \(\sigma_e^2\). Monozygotic twins share all genes whereas the dizygotic twins only share half the genes. This can be expressed via 5 random effect for each twin pair (for example). We start by setting this up. The pardes matrix tells how the the parameters of the 5 random effects are related, and the matrix her first has one random effect with parameter \(\theta_1\) (here the \(\sigma_g^2\)), then the next 3 random effects have parameters \(0.5 \theta_1\) (here \(0.5 \sigma_g^2\)), and the last random effect that is given by its own parameter \(\theta_2\) (here \(\sigma_e^2\)). \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data <- simClaytonOakes.twin.ace(2000,2,1,0,3) out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes pardes \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1.0 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.5 0 [5,] 0.0 1 \end{verbatim} The last part of the model structure is to decide how the random effects are shared for the different pairs (MZ and DZ), this is specfied by the random effects design (\(V_1\) and \(V_2\)) for each pair. This is here specified by an overall designmatrix for each subject (since they enter all pairs with the same random effects design). For an MZ pair the two share the full gene random effect and the full environmental random effect. In contrast the DZ pairs share the 2nd random effect with half the gene-variance and have both a non-shared gene-random effect with half the variance, and finally a fully shared environmental random effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} des.rv <- out$des.rv # MZ head(des.rv,2) # DZ tail(des.rv,2) \end{lstlisting} \begin{verbatim} MZ DZ DZns1 DZns2 env 1 1 0 0 0 1 2 1 0 0 0 1 MZ DZ DZns1 DZns2 env 3999 0 1 1 0 1 4000 0 1 0 1 1 \end{verbatim} Now we call the twostage function. We see that we essentially recover the true values, and note that the output also compares the sizes of the genetic and environmental random effect. This number is sometimes called the heritability. In addition the total variance for each subject is also computed and is here around \(3\), as we indeed constructed. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aa <- phreg(Surv(time,status)~x+cluster(cluster),data=data) ts <- twostage(aa,data=data,clusters=data$cluster,detail=0, theta=c(2,1),var.link=0,step=0.5, random.design=des.rv,theta.des=pardes) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.2111163 0.2219525 9.962113 0.000000e+00 0.5250665 0.02503201 dependence2 0.7431872 0.1706430 4.355217 1.329349e-05 0.2709211 0.04535315 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.7484 0.05898 0.6328 0.8640 6.669e-37 dependence2 0.2516 0.05898 0.1360 0.3672 1.995e-05 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.954 0.1426 2.675 3.234 2.514e-95 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The estimates can be transformed into Kendall's tau estimates for MZ and DZ twins. The Kendall's tau in the above output reflects how a gamma distributed random effect in the normal Clayton-Oakes model is related to the Kendall's tau. In this setting the Kendall's of MZ and DZ, however, should reflect both random effects. We do this based on simulations. The Kendall's tau of the MZ is around 0.60, and for DZ around 0.33. Both are quite high and this is due to a large shared environmental effect and large genetic effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} kendall.ClaytonOakes.twin.ace(ts$theta[1],ts$theta[2],K=10000) \end{lstlisting} \begin{verbatim} $mz.kendall [1] 0.5984888 $dz.kendall [1] 0.3257834 \end{verbatim} \subsection*{Family data} \label{sec:orga7a0fcf} For family data, things are quite similar since we use only the pairwise structure. We show how the designs are specified. First we simulate data from an ACE model. 2000 families with two-parents that share only the environment, and two-children that share genes with their parents. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) data <- simClaytonOakes.family.ace(2000,2,1,0,3) head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) \end{lstlisting} \begin{verbatim} time status x cluster type mintime lefttime truncated 1 0.26343780 1 1 1 mother 0.26343780 0 0 2 1.14490828 1 1 1 father 0.26343780 0 0 3 0.86649229 1 1 1 child 0.26343780 0 0 4 0.30843425 1 0 1 child 0.26343780 0 0 5 3.00000000 0 0 2 mother 0.07739746 0 0 6 0.07739746 1 0 2 father 0.07739746 0 0 \end{verbatim} To set up the random effects some functions can be used. We here set up the ACE model that has 9 random effects with one shared environmental effect (the last random effect) and 4 genetic random effects for each parent, with variance \(\sigma_g^2/4\). The random effect is again set-up with an overall designmatrix because it is again the same for each subject for all comparisons across family members. We below demonstrate how the model can be specified in various other ways. Each child share 2 genetic random effects with each parent, and also share 2 genetic random effects with his/her sibling. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 \end{verbatim} Then we fit the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pa <- phreg(Surv(time,status)~+1+cluster(cluster),data=data) aa <- aalen(Surv(time,status)~+1,data=data,robust=0) # make ace random effects design ts <- twostage(pa,data=data,clusters=data$cluster, var.par=1,var.link=0,theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.19164670 11.40623 0 0.5222132 0.02187458 dependence2 0.947110 0.07648339 12.38321 0 0.3213691 0.01761183 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.02997 0.6390 0.7564 7.182e-120 dependence2 0.3023 0.02997 0.2436 0.3610 6.359e-24 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1737 2.793 3.474 1.074e-72 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The model can also be fitted by specifying the pairs that one wants for the pairwise likelhood. This is done by specifying the pairs argument. We start by considering all pairs as we also did before. All pairs can be written up by calling the familycluster.index function. There are 12000 pairs to consider and the last 12 pairs for the last family is written out here. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # now specify fitting via specific pairs # first all pairs mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) \end{lstlisting} \begin{verbatim} [1] 1 2 1 3 1 4 2 3 2 4 [,1] [,2] [11989,] 7993 7994 [11990,] 7993 7995 [11991,] 7993 7996 [11992,] 7994 7995 [11993,] 7994 7996 [11994,] 7995 7996 [11995,] 7997 7998 [11996,] 7997 7999 [11997,] 7997 8000 [11998,] 7998 7999 [11999,] 7998 8000 [12000,] 7999 8000 \end{verbatim} Then fitting the model using only specified pairs \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ts <- twostage(pa,data=data,clusters=data$cluster, theta=c(2,1),var.link=0,step=1.0, random.design=out$des.rv, theta.des=out$pardes,pairs=pairs) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.18986604 11.51321 0 0.5222132 0.02167133 dependence2 0.947110 0.07929082 11.94476 0 0.3213691 0.01825829 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.03044 0.6381 0.7574 2.659e-116 dependence2 0.3023 0.03044 0.2426 0.3619 3.010e-23 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1713 2.797 3.469 1.057e-74 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now we only use a random sample of the pairs by sampling these. The pairs picked still refers to the data given in the data argument, and clusters (families) are also specified as before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ssid <- sort(sample(1:12000,2000)) tsd <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$des.rv,iid=1, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Sometimes one only has the data from the pairs in addition to for example a cohort estimate of the marginal surival models. We now demonstrate how this is dealt with. Everything is essentially as before but need to organize the design differently compared to before we specified the design for everybody in the cohort. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) # this requires that pair.new refers to id's in dataid (survival, status and so forth) # random.design and theta.des are constructed to be the array 3 dims via individual specfication from ace.family.design dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 1 1 0 0 0 0 1 [4,] 0 0 0 0 1 1 1 1 1 [5,] 1 1 0 0 1 1 0 0 1 [6,] 1 0 1 0 1 0 1 0 1 \end{verbatim} Now fitting the model using only the pair data. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=outid$des.rv,iid=1, theta.des=outid$pardes,pairs=pair.new) summary(tsdid) coef(tsdid) coef(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 \end{verbatim} Now we illustrate how one can also directly specify the random.design and theta.design for each pair, rather than taking the rows of the des.rv for the relevant pairs. This can be much simpler in some situations. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new) head(pair.types) # here makes pairwise design , simpler random.design og pardes, parameters # stil varg, varc # mother, child, share half rvm=c(1,1,0) rvc=c(1,0,1), # thetadesmcf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # father, child, share half rvf=c(1,1,0) rvc=c(1,0,1), # thetadescf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # child, child, share half rvc=c(1,1,0) rvc=c(1,0,1), # thetadesmf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # mother, father, share 0 rvm=c(1,0) rvf=c(0,1), # thetadesmf=rbind(c(1,0),c(1,0),c(0,1)) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } # 3 rvs here random.des[,,7] theta.des[,,7] # 4 rvs here random.des[,,1] theta.des[,,1] head(rvs) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] "mother" "father" [2,] "mother" "father" [3,] "mother" "child" [4,] "father" "child" [5,] "child" "child" [6,] "child" "child" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [1] 3 3 4 4 4 4 \end{verbatim} And fitting again the same model as before \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid2 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) tsd$theta tsdid2$theta tsdid$theta \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 \end{verbatim} Finally the same model structure can be setup based on a Kinship coefficient. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # simpler specification via kinship coefficient for each pair kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) # 4 rvs here , here independence since shared component has variance 0 ! out$random.des[,,9] out$theta.des[,,9] \end{lstlisting} \begin{verbatim} [1] 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 \end{verbatim} Same same \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid3 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) coef(tsdid3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 \end{verbatim} \subsection*{Univariate plackett model twostage models} \label{sec:org5250adb} The copula known as the Plackett distribution, see \cite{plackett1965,anderson1992time,ghosh2006sjs}, is on the form \begin{align} C(u,v; \theta) = \begin{cases} \frac{ S - (S^2 - 4 u v \theta (\theta-a))}{2 (\theta -1)} & \mbox{ if } \theta \ne 1 \\ u v & \mbox{ if } \theta = 1 \end{cases} \end{align} with \(S=1+(\theta-1) (u + v)\). With marginals \(S_i\) we now define the bivariate survival function as \(C(u_1,u_2)=H(S_1(t_1),S_2(t_2))\) with \(u_i=S_i(t_i)\). The dependence parameter \(\theta\) has the nice interpretation that the it is equivalent to the odds-ratio of all \(2 \times 2\) tables for surviving past any cut of the plane \((t_1,t_2)\), that is $$ \theta = \frac{ P(T_1 > t_1 | T_2 >t_2) P(T_1 \leq t_1 | T_2>t_2) }{P(T_1 > t_1 | T_2 \leq t_2) P(T_1 \leq t_1 | T_2 \leq t_2 ) }. $$ One additional nice feature of the odds-ratio measure it that it is directly linked to the Spearman correlation, \(\rho\), that can be computed as \begin{align} \frac{\theta+1}{\theta -1} - \frac{2 \theta}{(\theta-1)^2} \log(\theta) \end{align} when \(\theta \ne 1\), if \(\theta=1\) then \(\rho=0\). This model has a more free parameter than the Clayton-Oakes model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) # Plackett model mph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett") summary(fitp) # without covariates but with stratafied marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitpa <- survival.twostage(marg,data=diabetes,theta=1.0, clusters=diabetes$id,score.method="optimize") summary(fitpa) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. SE dependence1 1.14188 0.2784057 4.101497 4.104867e-05 0.3648217 0.08158643 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 3.133 0.8721 1.423 4.842 0.0003283 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683487 0.3239422 -0.1754476 0.8607279 0.3208252 0.07058583 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9448 0.306 0.3449 1.545 0.002022 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} With a regression design \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} mm <- model.matrix(~-1+factor(adult),diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett", theta.des=mm) summary(fitp) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. factor(adult)1 1.098333 0.3436264 3.196298 0.001392032 0.3519988 factor(adult)2 1.231962 0.4938132 2.494794 0.012603018 0.3909505 SE factor(adult)1 0.1016635 factor(adult)2 0.1417283 $or Estimate Std.Err 2.5% 97.5% P-value factor(adult)1 2.999 1.031 0.9792 5.019 0.003613 factor(adult)2 3.428 1.693 0.1102 6.746 0.042861 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # Piecewise constant cross hazards ratio modelling d <- subset(simClaytonOakes(2000,2,0.5,0,stoptime=2,left=0),!truncated) udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="plackett",silent=0) summary(udp) \end{lstlisting} \begin{verbatim} Data-set 1 out of 4 Number of joint events: 529 of 2000 Data-set 2 out of 4 Number of joint events: 248 of 1212 Data-set 3 out of 4 Number of joint events: 254 of 1219 Data-set 4 out of 4 Number of joint events: 633 of 960 [1] 1 Dependence parameter for Plackett model log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 1.761 (0.083) 1.628 (0.128) 0.5 - 2 1.74 (0.128) 2.017 (0.092) Spearman Correlation (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.532 (0.020) 0.499 (0.033) 0.5 - 2 0.527 (0.032) 0.593 (0.021) \end{verbatim} \end{document}mets/vignettes/rec1.jpg0000644000176200001440000005276313623061405014603 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( 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xO}4E`?_GW_@WbLH<9E'-F䱉N 2$~5?@xEm_ _hʲτ6AQ 0QEQEQEQEQEQEW9S-ΧBO=hD:˒8 qYkj tyjn|sK!N Os@ .]_FwVZSΏ!Yw1'VmPEPEPEkͩ (vVɧMuv@ĩ ;z WEq7ZI5-B%~3FҀ]y Gدl+n7 s|d1DpVW9*UOQEQEQEQ\׈P^xu[ ȸq3͜m/LڝS-ΧBO=hD:˒8 q@a3FOrU'nEPEPE\]5Pv酠]N~cgOtW-^W!V{g-PnHCԴ :m-/9>PFI$rhQ@Q@Q@+cDlKړ4EBdc9[qV]|M{un͜0QLH于6lNh(t ( ( :d c`v23QܶZjZ%Ԭ]\\< Pل kEpomΫ|aԭ bEH,Qm`e'9EwQEQEQEQI4{O(lI6 #<{+Z3j B[yB0a,G(p7 8ܲjڍͻZ$v@Jy*''9zQ@Q@Q@Q@Q@Q@Q@=*WHocfXIG+FnWBN pHQb Qh> loo, gXJҴ[ 9R'S+v9,@ghQEQEQEh:n"| !2$mlnRPTeO" Zoͱh(*ز @F2V4*H6QFs#wcՙcxr(((scmy-ǽf;Y3_sT|=obY}q"2H221|NzQ@YY[iPB»QOEQEQEUy,m xso?*Rv/_OX1/<%_kyܨ;w+PV0mpAj(((( NޭՒFpeXm!NKӯ4<%LmL57\Hwʲ|߼Zۢ ( ( (4)qJ E(2r+6ZAaSV21 ! p8+;[P7"7~hicݰ|glEQEQE坶e5+5RHpzǵgo<0?7GrFbt0H -;ZjAjV˶LQY] ڥR5EQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEW4<[hii;QA,p98"'&~mr2;u|k`ڟ(4|[waفr1j:OJ4 -Z8ૹ].F:@Ey,~l[cX3h.Iăn#WK+ -.59R&aX].K#6H*c<h(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((mets/vignettes/recurrent-events.org0000644000176200001440000006626213623061405017272 0ustar liggesusers#+TITLE: Recurrent Events #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Recurrent Events}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage ** Overview For recurrent events data it is often of interest to compute basis descriptive quantities as a first go at getting some basic understanding of the phenonmenon studied. We here demonstrate how one can compute - the marginal mean - the variance - the probability of exceeding k events In addition several tools can be used for simulating recurrent events and bivariate recurrent events data, in the case with a possible terminating event. For bivariate recurrent events we also compute summary measures that describe their dependence such as - the covariance - directional dependence - the bivariate probability of exceeding $(k_1,k_2)$ events ** Simulation of recurrents events We start by simulating some recurrent events data with two type of events with cumulative hazards - $\Lambda_1(t)$ (rate among survivors) - $\Lambda_2(t)$ (rate among survivors) - $\Lambda_D(t)$ where we consider types 1 and 2 and with a rate of the terminal event given by $\Lambda_D(t)$. We let the events be independent, but could also specify a random effects structure to generate dependence. When simulating data we can impose various random-effects structures to generate dependence - We can draw normally distributed random effects $Z_1,Z_2,Z_d$ were the variance (var.z) and correlation can be specified (cor.mat) (dependence=2). Then the intensities are - $\exp(Z_1) \lambda_1(t)$ - $\exp(Z_2) \lambda_2(t)$ - $\exp(Z_3) \lambda_D(t)$ - We can one gamma distributed random effects $Z$. Then the intensities are (dependence=1) - $Z \lambda_1(t)$ - $Z \lambda_2(t)$ - $Z \lambda_D(t)$ - We can draw gamma distributed random effects $Z_1,Z_2,Z_d$ were the sum-structure can be speicifed via a matrix cor.mat. Then we compute $\tilde Z_j = \sum_k Z_k^{cor.mat(j,k)}$ for $j=1,2,3$ (dependence=3) Then the intensities are - $\tilde Z_1 \lambda_1(t)$ - $\tilde Z_2 \lambda_2(t)$ - $\tilde Z_3 \lambda_D(t)$ - The intensities can be independent (dependence=0) We return to how to run the different set-ups later and start by simulating independent processes. ** Utility functions We here mention two utility functions - tie.breaker for breaking ties among jump-times which is expected in the functions below. - count.history that counts the number of jumps previous for each subject that is $N_1(t-)$ and $N_2(t-)$. ** Marginal Mean We start by estimating the marginal mean $E(N_1(t \wedge D))$ where $D$ is the timing of the terminal event. This is based on a rate model for - the type 1 events $ \sim E(dN_1(t) | D > t)$ - the terminal event $ \sim E(dN_d(t) | D > t)$ and is defined as $\mu_1(t)=E(N_1^*(t))$ \begin{align} \int_0^t S(u) d R_1(u) \end{align} where $S(t)=P(D \geq t)$ and $dR_1(t) = E(dN_1^*(t) | D > t)$ and can therefore be estimated by a - Kaplan-Meier estimator, $\hat S(u)$ - Nelson-Aalen estimator for $R_1(t)$ \begin{align} \hat R_1(t) & = \sum_i \int_0^t \frac{1}{Y_\bullet (s)} dN_{1i}(s) \end{align} where $Y_{\bullet}(t)= \sum_i Y_i(t)$ such that the estimator is \begin{align} \hat \mu_1(t) & = \int_0^t \hat S(u) d\hat R_1(u). \end{align} Cook & Lawless (1997), and developed further in Gosh & Lin (2000). The variance can be estimated based on the asymptotic expansion of $\hat \mu_1(t) - \mu_1(t)$ \begin{align*} & \sum_i \int_0^t \frac{S(s)}{\pi(s)} dM_{i1} - \mu_1(t) \int_0^t \frac{1}{\pi(s)} dM_i^d + \int_0^t \frac{\mu_1(s) }{\pi(s)} dM_i^d, \end{align*} with mean-zero processes - $M_i^d(t) = N_i^D(t)- \int_0^t Y_i(s) d \Lambda^D(s)$, - $M_{i1}(t) = N_{i1}(t) - \int_0^t Y_{i}(s) dR_1(s)$. as in Gosh & Lin (2000) *** Generating data We start by generating some data to illustrate the computation of the marginal mean #+BEGIN_SRC R :exports code :ravel echo=FALSE library(mets) set.seed(1000) # to control output in simulatins for p-values below. #+END_SRC #+RESULTS: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.5 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(base1cumhaz) data(base4cumhaz) data(drcumhaz) ddr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz rr <- simRecurrent(1000,base1,death.cumhaz=ddr) rr$x <- rnorm(nrow(rr)) rr$strata <- floor((rr$id-0.01)/500) dlist(rr,.~id| id %in% c(1,7,9)) #+END_SRC #+RESULTS: #+begin_example id: 1 entry time status rr dtime fdeath death start stop x strata 1 0 133.1 0 1 133.1 1 1 0 133.1 1.185 0 ------------------------------------------------------------ id: 7 entry time status rr dtime fdeath death start stop x strata 7 0.0 813.3 1 1 1729 1 0 0.0 813.3 1.5495 0 1004 813.3 1288.4 1 1 1729 1 0 813.3 1288.4 1.0535 0 1658 1288.4 1315.4 1 1 1729 1 0 1288.4 1315.4 1.5330 0 2150 1315.4 1449.4 1 1 1729 1 0 1315.4 1449.4 0.8944 0 2539 1449.4 1726.1 1 1 1729 1 0 1449.4 1726.1 -0.1931 0 2851 1726.1 1729.4 0 1 1729 1 1 1726.1 1729.4 0.4081 0 ------------------------------------------------------------ id: 9 entry time status rr dtime fdeath death start stop x strata 9 0.0 433.5 1 1 5110 0 0 0.0 433.5 -0.4660 0 1006 433.5 2451.1 1 1 5110 0 0 433.5 2451.1 1.0647 0 1659 2451.1 3629.7 1 1 5110 0 0 2451.1 3629.7 -0.2506 0 2151 3629.7 3644.7 1 1 5110 0 0 3629.7 3644.7 -0.6748 0 2540 3644.7 3695.8 1 1 5110 0 0 3644.7 3695.8 0.6510 0 2852 3695.8 3890.7 1 1 5110 0 0 3695.8 3890.7 -0.2033 0 3112 3890.7 5110.0 0 1 5110 0 0 3890.7 5110.0 -1.6981 0 #+end_example The status variable keeps track of the recurrent evnts and their type, and death the timing of death. To compute the marginal mean we simly estimate the two rates functions of the number of events of interest and death by using the phreg function (to start without covariates). Then the estimates are combined with standard error computation in the recurrentMarginal function #+NAME: rec1 #+BEGIN_SRC R :exports both :results output graphics :file rec1.jpg :ravel fig=TRUE,include=FALSE # to fit non-parametric models with just a baseline xr <- phreg(Surv(entry,time,status)~cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) # robust standard errors rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=4) # marginal mean of expected number of recurrent events out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=2) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Marginal mean for number of type 1 events, rate for death (panel (a)), rate for type 1 among survivors (panel (b)), and marginal mean (panel (c)) label:fig:rec1 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec1 [[file:rec1.jpg]] #+LATEX: \captionof{figure}{Marginal mean for number of type 1 events, rate for death (panel (a)), rate for type 1 among survivors (panel (b)), and marginal mean (panel (c)).} label:fig:rec #+END_marginfigure We can do the same with strata #+NAME: rec2 #+BEGIN_SRC R :exports both :results output graphics :file rec2.jpg :ravel fig=TRUE,include=FALSE xr <- phreg(Surv(entry,time,status)~strata(strata)+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~strata(strata)+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec2 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec2 [[file:rec2.jpg]] #+LATEX: \captionof{figure}{Recurrent events} label:fig:rec2 #+END_marginfigure Furhter, if we adjust for covariates for the two rates we can still do predictions of marginal mean, what can be plotted is the baseline marginal mean, that is for the covariates equal to 0 for both models. Predictions for specific covariates can also be obtained with the recmarg (recurren marginal mean used solely for predictions without standard error computation). #+NAME: rec3 #+BEGIN_SRC R :exports both :results output graphics :file rec3.jpg :ravel fig=TRUE,include=FALSE # cox case xr <- phreg(Surv(entry,time,status)~x+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~x+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) # predictions witout se's outX <- recmarg(xr,dr,Xr=1,Xd=1) bplot(outX,add=TRUE,col=3) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec3 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec3 [[file:rec3.jpg]] #+LATEX: \captionof{figure}{Recurrent events with cox models for rates.} label:fig:rec3 #+END_marginfigure ** Other marginal properties The mean is a useful summary measure but it is very easy and useful to look at other simple summary measures such as the probability of exceeding $k$ events - $P(N_1^*(t) \ge k)$ - cumulative incidence of $T_{k} = \inf \{ t: N_1^*(t)=k \}$ with competing $D$. that is thus equivalent to a certain cumulative incidence of $T_k$ occurring before $D$. We denote this cumulative incidence as $\hat F_k(t)$. We note also that $N_1^*(t)^2$ can be written as \begin{align*} \sum_{k=0}^K \int_0^t I(D > s) I(N_1^*(s-)=k) f(k) dN_1^*(s) \end{align*} with $f(k)=(k+1)^2 - k^2$, such that its mean can be written as \begin{align*} \sum_{k=0}^K \int_0^t S(s) f(k) P(N_1^*(s-)= k | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k, D> s) \end{align*} and estimated by \begin{align*} \tilde \mu_{1,2}(t) & = \sum_{k=0}^K \int_0^t \hat S(s) f(k) \frac{Y_{1\bullet}^k(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^k(s)} d N_{1\bullet}^k(s)= \sum_{i=1}^n \int_0^t \hat S(s) f(N_{i1}(s-)) \frac{1}{Y_\bullet (s)} d N_{i1}(s), \end{align*} That is very similar to the "product-limit" estimator for $E( (N_1^*(t))^2 )$ \begin{align} \hat \mu_{1,2}(t) & = \sum_{k=0}^K k^2 ( \hat F_{k}(t) - \hat F_{k+1}(t) ). \end{align} We use the esimator of the probabilty of exceeding "k" events based on the fact that $I(N_1^*(t) \geq k)$ is equivalent to \begin{align*} \int_0^t I(D > s) I(N_1^*(s-)=k-1) dN_1^*(s), \end{align*} suggesting that its mean can be computed as \begin{align*} \int_0^t S(s) P(N_1^*(s-)= k-1 | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k-1, D> s) \end{align*} and estimated by \begin{align*} \tilde F_k(t) = \int_0^t \hat S(s) \frac{Y_{1\bullet}^{k-1}(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^{k-1}(s)} d N_{1\bullet}^{k-1}(s). \end{align*} To compute these estimators we need to set up the data by computing the number of previous events of type "1" by the count.history function #+NAME: rec4 #+BEGIN_SRC R :exports both :results output graphics :file rec4.jpg :ravel fig=TRUE,include=FALSE ###cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) ###rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec4 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec4 [[file:rec4.jpg]] #+LATEX: \captionof{figure}{Recurrent events: probability of exceeding k events} label:fig:rec4 #+END_marginfigure We can also look at the mean and variance based on the estimators just described #+NAME: rec4MV #+BEGIN_SRC R :exports both :results output graphics :file rec4MV.jpg :ravel fig=TRUE,include=FALSE par(mfrow=c(1,2)) with(oo,plot(time,mu,col=2,type="l")) # with(oo,plot(time,varN,type="l")) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events, mean and variance label:fig:rec4MV #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec4MV [[file:rec4MV.jpg]] #+LATEX: \captionof{figure}{Recurrent events: mean and variance} label:fig:rec4MV #+END_marginfigure ** Multiple events We now generate recurrent events with two types of events. We start by generating data as before where all events are independent. #+BEGIN_SRC R :results output :exports both :session *R* :cache no rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) #+END_SRC #+RESULTS: : : status 0 1 2 : death : 0 124 3052 405 : 1 876 0 0 Based on this we can estimate also the joint distribution function, that is the probability that $(N_1(t) \geq k_1, N_2(t) \geq k_2)$ #+NAME: rec4Bi #+BEGIN_SRC R :exports both :results output graphics :file rec4Bi.jpg :ravel fig=TRUE,include=FALSE # Bivariate probability of exceeding oo <- prob.exceedBiRecurrent(rr,1,2,exceed1=c(1,5,10),exceed2=c(1,2,3)) with(oo, matplot(time,pe1e2,type="s")) nc <- ncol(oo$pe1e2) legend("topleft",legend=colnames(oo$pe1e2),lty=1:nc,col=1:nc) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec4Bi #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec4Bi [[file:rec4Bi.jpg]] #+LATEX: \captionof{figure}{Recurrent events: probability of exceeding $(k_1,k_2)$ events} label:fig:rec4Bi #+END_marginfigure ** Dependence between events: Covariance The dependence can also be summarised in other ways. For example by computing the covariance and comparing it to the covariance under the assumption of independence among survivors. Covariance among two types of events \begin{align} \rho(t) & = \frac{ E(N_1^*(t) N_2^*(t) ) - \mu_1(t) \mu_2(t) }{ \mbox{sd}(N_1^*(t)) \mbox{sd}(N_2^*(t)) } \end{align} where $E(N_1^*(t) N_2^*(t))$ can be computed as \begin{align*} E(N_1^*(t) N_2^*(t)) & = E( \int_0^t N_1^*(s-) dN_2^*(s) ) + E( \int_0^t N_2^*(s-) dN_1^*(s) ) \end{align*} Recall that we might have a terminal event present such that we only see $N_1^*(t \wedge D)$ and $N_2^*(t \wedge D)$. To compute the covariance we thus compute \begin{align*} E(\int_0^t N_1^*(s-) dN_2^*(s) ) & = \sum_k E( \int_0^t k I(N_1^*(s-)=k) I(D \geq s) dN_2^*(s) ) \end{align*} \begin{align*} = \sum_k \int_0^t S(s) k P(N_1^*(s-)= k | D \geq s) E( dN_2^*(s) | N_1^*(s-)=k, D \geq s) \end{align*} estimated by \begin{align*} & \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s), \end{align*} - $Y_j^k(t) = \sum Y_i(t) I( N_{ji}^*(s-)=k)$ for $j=1,2$, - $\tilde N_{j,k}(t) = \sum_i \int_0^t I(N_{ij^o}(s-)=k) dN_{ij}(s)$ - $j^o$ gives the other type so that $1^o=2$ and $2^o=1$. We thus estimate $ E(N_1^*(t) N_2^*(t))$ by \begin{align*} \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s) + \sum_k \int_0^t \hat S(s) k \frac{Y_2^k(s)}{Y_\bullet (s)} \frac{1}{Y_2^k(s)} d \tilde N_{1,k}(s). \end{align*} - Without terminating event covariance is a useful nonparametric measure. - With terminating event dependence can be generated terminating event. - In reality what is of interest would be independence among survivors that is if - $N_1$ is not predicitive for $N_2$ \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} - $N_2$ is not predicitive for $N_1$ \begin{align} E( dN_1^*(t) | N_2^*(t-)=k, D \geq t) = E( dN_1^*(t) | D \geq t) \end{align} If the two processes are independent among survivors then \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} so \begin{align*} E( \int_0^t N_1^*(s-) dN_2^*(s) ) & = \int_0^t S(s) E(N_1^*(s-) | D \geq s) E( dN_2^*(s) | D \geq s) \end{align*} and \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s), \end{align*} where $N_{j\bullet}(t) = \sum_i \int_0^t dN_{j,i}(s)$. Under the independence $E(N_1^*(t) N_2^*(t))$ is estimated \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s) + \int_0^t \hat S(s) \{ \sum_k k \frac{Y_2^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{1\bullet}(s). \end{align*} Both estimators, $\hat E(N_1^*(t) N_2^*(t))$ and $\hat E_I(N_1^*(t) N_2^*(t))$, as well as $\hat E(N_1^*(t))$ and $\hat E(N_2^*(t))$, have asymptotic expansions that can be written as a sum of iid processes, similarly to the arguments of Ghosh & Lin 2000, $\sum_i \Psi_i(t)$. We here, however, use a simple block bootstrap to get standard errors. We can thus estimate the standard errors and of the estimators and their difference $\hat E(N_1^*(t) N_2^*(t))- \hat E_I(N_1^*(t) N_2^*(t))$. Note that we have terms for whether - $N_1$ is predicitive for $N_2$ - N1 -> N2 : $E( \int_0^t N_1^*(s-) dN_2^*(s) )$ - this is equivalent to a weighted log-rank test - $N_2$ is predicitive for $N_1$ - N2 -> N1 : $E( \int_0^t N_2^*(s-) dN_1^*(s) )$ - this is equivalent to a weighted log-rank test #+NAME: rec5 #+BEGIN_SRC R :exports both :results output graphics :file rec5.jpg :ravel fig=TRUE,include=FALSE rr$strata <- 1 dtable(rr,~death+status) covrp <- covarianceRecurrent(rr,1,2,status="status",death="death", start="entry",stop="time",id="id",names.count="Count") par(mfrow=c(1,3)) plot(covrp) # with strata, each strata in matrix column, provides basis for fast Bootstrap covrpS <- covarianceRecurrentS(rr,1,2,status="status",death="death", start="entry",stop="time",strata="strata",id="id",names.count="Count") #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec5 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec5 [[file:rec5.jpg]] #+LATEX: \captionof{figure}{Covariance between events} label:fig:rec5 #+END_marginfigure ** Bootstrap standard errors for terms First fitting the model again to get our estimates of interst, and then computing them for some specific time-points #+BEGIN_SRC R :results output :exports both :session *R* :cache no times <- seq(500,5000,500) coo1 <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") # mug <- Cpred(cbind(coo1$time,coo1$EN1N2),times)[,2] mui <- Cpred(cbind(coo1$time,coo1$EIN1N2),times)[,2] mu2.1 <- Cpred(cbind(coo1$time,coo1$mu2.1),times)[,2] mu2.i <- Cpred(cbind(coo1$time,coo1$mu2.i),times)[,2] mu1.2 <- Cpred(cbind(coo1$time,coo1$mu1.2),times)[,2] mu1.i <- Cpred(cbind(coo1$time,coo1$mu1.i),times)[,2] cbind(times,mu2.1,mu2.i) cbind(times,mu1.2,mu1.i) #+END_SRC #+RESULTS: #+begin_example times mu2.1 mu2.i [1,] 500 0.03100697 0.03667899 [2,] 1000 0.12005101 0.11639334 [3,] 1500 0.27816419 0.25970625 [4,] 2000 0.39427551 0.36855802 [5,] 2500 0.62555191 0.59880569 [6,] 3000 0.87389364 0.85299235 [7,] 3500 1.05720576 1.04841424 [8,] 4000 1.17544378 1.17621886 [9,] 4500 1.24059951 1.24523661 [10,] 5000 1.41706642 1.44651653 times mu1.2 mu1.i [1,] 500 0.03600846 0.03183231 [2,] 1000 0.09403891 0.09621167 [3,] 1500 0.21312456 0.20444188 [4,] 2000 0.33724372 0.32986794 [5,] 2500 0.48942767 0.46709378 [6,] 3000 0.65365335 0.62713754 [7,] 3500 0.83195803 0.80087980 [8,] 4000 1.01132903 0.98848325 [9,] 4500 1.12459563 1.11010693 [10,] 5000 1.21985056 1.20821774 #+end_example To get the bootstrap standard errors there is a quick memory demanding function (with S for speed and strata) BootcovariancerecurrenceS and slow function that goes through the loops in R Bootcovariancerecurrence. #+BEGIN_SRC R :results output :exports both :session *R* :cache no bt1 <- BootcovariancerecurrenceS(rr,1,2,status="status",start="entry",stop="time",K=100,times=times) #bt1 <- Bootcovariancerecurrence(rr,1,2,status="status",start="entry",stop="time",K=K,times=times) output <- list(bt1=bt1,mug=mug,mui=mui, bse.mug=bt1$se.mug,bse.mui=bt1$se.mui, dmugi=mug-mui, bse.dmugi=apply(bt1$EN1N2-bt1$EIN1N2,1,sd), mu2.1 = mu2.1 , mu2.i = mu2.i , dmu2.i=mu2.1-mu2.i, mu1.2 = mu1.2 , mu1.i = mu1.i , dmu1.i=mu1.2-mu1.i, bse.mu2.1=apply(bt1$mu2.i,1,sd), bse.mu2.1=apply(bt1$mu2.1,1,sd), bse.dmu2.i=apply(bt1$mu2.1-bt1$mu2.i,1,sd), bse.mu1.2=apply(bt1$mu1.2,1,sd), bse.mu1.i=apply(bt1$mu1.i,1,sd), bse.dmu1.i=apply(bt1$mu1.2-bt1$mu1.i,1,sd) ) #+END_SRC #+RESULTS: We then look at the test for overall dependence in the different time-points. We here have no suggestion of dependence. #+BEGIN_SRC R :results output :exports both :session *R* :cache no tt <- output$dmugi/output$bse.dmugi cbind(times,2*(1-pnorm(abs(tt)))) #+END_SRC #+RESULTS: #+begin_example times [1,] 500 0.8652172 [2,] 1000 0.9250943 [3,] 1500 0.1774924 [4,] 2000 0.2034490 [5,] 2500 0.1802523 [6,] 3000 0.2713296 [7,] 3500 0.4340546 [8,] 4000 0.6915646 [9,] 4500 0.8700063 [10,] 5000 0.7841112 #+end_example We can also take out the specific components for whether $N_1$ is predictive for $N_2$ and vice versa. We here have no suggestion of dependence. #+BEGIN_SRC R :results output :exports both :session *R* :cache no t21 <- output$dmu1.i/output$bse.dmu1.i t12 <- output$dmu2.i/output$bse.dmu2.i cbind(times,2*(1-pnorm(abs(t21))),2*(1-pnorm(abs(t12)))) #+END_SRC #+RESULTS: #+begin_example times [1,] 500 0.5394804 0.3045120 [2,] 1000 0.8365802 0.7652914 [3,] 1500 0.5888113 0.2033822 [4,] 2000 0.7192628 0.1715893 [5,] 2500 0.3472740 0.3594882 [6,] 3000 0.3640448 0.5241137 [7,] 3500 0.3862490 0.8133454 [8,] 4000 0.5228586 0.9858764 [9,] 4500 0.7008942 0.9175257 [10,] 5000 0.7704913 0.5327502 #+end_example We finally plot the boostrap samples #+NAME: rec6 #+BEGIN_SRC R :exports both :results output graphics :file rec6.jpg :ravel fig=TRUE,include=FALSE par(mfrow=c(1,2)) matplot(bt1$time,bt1$EN1N2,type="l",lwd=0.3) matplot(bt1$time,bt1$EIN1N2,type="l",lwd=0.3) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Recurrent events label:fig:rec6 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec6 [[file:rec6.jpg]] #+LATEX: \captionof{figure}{Bootstrap samples} label:fig:rec6 #+END_marginfigure ** Looking at other simulations with dependence Using the normally distributed random effects we plot 4 different settings. We have variance $0.5$ for all random effects and change the correlation. We let the correlation between the random effect associated with $N_1$ and $N_2$ be denoted $\rho_{12}$ and the correlation between the random effects associated between $N_j$ and $D$ the terminal event be denoted as $\rho_{j3}$, and organize all correlation in a vector $\rho=(\rho_{12},\rho_{13},\rho_{23})$. - Scenario I $\rho=(0,0.0,0.0)$ Independence among all efects. #+NAME: rec7 #+BEGIN_SRC R :exports both :results output graphics :file rec7.jpg :ravel fig=TRUE,include=FALSE data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz par(mfrow=c(1,3)) var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.0), c(0.0, 1.0, 0.0), c(0.0, 0.0, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) cor(attr(rr,"z")) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") plot(coo,main ="Scenario I") #+END_SRC #+BEGIN_marginfigure # +CAPTION: Covariance: Scenario I label:fig:rec7 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec7 [[file:rec7.jpg]] #+LATEX: \captionof{figure}{Covariance: Scenario I} label:fig:rec7 #+END_marginfigure - Scenario II $\rho=(0,0.5,0.5)$ Independence among survivors but dependence on terminal event #+NAME: rec8 #+BEGIN_SRC R :exports both :results output graphics :file rec8.jpg :ravel fig=TRUE,include=FALSE var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.5), c(0.0, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") par(mfrow=c(1,3)) plot(coo,main ="Scenario II") #+END_SRC #+BEGIN_marginfigure # +CAPTION: Covariance: Scenario II label:fig:rec8 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec8 [[file:rec8.jpg]] #+LATEX: \captionof{figure}{Covariance: Scenario II} label:fig:rec8 #+END_marginfigure - Scenario III $\rho=(0.5,0.5,0.5)$ Positive dependence among survivors and dependence on terminal event #+NAME: rec9 #+BEGIN_SRC R :exports both :results output graphics :file rec9.jpg :ravel fig=TRUE,include=FALSE var.z <- c(0.5,0.5,0.5) # positive dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, 0.5, 0.5), c(0.5, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") par(mfrow=c(1,3)) plot(coo,main="Scenario III") #+END_SRC #+BEGIN_marginfigure # +CAPTION: Covariance: Scenario III label:fig:rec9 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec9 [[file:rec9.jpg]] #+LATEX: \captionof{figure}{Covariance: Scenario III} label:fig:rec9 #+END_marginfigure - Scenario IV $\rho=(-0.4,0.5,0.5)$ Negative dependence among survivors and positive dependence on terminal event #+NAME: rec10 #+BEGIN_SRC R :exports both :results output graphics :file rec10.jpg :ravel fig=TRUE,include=FALSE var.z <- c(0.5,0.5,0.5) # negative dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, -0.4, 0.5), c(-0.4, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") par(mfrow=c(1,3)) plot(coo,main="Scenario IV") #+END_SRC #+BEGIN_marginfigure # +CAPTION: Covariance: Scenario IV label:fig:rec10 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: rec10 [[file:rec10.jpg]] #+LATEX: \captionof{figure}{Covariance: Scenario IV} label:fig:rec10 #+END_marginfigure mets/vignettes/binomial-family.org0000644000176200001440000004677013623061405017032 0ustar liggesusers #+TITLE: Analysis of multivariate binomial data: family analysis #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Analysis of multivariate binomial data: family analysis}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. - Random-effects models logistic regression covered elsewhere (glmer in lme4). in the mets package you can fit the - Pairwise odds ratio model - Bivariate Probit model - With random effects - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. - Additive gamma random effects model - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. * Simulated family data We start by simulating family data with and additive gamma structure on ACE form. Here 40000 families consisting of two parents and two children. The response is ybin and there is one covariate x. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes library(mets) set.seed(100) data <- simbinClaytonOakes.family.ace(40000,2,1,beta=NULL,alpha=NULL) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) head(data) #+END_SRC #+RESULTS[27e4ff59d6c57b64dfea494da55eefcc71265da6]: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace ybin x type cluster number child 1 1 0 mother 1 1 0 2 1 1 father 1 2 0 3 1 1 child 1 3 1 4 1 1 child 1 4 0 5 0 0 mother 2 1 0 6 1 1 father 2 2 0 #+end_example We fit the marginal models, and here find a covariate effect at 0.3 for x. The marginals can be specified excatly as one wants. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes aa <- margbin <- glm(ybin~x,data=data,family=binomial()) summary(aa) #+END_SRC #+RESULTS[590c57384c65b5b484a3d1c9cf1242b039c5bff4]: #+begin_example Call: glm(formula = ybin ~ x, family = binomial(), data = data) Deviance Residuals: Min 1Q Median 3Q Max -1.5283 -1.3910 0.8632 0.9779 0.9779 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.489258 0.007291 67.1 <2e-16 *** x 0.306070 0.010553 29.0 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 206272 on 159999 degrees of freedom Residual deviance: 205428 on 159998 degrees of freedom AIC: 205432 Number of Fisher Scoring iterations: 4 #+end_example * Additive gamma model For the additive gamma of this type we set-up the random effects included in such a family to make the ACE valid using some special functions for this. The model is constructe with one enviromental effect shared by all in the family and 8 genetic random effects with size (1/4) genetic variance. Looking at the first family we see that the mother and father both share half the genes with the children and that the two children also share half their genes with this specification. Below we also show an alternative specification of this model using all pairs. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # make ace random effects design out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) #+END_SRC #+RESULTS[eda2ae38cebdf87ea316bd53b74f9a35b064608c]: #+begin_example [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 #+end_example We can now fit the model calling the two-stage function #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # fitting ace model for family structure ts <- binomial.twostage(margbin,data=data,clusters=data$cluster, theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) # true variance parameters c(2,1) # total variance 3 #+END_SRC #+RESULTS[61bb5855b777de8534d2c14e627e9fa56b2a4828]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.2425610 0.03747680 dependence2 0.1255742 0.01607478 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.659 0.0611 0.539 0.779 4.25e-27 dependence2 0.341 0.0611 0.221 0.461 2.39e-08 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.368 0.0252 0.319 0.418 3.31e-48 attr(,"class") [1] "summary.mets.twostage" [1] 0.2222222 0.1111111 [1] 0.3333333 #+end_example ** Pairwise fitting We now specify the same model via extracting all pairs. The random effecs structure is simpler when just looking at pairs. A special function writes up all combinations of pairs. There are 6 pairs within each family, and we keep track of who belongs to the different families. We first simply give the pairs and we then should get the same result as before. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=20) pairs <- mm$pairs dim(pairs) head(pairs,12) #+END_SRC #+RESULTS[d36e9dab79ac94bc13d0fad305a098ba343ea904]: #+begin_example [1] 1 2 1 3 1 4 2 3 2 4 3 4 5 6 5 7 5 8 6 7 [1] 240000 2 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 1 4 [4,] 2 3 [5,] 2 4 [6,] 3 4 [7,] 5 6 [8,] 5 7 [9,] 5 8 [10,] 6 7 [11,] 6 8 [12,] 7 8 #+end_example Now with the pairs we fit the model #+BEGIN_SRC R :results output :exports both :session *R* :cache yes tsp <- binomial.twostage(margbin,data=data, clusters=data$cluster, theta=c(2,1),detail=0, random.design=out$des.rv,theta.des=out$pardes,pairs=pairs) summary(tsp) #+END_SRC #+RESULTS[38e726dc0ad121df87192fbd8f65f499ae2c367a]: : Dependence parameter for Clayton-Oakes model : Variance of Gamma distributed random effects : Error in theta.des %*% theta : non-conformable arguments Here a random sample of pairs are given instead and we get other estimates. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes set.seed(100) ssid <- sort(sample(1:nrow(pairs),nrow(pairs)/2)) tsd <- binomial.twostage(aa,data=data,clusters=data$cluster, theta=c(2,1),step=1.0, random.design=out$des.rv,iid=1,Nit=10, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) #+END_SRC #+RESULTS[ac77be6001e9390c518f184e1c3e980f09e0d98f]: : Dependence parameter for Clayton-Oakes model : Variance of Gamma distributed random effects : Error in theta.des %*% theta : non-conformable arguments To specify such a model when only the pairs are availble we show how to specify the model. We here use the same marginal "aa" to make the results comparable. The marginal can also be fitted based on available data. We start by selecting the data related to the pairs, and sets up new id's and to start we specify the model using the full design with 9 random effects. Below we show how one can use with only the random effects needed for each pair, which is typically simpler. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes head(pairs[ssid,]) ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) #+END_SRC #+RESULTS[26b3d1289180f1990078bf8d031288608d7fe438]: #+begin_example [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 [5,] 1 1 1 1 0 0 0 0 1 [6,] 0 0 0 0 1 1 1 1 1 #+end_example Now fitting the model with the data set up #+BEGIN_SRC R :results output :exports both :session *R* :cache yes tsdid <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=outid$des.rv,theta.des=outid$pardes,pairs=pair.new) summary(tsdid) #+END_SRC #+RESULTS[7a9e897d1493321500a094c04471dc9bfd3fcbce]: : Dependence parameter for Clayton-Oakes model : Variance of Gamma distributed random effects : Error in theta.des %*% theta : non-conformable arguments We now specify the design specifically using the pairs. The random.design and design on the parameters are now given for each pair, as a 3 dimensional matrix. with a direct specification of random.design and the design on the parameters theta.design. In addition we need also to give the number of random effects for each pair. These basic things are constructed by certain functions for the ACE design. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new,7) head(pair.types,7) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } #+END_SRC #+RESULTS[906e24ad3e6fa43248975dfcf2d2a93237d25f83]: #+begin_example [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [7,] 5 8 [,1] [,2] [1,] "mother" "father" [2,] "mother" "child" [3,] "father" "child" [4,] "child" "child" [5,] "mother" "father" [6,] "mother" "child" [7,] "mother" "child" #+end_example For pair 1 that is a mother/farther pair, we see that they share 1 environmental random effect of size 1. There are also two genetic effects that are unshared between the two. So a total of 3 random effects are needed here. The theta.des relates the 3 random effects to possible relationships in the parameters. Here the genetic effects are full and so is the environmental effect. In contrast we also consider a mother/child pair that share half the genes, now with random effects with (1/2) gene variance. We there need 4 random effects, 2 non-shared half-gene, 1 shared half-gene, and one shared full environmental effect. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # 3 rvs here random.des[,,1] theta.des[,,1] # 4 rvs here random.des[,,2] theta.des[,,2] head(rvs) #+END_SRC #+RESULTS[05d72dd3c5c9565fa8590ffc8fc85a71abee3772]: #+begin_example [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [1] 3 4 4 4 3 4 #+end_example Now fitting the model, and we see that it is a lot quicker due to the fewer random effects needed for pairs. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes tsdid2 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) #+END_SRC #+RESULTS[dd95dd23d99675ae36e3239b4aeec50fa989eeec]: : Dependence parameter for Clayton-Oakes model : Variance of Gamma distributed random effects : Error in theta.des %*% theta : non-conformable arguments The same model can be specifed even simpler via the kinship coefficient. For this speicification there are 4 random effects for each pair, but some have variance 0. The mother-father pair, here shares a random effect with variance 0, and have two non-shared genetic effects with full variance, in addition to a fully shared environmental effect. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) out$random.des[,,1] out$theta.des[,,1] #+END_SRC #+RESULTS[11c9949740bb3fe5d415b91c9f4d99b0565bd7d9]: #+begin_example [1] 0.0 0.5 0.5 0.5 0.0 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0 0 [2,] 1 0 [3,] 1 0 [4,] 0 1 #+end_example Now, fitting the model we get the results from before. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes tsdid3 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/9,random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) #+END_SRC #+RESULTS[6f93e6815d5d4e5b174712b4163c9d0d59ba977a]: : Dependence parameter for Clayton-Oakes model : Variance of Gamma distributed random effects : Error in theta.des %*% theta : non-conformable arguments * Pairwise odds ratio model To fit the pairwise odds-ratio model in the case of a pair-specification there are two options for fitting the model. 1. One option is to set up some artificial data similar to twin data with - a pair-cluster-id (clusters) - with a cluster-id to get GEE type standard errors (se.cluster) - We can also use the specify the design via the theta.des that is also a matrix of dimension pairs x design with the design for POR model. Starting by the second option. We need to start by specify the design of the odds-ratio of each pair. We set up the data and find all combinations within the pairs. Subsequently, we remove all the empty groups, by grouping together the factor levels 4:9, and then we construct the design. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes tdp <-cbind( dataid[pair.new[,1],],dataid[pair.new[,2],]) names(tdp) <- c(paste(names(dataid),"1",sep=""), paste(names(dataid),"2",sep="")) tdp <-transform(tdp,tt=interaction(type1,type2)) dlevel(tdp) drelevel(tdp,newlevels=list(mother.father=4:9)) <- obs.types~tt dtable(tdp,~tt+obs.types) tdp <- model.matrix(~-1+factor(obs.types),tdp) #+END_SRC #+RESULTS[9a469da2b726c7c7e4093e1f3e61d751fdd46384]: #+begin_example type1 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- type2 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- tt #levels=:9 [1] "child.child" "father.child" "mother.child" "child.father" [5] "father.father" "mother.father" "child.mother" "father.mother" [9] "mother.mother" ----------------------------------------- obs.types mother.father child.child father.child mother.child tt child.child 0 19991 0 0 father.child 0 0 39837 0 mother.child 0 0 0 40212 child.father 0 0 0 0 father.father 0 0 0 0 mother.father 19960 0 0 0 child.mother 0 0 0 0 father.mother 0 0 0 0 mother.mother 0 0 0 0 #+end_example We then can fit the pairwise model using the pairs and the pair-design for descrbing the OR. The results are consistent with the the ACE model as the mother-father have a lower dependence as is due only the environmental effects. All other combinations should have the same dependence as also seem to be the case. To fit the OR model it is generally recommended to use the var.link to use the parmetrization with log-odd-ratio regression. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes porpair <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta.des=tdp,pairs=pair.new,model="or",var.link=1) summary(porpair) #+END_SRC #+RESULTS[c4026bc9a6236f8e96b140585e44876e3bcce6a5]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(obs.types)mother.father 0.1269881 0.03132228 factor(obs.types)child.child 0.3819107 0.03108233 factor(obs.types)father.child 0.3046284 0.02239909 factor(obs.types)mother.child 0.3293741 0.02233648 $or Estimate Std.Err 2.5% 97.5% P-value factor(obs.types)moth.... 1.14 0.0356 1.07 1.21 1.16e-223 factor(obs.types)chil.... 1.47 0.0455 1.38 1.55 4.26e-227 factor(obs.types)fath.... 1.36 0.0304 1.30 1.42 0.00e+00 factor(obs.types)moth.....1 1.39 0.0310 1.33 1.45 0.00e+00 $type [1] "or" attr(,"class") [1] "summary.mets.twostage" #+end_example * COMMENT mets/vignettes/rec5.jpg0000644000176200001440000006125313623061405014601 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( yg%hqesvͨ[4BQyuTpq]W"Ҵh|7k:u$6i?wb 3#mOS+. EH#T~_̭W9@Y>8o$Z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IӼ#I}wjܰ:1/<ַ;R胭J8c>V>+R ereR%X@  "1?[Z7`} t^f}>fѻ Kk0??[ZDŽ`M.uv"cn. uRȐQ1SXhm+HQ8ٝˍxE~?Z/xGT._gT*H7n\nr1ؠOP q [wk\c[?߯xCy{k~?Lov nkfJdγv LS[ӴQ7-~>?Vh柣Y-YUY؅љsp=M_VFF\H 2%[ 25v ( ( iڥW1WܭV 2ATP)oHd5\bY57cj!gk<㵥csIcŮ# J`a`pH] Cy{jC}si [8[wm7 3+Z+hmC2 #uFAsτC}>]7o!nxNnUCy{k~?Lovj>d%λ@s/+;gƃX+,DorW$rw}:P_~?Z/[{u,һġ$`8iZhsLenz־ /JEz^poΜܝ߾{<}ni1b7B73;bp嘞j(ddܥw!sm]2ArtvIU\A0ˌk9!g]5,RS(ҋqsCEQEk6m4 Nx#"_sJ͟[߹/?{tPfH4HTHAƅ"ZtQ@Q@Q@Q@,K&#d~c+I $b袀2t(/oq " $E~CR99o}:eACnۼSWMEAcgY[!b1ڠ=PL<؞=̛8#=@xL\:]ef*!Pc 3$s/YvMy{$K~Tǻ 1g5@Q@gDZͣ[MVQEQEQEVfH4HTHAƅZtPYwϸ"!ɂ)\JԢ9d-?b -6#veNwmvzblk+pD6,Q9;T2~ (!6HKx9~`Sdq$IqviDV@l0`(@⺊( ¶vsӰ{Geui008h (2uK?o . $`{>q^>ѳnQys]5GL##,O$ $b*jEQEQEQEQEQEQEVv -v*] fU~$r29(kO-nIUHXɁ| `NL^F_C0!o'nbh(((((((((( _W:Z$p>LKvߎ+9-RP?0J7ss;z( ëmnMĕˍUN[vҬI\mQ[Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@`UOm2KT- ErqAG7M&bG2\6:={juueӟfY$2e|F x"6+w9z(((((((((((((((((((((((((((((((((((((((((mets/vignettes/quantitative-twin.org0000644000176200001440000003134013623061405017441 0ustar liggesusers#+TITLE: Twin analysis #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+LATEX_HEADER: \usepackage{units} #+OPTIONS: toc:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Twin analysis of quantitative outcomes}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Mets package This document provides a brief tutorial to analyzing twin data using the *=mets=* package: #+BEGIN_SRC R :exports code :ravel echo=FALSE library("mets") options(warn=-1) #+END_SRC #+RESULTS: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.5 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined #+end_example The development version may be installed from /github/, i.e., with the =devtools= package: #+BEGIN_SRC R :eval never :exports code :ravel eval=FALSE devtools::install_github("kkholst/lava") devtools::install_github("kkholst/mets") #+END_SRC * Twin analysis, continuous traits In the following we examine the heritability of Body Mass Index\n{}cite:korkeila_bmi_1991 cite:hjelmborg_bmi_2008, based on data on self-reported BMI-values from a random sample of 11,411 same-sex twins. First, we will load data #+BEGIN_SRC R data("twinbmi") head(twinbmi) #+END_SRC #+RESULTS: : tvparnr bmi age gender zyg id num : 1 1 26.33289 57.51212 male DZ 1 1 : 2 1 25.46939 57.51212 male DZ 1 2 : 3 2 28.65014 56.62696 male MZ 2 1 : 5 3 28.40909 57.73097 male DZ 3 1 : 7 4 27.25089 53.68683 male DZ 4 1 : 8 4 28.07504 53.68683 male DZ 4 2 The data is on /long/ format with one subject per row. #+BEGIN_mnote + *=tvparnr=* :: twin id + *=bmi=* :: Body Mass Index (\(\unitfrac{kg}{m^2}\)) + *=age=* :: Age (years) + *=gender=* :: Gender factor (male,female) + *=zyg=* :: zygosity (MZ,DZ) #+END_mnote we transpose the data allowing us to do pairwise analyses #+BEGIN_SRC R twinwide <- fast.reshape(twinbmi, id="tvparnr",varying=c("bmi")) head(twinwide) #+END_SRC #+RESULTS: : tvparnr bmi1 age gender zyg id num bmi2 : 1 1 26.33289 57.51212 male DZ 1 1 25.46939 : 3 2 28.65014 56.62696 male MZ 2 1 NA : 5 3 28.40909 57.73097 male DZ 3 1 NA : 7 4 27.25089 53.68683 male DZ 4 1 28.07504 : 9 5 27.77778 52.55838 male DZ 5 1 NA : 11 6 28.04282 52.52231 male DZ 6 1 22.30936 Next we plot the association within each zygosity group #+BEGIN_SRC R :exports code library("cowplot") scatterdens <- function(x) { sp <- ggplot(x, aes_string(colnames(x)[1], colnames(x)[2])) + theme_minimal() + geom_point(alpha=0.3) + geom_density_2d() xdens <- ggplot(x, aes_string(colnames(x)[1],fill=1)) + theme_minimal() + geom_density(alpha=.5)+ theme(axis.text.x = element_blank(), legend.position = "none") + labs(x=NULL) ydens <- ggplot(x, aes_string(colnames(x)[2],fill=1)) + theme_minimal() + geom_density(alpha=.5) + theme(axis.text.y = element_blank(), axis.text.x = element_text(angle=90, vjust=0), legend.position = "none") + labs(x=NULL) + coord_flip() g <- plot_grid(xdens,NULL,sp,ydens, ncol=2,nrow=2, rel_widths=c(4,1.4),rel_heights=c(1.4,4)) return(g) } #+END_SRC #+RESULTS: : Loading required package: ggplot2 : Find out what's changed in ggplot2 at : http://github.com/tidyverse/ggplot2/releases. : : Attaching package: ‘cowplot’ : : The following object is masked from ‘package:ggplot2’: : : ggsave We here show the log-transformed data which is slightly more symmetric and more appropiate for the twin analysis (see Figure ref:fig:scatter1 and ref:fig:scatter2) #+NAME: scatter1 #+BEGIN_SRC R :exports both :results output graphics :file scatter1.jpg :ravel fig=TRUE,include=FALSE mz <- log(subset(twinwide, zyg=="MZ")[,c("bmi1","bmi2")]) scatterdens(mz) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Scatter plot of logarithmic BMI measurements in MZ twins label:fig:scatter1 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: scatter1 [[file:scatter1.jpg]] #+LATEX: \captionof{figure}{Scatter plot of logarithmic BMI measurements in MZ twins.} label:fig:scatter1 #+END_marginfigure #+NAME: scatter2 #+BEGIN_SRC R :exports both :results output graphics :file scatter2.jpg :ravel fig=TRUE,include=FALSE dz <- log(subset(twinwide, zyg=="DZ")[,c("bmi1","bmi2")]) scatterdens(dz) #+END_SRC #+BEGIN_marginfigure #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: scatter2 [[file:scatter2.jpg]] #+LATEX: \captionof{figure}{Scatter plot of logarithmic BMI measurements in DZ twins.} label:fig:scatter2 #+END_marginfigure The plots and raw association measures shows considerable stronger dependence in the MZ twins, thus indicating genetic influence of the trait #+BEGIN_SRC R cor.test(mz[,1],mz[,2], method="spearman") #+END_SRC #+RESULTS: : : Spearman's rank correlation rho : : data: mz[, 1] and mz[, 2] : S = 165460000, p-value < 2.2e-16 : alternative hypothesis: true rho is not equal to 0 : sample estimates: : rho : 0.6956209 #+BEGIN_SRC R cor.test(dz[,1],dz[,2], method="spearman") #+END_SRC #+RESULTS: : : Spearman's rank correlation rho : : data: dz[, 1] and dz[, 2] : S = 2162500000, p-value < 2.2e-16 : alternative hypothesis: true rho is not equal to 0 : sample estimates: : rho : 0.4012686 Ńext we examine the marginal distribution (GEE model with working independence) #+BEGIN_SRC R l0 <- lm(bmi ~ gender + I(age-40), data=twinbmi) estimate(l0, id=twinbmi$tvparnr) #+END_SRC #+RESULTS: : Estimate Std.Err 2.5% 97.5% P-value : (Intercept) 23.3687 0.054534 23.2618 23.4756 0.000e+00 : gendermale 1.4077 0.073216 1.2642 1.5512 2.230e-82 : I(age - 40) 0.1177 0.004787 0.1083 0.1271 1.499e-133 #+BEGIN_SRC R :ravel echo=FALSE library("splines") l1 <- lm(bmi ~ gender*ns(age,3), data=twinbmi) marg1 <- estimate(l1, id=twinbmi$tvparnr) #+END_SRC #+RESULTS: #+NAME: marg1 #+BEGIN_SRC R :exports both :results output graphics :file marg1.jpg :ravel include=FALSE,fig=TRUE dm <- Expand(twinbmi, bmi=0, gender=c("male"), age=seq(33,61,length.out=50)) df <- Expand(twinbmi, bmi=0, gender=c("female"), age=seq(33,61,length.out=50)) plot(marg1, function(p) model.matrix(l1,data=dm)%*%p, data=dm["age"], ylab="BMI", xlab="Age", ylim=c(22,26.5)) plot(marg1, function(p) model.matrix(l1,data=df)%*%p, data=df["age"], col="red", add=TRUE) legend("bottomright", c("Male","Female"), col=c("black","red"), lty=1, bty="n") #+END_SRC #+BEGIN_marginfigure #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: marg1 [[file:marg1.jpg]] #+LATEX: \captionof{figure}{...} label:fig:marg1 #+END_marginfigure ** Polygenic model Decompose outcome into \begin{align*} Y_i = A_i + D_i + C + E_i, \quad i=1,2 \end{align*} - \(A\) :: Additive genetic effects of alleles - \(D\) :: Dominante genetic effects of alleles - \(C\) :: Shared environmental effects - \(E\) :: Unique environmental genetic effects Dissimilarity of MZ twins arises from unshared environmental effects only! \(\cor(E_1,E_2)=0\) and \begin{align*} \cor(A_1^{MZ},A_2^{MZ}) = 1, \quad \cor(D_1^{MZ},D_2^{MZ}) = 1, \end{align*} \begin{align*} \cor(A_1^{DZ},A_2^{DZ}) = 0.5, \quad \cor(D_1^{DZ},D_2^{DZ}) = 0.25, \end{align*} \begin{align*} Y_i = A_i + C_i + D_i + E_i \end{align*} \begin{align*} A_i \sim\mathcal{N}(0,\sigma_A^2), C_i \sim\mathcal{N}(0,\sigma_C^2), D_i \sim\mathcal{N}(0,\sigma_D^2), E_i \sim\mathcal{N}(0,\sigma_E^2) \end{align*} \begin{gather*} \cov(Y_{1},Y_{2}) = \\ \begin{pmatrix} \sigma_A^2 & 2\Phi\sigma_A^2 \\ 2\Phi\sigma_A^2 & \sigma_A^2 \end{pmatrix} + \begin{pmatrix} \sigma_C^2 & \sigma_C^2 \\ \sigma_C^2 & \sigma_C^2 \end{pmatrix} + \begin{pmatrix} \sigma_D^2 & \Delta_{7}\sigma_D^2 \\ \Delta_{7}\sigma_D^2 & \sigma_D^2 \end{pmatrix} + \begin{pmatrix} \sigma_E^2 & 0 \\ 0 & \sigma_E^2 \end{pmatrix} \end{gather*} #+BEGIN_SRC R :exports code dd <- na.omit(twinbmi) l0 <- twinlm(bmi ~ age+gender, data=dd, DZ="DZ", zyg="zyg", id="tvparnr", type="sat") #+END_SRC #+RESULTS: #+BEGIN_SRC R l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) #+END_SRC #+RESULTS: #+begin_example ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 #+end_example A formal test of genetic effects can be obtained by comparing the MZ and DZ correlation: #+BEGIN_SRC R estimate(l,contr(5:6,6)) #+END_SRC #+RESULTS: : Estimate Std.Err 2.5% 97.5% P-value : [1@atanh(rhoMZ)] - [3.... 0.4829 0.04176 0.4011 0.5648 6.325e-31 : : Null Hypothesis: : [1@atanh(rhoMZ)] - [3@atanh(rhoDZ)] = 0 #+BEGIN_SRC R l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) #+END_SRC #+RESULTS: #+begin_example ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 #+end_example * Twin analysis, censored outcomes * Twin analysis, binary traits * Time to event * backmatter :ignore: bibliography:mets.bib bibliographystyle:plain mets/vignettes/rec2.jpg0000644000176200001440000006063513623061405014601 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (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Entry{Marginal Cox} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Marginal modelling of clustered survival data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Marginal modelling of clustered survival data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org4291342} A basic component for our modelling is that all these models are build around marginals that on Cox form. The marginal Cox model can be fitted efficiently in the mets package. The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{s(k,i)}(t) \exp( X_{ki}^T \beta). \] where \(s(k,i)\) gives the strata for the subject. We here discuss the \begin{itemize} \item robust standard errors of \begin{itemize} \item regression parameters \item baseline \end{itemize} \item cumulative residuals score test \end{itemize} First we generate some data from the Clayton-Oakes model, with \(5\) members in each cluster and a variance parameter at \(2\) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) # to control output in simulatins for p-values below. n <- 1000 k <- 5 theta <- 2 data <- simClaytonOakes(n,k,theta,0.3,3) head(data) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.4 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined time status x cluster mintime lefttime truncated 1 0.1406317 1 0 1 0.1406317 0 0 2 0.4593768 1 0 1 0.1406317 0 0 3 1.0952678 1 0 1 0.1406317 0 0 4 0.2057554 1 1 1 0.1406317 0 0 5 0.6776620 1 0 1 0.1406317 0 0 6 1.6093755 1 0 2 0.1092390 0 0 \end{verbatim} Now fitting the and producing robust standard errors for both regression parameters and baseline. Note that \begin{align} \hat A_s(t) - A_s(t) & = \sum_k \sum_i \int_0^t 1/S_{s} dM_{ki}^s - P^s(t) \beta_k \end{align} with \(P^s(t)\) a derivative wrt to \(\beta\), and \begin{align} \hat \beta - \beta & = \sum_k ( \sum_i \int_0^\tau (Z_{ik} - E_{s}) dM_{ik}^s ) \end{align} with \begin{align} M_{ki}(t) & = N_{ki}(t) - \int_0^t Y_{ki}(s) \exp( Z_{ki} \beta) d \Lambda_{s(ki)}(t) \end{align} the basic 0-mean processes, that are martingales in the iid setting. The variance of the baseline of strata s is \begin{align} \sum_{k} ( \sum_i \int_0^t 1/S_{0s(ki)} d\hat M_{ki}^s )^2 \end{align} that can be computed using the particular structure \begin{align} d \hat M_{ik}(t) & = dN_{ik}(t) - 1/S_{0s(i,k)} \exp(Z_{ik} \beta) dN_{s.}(t) \end{align} This robust variance of the baseline and the iid decomposition for \(\beta\) is computed in mets as: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- phreg(Surv(time,status)~x+cluster(cluster),data=data) summary(out) # robust standard errors attached to output rob <- robust.phreg(out) # making iid decomposition of regression parameters betaiid <- iid(out) head(betaiid) # robust standard errors crossprod(betaiid)^.5 # same as \end{lstlisting} \begin{verbatim} n events 5000 4854 1000 clusters Estimate S.E. dU^-1/2 P-value x 0.287859 0.028177 0.028897 0 [,1] 1 -3.461601e-04 2 -1.449189e-03 3 -3.898156e-05 4 4.215605e-04 5 3.425390e-04 6 -7.706668e-05 [,1] [1,] 0.02817714 \end{verbatim} Looking at the plot with robust standard errors \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robcox1.jpg} \end{center} \captionof{figure}{Baseline with robust standard errors.} \label{fig:robcox1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robcox1,caption= ,captionpos=b} \begin{lstlisting} bplot(rob,se=TRUE,robust=TRUE) \end{lstlisting} One can also make survival prediction with robust standard errors using the phreg. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pp <- predict(out,data[1:20,],se=TRUE,robust=TRUE) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robcox2,caption= ,captionpos=b} \begin{lstlisting} plot(pp,se=TRUE,whichx=1:10) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robcox2.jpg} \end{center} \captionof{figure}{Survival predictions with robust standard errors for Cox model} \label{fig:robcox2} \end{marginfigure} Finally, just to check that we can recover the model we also estimate the dependence parameter \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tt <- twostageMLE(out,data=data) summary(tt) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.5316753 0.03497789 15.20032 0 0.2100093 0.0109146 $type NULL attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Goodness of fit} \label{sec:orgb08000a} The observed score process is given by \begin{align} U(t,\hat \beta) & = \sum_k \sum_i \int_0^t (Z_{ki} - \hat E_s ) d \hat M_{ki}^s \end{align} where \(s\) is strata, this has as iid decomposition as \begin{align} \hat U(t) = \sum_k \sum_i \int_0^t (Z_{ki} - E_s) dM_{ki}^s - \sum_k I_t \beta_k \end{align} where \(\beta_k\) is the iid decomposition of the score process for the true \(\beta\) \begin{align} \beta_k & = \sum_i \int_0^t (Z_{ki} - E_s ) d M_{ki}^s \end{align} and \(I_t\) is the derivative of the total score with respect to \(\beta\). This observed score can be resampled given it is on iid form in terms of clusters. Now using the cumulative score process for checking proportional hazards \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} gout <- gof(out) gout \end{lstlisting} \begin{verbatim} Cumulative score process test for Proportionality: Sup|U(t)| pval x 30.24353 0.401 \end{verbatim} The p-value reflects wheter the observed score process is consistent with the model. \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robgofcox1.jpg} \end{center} \captionof{figure}{Goodness of fit for clustered Cox model.} \label{fig:robcgofox1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robgofcox1,caption= ,captionpos=b} \begin{lstlisting} plot(gout) \end{lstlisting} \subsection*{Cluster stratified Cox models} \label{sec:orgf70f1c5} For clustered data it is possible to estimate the regression coefficient within clusters by using Cox's partial likelihood stratified on clusters. Note, here that the data is generated with a different subject specific structure, so we will not recover the \(\beta\) at 0.3 and the model will not be a proportional Cox model, we we would also expect to reject "proportionality" with the gof-test. The model can be thought of as \[ \lambda_k(t) \exp( X_{ki}^T \beta) \] where \(\lambda_k(t)\) is some cluster specific baseline. The regression coefficient \(\beta\) can be estimated by using the partial likelihood for clusters. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- phreg(Surv(time,status)~x+strata(cluster),data=data) summary(out) \end{lstlisting} \begin{verbatim} n events 5000 4854 Estimate S.E. dU^-1/2 P-value x 0.406307 0.032925 0.039226 0 \end{verbatim} The cumulative score processes can still be used to validate the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} gg <- gof (out) summary(gg) \end{lstlisting} \begin{verbatim} Cumulative score process test for Proportionality: Sup|U(t)| pval x 27.55616 0.195 \end{verbatim} \end{document}mets/vignettes/rec4Bi.jpg0000644000176200001440000007114513623061405015054 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (9|_m[t"KPw9m+SWӣ*9e)"tub;A[o u-t.m j.gr;[ s@lD6suFcD.XK,sݏ^ER41/;Fqα[[+O[Em-i$ؘi'g: W+v6N_Ygks"qm5Բ'͜]'Yx-]CFMgOWRUGb3@m<]gyh ^:(yc]TThq3H.n#PS.0V*s+܎i xnPQi'lmmx,TfKegQܽ]YjG wnF$S2@tVJ"Ii bPcӎ-qvF&[! A}akO  (~.5.G>[bASc_˪߻_3@VG5 5xsϙX.HW'%PrG&6 $OcL_rx[J6EtpU!\6`p?p@-)&Ɛ0rx'#)V(3ğ+j7j{EUCğ+j7j{ET%Q@Q@Q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Х +e!FA$ 椼Ώs`(INVU!]AխEe*]`jjM`\!pCp޵( ( ( (2-c1anˁU;Lm>gHb3O$պ(((((((((((((((((((((IDLIڊ c-7Op& <7Fm @0Ñۨ5[ YGmX۸]Ǿ+AQԭ}"QfIjg]@pF21׊+cƣe"QFivv"Hf$w_XIiqʑ5 rXDweIAPkEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPmets/vignettes/quantitative-twin.ltx0000644000176200001440000004342613623061405017471 0ustar liggesusers% Created 2018-11-19 Mon 19:21 %\VignetteIndexEntry{Twin analysis of quantitative outcomes} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \usepackage{units} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Twin analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Twin analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Mets package} \label{sec:orgeaaf733} This document provides a brief tutorial to analyzing twin data using the \textbf{\texttt{mets}} package: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("mets") options(warn=-1) \end{lstlisting} The development version may be installed from \emph{github}, i.e., with the \texttt{devtools} package: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} devtools::install_github("kkholst/lava") devtools::install_github("kkholst/mets") \end{lstlisting} \section*{Twin analysis, continuous traits} \label{sec:org0778a55} In the following we examine the heritability of Body Mass Index\n{}\cite{korkeila_bmi_1991} \cite{hjelmborg_bmi_2008}, based on data on self-reported BMI-values from a random sample of 11,411 same-sex twins. First, we will load data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data("twinbmi") head(twinbmi) \end{lstlisting} \begin{verbatim} tvparnr bmi age gender zyg id num 1 1 26.33289 57.51212 male DZ 1 1 2 1 25.46939 57.51212 male DZ 1 2 3 2 28.65014 56.62696 male MZ 2 1 5 3 28.40909 57.73097 male DZ 3 1 7 4 27.25089 53.68683 male DZ 4 1 8 4 28.07504 53.68683 male DZ 4 2 \end{verbatim} The data is on \emph{long} format with one subject per row. \begin{mnote} \begin{description} \item[{\textbf{\texttt{tvparnr}}}] twin id \item[{\textbf{\texttt{bmi}}}] Body Mass Index (\(\unitfrac{kg}{m^2}\)) \item[{\textbf{\texttt{age}}}] Age (years) \item[{\textbf{\texttt{gender}}}] Gender factor (male,female) \item[{\textbf{\texttt{zyg}}}] zygosity (MZ,DZ) \end{description} \end{mnote} we transpose the data allowing us to do pairwise analyses \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinwide <- fast.reshape(twinbmi, id="tvparnr",varying=c("bmi")) head(twinwide) \end{lstlisting} \begin{verbatim} tvparnr bmi1 age gender zyg id num bmi2 1 1 26.33289 57.51212 male DZ 1 1 25.46939 3 2 28.65014 56.62696 male MZ 2 1 NA 5 3 28.40909 57.73097 male DZ 3 1 NA 7 4 27.25089 53.68683 male DZ 4 1 28.07504 9 5 27.77778 52.55838 male DZ 5 1 NA 11 6 28.04282 52.52231 male DZ 6 1 22.30936 \end{verbatim} Next we plot the association within each zygosity group \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("cowplot") scatterdens <- function(x) { sp <- ggplot(x, aes_string(colnames(x)[1], colnames(x)[2])) + theme_minimal() + geom_point(alpha=0.3) + geom_density_2d() xdens <- ggplot(x, aes_string(colnames(x)[1],fill=1)) + theme_minimal() + geom_density(alpha=.5)+ theme(axis.text.x = element_blank(), legend.position = "none") + labs(x=NULL) ydens <- ggplot(x, aes_string(colnames(x)[2],fill=1)) + theme_minimal() + geom_density(alpha=.5) + theme(axis.text.y = element_blank(), axis.text.x = element_text(angle=90, vjust=0), legend.position = "none") + labs(x=NULL) + coord_flip() g <- plot_grid(xdens,NULL,sp,ydens, ncol=2,nrow=2, rel_widths=c(4,1.4),rel_heights=c(1.4,4)) return(g) } \end{lstlisting} We here show the log-transformed data which is slightly more symmetric and more appropiate for the twin analysis (see Figure \ref{fig:scatter1} and \ref{fig:scatter2}) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=scatter1,caption= ,captionpos=b} \begin{lstlisting} mz <- log(subset(twinwide, zyg=="MZ")[,c("bmi1","bmi2")]) scatterdens(mz) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{scatter1.jpg} \end{center} \captionof{figure}{Scatter plot of logarithmic BMI measurements in MZ twins.} \label{fig:scatter1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=scatter2,caption= ,captionpos=b} \begin{lstlisting} dz <- log(subset(twinwide, zyg=="DZ")[,c("bmi1","bmi2")]) scatterdens(dz) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{scatter2.jpg} \end{center} \captionof{figure}{Scatter plot of logarithmic BMI measurements in DZ twins.} \label{fig:scatter2} \end{marginfigure} The plots and raw association measures shows considerable stronger dependence in the MZ twins, thus indicating genetic influence of the trait \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cor.test(mz[,1],mz[,2], method="spearman") \end{lstlisting} \begin{verbatim} Spearman's rank correlation rho data: mz[, 1] and mz[, 2] S = 165460000, p-value < 2.2e-16 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.6956209 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cor.test(dz[,1],dz[,2], method="spearman") \end{lstlisting} \begin{verbatim} Spearman's rank correlation rho data: dz[, 1] and dz[, 2] S = 2162500000, p-value < 2.2e-16 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.4012686 \end{verbatim} Ńext we examine the marginal distribution (GEE model with working independence) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l0 <- lm(bmi ~ gender + I(age-40), data=twinbmi) estimate(l0, id=twinbmi$tvparnr) \end{lstlisting} \begin{verbatim} Estimate Std.Err 2.5% 97.5% P-value (Intercept) 23.3687 0.054534 23.2618 23.4756 0.000e+00 gendermale 1.4077 0.073216 1.2642 1.5512 2.230e-82 I(age - 40) 0.1177 0.004787 0.1083 0.1271 1.499e-133 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("splines") l1 <- lm(bmi ~ gender*ns(age,3), data=twinbmi) marg1 <- estimate(l1, id=twinbmi$tvparnr) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=marg1,caption= ,captionpos=b} \begin{lstlisting} dm <- Expand(twinbmi, bmi=0, gender=c("male"), age=seq(33,61,length.out=50)) df <- Expand(twinbmi, bmi=0, gender=c("female"), age=seq(33,61,length.out=50)) plot(marg1, function(p) model.matrix(l1,data=dm)%*%p, data=dm["age"], ylab="BMI", xlab="Age", ylim=c(22,26.5)) plot(marg1, function(p) model.matrix(l1,data=df)%*%p, data=df["age"], col="red", add=TRUE) legend("bottomright", c("Male","Female"), col=c("black","red"), lty=1, bty="n") \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{marg1.jpg} \end{center} \captionof{figure}{...} \label{fig:marg1} \end{marginfigure} \subsection*{Polygenic model} \label{sec:org336bb16} Decompose outcome into \begin{align*} Y_i = A_i + D_i + C + E_i, \quad i=1,2 \end{align*} \begin{description} \item[{\(A\)}] Additive genetic effects of alleles \item[{\(D\)}] Dominante genetic effects of alleles \item[{\(C\)}] Shared environmental effects \item[{\(E\)}] Unique environmental genetic effects \end{description} Dissimilarity of MZ twins arises from unshared environmental effects only! \(\cor(E_1,E_2)=0\) and \begin{align*} \cor(A_1^{MZ},A_2^{MZ}) = 1, \quad \cor(D_1^{MZ},D_2^{MZ}) = 1, \end{align*} \begin{align*} \cor(A_1^{DZ},A_2^{DZ}) = 0.5, \quad \cor(D_1^{DZ},D_2^{DZ}) = 0.25, \end{align*} \begin{align*} Y_i = A_i + C_i + D_i + E_i \end{align*} \begin{align*} A_i \sim\mathcal{N}(0,\sigma_A^2), C_i \sim\mathcal{N}(0,\sigma_C^2), D_i \sim\mathcal{N}(0,\sigma_D^2), E_i \sim\mathcal{N}(0,\sigma_E^2) \end{align*} \begin{gather*} \cov(Y_{1},Y_{2}) = \\ \begin{pmatrix} \sigma_A^2 & 2\Phi\sigma_A^2 \\ 2\Phi\sigma_A^2 & \sigma_A^2 \end{pmatrix} + \begin{pmatrix} \sigma_C^2 & \sigma_C^2 \\ \sigma_C^2 & \sigma_C^2 \end{pmatrix} + \begin{pmatrix} \sigma_D^2 & \Delta_{7}\sigma_D^2 \\ \Delta_{7}\sigma_D^2 & \sigma_D^2 \end{pmatrix} + \begin{pmatrix} \sigma_E^2 & 0 \\ 0 & \sigma_E^2 \end{pmatrix} \end{gather*} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dd <- na.omit(twinbmi) l0 <- twinlm(bmi ~ age+gender, data=dd, DZ="DZ", zyg="zyg", id="tvparnr", type="sat") \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) \end{lstlisting} \begin{verbatim} ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 \end{verbatim} A formal test of genetic effects can be obtained by comparing the MZ and DZ correlation: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} estimate(l,contr(5:6,6)) \end{lstlisting} \begin{verbatim} Estimate Std.Err 2.5% 97.5% P-value [atanh(rhoMZ)@1] - [a.... 0.4829 0.04176 0.4011 0.5648 6.325e-31 Null Hypothesis: [atanh(rhoMZ)@1] - [atanh(rhoDZ)@3] = 0 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) \end{lstlisting} \begin{verbatim} ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 \end{verbatim} \section*{Twin analysis, censored outcomes} \label{sec:org4b5f762} \section*{Twin analysis, binary traits} \label{sec:org4c17447} \section*{Time to event} \label{sec:org843c812} \bibliography{mets} \bibliographystyle{plain} \end{document}mets/vignettes/binomial-case-control-ascertainment.org0000644000176200001440000006173013623061405022766 0ustar liggesusers#+TITLE: Analysis of multivariate binomial data: case control or ascertainment sampling #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Analysis of multivariate binomial data: case control or ascertainment sampling}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. - Random-effects models logistic regression covered elsewhere (glmer in lme4). in the mets package you can fit the - Pairwise odds ratio model - Bivariate Probit model - With random effects - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. - Additive gamma random effects model - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. ** Case-Control Sampling Sometimes, pairs are recruited after a case-proband is selected. This proband, can be either a - case: must be representative of cases or a - control: must be representative of controls First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{P(j)} \] the probailty of seeing \( (i,j) \) for the pair, given that the proband was observed as \( (j) \). We note that if the marginal is known, or possibly estimated from the full cohort. Then we can estimate dependence parameters using just the terms \( P(i,j) \) for the pairs. We can thus ignore the special sampling for models with marginal specification. If the marginal can not be obtained from other sources we need to maximize the full-pairwise-likelihood in all parameters, that is both dependence and marginal parameters. Similary, one can select a whole family based on having selected a proband, that is selected a representative member of either cases or controls. In this case we fit the models by using composited likelihoods, considering all pairs that involves the probands. This will give some lacking efficiency compared to looking at the full likelihood of the family given the proband. ** Ascertainment Sampling Similarly, in the setting of pairs we can select all pairs where there is at least one event of interest. First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{1-P(0,0)} \] the probailty of seeing \( (i,j) \) for the pair, given that it is sampled. If the marginal can estimated from a full sample we can then estimate the dependence parameter using the ascertainment likelihood. Generally, when whole families are ascertained the computation of the true truncation probability can be hard to the fact that families are hard to define in the real world. Nevertheless, if a random sample of such family is at hand. We suggest to in these families take out all pairs that satisfies the ascertainment criterion. With a family, with given size \( n \) we have binary observations \( (Y_1,...,Y_n) \). The family is sampled or a random sample of families such that \[ \sum_{i=1}^n Y_i \geq 1. \] We let the conditional distribution given sampling, be denoted as \[ P^O(\cdot) = P(\cdot | \sum_{i=1}^n Y_i \geq 1) \] Now, we note that all pairs within these family that satisfies that \( Y_i+Y_j \geq 1 \), will have distribution \begin{align*} P^O(Y_i=o_1, Y_j=o_2 | Y_i+Y_j \geq 1) & = \frac{P^O(o_1,o_2)}{P^O( Y_i+Y_j \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2, \sum_{i=1}^n Y_i \geq 1)}{ P( Y_i+Y_j \geq 1, \sum_{i=1}^n Y_i \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2) }{ P( Y_i+Y_j \geq 1)} = \frac{P(o_1,o_2)}{1 - P(0,0)} \end{align*} since we only consider the probabilities where \( o_1+o_2 \geq 1 \). Also here we could condition on covariates. So considering these pairs, or a random sample of them should yield valid inference. When standard errors are computed we need to rely on GEE type arguments. An advantage of this is that the ascertainment probability is much easier to get for the pairs. Again using the pairwise structure will lead to loss of efficiency compared to using the full likelihood of the ascertained families. In addition we note that when looking at one pair that has been ascertained then \begin{align*} P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j \geq 1) & = \sum_{k=1}^2 P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j = k ) P( Y_i + Y_j =k | Y_i + Y_j \geq 1 ). \end{align*} where \( o_1+ o_2 \geq 1 \). Note that the dependence will affect the probabilities \( P(Y_i+Y_j=2)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1)) \) and \( P(Y_i+Y_j=1)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1)) \). In particular when the marginal parameters are known the dependence parameters can be estimated using the proportion of concordant pairs compared to the non-concordant pairs with respect to the outcome. When considering the pairs with different responses we learn "only" (up to model specification) about covariate effects. For example when \( \mbox{logit}(P(Y_i=1 | \alpha_k )) = \alpha_{k} + \beta X_i \) for \( i=1,2 \) with \( \alpha_k \) a pair (cluster) specific effect and subject specific covariates $X_i$ for \( i=1,2 \), then \( P(Y_i=1,Y_j=0)/P(Y_i+Y_j=1) = \mbox{expit}((X_i - X_j) \beta) \), and with the standard definitions \( \mbox{logit}(p) = \log(p/(1-p)) \) and \( \mbox{expit}(x) = \exp(x)/(1+\exp(x)) \). * The twin-stutter data We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data #+BEGIN_SRC R :results output :exports both :session *R* :cache no library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) #+END_SRC #+RESULTS[4c41ab99466bf4a108ce410bed6469f1a5a75e08]: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6 mets version 1.2.3 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined tvparnr zyg stutter sex age nr binstut 1 1 mz no female 71 1 0 2 1 mz no female 71 2 0 3 2 dz no female 71 1 0 8 5 mz no female 71 1 0 9 5 mz no female 71 2 0 11 7 dz no male 71 1 0 #+end_example - First, we select an ascertaiment sample of the data, thus selecting a random sample of all ascertained pairs. - Secondly, we select a case-control sample of this data to illustrate the use of the methods. * Ascertaiment Sampling Selecting the ascertained pairs #+BEGIN_SRC R :results output :exports both :session *R* :cache no library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twina <- subset(twinstut,n==2 & stuttot>=1) #+END_SRC #+RESULTS[708d8d2a3d568c08b0831320a0c05425b3b4a4f9]: Selecting on the pairs where there is stuttering at taking a look at the tables of discordance and concordance for the twins. #+BEGIN_SRC R :results output :exports both :session *R* :cache no twinda <- fast.reshape(twina,id="tvparnr") twind <- fast.reshape(twinstut,id="tvparnr") dtable(twind,"binst*"~I(stuttot1>=1)) dtable(twinda,~"binst*") #+END_SRC #+RESULTS[35fcd3ee8431268e066816a5b4dc83d3466d57bd]: #+begin_example I(stuttot1 >= 1): FALSE binstut2 0 binstut1 0 6632 ------------------------------------------------------------ I(stuttot1 >= 1): TRUE binstut2 0 1 binstut1 0 0 289 1 281 111 binstut2 0 1 binstut1 0 0 289 1 281 111 #+end_example Now doing the analyses ** Biprobit model Looking at the full data for comparison. We estimate an unstructured probit model with different correlations for MZ and DZ twins. #+BEGIN_SRC R :results output :exports both :session *R* :cache no b1 <- biprobit(binstut~sex,~-1+binzyg,data=twinstut,id="tvparnr") summary(b1) #+END_SRC #+RESULTS[de1a8dfd25cb6147320d5d9861f6daf5e594585d]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.794821 0.023289 -77.066826 0.0000 sexmale 0.401430 0.030179 13.301756 0.0000 r:binzygDZ 0.132458 0.062516 2.118802 0.0341 r:binzygMZ 1.096915 0.073574 14.909085 0.0000 logLik: -4400.536 mean(score^2): 1.022e-06 n pairs 21288 7313 Contrast: Dependence [binzygDZ] Mean [(Intercept)] Estimate 2.5% 97.5% Rel.Recur.Risk 1.77662 0.92746 2.62577 OR 1.88752 1.09432 3.25566 Tetrachoric correlation 0.13169 0.00993 0.24960 Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 #+end_example Note, that the Casewise Concordance is a consistently estimated under complete ascertainment, i.e., when we consider a random sample of affected twins (at least on of the twins must have the event). ** Odd-Ratio modelling First looking at the marginal model based on the full data we find the overall level of stuttering and also that males have a much higher stuttering risk. #+BEGIN_SRC R :results output :exports both :session *R* :cache no margbin <- glm(binstut~factor(sex),data=twinstut,family=binomial()) summary(margbin) #+END_SRC #+RESULTS[5c622eb4645658450203040164fd3ef28aafcf35]: #+begin_example Call: glm(formula = binstut ~ factor(sex), family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4127 -0.4127 -0.2716 -0.2716 2.5763 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.28191 0.05000 -65.64 <2e-16 *** factor(sex)male 0.86171 0.06211 13.87 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9124.7 on 21286 degrees of freedom AIC: 9128.7 Number of Fisher Scoring iterations: 6 #+end_example First, fitting the OR model for MZ and DZ for the full data, we find that MZ have a much higher dependence than DZ twins. #+BEGIN_SRC R :results output :exports both :session *R* :cache no theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) #+END_SRC #+RESULTS[4268bb77084537539e34cdd71bc77fd15b77c50b]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5238541 0.2400861 factor(zyg)mz 3.4930902 0.1865567 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.689 0.4054 0.894 2.483 3.111e-05 factor(zyg)mz 32.887 6.1354 20.862 44.913 8.308e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example Now, using the overall marginal we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. #+BEGIN_SRC R :results output :exports both :session *R* :cache no theta.des <- model.matrix( ~-1+factor(zyg),data=twina) bina <- binomial.twostage(margbin,data=twina,var.link=1, clusters=twina$tvparnr,theta.des=theta.des, pair.ascertained=1) summary(bina) #+END_SRC #+RESULTS[<2018-02-05 11:48:56> a426c94a6fcc7a60b969a4c6d2dc827c33dab896]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.4874213 0.2472523 factor(zyg)mz 3.4753766 0.1985974 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.628 0.4026 0.8391 2.417 5.245e-05 factor(zyg)mz 32.310 6.4167 19.7335 44.886 4.771e-07 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example ** Additive gamma modelling First, again for comparision fitting the full data for the AE model. We get the size of the genetic variance in this model. #+BEGIN_SRC R :results output :exports both :session *R* :cache no out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) #+END_SRC #+RESULTS[850aeaf3f26b8ce7689814808e139a60ee679365]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9095 0.09536 0.7226 1.096 1.469e-21 attr(,"class") [1] "summary.mets.twostage" #+end_example We first here take at the look at the marginal model for the ascertained sample, and note as expected that this sample give highly biased estimated for the marginal model. #+BEGIN_SRC R :results output :exports both :session *R* :cache no outa <- twin.polygen.design(twina,id="tvparnr",zygname="zyg",zyg="dz",type="ae") marga <- glm(binstut~sex,data=twina,family=binomial()) summary(marga) #+END_SRC #+RESULTS[e12e7a711b5694f9fd66796e492527f064f099fc]: #+begin_example Call: glm(formula = binstut ~ sex, family = binomial(), data = twina) Deviance Residuals: Min 1Q Median 3Q Max -1.334 -1.298 1.028 1.028 1.061 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.27895 0.08739 3.192 0.00141 ** sexmale 0.08242 0.11237 0.733 0.46328 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1851.8 on 1361 degrees of freedom Residual deviance: 1851.2 on 1360 degrees of freedom AIC: 1855.2 Number of Fisher Scoring iterations: 4 #+end_example Now, using the overall marginal model we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. #+BEGIN_SRC R :results output :exports both :session *R* :cache no abintwin1 <- binomial.twostage(margbin,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1) summary(abintwin1) #+END_SRC #+RESULTS[30009e0cbff60c162c2b35ad4fd0fdc7dd0958de]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8920274 0.09732786 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.892 0.09733 0.7013 1.083 4.946e-20 attr(,"class") [1] "summary.mets.twostage" #+end_example In fact for this model we can also do a full-MLE fitting jointly the dependence parameters and the marginal model. This is based on the twostage option (twostage=0 is MLE). Here the starting value is given at the marginal model for the ascertained model. This gives quite similar results to the previous analyses with a genetic variance around 1. #+BEGIN_SRC R :results output :exports both :session *R* :cache no aabintwin1 <- binomial.twostage(marga,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1,twostage=0) summary(aabintwin1) coef(marga) coef(margbin) #+END_SRC #+RESULTS[391071c5ee9508d90ec0f05e51ced1e4b7748914]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.014398 0.1045593 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 1.014 0.1046 0.8095 1.219 2.967e-22 attr(,"class") [1] "summary.mets.twostage" (Intercept) sexmale 0.2789484 0.0824214 (Intercept) factor(sex)male -3.2819072 0.8617053 #+end_example * Case Control Sampling First, taking out all cases and one control for each case, we establish the pairs of these probands. This is based on keeping track of the twin related to the proband. Here using some utility functions in the mets packages. Then we write up the random design vectors and the parameter design for each pair using the kinship coefficient. When specifying the pairs in the case-control setup the second column should be the probands. #+BEGIN_SRC R :results output :exports both :session *R* :cache no library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twinstut <- subset(twinstut,n==2) twinstut <- dtransform(twinstut,nnrow=1:nrow(twinstut)) twinstut <- dby(twinstut,binstut~tvparnr,nnn=seq_along) twinstut <- dby2(twinstut,nnrow~tvparnr,pairnr=rev) cases <- which(twinstut$binstut==1) controls <- sample(which(twinstut$binstut==0),1217) rowsca <- with(twinstut,nnrow[cases]) rowsco <- with(twinstut,nnrow[controls]) rpairs <- c(rowsca,rowsco) cc.pairs <- cbind( with(twinstut,pairnr.nnrow[rpairs]),rpairs) ids <- sort(unique(c(cc.pairs))) pairsids <- c(cc.pairs) pair.new <- matrix(fast.approx(ids,pairsids),ncol=2) head(pair.new) dataid <- dsort(twinstut[ids,],"tvparnr") dataid=dtransform(dataid,kinship=0.5) dataid=dtransform(dataid,kinship=1,binzyg=="MZ") kinship <- dataid$kinship[pair.new[,2]] out <- make.pairwise.design(pair.new,kinship,type="ae") names(out) out$random.des[,,1] out$theta.des[,,1] #+END_SRC #+RESULTS[<2018-02-20 13:45:29> c4f8b836d16b386e597249418622af02fada445c]: #+begin_example [,1] [,2] [1,] 4 3 [2,] 16 15 [3,] 18 17 [4,] 32 31 [5,] 38 37 [6,] 44 43 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [1,] 1 1 0 [2,] 1 0 1 [1] 0.5 0.5 0.5 #+end_example Now doing the analyses, first with know marginals, that is marginals from the full data. For this analysis, since marginals do not contain dependence parameters we do not need to specify that this is case-control sampling. Having a correct is crucial for this to work, but this is certainly often possible in register based studies where a full cohort is also available. #+BEGIN_SRC R :results output :exports both :session *R* :cache no cc <- binomial.twostage(margbin,data=dataid,clusters=dataid$tvparnr,pairs=pair.new, random.design=out$random.design,theta.des=out$theta.des, pairs.rvs=out$ant.rvs,case.control=0,twostage=1) summary(cc) #+END_SRC #+RESULTS[<2018-02-20 13:51:39> 40511f7b24b7d6f42175d24ffd37ba9025cb10b4]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" #+end_example We now do the same analysis specifying the case-control sampling. This should result in the same dependence parameters as is also the case. #+BEGIN_SRC R :results output :exports both :session *R* :cache no cc3 <- binomial.twostage(margbin,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=1) summary(cc3) #+END_SRC #+RESULTS[<2018-02-05 11:48:56> d9aed82aa1d6bf7ad52c62a4d34cfbdd5f589c7a]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" #+end_example This model can also be fitted using a full likelhood of both dependence parameters and marginal parameters. Here there is no need to have a correctly specified marginal. We here use the marginal fitting from the case-control data as as starting values. Again we find a genetic variance around 1. The marginal parameters are also consistent with the results from the full analyses for the marginal parameters. #+BEGIN_SRC R :results output :exports both :session *R* :cache no marga <- glm(binstut~sex,data=dataid,family=binomial()) cc3 <- binomial.twostage(marga,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=0) summary(cc3) #+END_SRC #+RESULTS[422c3590cd02fa9a235febac6c0b4334239a7fac]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9222504 0.09729347 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9223 0.09729 0.7316 1.113 2.566e-21 attr(,"class") [1] "summary.mets.twostage" #+end_example When probands are related, here we may choose both case and controls from the same twin-pair then we need to adjust standard errors by grouping together contribution from related probands. This can be done using the se.cluster option that specifies how to cluster in the computation of the standard errors. In this case, however, this will be same as the clusters since these also are identical across pairs. * Combining Case Control and Ascertainment Sampling When specifying such models based on the pairs, it is in fact possible to combine ascertained pairs with case-control sampling by specifing vectors as the case.control=c(1,0,1,0) and pair.ascertained=c(0,1,0,1) arguments. Here with two case-control pairs, and two ascertained pairs. mets/vignettes/robgofcox1.jpg0000644000176200001440000010564413623061405016017 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (o]Kx̩Ғ0ps=v{KfK[{] "fbog;?״(((((((((((((((((((((((((((((((((Im He{WUv\ zjբ9;M.^Yn_"&U 2 Nk((((((((((((((((((((KrPKXm-pI$jݢ?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5עV-sO/oSZFkx$+Y U'j"b𣞬}Q@Q@Q@Q@Q@c2?ج}?F]g?@QEQEQEQEQEQE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M`Lrz֢ ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (?mets/vignettes/header.org0000644000176200001440000000241413623061405015174 0ustar liggesusers#+LATEX_CLASS: tufte-handout+listings #+LATEX_CLASS_OPTIONS: [a4paper] #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+PROPERTY: header-args:R+ :wrap example #+PROPERTY: tangle yes #+OPTIONS: timestamp:t title:t date:t author:t creator:nil toc:t #+OPTIONS: h:4 num:t tags:nil d:t #+LATEX_HEADER: \setlength{\parindent}{0pt} % Kills annoying indents. #+LATEX_HEADER: \newcommand{\n}{} #+STARTUP: hideall #+OPTIONS: toc:t h:4 num:nil #+HTML_HEAD: #+HTML_HEAD: #+BEGIN_EXPORT html \( \newcommand{\cov}{\mathbb{C}\text{ov}} \newcommand{\cor}{\mathbb{C}\text{or}} \newcommand{\var}{\mathbb{V}\text{ar}} \newcommand{\E}{\mathbb{E}} \newcommand{\unitfrac}[2]{#1/#2} \newcommand{\n}{} \) #+END_EXPORT mets/vignettes/basic-dutils.ltx0000644000176200001440000010177113623061405016355 0ustar liggesusers%\VignetteIndexEntry{Manipulation of data-frame data with dutility functions} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Manipulation of data-frame data with dutility functions} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Manipulation of data-frame data with dutility functions}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Simple data manipulation for data-frames} \label{sec:orge9cc1d9} \begin{itemize} \item Renaming variables, Deleting variables \item Looking at the data \item Making new variales for the analysis \item Making factors (groupings) \item Working with factors \item Making a factor from existing numeric variable and vice versa \end{itemize} Here are some key data-manipulation steps on a data-frame which is how we typically organize our data in R. After having read the data into R it will typically be a data-frame, if not we can force it to be a data-frame. The basic idea of the utility functions is to get a simple and easy to type way of making simple data-manipulation on a data-frame much like what is possible in SAS or STATA. The functions, say, dcut, dfactor and so on are all functions that basically does what the base R cut, factor do, but are easier to use in the context of data-frames and have additional functionality. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(melanoma) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} is.data.frame(melanoma) \end{lstlisting} \begin{verbatim} [1] TRUE \end{verbatim} Here we work on the melanoma data that is already read into R and is a data-frame. \section*{dUtility functions} \label{sec:org995ef5a} The structure for all functions is \begin{itemize} \item dfunction(dataframe,y\textasciitilde{}x|ifcond,\ldots{}) \end{itemize} to use the function on y in a dataframe grouped by x if condition ifcond is valid. The basic functions are Data processing \begin{itemize} \item dsort \item dreshape \item dcut \item drm, drename, ddrop, dkeep, dsubset \item drelevel \item dlag \item dfactor, dnumeric \end{itemize} Data aggregation \begin{itemize} \item dby, dby2 \item dscalar, deval, daggregate \item dmean, dsd, dsum, dquantile, dcor \item dtable, dcount \end{itemize} Data summaries \begin{itemize} \item dhead, dtail, \item dsummary, \item dprint, dlist, dlevels, dunique \end{itemize} A generic function daggregate, daggr, can be called with a function as the argument \begin{itemize} \item daggregate(dataframe,y\textasciitilde{}x|ifcond,fun=function,\ldots{}) \end{itemize} without the grouping variable (x) \begin{itemize} \item daggregate(dataframe,\textasciitilde{}y|ifcond,fun=function,\ldots{}) \end{itemize} A useful feature is that y and x as well as the subset condition can be specified using regular-expressions or by wildcards (default). Here to illustrate this, we compute the means of certain variables. First just oveall \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,~thick+I(log(thick))) \end{lstlisting} \begin{verbatim} thick I(log(thick)) 291.985366 5.223341 \end{verbatim} now only when days>500 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,~thick+I(log(thick))|I(days>500)) \end{lstlisting} \begin{verbatim} thick I(log(thick)) 271.582011 5.168691 \end{verbatim} and now after sex but only when days>500 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,thick+I(log(thick))~sex|I(days>500)) \end{lstlisting} \begin{verbatim} sex thick I(log(thick)) 1 0 242.9580 5.060086 2 1 320.2429 5.353321 \end{verbatim} and finally after quartiles of days (via the dcut function) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,thick+I(log(thick))~I(dcut(days))) \end{lstlisting} \begin{verbatim} I(dcut(days)) thick I(log(thick)) 1 [10,1.52e+03] 482.1731 5.799525 2 (1.52e+03,2e+03] 208.5490 4.987652 3 (2e+03,3.04e+03] 223.2941 4.974759 4 (3.04e+03,5.56e+03] 250.1961 5.120129 \end{verbatim} or summary of all variables starting with "s" and that contains "a" \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,"s*"+"*a*"~sex|I(days>500)) \end{lstlisting} \begin{verbatim} sex status days 1 0 1.831933 2399.143 2 1 1.714286 2169.800 \end{verbatim} \section*{Renaming, deleting, keeping, dropping variables} \label{sec:orgb2de04c} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=drename(melanoma,tykkelse~thick) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" "tykkelse" "sex" \end{verbatim} Deleting variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=drm(melanoma,~thick+sex) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} or sas style \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=ddrop(melanoma,~thick+sex) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} alternatively we can also keep certain variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=dkeep(melanoma,~thick+sex+status+days) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "thick" "sex" "status" "days" \end{verbatim} This can also be done with direct asignment \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) ddrop(melanoma) <- ~thick+sex names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} \section*{Looking at the data} \label{sec:orgae42906} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dstr(melanoma) \end{lstlisting} \begin{verbatim} 'data.frame': 205 obs. of 6 variables: $ no : int 789 13 97 16 21 469 685 7 932 944 ... $ status: int 3 3 2 3 1 1 1 1 3 1 ... $ days : int 10 30 35 99 185 204 210 232 232 279 ... $ ulc : int 1 0 0 0 1 1 1 1 1 1 ... $ thick : int 676 65 134 290 1208 484 516 1288 322 741 ... $ sex : int 1 1 1 0 1 1 1 1 0 0 ... \end{verbatim} The data can in Rstudio be seen as a data-table but to list certain parts of the data in output window \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 --- 201 317 2 4492 1 706 1 202 798 2 4668 0 612 0 203 806 2 4688 0 48 0 204 606 2 4926 0 226 0 205 328 2 5565 0 290 0 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma, ~.|sex==1) \end{lstlisting} \begin{verbatim} no status days ulc thick 1 789 3 10 1 676 2 13 3 30 0 65 3 97 2 35 0 134 5 21 1 185 1 1208 6 469 1 204 1 484 --- 191 445 2 3909 1 806 195 415 2 4119 0 65 197 175 2 4207 0 65 198 493 2 4310 0 210 201 317 2 4492 1 706 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma, ~ulc+days+thick+sex|sex==1) \end{lstlisting} \begin{verbatim} ulc days thick sex 1 1 10 676 1 2 0 30 65 1 3 0 35 134 1 5 1 185 1208 1 6 1 204 484 1 --- 191 1 3909 806 1 195 0 4119 65 1 197 0 4207 65 1 198 0 4310 210 1 201 1 4492 706 1 \end{verbatim} Getting summaries \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick Min. : 2.0 Min. :1.00 Min. : 10 Min. :0.000 Min. : 10 1st Qu.:222.0 1st Qu.:1.00 1st Qu.:1525 1st Qu.:0.000 1st Qu.: 97 Median :469.0 Median :2.00 Median :2005 Median :0.000 Median : 194 Mean :463.9 Mean :1.79 Mean :2153 Mean :0.439 Mean : 292 3rd Qu.:731.0 3rd Qu.:2.00 3rd Qu.:3042 3rd Qu.:1.000 3rd Qu.: 356 Max. :992.0 Max. :3.00 Max. :5565 Max. :1.000 Max. :1742 sex Min. :0.0000 1st Qu.:0.0000 Median :0.0000 Mean :0.3854 3rd Qu.:1.0000 Max. :1.0000 \end{verbatim} or for specfic variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,~thick+status+sex) \end{lstlisting} \begin{verbatim} thick status sex Min. : 10 Min. :1.00 Min. :0.0000 1st Qu.: 97 1st Qu.:1.00 1st Qu.:0.0000 Median : 194 Median :2.00 Median :0.0000 Mean : 292 Mean :1.79 Mean :0.3854 3rd Qu.: 356 3rd Qu.:2.00 3rd Qu.:1.0000 Max. :1742 Max. :3.00 Max. :1.0000 \end{verbatim} Summaries in different groups (sex) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex) \end{lstlisting} \begin{verbatim} sex: 0 thick days status Min. : 10.0 Min. : 99 Min. :1.000 1st Qu.: 97.0 1st Qu.:1636 1st Qu.:2.000 Median : 162.0 Median :2059 Median :2.000 Mean : 248.6 Mean :2283 Mean :1.833 3rd Qu.: 306.0 3rd Qu.:3131 3rd Qu.:2.000 Max. :1742.0 Max. :5565 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. : 16.0 Min. : 10 Min. :1.000 1st Qu.: 105.0 1st Qu.:1052 1st Qu.:1.000 Median : 258.0 Median :1860 Median :2.000 Mean : 361.1 Mean :1946 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2784 3rd Qu.:2.000 Max. :1466.0 Max. :4492 Max. :3.000 \end{verbatim} and only among those with thin-tumours or only females (sex==1) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex|thick<97) \end{lstlisting} \begin{verbatim} sex: 0 thick days status Min. :10.00 Min. : 355 Min. :1.000 1st Qu.:32.00 1st Qu.:1762 1st Qu.:2.000 Median :64.00 Median :2227 Median :2.000 Mean :51.48 Mean :2425 Mean :2.034 3rd Qu.:65.00 3rd Qu.:3185 3rd Qu.:2.000 Max. :81.00 Max. :4688 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. :16.00 Min. : 30 Min. :1.000 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 Median :65.00 Median :2886 Median :2.000 Mean :55.75 Mean :2632 Mean :1.875 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 Max. :81.00 Max. :4207 Max. :3.000 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+status~+1|sex==1) \end{lstlisting} \begin{verbatim} thick status Min. : 16.0 Min. :1.000 1st Qu.: 105.0 1st Qu.:1.000 Median : 258.0 Median :2.000 Mean : 361.1 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2.000 Max. :1466.0 Max. :3.000 \end{verbatim} or \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,~thick+status|sex==1) \end{lstlisting} \begin{verbatim} thick status Min. : 16.0 Min. :1.000 1st Qu.: 105.0 1st Qu.:1.000 Median : 258.0 Median :2.000 Mean : 361.1 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2.000 Max. :1466.0 Max. :3.000 \end{verbatim} To make more complex conditions need to use the I() \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex|I(thick<97 & sex==1)) \end{lstlisting} \begin{verbatim} sex: 1 thick days status Min. :16.00 Min. : 30 Min. :1.000 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 Median :65.00 Median :2886 Median :2.000 Mean :55.75 Mean :2632 Mean :1.875 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 Max. :81.00 Max. :4207 Max. :3.000 \end{verbatim} Tables between variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex) \end{lstlisting} \begin{verbatim} sex 0 1 status 1 28 29 2 91 43 3 7 7 \end{verbatim} All bivariate tables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc,level=2) \end{lstlisting} \begin{verbatim} status sex 1 2 3 0 28 91 7 1 29 43 7 status ulc 1 2 3 0 16 92 7 1 41 42 7 sex ulc 0 1 0 79 36 1 47 43 \end{verbatim} All univariate tables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc,level=1) \end{lstlisting} \begin{verbatim} status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 \end{verbatim} and with new variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc+dcut(days)+I(days>300),level=1) \end{lstlisting} \begin{verbatim} status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 dcut(days) [10,1.52e+03] (1.52e+03,2e+03] (2e+03,3.04e+03] (3.04e+03,5.56e+03] 52 51 51 51 I(days > 300) FALSE TRUE 11 194 \end{verbatim} \section*{Sorting the data} \label{sec:org4adbc9e} To sort the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) mel= dsort(melanoma,~days) dsort(melanoma) <- ~days head(mel) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 6 469 1 204 1 484 1 \end{verbatim} and to sort after multiple variables increasing and decreasing \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsort(melanoma) <- ~days-status head(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 6 469 1 204 1 484 1 \end{verbatim} \section*{Making new variales for the analysis} \label{sec:orgb492e14} To define a bunch of new covariates within a data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma= transform(melanoma, thick2=thick^2, lthick=log(thick) ) dhead(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex thick2 lthick 1 789 3 10 1 676 1 456976 6.516193 2 13 3 30 0 65 1 4225 4.174387 3 97 2 35 0 134 1 17956 4.897840 4 16 3 99 0 290 0 84100 5.669881 5 21 1 185 1 1208 1 1459264 7.096721 6 469 1 204 1 484 1 234256 6.182085 \end{verbatim} When the above definitions are done using a condition this can be achieved using the dtransform function that extends transform with a possible condition \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=dtransform(melanoma,ll=thick*1.05^ulc,sex==1) melanoma=dtransform(melanoma,ll=thick,sex!=1) dmean(melanoma,ll~sex+ulc) \end{lstlisting} \begin{verbatim} sex ulc ll 1 0 0 173.7342 2 1 0 197.3611 3 0 1 374.5532 4 1 1 523.1198 \end{verbatim} \section*{Making factors (groupings)} \label{sec:orgca893e7} On the melanoma data the variable thick gives the thickness of the melanom tumour. For some analyses we would like to make a factor depending on the thickness. This can be done in several different ways \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=dcut(melanoma,~thick,breaks=c(0,200,500,800,2000)) \end{lstlisting} New variable is named thickcat.0 by default. To see levels of factors in data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- \end{verbatim} Checking group sizes \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~thickcat.0) \end{lstlisting} \begin{verbatim} thickcat.0 [0,200] (200,500] (500,800] (800,2e+03] 109 64 20 12 \end{verbatim} With adding to the data-frame directly \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dcut(melanoma,breaks=c(0,200,500,800,2000)) <- gr.thick1~thick dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- gr.thick1 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- \end{verbatim} new variable is named thickcat.0 (after first cut-point), or to get quartiles with default names thick.cat.4 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dcut(melanoma) <- ~ thick # new variable is thickcat.4 dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- gr.thick1 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- thickcat.4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or median groups, here starting again with the original data, \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=2) <- ~ thick # new variable is thick.2 dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.2 #levels=:2 [1] "[10,194]" "(194,1.74e+03]" ----------------------------------------- \end{verbatim} to control new names \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) mela= dcut(melanoma,thickcat4+dayscat4~thick+days,breaks=4) dlevels(mela) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- dayscat4 #levels=:4 [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" [4] "(3.04e+03,5.56e+03]" ----------------------------------------- \end{verbatim} or \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=4) <- thickcat4+dayscat4~thick+days dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- dayscat4 #levels=:4 [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" [4] "(3.04e+03,5.56e+03]" ----------------------------------------- \end{verbatim} This can also be typed out more specifically \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma$gthick = cut(melanoma$thick,breaks=c(0,200,500,800,2000)) melanoma$gthick = cut(melanoma$thick,breaks=quantile(melanoma$thick),include.lowest=TRUE) \end{lstlisting} \section*{Working with factors} \label{sec:orgb002bf7} To see levels of covariates in data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=4) <- thickcat4~thick dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} To relevel the factor \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~thickcat4) melanoma = drelevel(melanoma,~thickcat4,ref="(194,356]") dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 [10,97] (97,194] (194,356] (356,1.74e+03] 56 53 45 51 thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or to take the third level in the list of levels, same as above, \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = drelevel(melanoma,~thickcat4,ref=2) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} To combine levels of a factor (first combinining first 3 groups into one) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = drelevel(melanoma,~thickcat4,newlevels=1:3) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.1:3 #levels=:2 [1] "[10,97]-(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or to combine groups 1 and 2 into one group and 3 and 4 into another \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dkeep(melanoma) <- ~thick+thickcat4 melanoma = drelevel(melanoma,gthick2~thickcat4,newlevels=list(1:2,3:4)) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- gthick2 #levels=:2 [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" ----------------------------------------- \end{verbatim} Changing order of factor levels \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dfactor(melanoma,levels=c(3,1,2,4)) <- thickcat4.2~thickcat4 dlevel(melanoma,~ "thickcat4*") dtable(melanoma,~thickcat4+thickcat4.2) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 (194,356] [10,97] (97,194] (356,1.74e+03] thickcat4 [10,97] 0 56 0 0 (97,194] 0 0 53 0 (194,356] 45 0 0 0 (356,1.74e+03] 0 0 0 51 \end{verbatim} Combine levels but now control factor-level names \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=drelevel(melanoma,gthick3~thickcat4,newlevels=list(group1.2=1:2,group3.4=3:4)) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- gthick2 #levels=:2 [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- gthick3 #levels=:2 [1] "group1.2" "group3.4" ----------------------------------------- \end{verbatim} \section*{Making a factor from existing numeric variable and vice versa} \label{sec:orgdcd4633} A numeric variable "status" with values 1,2,3 into a factor by \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma = dfactor(melanoma,~status, labels=c("malignant-melanoma","censoring","dead-other")) melanoma = dfactor(melanoma,sexl~sex,labels=c("females","males")) dtable(melanoma,~sexl+status.f) \end{lstlisting} \begin{verbatim} status.f malignant-melanoma censoring dead-other sexl females 28 91 7 males 29 43 7 \end{verbatim} A gender factor with values "M", "F" can be converted into numerics by \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = dnumeric(melanoma,~sexl) dstr(melanoma,"sex*") dtable(melanoma,~'sex*',level=2) \end{lstlisting} \begin{verbatim} 'data.frame': 205 obs. of 3 variables: $ sex : int 1 1 1 0 1 1 1 1 0 0 ... $ sexl : Factor w/ 2 levels "females","males": 2 2 2 1 2 2 2 2 1 1 ... $ sexl.n: num 2 2 2 1 2 2 2 2 1 1 ... sex sexl 0 1 females 126 0 males 0 79 sex sexl.n 0 1 1 126 0 2 0 79 sexl sexl.n females males 1 126 0 2 0 79 \end{verbatim} \end{document}mets/vignettes/rec6.jpg0000644000176200001440000005770113623061405014605 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ('}R\ej9bI'ڀ7hkk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5עS]Aqo3*c kv ( ( ( ( (vlXe8|MCx J+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Z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z~(((((((((((((((((D(X`2(((((((((((((((((((((((((((((((((((((((((((mets/vignettes/binomial-family.ltx0000644000176200001440000005721713623061405017050 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate binomial data: family analysis} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate binomial data: family analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate binomial data: family analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org413d47e} When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. \section*{Simulated family data} \label{sec:org9bae582} We start by simulating family data with and additive gamma structure on ACE form. Here 40000 families consisting of two parents and two children. The response is ybin and there is one covariate x. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(100) data <- simbinClaytonOakes.family.ace(40000,2,1,beta=NULL,alpha=NULL) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) head(data) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace ybin x type cluster number child 1 1 0 mother 1 1 0 2 1 1 father 1 2 0 3 1 1 child 1 3 1 4 1 1 child 1 4 0 5 0 0 mother 2 1 0 6 1 1 father 2 2 0 \end{verbatim} We fit the marginal models, and here find a covariate effect at 0.3 for x. The marginals can be specified excatly as one wants. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aa <- margbin <- glm(ybin~x,data=data,family=binomial()) summary(aa) \end{lstlisting} \begin{verbatim} Call: glm(formula = ybin ~ x, family = binomial(), data = data) Deviance Residuals: Min 1Q Median 3Q Max -1.5283 -1.3910 0.8632 0.9779 0.9779 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.489258 0.007291 67.1 <2e-16 *** x 0.306070 0.010553 29.0 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 206272 on 159999 degrees of freedom Residual deviance: 205428 on 159998 degrees of freedom AIC: 205432 Number of Fisher Scoring iterations: 4 \end{verbatim} \section*{Additive gamma model} \label{sec:org85bea3a} For the additive gamma of this type we set-up the random effects included in such a family to make the ACE valid using some special functions for this. The model is constructe with one enviromental effect shared by all in the family and 8 genetic random effects with size (1/4) genetic variance. Looking at the first family we see that the mother and father both share half the genes with the children and that the two children also share half their genes with this specification. Below we also show an alternative specification of this model using all pairs. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # make ace random effects design out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 \end{verbatim} We can now fit the model calling the two-stage function \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # fitting ace model for family structure ts <- binomial.twostage(margbin,data=data,clusters=data$cluster, theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) # true variance parameters c(2,1) # total variance 3 \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.2425610 0.03747680 dependence2 0.1255742 0.01607478 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.659 0.0611 0.539 0.779 4.25e-27 dependence2 0.341 0.0611 0.221 0.461 2.39e-08 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.368 0.0252 0.319 0.418 3.31e-48 attr(,"class") [1] "summary.mets.twostage" [1] 0.2222222 0.1111111 [1] 0.3333333 \end{verbatim} \subsection*{Pairwise fitting} \label{sec:orged91ad8} We now specify the same model via extracting all pairs. The random effecs structure is simpler when just looking at pairs. A special function writes up all combinations of pairs. There are 6 pairs within each family, and we keep track of who belongs to the different families. We first simply give the pairs and we then should get the same result as before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=20) pairs <- mm$pairs dim(pairs) head(pairs,12) \end{lstlisting} \begin{verbatim} [1] 1 2 1 3 1 4 2 3 2 4 3 4 5 6 5 7 5 8 6 7 [1] 240000 2 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 1 4 [4,] 2 3 [5,] 2 4 [6,] 3 4 [7,] 5 6 [8,] 5 7 [9,] 5 8 [10,] 6 7 [11,] 6 8 [12,] 7 8 \end{verbatim} Now with the pairs we fit the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsp <- binomial.twostage(margbin,data=data, clusters=data$cluster, theta=c(2,1),detail=0, random.design=out$des.rv,theta.des=out$pardes,pairs=pairs) summary(tsp) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} Here a random sample of pairs are given instead and we get other estimates. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} set.seed(100) ssid <- sort(sample(1:nrow(pairs),nrow(pairs)/2)) tsd <- binomial.twostage(aa,data=data,clusters=data$cluster, theta=c(2,1),step=1.0, random.design=out$des.rv,iid=1,Nit=10, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} To specify such a model when only the pairs are availble we show how to specify the model. We here use the same marginal "aa" to make the results comparable. The marginal can also be fitted based on available data. We start by selecting the data related to the pairs, and sets up new id's and to start we specify the model using the full design with 9 random effects. Below we show how one can use with only the random effects needed for each pair, which is typically simpler. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} head(pairs[ssid,]) ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 [5,] 1 1 1 1 0 0 0 0 1 [6,] 0 0 0 0 1 1 1 1 1 \end{verbatim} Now fitting the model with the data set up \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=outid$des.rv,theta.des=outid$pardes,pairs=pair.new) summary(tsdid) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} We now specify the design specifically using the pairs. The random.design and design on the parameters are now given for each pair, as a 3 dimensional matrix. with a direct specification of random.design and the design on the parameters theta.design. In addition we need also to give the number of random effects for each pair. These basic things are constructed by certain functions for the ACE design. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new,7) head(pair.types,7) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [7,] 5 8 [,1] [,2] [1,] "mother" "father" [2,] "mother" "child" [3,] "father" "child" [4,] "child" "child" [5,] "mother" "father" [6,] "mother" "child" [7,] "mother" "child" \end{verbatim} For pair 1 that is a mother/farther pair, we see that they share 1 environmental random effect of size 1. There are also two genetic effects that are unshared between the two. So a total of 3 random effects are needed here. The theta.des relates the 3 random effects to possible relationships in the parameters. Here the genetic effects are full and so is the environmental effect. In contrast we also consider a mother/child pair that share half the genes, now with random effects with (1/2) gene variance. We there need 4 random effects, 2 non-shared half-gene, 1 shared half-gene, and one shared full environmental effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # 3 rvs here random.des[,,1] theta.des[,,1] # 4 rvs here random.des[,,2] theta.des[,,2] head(rvs) \end{lstlisting} \begin{verbatim} [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [1] 3 4 4 4 3 4 \end{verbatim} Now fitting the model, and we see that it is a lot quicker due to the fewer random effects needed for pairs. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid2 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} The same model can be specifed even simpler via the kinship coefficient. For this speicification there are 4 random effects for each pair, but some have variance 0. The mother-father pair, here shares a random effect with variance 0, and have two non-shared genetic effects with full variance, in addition to a fully shared environmental effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) out$random.des[,,1] out$theta.des[,,1] \end{lstlisting} \begin{verbatim} [1] 0.0 0.5 0.5 0.5 0.0 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0 0 [2,] 1 0 [3,] 1 0 [4,] 0 1 \end{verbatim} Now, fitting the model we get the results from before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid3 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/9,random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} \section*{Pairwise odds ratio model} \label{sec:org2ddc2cf} To fit the pairwise odds-ratio model in the case of a pair-specification there are two options for fitting the model. \begin{enumerate} \item One option is to set up some artificial data similar to twin data with \begin{itemize} \item a pair-cluster-id (clusters) \item with a cluster-id to get GEE type standard errors (se.cluster) \end{itemize} \item We can also use the specify the design via the theta.des that is also a matrix of dimension pairs x design with the design for POR model. \end{enumerate} Starting by the second option. We need to start by specify the design of the odds-ratio of each pair. We set up the data and find all combinations within the pairs. Subsequently, we remove all the empty groups, by grouping together the factor levels 4:9, and then we construct the design. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tdp <-cbind( dataid[pair.new[,1],],dataid[pair.new[,2],]) names(tdp) <- c(paste(names(dataid),"1",sep=""), paste(names(dataid),"2",sep="")) tdp <-transform(tdp,tt=interaction(type1,type2)) dlevel(tdp) drelevel(tdp,newlevels=list(mother.father=4:9)) <- obs.types~tt dtable(tdp,~tt+obs.types) tdp <- model.matrix(~-1+factor(obs.types),tdp) \end{lstlisting} \begin{verbatim} type1 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- type2 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- tt #levels=:9 [1] "child.child" "father.child" "mother.child" "child.father" [5] "father.father" "mother.father" "child.mother" "father.mother" [9] "mother.mother" ----------------------------------------- obs.types mother.father child.child father.child mother.child tt child.child 0 19991 0 0 father.child 0 0 39837 0 mother.child 0 0 0 40212 child.father 0 0 0 0 father.father 0 0 0 0 mother.father 19960 0 0 0 child.mother 0 0 0 0 father.mother 0 0 0 0 mother.mother 0 0 0 0 \end{verbatim} We then can fit the pairwise model using the pairs and the pair-design for descrbing the OR. The results are consistent with the the ACE model as the mother-father have a lower dependence as is due only the environmental effects. All other combinations should have the same dependence as also seem to be the case. To fit the OR model it is generally recommended to use the var.link to use the parmetrization with log-odd-ratio regression. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} porpair <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta.des=tdp,pairs=pair.new,model="or",var.link=1) summary(porpair) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(obs.types)mother.father 0.1269881 0.03132228 factor(obs.types)child.child 0.3819107 0.03108233 factor(obs.types)father.child 0.3046284 0.02239909 factor(obs.types)mother.child 0.3293741 0.02233648 $or Estimate Std.Err 2.5% 97.5% P-value factor(obs.types)moth.... 1.14 0.0356 1.07 1.21 1.16e-223 factor(obs.types)chil.... 1.47 0.0455 1.38 1.55 4.26e-227 factor(obs.types)fath.... 1.36 0.0304 1.30 1.42 0.00e+00 factor(obs.types)moth.....1 1.39 0.0310 1.33 1.45 0.00e+00 $type [1] "or" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \end{document}mets/vignettes/binomial-case-control-ascertainment.ltx0000644000176200001440000007154713623061405023015 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate binomial data: case control or ascertainment sampling} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate binomial data: case control or ascertainment sampling} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate binomial data: case control or ascertainment sampling}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgad14f2c} When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. \subsection*{Case-Control Sampling} \label{sec:org93e2d83} Sometimes, pairs are recruited after a case-proband is selected. This proband, can be either a \begin{itemize} \item case: must be representative of cases \end{itemize} or a \begin{itemize} \item control: must be representative of controls \end{itemize} First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{P(j)} \] the probailty of seeing \((i,j)\) for the pair, given that the proband was observed as \((j)\). We note that if the marginal is known, or possibly estimated from the full cohort. Then we can estimate dependence parameters using just the terms \(P(i,j)\) for the pairs. We can thus ignore the special sampling for models with marginal specification. If the marginal can not be obtained from other sources we need to maximize the full-pairwise-likelihood in all parameters, that is both dependence and marginal parameters. Similary, one can select a whole family based on having selected a proband, that is selected a representative member of either cases or controls. In this case we fit the models by using composited likelihoods, considering all pairs that involves the probands. This will give some lacking efficiency compared to looking at the full likelihood of the family given the proband. \subsection*{Ascertainment Sampling} \label{sec:org6773872} Similarly, in the setting of pairs we can select all pairs where there is at least one event of interest. First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{1-P(0,0)} \] the probailty of seeing \((i,j)\) for the pair, given that it is sampled. If the marginal can estimated from a full sample we can then estimate the dependence parameter using the ascertainment likelihood. Generally, when whole families are ascertained the computation of the true truncation probability can be hard to the fact that families are hard to define in the real world. Nevertheless, if a random sample of such family is at hand. We suggest to in these families take out all pairs that satisfies the ascertainment criterion. With a family, with given size \(n\) we have binary observations \((Y_1,...,Y_n)\). The family is sampled or a random sample of families such that \[ \sum_{i=1}^n Y_i \geq 1. \] We let the conditional distribution given sampling, be denoted as \[ P^O(\cdot) = P(\cdot | \sum_{i=1}^n Y_i \geq 1) \] Now, we note that all pairs within these family that satisfies that \(Y_i+Y_j \geq 1\), will have distribution \begin{align*} P^O(Y_i=o_1, Y_j=o_2 | Y_i+Y_j \geq 1) & = \frac{P^O(o_1,o_2)}{P^O( Y_i+Y_j \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2, \sum_{i=1}^n Y_i \geq 1)}{ P( Y_i+Y_j \geq 1, \sum_{i=1}^n Y_i \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2) }{ P( Y_i+Y_j \geq 1)} = \frac{P(o_1,o_2)}{1 - P(0,0)} \end{align*} since we only consider the probabilities where \(o_1+o_2 \geq 1\). Also here we could condition on covariates. So considering these pairs, or a random sample of them should yield valid inference. When standard errors are computed we need to rely on GEE type arguments. An advantage of this is that the ascertainment probability is much easier to get for the pairs. Again using the pairwise structure will lead to loss of efficiency compared to using the full likelihood of the ascertained families. In addition we note that when looking at one pair that has been ascertained then \begin{align*} P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j \geq 1) & = \sum_{k=1}^2 P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j = k ) P( Y_i + Y_j =k | Y_i + Y_j \geq 1 ). \end{align*} where \(o_1+ o_2 \geq 1\). Note that the dependence will affect the probabilities \(P(Y_i+Y_j=2)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1))\) and \(P(Y_i+Y_j=1)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1))\). In particular when the marginal parameters are known the dependence parameters can be estimated using the proportion of concordant pairs compared to the non-concordant pairs with respect to the outcome. When considering the pairs with different responses we learn "only" (up to model specification) about covariate effects. For example when \(\mbox{logit}(P(Y_i=1 | \alpha_k )) = \alpha_{k} + \beta X_i\) for \(i=1,2\) with \(\alpha_k\) a pair (cluster) specific effect and subject specific covariates \(X_i\) for \(i=1,2\), then \(P(Y_i=1,Y_j=0)/P(Y_i+Y_j=1) = \mbox{expit}((X_i - X_j) \beta)\), and with the standard definitions \(\mbox{logit}(p) = \log(p/(1-p))\) and \(\mbox{expit}(x) = \exp(x)/(1+\exp(x))\). \section*{The twin-stutter data} \label{sec:org51abefd} We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6 mets version 1.2.3 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined tvparnr zyg stutter sex age nr binstut 1 1 mz no female 71 1 0 2 1 mz no female 71 2 0 3 2 dz no female 71 1 0 8 5 mz no female 71 1 0 9 5 mz no female 71 2 0 11 7 dz no male 71 1 0 \end{verbatim} \begin{itemize} \item First, we select an ascertaiment sample of the data, thus selecting a random sample of all ascertained pairs. \item Secondly, we select a case-control sample of this data to illustrate the use of the methods. \end{itemize} \section*{Ascertaiment Sampling} \label{sec:orgaa08da8} Selecting the ascertained pairs \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twina <- subset(twinstut,n==2 & stuttot>=1) \end{lstlisting} Selecting on the pairs where there is stuttering at taking a look at the tables of discordance and concordance for the twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinda <- fast.reshape(twina,id="tvparnr") twind <- fast.reshape(twinstut,id="tvparnr") dtable(twind,"binst*"~I(stuttot1>=1)) dtable(twinda,~"binst*") \end{lstlisting} \begin{verbatim} I(stuttot1 >= 1): FALSE binstut2 0 binstut1 0 6632 ------------------------------------------------------------ I(stuttot1 >= 1): TRUE binstut2 0 1 binstut1 0 0 289 1 281 111 binstut2 0 1 binstut1 0 0 289 1 281 111 \end{verbatim} Now doing the analyses \subsection*{Biprobit model} \label{sec:orgb7a66bb} Looking at the full data for comparison. We estimate an unstructured probit model with different correlations for MZ and DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- biprobit(binstut~sex,~-1+binzyg,data=twinstut,id="tvparnr") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -1.794821 0.023289 -77.066826 0.0000 sexmale 0.401430 0.030179 13.301756 0.0000 r:binzygDZ 0.132458 0.062516 2.118802 0.0341 r:binzygMZ 1.096915 0.073574 14.909085 0.0000 logLik: -4400.536 mean(score^2): 1.022e-06 n pairs 21288 7313 Contrast: Dependence [binzygDZ] Mean [(Intercept)] Estimate 2.5% 97.5% Rel.Recur.Risk 1.77662 0.92746 2.62577 OR 1.88752 1.09432 3.25566 Tetrachoric correlation 0.13169 0.00993 0.24960 Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 \end{verbatim} Note, that the Casewise Concordance is a consistently estimated under complete ascertainment, i.e., when we consider a random sample of affected twins (at least on of the twins must have the event). \subsection*{Odd-Ratio modelling} \label{sec:org1c452c4} First looking at the marginal model based on the full data we find the overall level of stuttering and also that males have a much higher stuttering risk. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~factor(sex),data=twinstut,family=binomial()) summary(margbin) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ factor(sex), family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4127 -0.4127 -0.2716 -0.2716 2.5763 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.28191 0.05000 -65.64 <2e-16 *** factor(sex)male 0.86171 0.06211 13.87 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9124.7 on 21286 degrees of freedom AIC: 9128.7 Number of Fisher Scoring iterations: 6 \end{verbatim} First, fitting the OR model for MZ and DZ for the full data, we find that MZ have a much higher dependence than DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5238541 0.2400861 factor(zyg)mz 3.4930902 0.1865567 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.689 0.4054 0.894 2.483 3.111e-05 factor(zyg)mz 32.887 6.1354 20.862 44.913 8.308e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now, using the overall marginal we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twina) bina <- binomial.twostage(margbin,data=twina,var.link=1, clusters=twina$tvparnr,theta.des=theta.des, pair.ascertained=1) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.4874213 0.2472523 factor(zyg)mz 3.4753766 0.1985974 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.628 0.4026 0.8391 2.417 5.245e-05 factor(zyg)mz 32.310 6.4167 19.7335 44.886 4.771e-07 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Additive gamma modelling} \label{sec:org524055f} First, again for comparision fitting the full data for the AE model. We get the size of the genetic variance in this model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9095 0.09536 0.7226 1.096 1.469e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We first here take at the look at the marginal model for the ascertained sample, and note as expected that this sample give highly biased estimated for the marginal model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} outa <- twin.polygen.design(twina,id="tvparnr",zygname="zyg",zyg="dz",type="ae") marga <- glm(binstut~sex,data=twina,family=binomial()) summary(marga) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ sex, family = binomial(), data = twina) Deviance Residuals: Min 1Q Median 3Q Max -1.334 -1.298 1.028 1.028 1.061 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.27895 0.08739 3.192 0.00141 ** sexmale 0.08242 0.11237 0.733 0.46328 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1851.8 on 1361 degrees of freedom Residual deviance: 1851.2 on 1360 degrees of freedom AIC: 1855.2 Number of Fisher Scoring iterations: 4 \end{verbatim} Now, using the overall marginal model we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} abintwin1 <- binomial.twostage(margbin,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1) summary(abintwin1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8920274 0.09732786 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.892 0.09733 0.7013 1.083 4.946e-20 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} In fact for this model we can also do a full-MLE fitting jointly the dependence parameters and the marginal model. This is based on the twostage option (twostage=0 is MLE). Here the starting value is given at the marginal model for the ascertained model. This gives quite similar results to the previous analyses with a genetic variance around 1. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aabintwin1 <- binomial.twostage(marga,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1,twostage=0) summary(aabintwin1) coef(marga) coef(margbin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.014398 0.1045593 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 1.014 0.1046 0.8095 1.219 2.967e-22 attr(,"class") [1] "summary.mets.twostage" (Intercept) sexmale 0.2789484 0.0824214 (Intercept) factor(sex)male -3.2819072 0.8617053 \end{verbatim} \section*{Case Control Sampling} \label{sec:org56e8f5e} First, taking out all cases and one control for each case, we establish the pairs of these probands. This is based on keeping track of the twin related to the proband. Here using some utility functions in the mets packages. Then we write up the random design vectors and the parameter design for each pair using the kinship coefficient. When specifying the pairs in the case-control setup the second column should be the probands. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twinstut <- subset(twinstut,n==2) twinstut <- dtransform(twinstut,nnrow=1:nrow(twinstut)) twinstut <- dby(twinstut,binstut~tvparnr,nnn=seq_along) twinstut <- dby2(twinstut,nnrow~tvparnr,pairnr=rev) cases <- which(twinstut$binstut==1) controls <- sample(which(twinstut$binstut==0),1217) rowsca <- with(twinstut,nnrow[cases]) rowsco <- with(twinstut,nnrow[controls]) rpairs <- c(rowsca,rowsco) cc.pairs <- cbind( with(twinstut,pairnr.nnrow[rpairs]),rpairs) ids <- sort(unique(c(cc.pairs))) pairsids <- c(cc.pairs) pair.new <- matrix(fast.approx(ids,pairsids),ncol=2) head(pair.new) dataid <- dsort(twinstut[ids,],"tvparnr") dataid=dtransform(dataid,kinship=0.5) dataid=dtransform(dataid,kinship=1,binzyg=="MZ") kinship <- dataid$kinship[pair.new[,2]] out <- make.pairwise.design(pair.new,kinship,type="ae") names(out) out$random.des[,,1] out$theta.des[,,1] \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 4 3 [2,] 16 15 [3,] 18 17 [4,] 32 31 [5,] 38 37 [6,] 44 43 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [1,] 1 1 0 [2,] 1 0 1 [1] 0.5 0.5 0.5 \end{verbatim} Now doing the analyses, first with know marginals, that is marginals from the full data. For this analysis, since marginals do not contain dependence parameters we do not need to specify that this is case-control sampling. Having a correct is crucial for this to work, but this is certainly often possible in register based studies where a full cohort is also available. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cc <- binomial.twostage(margbin,data=dataid,clusters=dataid$tvparnr,pairs=pair.new, random.design=out$random.design,theta.des=out$theta.des, pairs.rvs=out$ant.rvs,case.control=0,twostage=1) summary(cc) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We now do the same analysis specifying the case-control sampling. This should result in the same dependence parameters as is also the case. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cc3 <- binomial.twostage(margbin,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=1) summary(cc3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} This model can also be fitted using a full likelhood of both dependence parameters and marginal parameters. Here there is no need to have a correctly specified marginal. We here use the marginal fitting from the case-control data as as starting values. Again we find a genetic variance around 1. The marginal parameters are also consistent with the results from the full analyses for the marginal parameters. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} marga <- glm(binstut~sex,data=dataid,family=binomial()) cc3 <- binomial.twostage(marga,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=0) summary(cc3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9222504 0.09729347 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9223 0.09729 0.7316 1.113 2.566e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} When probands are related, here we may choose both case and controls from the same twin-pair then we need to adjust standard errors by grouping together contribution from related probands. This can be done using the se.cluster option that specifies how to cluster in the computation of the standard errors. In this case, however, this will be same as the clusters since these also are identical across pairs. \section*{Combining Case Control and Ascertainment Sampling} \label{sec:orgff68ee7} When specifying such models based on the pairs, it is in fact possible to combine ascertained pairs with case-control sampling by specifing vectors as the case.control=c(1,0,1,0) and pair.ascertained=c(0,1,0,1) arguments. Here with two case-control pairs, and two ascertained pairs. \end{document}mets/vignettes/competing.org0000644000176200001440000000412013623061405015725 0ustar liggesusers#+TITLE: Analysis of multivariate competing risks data #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Analysis of multivariate competing riks data}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview - marginal modelling with standard errors cif, - cause specific hazards - cumulative incidence modelling - random effects simple cif - Luise model When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package - Binary models and adjust for censoring with inverse probabilty of censoring weighting - Bivariate surival models of Clayton-Oakes type - With regression structure on dependence parameter - With additive gamma distributed random effects - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. - Plackett OR model model - With regression structure on OR dependence parameter - Cluster stratified Cox Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \( T_1, \delta_1, T_2, \delta_2, X_1, X_2 \) where the censored survival responses are \( T_1, \delta_1, T_2, \delta_2 \) and we have covariates \( X_1, X_2 \). mets/vignettes/surv-cc-base.jpg0000644000176200001440000004041113623061405016226 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (WFqῇΫhJHuFvݟ€:+/Aur4|$VIrĶ'sdGSZgeq[?I4n4>\r~y' ExG>#k>K]7WZ]Wm62C_kZ/燬n,,l.5עҜm!$V*!8hh6Ş8֯]'L&4{XeHid8NF>Qg .{;lR/YH>BA+?a[״?Z~A]T@ oeʞGGb1UR$SjI<@`6I=|]e$iWjHS'=Zh(((((((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QEQEVchv.dF'c9c8y:(KE%IfyQ㉣Cn^7Ѻűߘ|WMEfiZ$ I4DhX.onNOEQEQEQEkj|D"b6G2,N9+N(.B DW10@e#+YӬ[~Zmt>Fʜ8tP6qi}"x(?ASES͉ɹJC3Z}7t=ӥ۫&QVbr0?.2Kg9wmtחK$K;;'EL{J/ys] QEV~E5N"Fe;ЊТ9>үFsgçwG~cqZzVoI#,n!Q!G(8ۓi@Q@Q@Q@fiZ$ I4DhX.onNOE{A{|o|nqI"+̘ 2ȕxJ(>gO^ k7mFTvwg+~-?OCoc@'*z((>lǍßpGu< GDkMEdf x 6>^+0|+gaz1]; dv];VA ӎ+v(('YM!P`˜FGk>OhMj16 ۰}g5Q@t2=294O If+":vQ@Q@Q@Q@Q@Q@Q@gkO`aeW@-##Ѣ8؏&tT'b fuOk髯o5/1 6v`9+v((((((((((=sRN *ȨYpAnA=Ⳓ+ucȈA,` w1I90:kI_-|Tm*ĕnEQEQEQEQEQEQEQEQEQEVu[$UIJ r [P'.dstf,s,!M`0#׶WV]9eK&W̎4`W#bwsע ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (?mets/vignettes/robcox1.jpg0000644000176200001440000003535713623061405015326 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 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 .]_FwVZSΏ!Yw1'VmPEPEPEkͩ (vVɧMuv@ĩ ;z WEq7ZI5-B%~3FҀ]y Gدl+n7 s|d1DpVW9*UOQEQEQEQ\׈P^xu[ ȸq3͜m/LڝS-ΧBO=hD:˒8 q@a3FOrU'nEPEPE\]5Pv酠]N~cgOtW-^W!V{g-PnHCԴ :m-/9>PFI$rhQ@Q@Q@+cDlKړ4EBdc9[qV]|M{un͜0QLH于6lNh(t ( ( )1F ;I([WY5-CPVђVhw.bvL|ph Ub}0V"a(6v2t"(((bŅ'~S(NWy N'VEe4#soW.j5 ^ӣYvLt##((((((((VzC{2H9Z7#rpH#GzxKZAh`{e{yf70e8:TP~hʖ1:X4,+Yb8B((([Aui AY%xkcr*x8EewJ#xmFGEPFŐR0'!< iVzE3#ij$PEPEPEP{kme=k7 Fɞ:ßZ{7P~̳[E]rsRNڈ=z(((cm.Ǜx(qUʖsz}jy-\[\<nGXv8!+h#8P0@v@Q@Q@Q@Zw4}&n7Wwu-i rXyI-cjew6ѬICUw$QEQEQEɡK$PLr)FF#Xv Ѵ$j ̊(iS\؊ߢ1ѿF@u|[Hs#<kf(((eWB# Z(&mk* 6ěY#ƾɌ`z kI:jFԛ*_ie]3/$EQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEW4<[hii;QA,p98"'&~mr2;u|k`ڟ(4|[waفr1j:OJ4 -Z8ૹ].F:@Ey,~l[cX3h.Iăn#WK+ -.59R&aX].K#6H*c<h(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((mets/vignettes/index.html0000644000176200001440000000423113623061405015227 0ustar liggesusers mets User Guides

Analysis of Multivariate Event Times


User Guides and Package Vignettes




This page was generated by the R.rsp package.
mets/vignettes/rec4.jpg0000644000176200001440000010352613623061405014600 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghij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m>lb6I'ӷPt}Zkv[A#NL[=O%J6mV!կ-}6#J(aQoؠqp98v+M%!2 1Sܒp1k=;&Elnp|ξqq@viFYq33A"B~1T7'Q_ښlvx3@6'{O-"k`O"-K`~TH -j*֞a<n\֟%?$T[ ݬe.B)v.1X's֜ZEc$ld6 3vfQj캋K9Y6>ֱ1cuJw$eom(?g'cs[Ot&pfe{xї?Ŗ {dҦT*5B7 `bS=xMڟ*[O&$F1ċnOa#ۚ识?Mmʾo5 y\&h~x.3ךWE[;Tr qʪzNm1PBG>Lp&>.Z=?̮Z_{\W2?.q,:g r3L3+M3L=|JH ̌[a@*_"舗.{oُ{H-}̡-1Zrw;4WۿW)IK-x0:ŚY6I'ӏ֏D`;s?h}{9ǷJR-[p(O!kߗ >f/gH'܃8@4|l s{?9gPpFFy \F|><:U44itfg?Vo?Vo((((?WSIp{wpIXtmm<3<;zܫ$'kŕ7$(!A<(u`MlV}惣hlnf_2ktv2Fq@VG"qcK/ ԊOOY5dgh / h#+/ + Я/&B<'Bޢ / h#+/ + Я/&B<'Bޢ / k/ &zE<Х +e!FA$ 椼Ώs`(INVU!]AխEe*]`jjM`\!pCp޵( ( ( (2-c1anˁU;Lm>gHb3O$պ(((((((((((((((((((|ceƱ yib!aWs<Q^n}siZ]vy A̠m$`Fsqitow>Si&Ĉfs<Aq[=I#I$MW,y^w&oi"s"\ v7u{kFI &; eXOH1'Os@Eydv\UOmkk5xLC;P䚭eM-ǥaq}ʑg HBI^I4ꗗ|)5Ԟ\o,pN^GV`?j?W-07!cp9G y:h7ŮYou Yb"LF`nwVF\_ e>Ǡϡ GFOݙl|ngC(~} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Recurrent Events} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Recurrent Events}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org01ebcd2} For recurrent events data it is often of interest to compute basis descriptive quantities as a first go at getting some basic understanding of the phenonmenon studied. We here demonstrate how one can compute \begin{itemize} \item the marginal mean \item the variance \item the probability of exceeding k events \end{itemize} In addition several tools can be used for simulating recurrent events and bivariate recurrent events data, in the case with a possible terminating event. We start by simulating some recurrent events data with two type of events with cumulative hazards \begin{itemize} \item \(\Lambda_1(t)\) \item \(\Lambda_2(t)\) \item \(\Lambda_D(t)\) \end{itemize} where we consider types 1 and 4 and with a rate of the terminal event given by \(\Lambda_D(t)\). We let the events be independent, but could also specify a random effects structure to generate dependence. When simulating data we can impose various random-effects structures to generate dependence \begin{itemize} \item We can draw normally distributed random effects \(Z_1,Z_2,Z_d\) were the variance (var.z) and correlation can be specified (cor.mat) (dependence=2). Then the intensities are \begin{itemize} \item \(\exp(Z_1) \lambda_1(t)\) \item \(\exp(Z_2) \lambda_2(t)\) \item \(\exp(Z_3) \lambda_D(t)\) \end{itemize} \item We can one gamma distributed random effects \(Z\). Then the intensities are (dependence=1) \begin{itemize} \item \(Z \lambda_1(t)\) \item \(Z \lambda_2(t)\) \item \(Z \lambda_D(t)\) \end{itemize} \item We can draw gamma distributed random effects \(Z_1,Z_2,Z_d\) were the sum-structure can be speicifed via a matrix cor.mat. Then we compute \(\tilde Z_j = \sum_k Z_k^{cor.mat(j,k)}\) for \(j=1,2,3\) (dependence=3) Then the intensities are \begin{itemize} \item \(\tilde Z_1 \lambda_1(t)\) \item \(\tilde Z_2 \lambda_2(t)\) \item \(\tilde Z_3 \lambda_D(t)\) \end{itemize} \item The intensities can be independent (dependence=0) \end{itemize} We return to how to run the different set-ups later and start by simulating independent processes. \subsection*{Utility functions} \label{sec:org9be05a8} We here mention two utility functions \begin{itemize} \item tie.breaker for breaking ties among jump-times which is expected in the functions below. \item count.history that counts the number of jumps previous for each subject that is \(N_1(t-)\) and \(N_2(t-)\). \end{itemize} \subsection*{Marginal Mean} \label{sec:orga8b27b9} We start by estimating the marginal mean \(E(N_1(t \wedge D))\) where \(D\) is the timing of the terminal event. This is based on a rate model for \begin{itemize} \item the type 1 events \item the terminal event \end{itemize} and is defined as \(\mu_1(t)=E(N_1^*(t))\) \begin{align} \int_0^t S(u) d R_1(u) \end{align} where \(S(t)=P(D \geq t)\) and \(dR_1(t) = E(dN_1^*(t) | D \geq t)\) and can therefore be estimated by a \begin{itemize} \item Kaplan-Meier estimator, \(\hat S(u)\) \item Nelson-Aalen estimator for \(R_1(t)\) \end{itemize} \begin{align} \hat R_1(t) & = \sum_i \int_0^t \frac{1}{Y_\bullet (s)} dN_{1i}(s) \end{align} where \(Y_{\bullet}(t)= \sum_i Y_i(t)\) such that the estimator is \begin{align} \hat \mu_1(t) & = \int_0^t \hat S(u) d\hat R_1(u). \end{align} Cook \& Lawless (1997), and developed further in Gosh \& Lin (2000). The variance can be estimated based on the asymptotic expansion of \(\hat \mu_1(t) - \mu_1(t)\) \begin{align*} & \sum_i \int_0^t \frac{S(s)}{\pi(s)} dM_{i1} - \mu_1(t) \int_0^t \frac{1}{\pi(s)} dM_i^d + \int_0^t \frac{\mu_1(s) }{\pi(s)} dM_i^d, \end{align*} with mean-zero processes \begin{itemize} \item \(M_i^d(t) = N_i^D(t)- \int_0^t Y_i(s) d \Lambda^D(s)\), \item \(M_{i1}(t) = N_{i1}(t) - \int_0^t Y_{i}(s) dR_1(s)\). \end{itemize} as in Gosh \& Lin (2000) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) # to control output in simulatins for p-values below. data(base1cumhaz) data(base4cumhaz) data(drcumhaz) ddr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz rr <- simRecurrent(1000,base1,death.cumhaz=ddr) rr$x <- rnorm(nrow(rr)) rr$strata <- floor((rr$id-0.01)/500) dlist(rr,.~id| id %in% c(1,7,9)) \end{lstlisting} \begin{verbatim} id: 1 entry time status rr dtime fdeath death start stop x strata 1 0 133.1 0 1 133.1 1 1 0 133.1 1.185 0 ------------------------------------------------------------ id: 7 entry time status rr dtime fdeath death start stop x strata 7 0.0 813.3 1 1 1729 1 0 0.0 813.3 1.5495 0 1004 813.3 1288.4 1 1 1729 1 0 813.3 1288.4 1.0535 0 1658 1288.4 1315.4 1 1 1729 1 0 1288.4 1315.4 1.5330 0 2150 1315.4 1449.4 1 1 1729 1 0 1315.4 1449.4 0.8944 0 2539 1449.4 1726.1 1 1 1729 1 0 1449.4 1726.1 -0.1931 0 2851 1726.1 1729.4 0 1 1729 1 1 1726.1 1729.4 0.4081 0 ------------------------------------------------------------ id: 9 entry time status rr dtime fdeath death start stop x strata 9 0.0 433.5 1 1 5110 0 0 0.0 433.5 -0.4660 0 1006 433.5 2451.1 1 1 5110 0 0 433.5 2451.1 1.0647 0 1659 2451.1 3629.7 1 1 5110 0 0 2451.1 3629.7 -0.2506 0 2151 3629.7 3644.7 1 1 5110 0 0 3629.7 3644.7 -0.6748 0 2540 3644.7 3695.8 1 1 5110 0 0 3644.7 3695.8 0.6510 0 2852 3695.8 3890.7 1 1 5110 0 0 3695.8 3890.7 -0.2033 0 3112 3890.7 5110.0 0 1 5110 0 0 3890.7 5110.0 -1.6981 0 \end{verbatim} The status variable keeps track of the recurrent evnts and their type, and death the timing of death. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec1,caption= ,captionpos=b} \begin{lstlisting} # to fit non-parametric models with just a baseline xr <- phreg(Surv(entry,time,status)~cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) # robust standard errors rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=4) # marginal mean of expected number of recurrent events out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec1.jpg} \end{center} \captionof{figure}{Marginal mean for number of type 1 events, rate for death (panel (a)), rate for type 1 among survivors (panel (b)), and marginal mean (panel (c)).} \label{fig:rec} \end{marginfigure} We can do the same with strata \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec2,caption= ,captionpos=b} \begin{lstlisting} xr <- phreg(Surv(entry,time,status)~strata(strata)+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~strata(strata)+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec2.jpg} \end{center} \captionof{figure}{Recurrent events} \label{fig:rec2} \end{marginfigure} Furhter, if we adjust for covariates for the two rates we can still do predictions of marginal mean, what can be plotted is the baseline marginal mean, that is for the covariates equal to 0 for both models. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec3,caption= ,captionpos=b} \begin{lstlisting} # cox case xr <- phreg(Surv(entry,time,status)~x+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~x+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) # predictions witout se's outX <- recmarg(xr,dr,Xr=1,Xd=1) bplot(outX,add=TRUE,col=3) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec3.jpg} \end{center} \captionof{figure}{Recurrent events with cox models for rates.} \label{fig:rec3} \end{marginfigure} \subsection*{Other marginal properties} \label{sec:org2fcaab7} \begin{itemize} \item \(P(N_1^*(t) \ge k)\) \begin{itemize} \item cumulative incidence of \(T_{k} = \inf \{ t: N_1^*(t)=k \}\) with competing \(D\). \end{itemize} \end{itemize} We note also that \(N_1^*(t)^2\) can be written as \begin{align*} \sum_{k=0}^K \int_0^t I(D > s) I(N_1^*(s-)=k) f(k) dN_1^*(s) \end{align*} with \(f(k)=(k+1)^2 - k^2\), such that its mean can be written as \begin{align*} \sum_{k=0}^K \int_0^t S(s) f(k) P(N_1^*(s-)= k | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k, D> s) \end{align*} and estimated by \begin{align*} \hat \mu_{1,2}(t) & = \sum_{k=0}^K \int_0^t \hat S(s) f(k) \frac{Y_{1\bullet}^k(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^k(s)} d N_{1\bullet}^k(s)= \sum_{i=1}^n \int_0^t \hat S(s) f(N_{i1}(s-)) \frac{1}{Y_\bullet (s)} d N_{i1}(s), \end{align*} Compared to "product-limit" estimator for \(E( (N_1^*(t))^2 )\) \begin{align} \hat \mu_{1,2}(t) & = \sum_{k=0}^K k^2 ( \hat F_{k}(t) - \hat F_{k+1}(t) ). \end{align} Probabilty of exceeding "k" Note also that \(I(N_1^*(t) \geq k)\) is \begin{align*} \int_0^t I(D > s) I(N_1^*(s-)=k-1) dN_1^*(s), \end{align*} suggesting that its mean can be computed as \begin{align*} \int_0^t S(s) P(N_1^*(s-)= k-1 | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k-1, D> s) \end{align*} and estimated by \begin{align*} \tilde F_k(t) = \int_0^t \hat S(s) \frac{Y_{1\bullet}^{k-1}(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^{k-1}(s)} d N_{1\bullet}^{k-1}(s). \end{align*} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4,caption= ,captionpos=b} \begin{lstlisting} cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4,caption= ,captionpos=b} \begin{lstlisting} cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4MV.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4MV} \end{marginfigure} Mean and variance of number of recurrent events \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4MV,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(1,2)) with(oo,plot(time,mu,col=2,type="l")) # with(oo,plot(time,varN,type="l")) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4Bi,caption= ,captionpos=b} \begin{lstlisting} # Bivariate probability of exceeding oo <- prob.exceedBiRecurrent(rr,1,2,exceed1=c(1,5,10),exceed2=c(1,2,3)) with(oo, matplot(time,pe1e2,type="s")) nc <- ncol(oo$pe1e2) legend("topleft",legend=colnames(oo$pe1e2),lty=1:nc,col=1:nc) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4Bi.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4Bi} \end{marginfigure} \subsection*{Dependence between events: Covariance} \label{sec:org0e76a6d} Covariance among two types of events \begin{align} \rho(t) & = \frac{ E(N_1^*(t) N_2^*(t) ) - \mu_1(t) \mu_2(t) }{ \mbox{sd}(N_1^*(t)) \mbox{sd}(N_2^*(t)) } \end{align} where \begin{itemize} \item \(E(N_1^*(t) N_2^*(t))\). \end{itemize} \begin{align*} E(N_1^*(t) N_2^*(t)) & = E( \int_0^t N_1^*(s-) dN_2^*(s) ) + E( \int_0^t N_2^*(s-) dN_1^*(s) ) \end{align*} Recall that \(N_1^*(t \wedge D)\) and \(N_2^*(t \wedge D)\). \begin{align*} E(\int_0^t N_1^*(s-) dN_2^*(s) ) & = \sum_k E( \int_0^t k I(N_1^*(s-)=k) I(D \geq s) dN_2^*(s) ) \end{align*} \begin{align*} = \sum_k \int_0^t S(s) k P(N_1^*(s-)= k | D \geq s) E( dN_2^*(s) | N_1^*(s-)=k, D \geq s) \end{align*} estimated by \begin{align*} & \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s), \end{align*} \begin{itemize} \item \(Y_j^k(t) = \sum Y_i(t) I( N_{ji}^*(s-)=k)\) for \(j=1,2\), \item \(\tilde N_{j,k}(t) = \sum_i \int_0^t I(N_{ij^o}(s-)=k) dN_{ij}(s)\) \end{itemize} Estimate of \$ E(N\(_{\text{1}}^{\text{*}}\)(t) N\(_{\text{2}}^{\text{*}}\)(t))\$ \begin{align*} \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s) + \sum_k \int_0^t \hat S(s) k \frac{Y_2^k(s)}{Y_\bullet (s)} \frac{1}{Y_2^k(s)} d \tilde N_{1,k}(s). \end{align*} \begin{itemize} \item Without terminating event covariance is useful nonpar measure \item With terminating event dependence generated by terminating event. \item In reality what is of interest would be independence among survivors \begin{itemize} \item if \(N_1\) not predicitive for \(N_2\) \end{itemize} \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} \begin{itemize} \item if \(N_2\) not predicitive for \(N_1\) \end{itemize} \begin{align} E( dN_1^*(t) | N_2^*(t-)=k, D \geq t) = E( dN_1^*(t) | D \geq t) \end{align} \end{itemize} If the two processes are independent among survivors then \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} so \begin{align*} E( \int_0^t N_1^*(s-) dN_2^*(s) ) & = \int_0^t S(s) E(N_1^*(s-) | D \geq s) E( dN_2^*(s) | D \geq s) \end{align*} and \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s), \end{align*} where \(N_{j\bullet}(t) = \sum_i \int_0^t dN_{j,i}(s)\). Under the independence \(E(N_1^*(t) N_2^*(t))\) is estimated \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s) + \int_0^t \hat S(s) \{ \sum_k k \frac{Y_2^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{1\bullet}(s). \end{align*} Both estimators, \(\hat E(N_1^*(t) N_2^*(t))\) and \(\hat E_I(N_1^*(t) N_2^*(t))\), as well as \(\hat E(N_1^*(t))\) and \(\hat E(N_2^*(t))\), have asymptotic expansions that can be written as a sum of iid processes, similarly to the arguments of Ghosh \& Lin 2000, \(\sum_i \Psi_i(t)\). We can thus estimate the standard errors and of the estimators and their difference \(\hat E(N_1^*(t) N_2^*(t))- \hat E_I(N_1^*(t) N_2^*(t))\). Terms for \begin{itemize} \item N1 -> N2 : \(E( \int_0^t N_1^*(s-) dN_2^*(s) )\) \item N2 -> N1 : \(E( \int_0^t N_2^*(s-) dN_1^*(s) )\) \end{itemize} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec5,caption= ,captionpos=b} \begin{lstlisting} rr$strata <- 1 dtable(rr,~death+status) covrp <- covarianceRecurrent(rr,1,2,status="status",death="death", start="entry",stop="time",id="id",names.count="Count") par(mfrow=c(1,3)) plot(covrp) # with strata, each strata in matrix column, provides basis for fast Bootstrap covrpS <- covarianceRecurrentS(rr,1,2,status="status",death="death", start="entry",stop="time",strata="strata",id="id",names.count="Count") \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec5.jpg} \end{center} \captionof{figure}{Covariance between events} \label{fig:rec5} \end{marginfigure} \subsection*{Bootstrap standard errors for terms} \label{sec:orgc567a4f} First fitting the model again to get our estimates of interst, and then computing them for some specific time-points \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} times <- seq(500,5000,500) coo1 <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") # mug <- Cpred(cbind(coo1$time,coo1$EN1N2),times)[,2] mui <- Cpred(cbind(coo1$time,coo1$EIN1N2),times)[,2] mu2.1 <- Cpred(cbind(coo1$time,coo1$mu2.1),times)[,2] mu2.i <- Cpred(cbind(coo1$time,coo1$mu2.i),times)[,2] mu1.2 <- Cpred(cbind(coo1$time,coo1$mu1.2),times)[,2] mu1.i <- Cpred(cbind(coo1$time,coo1$mu1.i),times)[,2] cbind(mu2.1,mu2.i) cbind(mu1.2,mu1.i) \end{lstlisting} \begin{verbatim} mu2.1 mu2.i [1,] 0.04101096 0.03656491 [2,] 0.09303668 0.08572694 [3,] 0.22613687 0.21906324 [4,] 0.35727148 0.34562539 [5,] 0.60258982 0.59071900 [6,] 0.80089841 0.79020220 [7,] 1.03031183 1.03424672 [8,] 1.16860632 1.16686717 [9,] 1.25782175 1.25105963 [10,] 1.38716306 1.40250244 mu1.2 mu1.i [1,] 0.03501045 0.03259566 [2,] 0.08803686 0.08526834 [3,] 0.16709531 0.16634828 [4,] 0.27720710 0.29485672 [5,] 0.38034407 0.41985665 [6,] 0.53057410 0.56459585 [7,] 0.69387628 0.72234676 [8,] 0.87226707 0.88771625 [9,] 0.96949736 0.99728527 [10,] 1.06074066 1.06854228 \end{verbatim} To get the bootstrap standard errors there is a quick memory demanding function (with S for speed and strata) BootcovariancerecurrenceS and slow function that goes through the loops in R Bootcovariancerecurrence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} bt1 <- BootcovariancerecurrenceS(rr,1,2,status="status",start="entry",stop="time",K=100,times=times) #bt1 <- BootcovariancerecurrenceS(rr,1,2,status="status",start="entry",stop="time",K=K,times=times) output <- list(bt1=bt1,mug=mug,mui=mui, bse.mug=bt1$se.mug,bse.mui=bt1$se.mui, dmugi=mug-mui, bse.dmugi=apply(bt1$EN1N2-bt1$EIN1N2,1,sd), mu2.1 = mu2.1 , mu2.i = mu2.i , dmu2.i=mu2.1-mu2.i, mu1.2 = mu1.2 , mu1.i = mu1.i , dmu1.i=mu1.2-mu1.i, bse.mu2.1=apply(bt1$mu2.i,1,sd), bse.mu2.1=apply(bt1$mu2.1,1,sd), bse.dmu2.i=apply(bt1$mu2.1-bt1$mu2.i,1,sd), bse.mu1.2=apply(bt1$mu1.2,1,sd), bse.mu1.i=apply(bt1$mu1.i,1,sd), bse.dmu1.i=apply(bt1$mu1.2-bt1$mu1.i,1,sd) ) \end{lstlisting} We then look at the test for overall dependence in the different time-points. We here have no suggestion of dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tt <- output$dmugi/output$bse.dmugi cbind(times,2*(1-pnorm(abs(tt)))) \end{lstlisting} \begin{verbatim} times [1,] 500 0.3572253 [2,] 1000 0.4577012 [3,] 1500 0.7136132 [4,] 2000 0.7956959 [5,] 2500 0.3837459 [6,] 3000 0.5134406 [7,] 3500 0.4209237 [8,] 4000 0.7632914 [9,] 4500 0.6836682 [10,] 5000 0.6598813 \end{verbatim} We can also take out the specific components for whether \(N_1\) is predictive for \(N_2\) and vice versa. We here have no suggestion of dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} t21 <- output$dmu1.i/output$bse.dmu1.i t12 <- output$dmu2.i/output$bse.dmu2.i cbind(times,2*(1-pnorm(abs(t21))),2*(1-pnorm(abs(t12)))) \end{lstlisting} \begin{verbatim} times [1,] 500 0.71706002 0.3918872 [2,] 1000 0.81454942 0.3202626 [3,] 1500 0.95715638 0.6006314 [4,] 2000 0.21300406 0.4942293 [5,] 2500 0.02182129 0.6086128 [6,] 3000 0.11688970 0.6805457 [7,] 3500 0.25587816 0.8965495 [8,] 4000 0.63373150 0.9578608 [9,] 4500 0.41743073 0.8548733 [10,] 5000 0.83041113 0.6805618 \end{verbatim} We finally plot the boostrap samples \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec6,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(1,2)) matplot(bt1$time,bt1$EN1N2,type="l",lwd=0.3) matplot(bt1$time,bt1$EIN1N2,type="l",lwd=0.3) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec6.jpg} \end{center} \captionof{figure}{Bootstrap samples} \label{fig:rec6} \end{marginfigure} \subsection*{Looking at other simulations with dependence} \label{sec:orga99167a} Using the normally distributed random effects we plot 4 different settings. We have variance \(0.5\) for all random effects and change the correlation. We let the correlation between the random effect associated with \(N_1\) and \(N_2\) be denoted \(\rho_{12}\) and the correlation between the random effects associated between \(N_j\) and \(D\) the terminal event be denoted as \(\rho_{j3}\), and organize all correlation in a vector \(\rho=(\rho_{12},\rho_{13},\rho_{23})\). \begin{itemize} \item Scenario I \(\rho=(0,0.0,0.0)\) Independence among all efects. \item Scenario II \(\rho=(0,0.5,0.5)\) Independence among survivors but dependence on terminal event \item Scenario III \(\rho=(0.5,0.5,0.5)\) Positive dependence among survivors and dependence on terminal event \item Scenario IV \(\rho=(-0.4,0.5,0.5)\) Negative dependence among survivors and positive dependence on terminal event \end{itemize} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec7,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(2,2)) data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.0), c(0.0, 1.0, 0.0), c(0.0, 0.0, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) cor(attr(rr,"z")) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") par(mfrow=c(2,2)) with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (a)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario I") var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.5), c(0.0, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (b)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario II") var.z <- c(0.5,0.5,0.5) # positive dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, 0.5, 0.5), c(0.5, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (d)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario III") var.z <- c(0.5,0.5,0.5) # negative dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, -0.4, 0.5), c(-0.4, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (d)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario IV") \end{lstlisting} \begin{figure} \begin{center} \includegraphics[width=\textwidth]{rec7.jpg} \end{center} \captionof{figure}{Bootstrap samples} \label{fig:rec7} \end{figure} \end{document}mets/vignettes/marginal-cox.org0000644000176200001440000002227613623061405016335 0ustar liggesusers#+TITLE: Marginal modelling of clustered survival data #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Marginal Cox}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview A basic component for our modelling of multivariate survival data is that many models are build around marginals that on Cox form. The marginal Cox model can be fitted efficiently in the mets package. The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{g(k,i)}(t) \exp( X_{ki}^T \beta). \] where \( g(k,i) \) gives the strata for the subject. We here discuss and show how to get - robust standard errors of - the regression parameters - the baseline and how to do goodness of fit test using - cumulative residuals score test First we generate some data from the Clayton-Oakes model, with \( 5 \) members in each cluster and a variance parameter at \( 2 \) #+BEGIN_SRC R :exports code :ravel echo=FALSE library(mets) options(warn=-1) set.seed(1000) # to control output in simulatins for p-values below. n <- 1000 k <- 5 theta <- 2 data <- simClaytonOakes(n,k,theta,0.3,3) #+END_SRC #+RESULTS: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.5 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no head(data) #+END_SRC #+RESULTS: : time status x cluster mintime lefttime truncated : 1 0.1406317 1 0 1 0.1406317 0 0 : 2 0.4593768 1 0 1 0.1406317 0 0 : 3 1.0952678 1 0 1 0.1406317 0 0 : 4 0.2057554 1 1 1 0.1406317 0 0 : 5 0.6776620 1 0 1 0.1406317 0 0 : 6 1.6093755 1 0 2 0.1092390 0 0 The data is on has one subject per row. #+BEGIN_mnote + *=time=* :: time of event + *=status=* :: 1 for event and 0 for censoring + *=x=* :: x is a binary covariate + *=cluster=* :: cluster #+END_mnote Now we fit the model and produce robust standard errors for both regression parameters and baseline. First, recall that the baseline for strata $g$ is asymptotically equivalent to \begin{align} \hat A_g(t) - A_g(t) & = \sum_k \sum_i \int_0^t \frac{1}{S_{0,g}} dM_{ki}^g - P^g(t) \beta_k \end{align} with $P^g(t)$ a derivative wrt to $\beta$, and \begin{align} \hat \beta - \beta & = \sum_k ( \sum_i \int_0^\tau (Z_{ik} - E_{g}) dM_{ik}^g ) = \sum_k \beta_{k} \end{align} with \begin{align} M_{ki}^g(t) & = N_{ki}(t) - \int_0^t Y_{ki}(s) \exp( Z_{ki} \beta) d \Lambda_{g(k,i)}(t), \beta_{k} & = \sum_i \int_0^\tau (Z_{ik} - E_{g}) dM_{ik}^g \end{align} the basic 0-mean processes, that are martingales in the iid setting. The variance of the baseline of strata g is estimated by \begin{align} \sum_{k} ( \sum_i \int_0^t \frac{1}{S_{0,g(k,i)}} d\hat M_{ki}^g - P^g(t) \beta_k )^2 \end{align} that can be computed using the particular structure of \begin{align} d \hat M_{ik}^g(t) & = dN_{ik}(t) - \frac{1}{S_{0,g(i,k)}} \exp(Z_{ik} \beta) dN_{g.}(t) \end{align} This robust variance of the baseline and the iid decomposition for $\beta$ is computed in mets as: #+BEGIN_SRC R :results output :exports both :session *R* :cache no out <- phreg(Surv(time,status)~x+cluster(cluster),data=data) summary(out) # robust standard errors attached to output rob <- robust.phreg(out) #+END_SRC #+RESULTS: : : n events : 5000 4854 : : 1000 clusters : : Estimate S.E. dU^-1/2 P-value : x 0.287859 0.028177 0.028897 0 We can get the iid decomposition of the $\hat \beta - \beta$ by #+BEGIN_SRC R :results output :exports both :session *R* :cache no # making iid decomposition of regression parameters betaiid <- iid(out) head(betaiid) # robust standard errors crossprod(betaiid)^.5 # same as #+END_SRC #+RESULTS: : [,1] : 1 -3.461601e-04 : 2 -1.449189e-03 : 3 -3.898156e-05 : 4 4.215605e-04 : 5 3.425390e-04 : 6 -7.706668e-05 : [,1] : [1,] 0.02817714 We now look at the plot with robust standard errors #+BEGIN_marginfigure #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: robcox1 [[file:robcox1.jpg]] #+LATEX: \captionof{figure}{Baseline with robust standard errors.} label:fig:robcox1 #+END_marginfigure #+NAME: robcox1 #+BEGIN_SRC R :exports both :results output graphics :file robcox1.jpg :ravel fig=TRUE,include=FALSE bplot(rob,se=TRUE,robust=TRUE,col=3) #+END_SRC We can also make survival prediction with robust standard errors using the phreg. #+NAME: robcox2 #+BEGIN_SRC R :exports both :results output graphics :file robcox2.jpg :ravel fig=TRUE,include=FALSE pp <- predict(out,data[1:20,],se=TRUE,robust=TRUE) plot(pp,se=TRUE,whichx=1:10) #+END_SRC #+BEGIN_marginfigure # +CAPTION: Survival predictions with robust standard errors for Cox model label:fig:robcox2 #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: robcox2 [[file:robcox2.jpg]] #+LATEX: \captionof{figure}{Survival predictions with robust standard errors for Cox model} label:fig:robcox2 #+END_marginfigure Finally, just to check that we can recover the model we also estimate the dependence parameter #+BEGIN_SRC R :results output :exports both :session *R* :cache no tt <- twostageMLE(out,data=data) summary(tt) #+END_SRC #+RESULTS[<2018-09-10 14:18:33> cdb331054808b11985b02b84f953da8bfc6afbd9]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.5316753 0.03497789 15.20032 0 0.2100093 0.0109146 $type NULL attr(,"class") [1] "summary.mets.twostage" #+end_example ** Goodness of fit The observed score process is given by \begin{align} U(t,\hat \beta) & = \sum_k \sum_i \int_0^t (Z_{ki} - \hat E_g ) d \hat M_{ki}^g \end{align} where $g$ is strata $g(k,i)$. The observed score has the iid decomposition \begin{align} \hat U(t) = \sum_k \sum_i \int_0^t (Z_{ki} - E_g) dM_{ki}^g - \sum_k I(t) \beta_k \end{align} where $\beta_k$ is the iid decomposition of the score process for the true $\beta$ \begin{align} \beta_k & = \sum_i \int_0^\tau (Z_{ki} - E_g ) d M_{ki}^g \end{align} and $I(t)$ is the derivative of the total score, $\hat U(t,\beta))$, with respect to $\beta$ evaluated at time $t$. This observed score can be resampled given it is on iid form in terms of clusters. Now using the cumulative score process for checking proportional hazards #+BEGIN_SRC R :results output :exports both :session *R* :cache no gout <- gof(out) gout #+END_SRC #+RESULTS[<2018-09-10 14:32:08> 8bde76b6fea8c56142541f6eeb247699c5236c44]: : Cumulative score process test for Proportionality: : Sup|U(t)| pval : x 30.24353 0.401 The p-value reflects wheter the observed score process is consistent with the model. #+BEGIN_marginfigure #+ATTR_LATEX: :width \textwidth :float nil :center t #+RESULTS: robgofcox1 [[file:robgofcox1.jpg]] #+LATEX: \captionof{figure}{Goodness of fit for clustered Cox model.} label:fig:robcgofox1 #+END_marginfigure #+NAME: robgofcox1 #+BEGIN_SRC R :exports both :results output graphics :file robgofcox1.jpg :ravel fig=TRUE,include=FALSE plot(gout) #+END_SRC ** Cluster stratified Cox models For clustered data it is possible to estimate the regression coefficient within clusters by using Cox's partial likelihood stratified on clusters. Note, here that the data is generated with a different subject specific structure, so we will not recover the \( \beta \) at 0.3 and the model will not be a proportional Cox model, we we would also expect to reject "proportionality" with the gof-test. The model can be thought of as \[ \lambda_k(t) \exp( X_{ki}^T \beta) \] where \( \lambda_k(t) \) is some cluster specific baseline. The regression coefficient \( \beta \) can be estimated by using the partial likelihood for clusters. #+BEGIN_SRC R :results output :exports both :session *R* :cache no out <- phreg(Surv(time,status)~x+strata(cluster),data=data) summary(out) #+END_SRC #+RESULTS[<2018-09-11 09:16:22> ca332c824091210c9d8c97177e43d7db5326a8ae]: : : n events : 5000 4854 : : Estimate S.E. dU^-1/2 P-value : x 0.406307 0.032925 0.039226 0 The cumulative score processes can still be used to validate the model #+BEGIN_SRC R :results output :exports both :session *R* :cache no gg <- gof (out) summary(gg) #+END_SRC #+RESULTS[<2018-09-11 09:16:22> 6815b9399a490044f01367d6c2ebbab00700d2fb]: : Cumulative score process test for Proportionality: : Sup|U(t)| pval : x 27.55616 0.195 mets/vignettes/marg1.jpg0000644000176200001440000004221513623061405014747 0ustar liggesusersJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ('}R\ej9bI'ڀ7hkk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^ֿ8G~A5ע?/q ƀ5謏kk4g___ z+#?Zh^6:©fP2I^?Z4@$9J\:Z+](ƭSU'kk4EsZ柤^ަI(V\N>DG=YA4( ( ( ( ( e݃A5X&6((((((((((((((((((((((($ĻuAe(U)u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ej'ٴilf 䉶1)d`X1 m@ cXB" US袀 ( ( (2mJ+R.K;ﲡ;U99N=Ҽ&u$"$":((((((((((((((((((((((/\ux4륟w k>/QdZ5ۻ Kc1bc 0;g5w:k+d #y- ]FGo@Ey$+<"OiZqլwD̀Al`S=wsx[M.rgoiwyv,k\Y(((((((((((((((((((((((((((((((((((((((((((((((((((mets/vignettes/competing.ltx0000644000176200001440000006502313623061405015756 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate competing riks data} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate competing risks data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate competing risks data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgbe56752} \begin{itemize} \item marginal modelling with standard errors cif, \item cause specific hazards \item cumulative incidence modelling \begin{itemize} \item random effects simple cif \item Luise model \end{itemize} \end{itemize} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \(T_1, \delta_1, T_2, \delta_2, X_1, X_2\) where the censored survival responses are \(T_1, \delta_1, T_2, \delta_2\) and we have covariates \(X_1, X_2\). The focus of this vignette is describe how to work on bivariate survival data using the addtive gamma-random effects models. We present two different ways of specifying different dependence structures. The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_0(t) \exp( X_{ki}^T \beta) \] then two types of models can be considered. \begin{itemize} \item Univariate models with a single random effect for each cluster and with a regression design on the varince. \item Multivariate models with multiple random effects for each cluster. \end{itemize} The univariate models are then given a given cluster random effects \(Z_k\) with parameter \(\theta\) the joint survival function is given by the Clayton copula and on the form \[ \psi(\theta, \psi^{-1}(\theta,S_1(t,X_{k1}) ) + \psi^{-1}(\theta, S_1(t,X_{k1}) ) \] where \(\psi\) is the Laplace transform of a gamma distributed random variable with mean 1 and variance \(\theta\). We then model the variance within clusters by a cluster specific regression design such that \[ \theta = z_j^T \alpha \] where \(z\) is the regression design (specified by theta.des in the software). This model can be fitted using a pairwise likelihood or the pseudo-likelihood using either \begin{itemize} \item twostage \item twostageMLE \end{itemize} For the Multivariate models we are given a multivarite random effect each subject \((Z_1,...,Z_d)\) with d random effects. The total random effect for each subject is then specified using a regression design on these random effects, with a regression vector \(v_j\) such that the total random effect is \{v\(_{\text{1}}^{\text{T}}\) (Z\(_{\text{1,\ldots{},Z}}\)\(_{\text{d}}\))\}. Each random effect has an associated parameter \((\lambda_1,...,\lambda_d)\) and \(Z_j\) is Gamma distributed with \begin{itemize} \item mean \(lambda_j/v_1^T \lambda\) \item variance $\backslash$( \(\lambda_{\text{j}}\)/(v\(_{\text{1}}^{\text{T}}\) \(\lambda\))\(^{\text{2}}\)\}. \end{itemize} The key assumption to make the two-stage fitting possible is that \[ lamtot=v_j^T \lambda \] with clusters. The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \[ \theta_j = \lambda_j/(v_1^T \lambda)^2 \] For alternative parametrizations one can specify how the parameters relate to \(\lambda_j\) with the argument var.par=0. For both types of models the basic model assumptions are that given the random effects of the clusters the survival distributions within a cluster are independent and ' on the form \[ P(T > t| x,z) = exp( -Z \cdot Laplace^{-1}(lamtot^{-1},S(t|x)) ) \] with the inverse laplace of the gamma distribution with mean 1 and variance 1/lamtot. Finally the parameters \((\lambda_1,...,\lambda_d)\) are related to the parameters of the model by a regression construction \(M\) (d x k), that links the \(d\) \(\lambda\) parameters with the \(k\) underlying \(\alpha\) parameters \[ \lambda = M \alpha \] here using theta.des to specify these low-dimension association. Default is a diagonal matrix. This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. In software \(M\) is called theta.des We consider \(K\) independent clusters, with \(n_k\) subject within each cluster. For each cluster we are given a set of independent random effects \(V = (V_1,\dots , V_m)^T\). We let \((V_1,\dots,V_m)^T\) be independent Gamma distributed with \(V_l \sim \Gamma(\eta_l , \nu_l), l = 1,\dots,p\) independent gamma distributed random variables such that \(E(V_l) = \eta_l /\nu\) and \(Var(V_l ) = \eta_l /\nu^2\). \%\%Let \(\nu =(\nu_1,\dots,\nu_p)\). The \(\eta=(\eta_1,\dots,\eta_m)\) parameters are given such that \(\eta=D \theta\). Letting the rows in the matrix be denoted as \(Q_i,\dots,Q_m\). \%\%\%As is commonly done \cite{korsgaard1998additive,petersen1998additive} To facilitate our two-stage construction we also assume that \(\nu=Q_i^T \eta\) for all \(i=1,\dots,n_k\) such that \(Q_i^T V\) is also Gamma distributed with \(\Gamma(1, \nu)\), that is has variance \(\nu^{-1}\) and mean 1. We get back to specific models where this is the case, but this assumption is often reasonable and needed \cite{korsgaard1998additive,petersen1998additive} Let \(\Psi(\eta_l,\nu,\cdot)\) denote the Laplace transform of the Gamma distribution \(\Gamma(\eta_l,\nu)\), and let its inverse be \(\Psi^{-1}(\eta_l,\nu,\cdot)\). For simplicity we also assume that \(\eta\) is the same across clusters. Assume that the marginal survival distribution for subject \(i\) within cluster \(k\) is given by \(S_{X_{k,i}}(t)\) given covariates \(X_{k,i}\). Now given the random effects of the cluster \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) we assume that subjects within the cluster are independent with survival distributions \begin{align*} \exp(- ( Q_{k,i} V_k) \Psi^{-1} (\nu,\nu,S_{X_{k,i}}(t)) ). \end{align*} A consequence of this is that the hazards given the covariates \(X_{k,i}\) and the random effects \(V_k\) are given by \begin{align} \lambda_{k,i}(t;X_{k,i},V_{k,i}) = ( Q_{k,i} V_k) D_3 \Psi^{-1} (\nu,\nu,S_{X_{k,i}}(t)) D_t S_{X_{k,i}}(t) \label{eq-cond-haz} \end{align} where \(D_t\) and \(D_3\) denotes the partial derivatives with respect to \(t\) and the third argument, respectively. Further, we can express the multivariate survival distribution as \begin{align} S(t_1,\dots,t_m) & = \exp( -\sum_{i=1}^m (Q_i V) \Psi^{-1}(\eta_l,\nu_l,S_{X_{k,i}}(t_i)) ) \nonumber \\ & = \prod_{l=1}^p \Psi(\eta_l,\eta , \sum_{i=1}^m Q_{k,i} \Psi^{-1}(\eta,\eta,S_{X_{k,i}}(t_i))). \label{eq-multivariate-surv} \end{align} In the case of considering just pairs, we write this function as \(C(S_{k,i}(t),S_{k,j}(t))\). In addition to survival times from this model, we assume that we independent right censoring present \(U_{k,i}\) such that the given \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) \((U_{k,1},\dots,U_{k,n_k})\) of \((T_{k,1},\dots,T_{k,n_k})\), and the conditional censoring distribution do not depend on \(V_k\). We can also express this via counting processes \(N_{k,i}(t)=I(T_{k,i}t,U_{k,i}>t)\), and the censoring indicators \(\delta_{k,i}=I(T_{k,i}OMZ&Czj(!eۡ.[oPeѓMSUto >ܒO@xrk]SRY"Kc`&0L*1rz)(NTikZ4o3}1Zj:M~\䱅J[!}ؑOQE*F 0]*893J{g"97#Xk)EY:OxmHͥlm[ T~;b+w$Qjed+coUaWxkxKB!&򮭘堐uS:{ rԇ+:ϙoeY HK`:Alw}w-֖LZc8RSF[-oe@ MweіKE&[oP:QEQEQEQEQEQEQEQEQEQE8VO }3zչ`p 2򟕕AOBO\.RUu4,ZIMFC"ebq8 #EO"-T'eݳϠk fBaUd)p{<BE8$Om"X" r$ ~<k1ܟ#u>-1C@<7ߧo?ͿOym>f<@-5% Zn<7ߧo?ͿOym>?nB9ؿnOo~(7ߧ g\t/JB 13Tei,x rOO{cWSdȳVOsGS۠$ ɜP}+ ПY-AԄunldtWZI+#O)(=E-1 QR@ QR@ YtM5.2 .-QvFn MX[KI՘ikVi!#Â3Aokʭ'4}cVnc@:7r1B|Eզ6u׷ס 88RF< ݷ4CPXmoi-3ymoiP7ߧY֥?ߏ oh~O6?ƍy4(oiۯԔ}7ymoiP7ߧѼ6?ƟE 9Ɩ((((((((((/0&w;Km Cl>cl6b*b_ٴ{;kylݒx-$𮋖,~\y9uK&f$ylTv=D^dV;Z-ai]GQQELfԔ ;w*Z(7{ʍ򥢀wn_J} Z7{ʍ򥢀w*Z()g^//pDID^&kv~Ҥf0ƃ/+;6lrxWl0vORp"sQC[ԗUY?eS;P}B:0:ϟcKEu$9[m݉cF}-!Ɩh<\Vg[!%wMiWvk=`G['mm#ǒZH~'HBǩ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4Daesn码CW^4D8x%FJ'uWX{bf\)+!>\-،Hƀ ( 1h ( (m]CpǎRzZ+]#T>M'`H.v1'[=@+itrCDZ@YF7=(((9((aJbp3m(3"Ub,^](J@>ڀ ( 1h ( ( NIk#V*r<<=EK J=Q*Z%`Cĸ$qO֥c) bNl1lP`q{Ң(9($jPH;#'9 ֹZ*U++uVzU6Y 1$i wg<f((((((((((((((((oz֙yDny 1Xj9} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate survival data based on Case Control Data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate survival data based on Case Control Data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org37fdee6} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \begin{itemize} \item biprobit model \end{itemize} \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} We have discussed how to fit such models in the vignette about twostage survival modelling. Here we show what can be done if one has data available from case-control sampling. First we set up some case-control data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(100) ncases <- 2000 ncontrols <- ncases*5 data <- simClaytonOakes.twin.ace(100000,1,2,0,3,Cvar=1) theta <- c(1,2) cens.prob <- mean(data$status==0) # data2 <- fast.reshape(data,id="cluster") with(data2,table(status1,status2)) controls <- which(data2$status2==0) cases <- which(data2$status2==1) cases <- sample(cases,min(ncases,length(cases))) controls <- sample(controls,min(ncontrols,length(controls))) nccc <- c(length(cases),length(controls)) clustco <- data2$cluster[controls] clustca <- data2$cluster[cases] # med <- data$cluster %in% c(clustco,clustca) datacc <- data[med,] datacc2 <- fast.reshape(datacc,id="cluster") dd <- with(datacc2,table(status1,status2)) # # out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes des.rv <- out$des.rv aa <- phreg(Surv(time,status)~+cluster(cluster),data=data) out <- twin.polygen.design(datacc,id="cluster") pardes <- out$pardes des.rv <- out$des.rv # # # needs to use pair structure to profile out # baseline mm <- familycluster.index(datacc$cluster) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) # kinship <- rep(1,nrow(pairs)) kinship[datacc$zyg[pairs[,1]]=="DZ"] <- 0.5 table(kinship) # dout <- make.pairwise.design(pairs,kinship,type="ace") des.rv <- dout$random.design pardes <- dout$theta.des # cr.models <- list(Surv(time,status)~+1) tscce <- survival.twostage(NULL,data=datacc, clusters=datacc$cluster, theta=theta,var.link=0,step=1.0, random.design=des.rv,theta.des=pardes, pairs.rvs=dout$ant.rvs,var.par=1, pairs=pairs, case.control=1,marginal.status=datacc$status, cr.models=cr.models) summary(tscce) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.4 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined status2 status1 0 1 0 16121 15661 1 15828 52390 kinship 0.5 1 5963 6037 Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 1.006966 0.08370828 12.02947 0 0.3348778 0.01851575 dependence2 1.838534 0.08963533 20.51127 0 0.4789678 0.01216686 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.3539 0.02812 0.2988 0.4090 2.496e-36 dependence2 0.6461 0.02812 0.5910 0.7012 7.193e-117 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.846 0.06515 2.718 2.973 0 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # known baseline from cohort aa <- aalen(Surv(time,status)~+1,data=data,robust=0) ts <- survival.twostage(aa,data=datacc, clusters=datacc$cluster, theta=theta,var.link=0,step=1.0, random.design=des.rv,theta.des=pardes, pairs.rvs=dout$ant.rvs,var.par=1, pairs=pairs, case.control=1, marginal.status=datacc$status, cr.models=cr.models) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 1.032045 0.07944442 12.99078 0 0.3403792 0.017283117 dependence2 1.897001 0.06795064 27.91734 0 0.4867849 0.008948751 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.3523 0.02247 0.3083 0.3964 2.030e-55 dependence2 0.6477 0.02247 0.6036 0.6917 1.079e-182 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.929 0.07785 2.776 3.082 0 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Figure \ref{fig:surv-cc-base} shows the baseline \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=surv-cc-base,caption= ,captionpos=b} \begin{lstlisting} plot(aa) lines(tscce$baseline,col=2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{surv-cc-base.jpg} \end{center} \captionof{figure}{Baseline with robust standard errors. Black based on cohort data, red based on profiling for case-control data.} \label{fig:robcox1} \end{marginfigure} \end{document}mets/vignettes/basic-dutils.org0000644000176200001440000006523013623061405016334 0ustar liggesusers#+TITLE: Manipulation of data-frame data with dutility functions #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Manipulation of data-frame data with dutility functions}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Simple data manipulation for data-frames - Renaming variables, Deleting variables - Looking at the data - Making new variales for the analysis - Making factors (groupings) - Working with factors - Making a factor from existing numeric variable and vice versa Here are some key data-manipulation steps on a data-frame which is how we typically organize our data in R. After having read the data into R it will typically be a data-frame, if not we can force it to be a data-frame. The basic idea of the utility functions is to get a simple and easy to type way of making simple data-manipulation on a data-frame much like what is possible in SAS or STATA. The functions, say, dcut, dfactor and so on are all functions that basically does what the base R cut, factor do, but are easier to use in the context of data-frames and have additional functionality. #+BEGIN_SRC R :results no :exports code :session *R* :cache no library(mets) data(melanoma) #+END_SRC #+RESULTS: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.5 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no is.data.frame(melanoma) #+END_SRC #+RESULTS: : [1] TRUE Here we work on the melanoma data that is already read into R and is a data-frame. * dUtility functions The structure for all functions is - dfunction(dataframe,y~x|ifcond,...) to use the function on y in a dataframe grouped by x if condition ifcond is valid. The basic functions are Data processing - dsort - dreshape - dcut - drm, drename, ddrop, dkeep, dsubset - drelevel - dlag - dfactor, dnumeric Data aggregation - dby, dby2 - dscalar, deval, daggregate - dmean, dsd, dsum, dquantile, dcor - dtable, dcount Data summaries - dhead, dtail, - dsummary, - dprint, dlist, dlevels, dunique A generic function daggregate, daggr, can be called with a function as the argument - daggregate(dataframe,y~x|ifcond,fun=function,...) without the grouping variable (x) - daggregate(dataframe,~y|ifcond,fun=function,...) A useful feature is that y and x as well as the subset condition can be specified using regular-expressions or by wildcards (default). Here to illustrate this, we compute the means of certain variables. First just oveall #+BEGIN_SRC R :results output :exports both :session *R* :cache no dmean(melanoma,~thick+I(log(thick))) #+END_SRC #+RESULTS: : thick I(log(thick)) : 291.985366 5.223341 now only when days>500 #+BEGIN_SRC R :results output :exports both :session *R* :cache no dmean(melanoma,~thick+I(log(thick))|I(days>500)) #+END_SRC #+RESULTS: : thick I(log(thick)) : 271.582011 5.168691 and now after sex but only when days>500 #+BEGIN_SRC R :results output :exports both :session *R* :cache no dmean(melanoma,thick+I(log(thick))~sex|I(days>500)) #+END_SRC #+RESULTS: : sex thick I(log(thick)) : 1 0 242.9580 5.060086 : 2 1 320.2429 5.353321 and finally after quartiles of days (via the dcut function) #+BEGIN_SRC R :results output :exports both :session *R* :cache no dmean(melanoma,thick+I(log(thick))~I(dcut(days))) #+END_SRC #+RESULTS: : I(dcut(days)) thick I(log(thick)) : 1 [10,1.52e+03] 482.1731 5.799525 : 2 (1.52e+03,2e+03] 208.5490 4.987652 : 3 (2e+03,3.04e+03] 223.2941 4.974759 : 4 (3.04e+03,5.56e+03] 250.1961 5.120129 or summary of all variables starting with "s" and that contains "a" #+BEGIN_SRC R :results output :exports both :session *R* :cache no dmean(melanoma,"s*"+"*a*"~sex|I(days>500)) #+END_SRC #+RESULTS: : sex status days : 1 0 1.831933 2399.143 : 2 1 1.714286 2169.800 * Renaming, deleting, keeping, dropping variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma=drename(melanoma,tykkelse~thick) names(melanoma) #+END_SRC #+RESULTS: : [1] "no" "status" "days" "ulc" "tykkelse" "sex" Deleting variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) melanoma=drm(melanoma,~thick+sex) names(melanoma) #+END_SRC #+RESULTS: : [1] "no" "status" "days" "ulc" or sas style #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) melanoma=ddrop(melanoma,~thick+sex) names(melanoma) #+END_SRC #+RESULTS: : [1] "no" "status" "days" "ulc" alternatively we can also keep certain variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) melanoma=dkeep(melanoma,~thick+sex+status+days) names(melanoma) #+END_SRC #+RESULTS: : [1] "thick" "sex" "status" "days" This can also be done with direct asignment #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) ddrop(melanoma) <- ~thick+sex names(melanoma) #+END_SRC #+RESULTS: : [1] "no" "status" "days" "ulc" * Looking at the data #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) dstr(melanoma) #+END_SRC #+RESULTS: #+begin_example 'data.frame': 205 obs. of 6 variables: $ no : int 789 13 97 16 21 469 685 7 932 944 ... $ status: int 3 3 2 3 1 1 1 1 3 1 ... $ days : int 10 30 35 99 185 204 210 232 232 279 ... $ ulc : int 1 0 0 0 1 1 1 1 1 1 ... $ thick : int 676 65 134 290 1208 484 516 1288 322 741 ... $ sex : int 1 1 1 0 1 1 1 1 0 0 ... Warning message: In structure(res, ngroupvar = 0, class = c("daggregate", class(res))) : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead. #+end_example The data can in Rstudio be seen as a data-table but to list certain parts of the data in output window #+BEGIN_SRC R :results output :exports both :session *R* :cache no dlist(melanoma) #+END_SRC #+RESULTS: #+begin_example no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 --- 201 317 2 4492 1 706 1 202 798 2 4668 0 612 0 203 806 2 4688 0 48 0 204 606 2 4926 0 226 0 205 328 2 5565 0 290 0 #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no dlist(melanoma, ~.|sex==1) #+END_SRC #+RESULTS: #+begin_example no status days ulc thick 1 789 3 10 1 676 2 13 3 30 0 65 3 97 2 35 0 134 5 21 1 185 1 1208 6 469 1 204 1 484 --- 191 445 2 3909 1 806 195 415 2 4119 0 65 197 175 2 4207 0 65 198 493 2 4310 0 210 201 317 2 4492 1 706 #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no dlist(melanoma, ~ulc+days+thick+sex|sex==1) #+END_SRC #+RESULTS: #+begin_example ulc days thick sex 1 1 10 676 1 2 0 30 65 1 3 0 35 134 1 5 1 185 1208 1 6 1 204 484 1 --- 191 1 3909 806 1 195 0 4119 65 1 197 0 4207 65 1 198 0 4310 210 1 201 1 4492 706 1 #+end_example Getting summaries #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma) #+END_SRC #+RESULTS: #+begin_example no status days ulc thick Min. : 2.0 Min. :1.00 Min. : 10 Min. :0.000 Min. : 10 1st Qu.:222.0 1st Qu.:1.00 1st Qu.:1525 1st Qu.:0.000 1st Qu.: 97 Median :469.0 Median :2.00 Median :2005 Median :0.000 Median : 194 Mean :463.9 Mean :1.79 Mean :2153 Mean :0.439 Mean : 292 3rd Qu.:731.0 3rd Qu.:2.00 3rd Qu.:3042 3rd Qu.:1.000 3rd Qu.: 356 Max. :992.0 Max. :3.00 Max. :5565 Max. :1.000 Max. :1742 sex Min. :0.0000 1st Qu.:0.0000 Median :0.0000 Mean :0.3854 3rd Qu.:1.0000 Max. :1.0000 #+end_example or for specfic variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,~thick+status+sex) #+END_SRC #+RESULTS: : thick status sex : Min. : 10 Min. :1.00 Min. :0.0000 : 1st Qu.: 97 1st Qu.:1.00 1st Qu.:0.0000 : Median : 194 Median :2.00 Median :0.0000 : Mean : 292 Mean :1.79 Mean :0.3854 : 3rd Qu.: 356 3rd Qu.:2.00 3rd Qu.:1.0000 : Max. :1742 Max. :3.00 Max. :1.0000 Summaries in different groups (sex) #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,thick+days+status~sex) #+END_SRC #+RESULTS: #+begin_example sex: 0 thick days status Min. : 10.0 Min. : 99 Min. :1.000 1st Qu.: 97.0 1st Qu.:1636 1st Qu.:2.000 Median : 162.0 Median :2059 Median :2.000 Mean : 248.6 Mean :2283 Mean :1.833 3rd Qu.: 306.0 3rd Qu.:3131 3rd Qu.:2.000 Max. :1742.0 Max. :5565 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. : 16.0 Min. : 10 Min. :1.000 1st Qu.: 105.0 1st Qu.:1052 1st Qu.:1.000 Median : 258.0 Median :1860 Median :2.000 Mean : 361.1 Mean :1946 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2784 3rd Qu.:2.000 Max. :1466.0 Max. :4492 Max. :3.000 #+end_example and only among those with thin-tumours or only females (sex==1) #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,thick+days+status~sex|thick<97) #+END_SRC #+RESULTS: #+begin_example sex: 0 thick days status Min. :10.00 Min. : 355 Min. :1.000 1st Qu.:32.00 1st Qu.:1762 1st Qu.:2.000 Median :64.00 Median :2227 Median :2.000 Mean :51.48 Mean :2425 Mean :2.034 3rd Qu.:65.00 3rd Qu.:3185 3rd Qu.:2.000 Max. :81.00 Max. :4688 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. :16.00 Min. : 30 Min. :1.000 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 Median :65.00 Median :2886 Median :2.000 Mean :55.75 Mean :2632 Mean :1.875 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 Max. :81.00 Max. :4207 Max. :3.000 #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,thick+status~+1|sex==1) #+END_SRC #+RESULTS: : thick status : Min. : 16.0 Min. :1.000 : 1st Qu.: 105.0 1st Qu.:1.000 : Median : 258.0 Median :2.000 : Mean : 361.1 Mean :1.722 : 3rd Qu.: 484.0 3rd Qu.:2.000 : Max. :1466.0 Max. :3.000 or #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,~thick+status|sex==1) #+END_SRC #+RESULTS: : thick status : Min. : 16.0 Min. :1.000 : 1st Qu.: 105.0 1st Qu.:1.000 : Median : 258.0 Median :2.000 : Mean : 361.1 Mean :1.722 : 3rd Qu.: 484.0 3rd Qu.:2.000 : Max. :1466.0 Max. :3.000 To make more complex conditions need to use the I() #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsummary(melanoma,thick+days+status~sex|I(thick<97 & sex==1)) #+END_SRC #+RESULTS: : sex: 1 : thick days status : Min. :16.00 Min. : 30 Min. :1.000 : 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 : Median :65.00 Median :2886 Median :2.000 : Mean :55.75 Mean :2632 Mean :1.875 : 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 : Max. :81.00 Max. :4207 Max. :3.000 Tables between variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~status+sex) #+END_SRC #+RESULTS: : : sex 0 1 : status : 1 28 29 : 2 91 43 : 3 7 7 All bivariate tables #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~status+sex+ulc,level=2) #+END_SRC #+RESULTS: #+begin_example status sex 1 2 3 0 28 91 7 1 29 43 7 status ulc 1 2 3 0 16 92 7 1 41 42 7 sex ulc 0 1 0 79 36 1 47 43 #+end_example All univariate tables #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~status+sex+ulc,level=1) #+END_SRC #+RESULTS: #+begin_example status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 #+end_example and with new variables #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~status+sex+ulc+dcut(days)+I(days>300),level=1) #+END_SRC #+RESULTS: #+begin_example status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 dcut(days) [10,1.52e+03] (1.52e+03,2e+03] (2e+03,3.04e+03] (3.04e+03,5.56e+03] 52 51 51 51 I(days > 300) FALSE TRUE 11 194 #+end_example * Sorting the data To sort the data #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) mel= dsort(melanoma,~days) dsort(melanoma) <- ~days head(mel) #+END_SRC #+RESULTS: : no status days ulc thick sex : 1 789 3 10 1 676 1 : 2 13 3 30 0 65 1 : 3 97 2 35 0 134 1 : 4 16 3 99 0 290 0 : 5 21 1 185 1 1208 1 : 6 469 1 204 1 484 1 and to sort after multiple variables increasing and decreasing #+BEGIN_SRC R :results output :exports both :session *R* :cache no dsort(melanoma) <- ~days-status head(melanoma) #+END_SRC #+RESULTS: : no status days ulc thick sex : 1 789 3 10 1 676 1 : 2 13 3 30 0 65 1 : 3 97 2 35 0 134 1 : 4 16 3 99 0 290 0 : 5 21 1 185 1 1208 1 : 6 469 1 204 1 484 1 * Making new variales for the analysis To define a bunch of new covariates within a data-frame #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) melanoma= transform(melanoma, thick2=thick^2, lthick=log(thick) ) dhead(melanoma) #+END_SRC #+RESULTS: : no status days ulc thick sex thick2 lthick : 1 789 3 10 1 676 1 456976 6.516193 : 2 13 3 30 0 65 1 4225 4.174387 : 3 97 2 35 0 134 1 17956 4.897840 : 4 16 3 99 0 290 0 84100 5.669881 : 5 21 1 185 1 1208 1 1459264 7.096721 : 6 469 1 204 1 484 1 234256 6.182085 When the above definitions are done using a condition this can be achieved using the dtransform function that extends transform with a possible condition #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma=dtransform(melanoma,ll=thick*1.05^ulc,sex==1) melanoma=dtransform(melanoma,ll=thick,sex!=1) dmean(melanoma,ll~sex+ulc) #+END_SRC #+RESULTS: : sex ulc ll : 1 0 0 173.7342 : 2 1 0 197.3611 : 3 0 1 374.5532 : 4 1 1 523.1198 * Making factors (groupings) On the melanoma data the variable thick gives the thickness of the melanom tumour. For some analyses we would like to make a factor depending on the thickness. This can be done in several different ways #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma=dcut(melanoma,~thick,breaks=c(0,200,500,800,2000)) #+END_SRC #+RESULTS: New variable is named thickcat.0 by default. To see levels of factors in data-frame #+BEGIN_SRC R :results output :exports both :session *R* :cache no dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat.0 #levels=:4 : [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" : ----------------------------------------- Checking group sizes #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~thickcat.0) #+END_SRC #+RESULTS: : : thickcat.0 : [0,200] (200,500] (500,800] (800,2e+03] : 109 64 20 12 With adding to the data-frame directly #+BEGIN_SRC R :results output :exports both :session *R* :cache no dcut(melanoma,breaks=c(0,200,500,800,2000)) <- gr.thick1~thick dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat.0 #levels=:4 : [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" : ----------------------------------------- : gr.thick1 #levels=:4 : [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" : ----------------------------------------- new variable is named thickcat.0 (after first cut-point), or to get quartiles with default names thick.cat.4 #+BEGIN_SRC R :results output :exports both :session *R* :cache no dcut(melanoma) <- ~ thick # new variable is thickcat.4 dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat.0 #levels=:4 : [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" : ----------------------------------------- : gr.thick1 #levels=:4 : [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" : ----------------------------------------- : thickcat.4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- or median groups, here starting again with the original data, #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) dcut(melanoma,breaks=2) <- ~ thick # new variable is thick.2 dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat.2 #levels=:2 : [1] "[10,194]" "(194,1.74e+03]" : ----------------------------------------- to control new names #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) mela= dcut(melanoma,thickcat4+dayscat4~thick+days,breaks=4) dlevels(mela) #+END_SRC #+RESULTS: : thickcat4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- : dayscat4 #levels=:4 : [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" : [4] "(3.04e+03,5.56e+03]" : ----------------------------------------- or #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) dcut(melanoma,breaks=4) <- thickcat4+dayscat4~thick+days dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- : dayscat4 #levels=:4 : [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" : [4] "(3.04e+03,5.56e+03]" : ----------------------------------------- This can also be typed out more specifically #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma$gthick = cut(melanoma$thick,breaks=c(0,200,500,800,2000)) melanoma$gthick = cut(melanoma$thick,breaks=quantile(melanoma$thick),include.lowest=TRUE) #+END_SRC #+RESULTS: * Working with factors To see levels of covariates in data-frame #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) dcut(melanoma,breaks=4) <- thickcat4~thick dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- To relevel the factor #+BEGIN_SRC R :results output :exports both :session *R* :cache no dtable(melanoma,~thickcat4) melanoma = drelevel(melanoma,~thickcat4,ref="(194,356]") dlevels(melanoma) #+END_SRC #+RESULTS: #+begin_example thickcat4 [10,97] (97,194] (194,356] (356,1.74e+03] 56 53 45 51 thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- #+end_example or to take the third level in the list of levels, same as above, #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma = drelevel(melanoma,~thickcat4,ref=2) dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- : thickcat4.(194,356] #levels=:4 : [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" : ----------------------------------------- : thickcat4.2 #levels=:4 : [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- To combine levels of a factor (first combinining first 3 groups into one) #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma = drelevel(melanoma,~thickcat4,newlevels=1:3) dlevels(melanoma) #+END_SRC #+RESULTS: #+begin_example thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.1:3 #levels=:2 [1] "[10,97]-(194,356]" "(356,1.74e+03]" ----------------------------------------- #+end_example or to combine groups 1 and 2 into one group and 3 and 4 into another #+BEGIN_SRC R :results output :exports both :session *R* :cache no dkeep(melanoma) <- ~thick+thickcat4 melanoma = drelevel(melanoma,gthick2~thickcat4,newlevels=list(1:2,3:4)) dlevels(melanoma) #+END_SRC #+RESULTS: : thickcat4 #levels=:4 : [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" : ----------------------------------------- : gthick2 #levels=:2 : [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" : ----------------------------------------- Changing order of factor levels #+BEGIN_SRC R :results output :exports both :session *R* :cache no dfactor(melanoma,levels=c(3,1,2,4)) <- thickcat4.2~thickcat4 dlevel(melanoma,~ "thickcat4*") dtable(melanoma,~thickcat4+thickcat4.2) #+END_SRC #+RESULTS: #+begin_example thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 (194,356] [10,97] (97,194] (356,1.74e+03] thickcat4 [10,97] 0 56 0 0 (97,194] 0 0 53 0 (194,356] 45 0 0 0 (356,1.74e+03] 0 0 0 51 #+end_example Combine levels but now control factor-level names #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma=drelevel(melanoma,gthick3~thickcat4,newlevels=list(group1.2=1:2,group3.4=3:4)) dlevels(melanoma) #+END_SRC #+RESULTS: #+begin_example thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- gthick2 #levels=:2 [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- gthick3 #levels=:2 [1] "group1.2" "group3.4" ----------------------------------------- #+end_example * Making a factor from existing numeric variable and vice versa A numeric variable "status" with values 1,2,3 into a factor by #+BEGIN_SRC R :results output :exports both :session *R* :cache no data(melanoma) melanoma = dfactor(melanoma,~status, labels=c("malignant-melanoma","censoring","dead-other")) melanoma = dfactor(melanoma,sexl~sex,labels=c("females","males")) dtable(melanoma,~sexl+status.f) #+END_SRC #+RESULTS: : : status.f malignant-melanoma censoring dead-other : sexl : females 28 91 7 : males 29 43 7 A gender factor with values "M", "F" can be converted into numerics by #+BEGIN_SRC R :results output :exports both :session *R* :cache no melanoma = dnumeric(melanoma,~sexl) dstr(melanoma,"sex*") dtable(melanoma,~'sex*',level=2) #+END_SRC #+RESULTS: #+begin_example 'data.frame': 205 obs. of 3 variables: $ sex : int 1 1 1 0 1 1 1 1 0 0 ... $ sexl : Factor w/ 2 levels "females","males": 2 2 2 1 2 2 2 2 1 1 ... $ sexl.n: num 2 2 2 1 2 2 2 2 1 1 ... Warning message: In structure(res, ngroupvar = 0, class = c("daggregate", class(res))) : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead. sex sexl 0 1 females 126 0 males 0 79 sex sexl.n 0 1 1 126 0 2 0 79 sexl sexl.n females males 1 126 0 2 0 79 #+end_example mets/vignettes/binomial-twin.org0000644000176200001440000007306213623061405016524 0ustar liggesusers#+TITLE: Analysis of bivariate binomial data: Twin analysis #+AUTHOR: Klaus Holst & Thomas Scheike #+PROPERTY: header-args:R :session *R* :cache no :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+INCLUDE: header.org #+OPTIONS: toc:nil timestamp:nil #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{Analysis of bivariate binomial data: Twin analysis}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC ----- # +LaTeX: \clearpage * Overview When looking at bivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. - Random-effects models logistic regression covered elsewhere (glmer in lme4). in the mets package you can fit the - Pairwise odds ratio model - Bivariate Probit model - With random effects - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. - Additive gamma random effects model - Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible in our models. To be concrete about the model structure assume that we have paired binomial data \( Y_1, Y_2, X_1, X_2 \) where the responses are \( Y_1, Y_2 \) and we have covariates \( X_1, X_2 \). We start by giving a brief description of these different models. First we for bivariate data one can specify the marginal probability using logistic regression models \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2. \] These model can be estimated under working independence \cite{zeger-liang-86}. A typical twin analysis will typically consist of looking at both - Pairwise odds ratio model - Bivariate Probit model The additive gamma can be used for the same as the bivariate probit model but is more restrictive in terms of dependence structure, but is nevertheless still valuable to have also as a check of results of the bivariate probit model. ** Biprobit with random effects For these model we assume that given random effects $Z$ and a covariate vector \( V_{12} \) we have independent logistic regression models \[ probit(P(Y_i=1|X_i, Z)) = \alpha_i + X_i^T \beta + V_{12}^T Z i=1,2. \] where \( Z \) is a bivariate normal distribution with some covariance \( \Sigma \). The general covariance structure \( \Sigma \) makes the model very flexible. We note that - Paramters \( \beta \) are subject specific - The \( \Sigma \) will reflect dependence The more standard link function \( logit \) rather than the \( probit \) link is often used and implemented in for example \cite{mm}. The advantage is that one now gets an odds-ratio interpretation of the subject specific effects, but one then needs numerical integration to fit the model. #We note that # # - Numerical integration is involved and this can be difficult for many random # effects. ** Pairwise odds ratio model Now the pairwise odds ratio model the specifies that given \( X_1, X_2 \) the marginal models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] The primary object of interest are the odds ratio between \(Y_{1}\) and \(Y_{2}\) \[ \gamma_{12} = \frac{ P( Y_{ki} =1 , Y_{kj} =1) P( Y_{ki} =0 , Y_{kj} =0) }{ P( Y_{ki} =1 , Y_{kj} =0) P( Y_{ki} =0 , Y_{kj} =1) } \] given \(X_{ki}\), \(X_{kj}\), and \(Z_{kji}\). We model the odds ratio with the regression \[ \gamma_{12} = \exp( Z_{12}^T \lambda) \] Where \( Z_{12} \) are some covarites that may influence the odds-ratio between between \(Y_{1}\) and \(Y_{2}\) and contains the marginal covariates, \cite{carey-1993,dale1986global,palmgren1989,molenberghs1994marginal}. This odds-ratio is given covariates as well as marginal covariates. The odds-ratio and marginals specify the joint bivariate distribution via the so-called Placckett-distribution. One way of fitting this model is the ALR algoritm, the alternating logistic regression ahd this has been described in several papers \cite{kuk2004permutation,kuk2007hybrid,qaqish2012orthogonalized}. We here simply estimate the parameters in a two stage-procedure - Estimating the marginal parameters via GEE - Using marginal estimates, estimate dependence parameters This gives efficient estimates of the dependence parameters because of orthogonality, but some efficiency may be gained for the marginal parameters by using the full likelihood or iterative fitting such as for the ALR. The pairwise odds-ratio model is very useful, but one do not have a random effects model. ** Additive gamma model Again we operate under marginal logistic regression models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] First with just one random effect \( Z \) we assume that conditional on \( Z \) the responses are independent and follow the model \[ logit(P(Y_i=1|X_i,Z)) = exp( -Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) \] where \( \Psi \) is the laplace transform of \( Z \) where we assume that \( Z \) is gamma distributed with variance \( \lambda_{\bullet}^{-1} \) and mean 1. In general \( \Psi(\lambda_1,\lambda_2) \) is the laplace transform of a Gamma distributed random effect with \( Z \) with mean \( \lambda_1/\lambda_2 \) and variance \( \lambda_1/\lambda_2^2 \). We fit this model by - Estimating the marginal parameters via GEE - Using marginal estimates, estimate dependence parameters To deal with multiple random effects we consider random effects \( Z_i i=1,...,d \) such that \( Z_i \) is gamma distributed with mean \( \lambda_j/\lambda_{\bullet} \) and variance \( \lambda_j/\lambda_{\bullet}^2 \), where we define the scalar \( \lambda_{\bullet} \) below. Now given a cluster-specific design vector \( V_{12} \) we assume that \[ V_{12}^T Z \] is gamma distributed with mean 1 and variance \( \lambda_{\bullet}^{-1} \) such that critically the random effect variance is the same for all clusters. That is \[ \lambda_{\bullet} = V_{12}^T (\lambda_1,...,\lambda_d)^T \] We return to some specific models below, and show how to fit the ACE and AE model using this set-up. One last option in the model-specification is to specify how the parameters \( \lambda_1,...,\lambda_d \) are related. We thus can specify a matrix \( M \) of dimension \( p \times d \) such that \[ (\lambda_1,...,\lambda_d)^T = M \theta \] where \( \theta \) is d-dimensional. If \( M \) is diagonal we have no restrictions on parameters. This parametrization is obtained with the var.par=0 option that thus estimates \( \theta \). The DEFAULT parametrization instead estimates the variances of the random effecs (var.par=1) via the parameters \( \nu \) \[ M \nu = ( \lambda_1/\lambda_{\bullet}^2, ...,\lambda_d/\lambda_{\bullet}^2)^T \] The basic modelling assumption is now that given random effects \(Z=(Z_1,...,Z_d)\) we have independent probabilites \[ logit(P(Y_i=1|X_i,Z)) = exp( -V_{12,i}^T Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) i=1,2 \] We fit this model by - Estimating the marginal parameters via GEE - Using marginal estimates, estimate dependence parameters Even though the model not formaly in this formulation allows negative correlation in practice the paramters can be negative and this reflects negative correlation. An advanatage is that no numerical integration is needed. * The twin-stutter data We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data #+BEGIN_SRC R :results output :exports both :session *R* :cache yes library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinsall <- twinstut twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) #+END_SRC #+RESULTS[9949cf8d9d2aaad53abb274bed18baea16f4e110]: #+begin_example tvparnr zyg stutter sex age nr binstut 1 1 mz no female 71 1 0 2 1 mz no female 71 2 0 3 2 dz no female 71 1 0 8 5 mz no female 71 1 0 9 5 mz no female 71 2 0 11 7 dz no male 71 1 0 #+end_example * Pairwise odds ratio model We start by fitting an overall dependence OR for both MZ and DZ even though the dependence is expected to be different across zygosity. The first step is to fit the marginal model adjusting for marginal covariates. We here note that there is a rather strong gender effect in the risk of stuttering. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) summary(margbin) #+END_SRC #+RESULTS[d7ee0e2a1c7ce11cbee6bef6130d1b6d298cfb0c]: #+begin_example Call: glm(formula = binstut ~ factor(sex) + age, family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4419 -0.4078 -0.2842 -0.2672 2.6395 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.027625 0.104012 -29.108 < 2e-16 *** factor(sex)male 0.869826 0.062197 13.985 < 2e-16 *** age -0.005983 0.002172 -2.754 0.00588 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9117.0 on 21285 degrees of freedom AIC: 9123 Number of Fisher Scoring iterations: 6 #+end_example Now estimating the OR parameter. We see a strong dependence with an OR at around 8 that is clearly significant. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,detail=0) summary(bina) #+END_SRC #+RESULTS[f4450da3e8f5b38bdcf307346f9090ad59a689fa]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dependence1 2.085347 0.1274536 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 8.05 1.03 6.04 10.1 4.3e-15 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example Now, and more interestingly, we consider an OR that depends on zygosity and note that MZ have a much larger OR than DZ twins. This type of trait is somewhat complicated to interpret, but clearly, one option is that that there is a genetic effect, alternatively there might be a stronger environmental effect for MZ twins. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # design for OR dependence theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) #+END_SRC #+RESULTS[252013ed4e3d7459c1b5e59d1eb3ec053d71a367]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5221651 0.2401355 factor(zyg)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example We now consider further regression modelling of the OR structure by considering possible interactions between sex and zygozsity. We see that MZ has a much higher dependence and that males have a much lower dependence. We tested for interaction in this model and these were not significant. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes twinstut$cage <- scale(twinstut$age) theta.des <- model.matrix( ~-1+factor(zyg)+factor(sex),data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) #+END_SRC #+RESULTS[f12b874bc6e09b656a63ed81039a73362628c588]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.8098841 0.3138423 factor(zyg)mz 3.7318076 0.2632250 factor(sex)male -0.4075409 0.3055349 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 2.248 0.705 0.865 3.63 0.001441 factor(zyg)mz 41.755 10.991 20.213 63.30 0.000145 factor(sex)male 0.665 0.203 0.267 1.06 0.001064 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example ** Alternative syntax We now demonstrate how the models can fitted jointly and with anohter syntax, that ofcourse just fits the marginal model and subsequently fits the pairwise OR model. First noticing as before that MZ twins have a much higher dependence. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's) out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, response="binstut",id="tvparnr",var.link=1, theta.formula=~-1+factor(zyg1)) summary(out) #+END_SRC #+RESULTS[9b2592b96c25b34e8d66101f639ba885c137d9c6]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg1)dz 0.5221651 0.2401355 factor(zyg1)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg1)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg1)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example Now considering all data and estimating separate effects for the OR for opposite sex DZ twins and same sex twins. We here find that os twins are not markedly different from the same sex DZ twins. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's)) desfs<-function(x,num1="zyg1",num2="zyg2") c(x[num1]=="dz",x[num1]=="mz",x[num1]=="os")*1 margbinall <- glm(binstut~factor(sex)+age,data=twinsall,family=binomial()) out3 <- easy.binomial.twostage(binstut~factor(sex)+age, data=twinsall,response="binstut",id="tvparnr",var.link=1, theta.formula=desfs,desnames=c("dz","mz","os")) summary(out3) #+END_SRC #+RESULTS[21d70482c6a40770f5ed94e778e47808db7228a2]: #+begin_example Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dz 0.5278527 0.2396796 mz 3.4850037 0.1864190 os 0.7802940 0.2894394 $or Estimate Std.Err 2.5% 97.5% P-value dz 1.70 0.406 0.899 2.49 3.02e-05 mz 32.62 6.081 20.703 44.54 8.13e-08 os 2.18 0.632 0.944 3.42 5.50e-04 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" #+end_example * Bivariate Probit model #+BEGIN_SRC R :results output :exports both :session *R* :cache yes library(mets) data(twinstut) twinstut <- subset(twinstut,zyg%in%c("mz","dz")) twinstut$binstut <- 1*(twinstut$stutter=="yes") head(twinstut) #+END_SRC #+RESULTS[4e32c4fd9dd33864fd59d4ef493048607c4f2ac2]: : tvparnr zyg stutter sex age nr binstut : 1 2001005 mz no female 71 1 0 : 2 2001005 mz no female 71 2 0 : 3 2001006 dz no female 71 1 0 : 8 2001012 mz no female 71 1 0 : 9 2001012 mz no female 71 2 0 : 11 2001015 dz no male 71 1 0 First testing for same dependence in MZ and DZ that we recommend doing by comparing the correlations of MZ and DZ twins. Apart from regression correction in the mean this is an un-structured model, and the useful concordance and casewise concordance estimates can be reported from this analysis. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="un") summary(b1) #+END_SRC #+RESULTS[5188e3b434027f5abc5fae0d144e44651cefd1f0]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.794823 0.023289 -77.066728 0.0000 sexmale 0.401432 0.030179 13.301813 0.0000 atanh(rho) MZ 1.096916 0.073574 14.909087 0.0000 atanh(rho) DZ 0.132458 0.062516 2.118800 0.0341 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.79939 0.74101 0.84577 Tetrachoric correlation DZ 0.13169 0.00993 0.24960 MZ: Estimate 2.5% 97.5% Concordance 0.01698 0.01411 0.02042 Casewise Concordance 0.46730 0.40383 0.53185 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 12.85882 10.87510 14.84253 log(OR) 3.75632 3.37975 4.13289 DZ: Estimate 2.5% 97.5% Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 1.77662 0.92746 2.62577 log(OR) 0.63527 0.09013 1.18040 Estimate 2.5% 97.5% Broad-sense heritability 1 NaN NaN #+end_example ** Polygenic modelling We now turn attention to specific polygenic modelling where special random effects are used to specify ACE, AE, ADE models and so forth. This is very easy with the bptwin function. The key parts of the output are the sizes of the genetic component A and the environmental component, and we can compare with the results of the unstructed model above. Also formally we can test if this submodel is acceptable by a likelihood ratio test. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ace") summary(b1) #+END_SRC #+RESULTS[68028e51ecc9e1ac66efb0b6397c86109b7523df]: #+begin_example Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 log(var(C)) -29.99519 NA NA NA Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 C 0.00000 0.00000 0.00000 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 #+end_example #+BEGIN_SRC R :results output :exports both :session *R* :cache yes b0 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ae") summary(b0) #+END_SRC #+RESULTS[c0e45ba8833413d2e33cf487e1b564c90e2f2378]: #+begin_example Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 #+end_example * Additive gamma random effects Fitting first a model with different size random effects for MZ and DZ. We note that as before in the OR and biprobit model the dependence is much stronger for MZ twins. We also test if these are the same by parametrizing the OR model with an intercept. This clearly shows a significant difference. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) # test for same dependence in MZ and DZ theta.des <- model.matrix( ~factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) #+END_SRC #+RESULTS[2e770040cc6e95503373b894ca170abc19468abe]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se factor(zyg)dz -2.61194495 0.4854454 factor(zyg)mz -0.01817181 0.1030735 $vargam Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 0.0734 0.0356 0.00356 0.143 3.94e-02 factor(zyg)mz 0.9820 0.1012 0.78361 1.180 2.96e-22 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se (Intercept) -2.611945 0.4854454 factor(zyg)mz 2.593773 0.4962675 $vargam Estimate Std.Err 2.5% 97.5% P-value (Intercept) 0.0734 0.0356 0.00356 0.143 0.0394 factor(zyg)mz 13.3802 6.6401 0.36573 26.395 0.0439 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" #+end_example ** Polygenic modelling First setting up the random effects design for the random effects and the the relationship between variance parameters. We see that the genetic random effect has size one for MZ and 0.5 for DZ subjects, that have shared and non-shared genetic components with variance 0.5 such that the total genetic variance is the same for all subjects. The shared environmental effect is the samme for all. Thus two parameters with these bands. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ace") head(cbind(out$des.rv,twinstut$tvparnr),10) out$pardes #+END_SRC #+RESULTS[5b4ecc2d5fe90ba4e492080f3b6857f1ecc92a8b]: #+begin_example MZ DZ DZns1 DZns2 env 1 1 0 0 0 1 2001005 2 1 0 0 0 1 2001005 3 0 1 1 0 1 2001006 8 1 0 0 0 1 2001012 9 1 0 0 0 1 2001012 11 0 1 1 0 1 2001015 12 0 1 1 0 1 2001016 13 0 1 0 1 1 2001016 15 0 1 1 0 1 2001020 18 0 1 1 0 1 2001022 [,1] [,2] [1,] 1.0 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.5 0 [5,] 0.0 1 #+end_example Now, fitting the ACE model, we see that the variance of the genetic, component, is 1.5 and the environmental variance is -0.5. Thus suggesting that the ACE model does not fit the data. When the random design is given we automatically use the gamma fralty model. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin1 <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin1) #+END_SRC #+RESULTS[b4e825656d6fbc68289cb3007da5c7be882c530a]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.5261839 0.2475041 dependence2 -0.5447955 0.1942159 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1.555 0.187 1.189 1.922 9.11e-17 dependence2 -0.555 0.187 -0.922 -0.189 2.99e-03 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.981 0.102 0.781 1.18 8.29e-22 attr(,"class") [1] "summary.mets.twostage" #+end_example For this model we estimate the concordance and casewise concordance as well as the marginal rates of stuttering for females. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes concordanceTwinACE(bintwin1,type="ace") #+END_SRC #+RESULTS[c5cf06fe6ea4f093a95f84bf09f5bdec22e4659c]: #+begin_example $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0182 0.00147 0.0153 0.0211 2.61e-35 casewise concordance 0.5033 0.03256 0.4395 0.5672 6.49e-54 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00235 0.000589 0.0012 0.00351 6.45e-05 casewise concordance 0.06501 0.015836 0.0340 0.09604 4.04e-05 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 #+end_example The E component was not consistent with the fit of the data and we now consider instead the AE model. #+BEGIN_SRC R :results output :exports both :session *R* :cache yes out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) #+END_SRC #+RESULTS[11b872ba5c2c67ef5226f87056a1fbf681905039]: #+begin_example Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.909 0.0954 0.723 1.1 1.47e-21 attr(,"class") [1] "summary.mets.twostage" #+end_example Again, the concordance can be computed: #+BEGIN_SRC R :results output :exports both :session *R* :cache yes concordanceTwinACE(bintwin,type="ae") #+END_SRC #+RESULTS[4ccb3ed37a1358c4f7a471e7bed08804648d6178]: #+begin_example $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0174 0.00143 0.0146 0.0202 5.00e-34 casewise concordance 0.4795 0.03272 0.4154 0.5437 1.20e-48 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00477 0.000393 0.0040 0.00554 5.94e-34 casewise concordance 0.13175 0.005417 0.1211 0.14237 1.14e-130 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 #+end_example * COMMENT :PROPERTIES: :BEAMER_opt: shrink=85 :END: #+BEGIN_SRC R :results graphics :cache yes :file auto/remis-km-placebo.png :exports both :session *R* par(mfrow=c(2,2)) plot(survfit(Surv(time,event)~placebo,data=remis),col=c("red","blue")) legend("topright",legend=c("Treatment","Placebo"),col=c("red","blue"),lty=c(1,1)) plot(survfit(Surv(time,event)~placebo,data=remis),col=c("red","blue"),fun="cumhaz") legend("topright",legend=c("Treatment","Placebo"),col=c("red","blue"),lty=c(1,1)) plot(survfit(Surv(time,event)~placebo,data=remis),col=c("red","blue"),fun="cloglog") legend("topright",legend=c("Treatment","Placebo"),col=c("red","blue"),lty=c(1,1)) #+END_SRC #+RESULTS[b18ba18e9bad6516327104e8dd024ea654d17568]: [[file:auto/remis-km-placebo.png]] [[file:auto/remis-km-placebo.png]] mets/NEWS0000644000176200001440000001755713623061405011740 0ustar liggesusers#-*- mode: org -*- * Version 1.2.7 <2020-02-18 Tue> - Maintenance release * Version 1.2.6 <2019-08-02 Fri> - Cumulative incidence regression cifreg function - Fine-Gray model with cloglog link of (1-F_1(t,x)) - Logit link - Prototype of wildbootstrap for Cox regression with - confidence bands for baseline - with confidenence bands cumulative incidence for two cox's - Piecewise constant hazard: rpch, ppch - Test-version of multinomial regression model (via phreg): mlogit - Simulation for illness-death model: simMultistate - Haplotype modelling for discrete time-to-pregnancy models: haplo.surv.discrete - Interval censoring for discrete time logit-survival model: interval.logitsurv.discrete - Binomial Regression for competing risks data with censoring and one time point only: binreg * Version 1.2.5 <2018-11-18 Sun> - Updated predict function for phreg - with plotting functionality - with robust standard errors - New vignettes started - phreg robust se's for marginal Cox model - twostage survival model - multivariate competing risks - recurrent events - logitSurv for fitting semiparametric proportional odds model - gof - robust standard errors for clustered case - twostageMLE for fast twostage fitting for clustered survival data with robust standard errors. - standard errors for twostage models now also with uncertainty from Cox baseline - cumulative score process test gof now also for marginal Cox models * Version 1.2.4 <2018-05-18 Wed> - functions km (Kaplan-Meier) and cif (cumulative incidence probability) with robust standard errors. - computation of probability of exceeding "k" events for recurrents processs - computation of probability of exceeding "k1" and "k2" events for bivariate recurrents processseses - dspline simple spline decomposition on a data frame - rmvn, dmvn: RNG and density for multivariate normal distribution with varying correlation coefficients. * Version 1.2.3.1 <2018-04-18 Wed> - starting values updated for twinlm method * Version 1.2.3 <2018-02-02 Mon> - twinlm now supports ordinal outcomes - optimized strata calculations in phreg - optimized robust standard errors in phreg - weights and offsets in phreg - weights argument added to lifetable - gof of phreg with fast cumulative residuals (Lin, Wei, Ying) - graphical gof of phreg - recurrent events function for marginal mean with standard errors - simulating recurrent events with possibly two recurrent events and death - covariance calculation for recurrent events data and related bootstrap * Version 1.2.2 <2017-03-18 Sat> - Vignettes updated - Compatibility with lava version 1.5 * Version 1.2.1 <2017-02-25 Sat> - New documentation/vignettes - Additional examples and unit tests - lifecourse plot function: lifecourse - block sampling function: dsample * Version 1.2.0 <2017-02-03 Fri> - Namespace cleaning (twostage)... - Dependency on R>=3.3 radix algorithm - Case-Control sampling for twostage model. - Two-stage additive gamma survival model. Additive random effects for two-stage survival model via pairwise composite likelihood. Simulation of family ace survival model. Function for computing Kendall's tau for pairs with additive gamma random effects model via simulations. - Two-stage additive gamma binomial model. Additive random effects for binomial model via pairwise composite likelihood. Simulation of family ace model. Function for computing pairwise concordance for for pairs with additive gamma random effects model. - Updated divide.conquer - Extra unit tests - force.same.cens argument with IPWC methods - New utility functions for data.frames Data processing - dsort - dreshape - dcut - drm, drename, ddrop, dkeep, dsubset - drelevel - dlag - dfactor, dnumeric Data aggregation - dby, dby2 - dscalar, deval, daggregate - dmean, dsd, dsum, dquantile, dcor - dtable, dcount Data summaries - dhead, dtail, - dsummary, - dprint, dlist, dlevels, dunique * Version 1.1.1 <2015-05-27 Wed> - Support for left-truncation * Version 1.1.0 <2015-02-16 Mon> - fast.approx with 'type' argument - scoreMV - lifetable updated and new survpois function (piecewise constant hazard) * Version 1.0.0 <2014-11-18 Tue> - New functions biprobit.time, binomial.twostage.time. Automatically samples time points (approximately equidistant) up to last double jump time. Intial support for left truncation. contrast argument added to biprobit.time. - ipw removed (from namespace) - biprobit optimized for tabular data (non-continuous covariates). Regression design for dependence parameter (tetrachoric correlation) now possible. - predict method implemented for biprobit - arc-sinus transformation used for probability estimates - updated output of bptwin with relative recurrence risk + log-OR estimates - iid method for bptwin (influence function) - survival probabilities and start and end of intervals added to lifetable - new function 'jumptimes' for extracting jump times and possibly sample (equidistant) - fast.pattern updated to handle more than two categories - demos added to the mets package - divide.conquer function, folds function * Version 0.2.8 <2014-05-07 Wed> - Normal orthant probabilities via 'pmvn' (vectorized) - Parametric proportional hazards models via 'phreg.par' - twinlm.time function for censored twin data. Wraps the 'ipw' function that now also supports parametric survival models via phreg.par. 'grouptable' for tabulating twin-data. - Relative recurrence risk ratios now reported with bptwin/twinlm. - Grandom.cif more stable * Version 0.2.7 <2014-02-18 Tue> - Adapted to changes in 'timereg::comp.risk' - cluster.index with 'mat' argument for stacking rows of a matrix according to cluster-variable - New lava-estimator: 'normal', for ordinal data (cumulative probit) - fast.reshape more robust. Now also supports 'varying arguments of the type 'varying=-c(...)' choosing everything except '...'. * Version 0.2.6 <2013-12-07 Sat> - C++ source code cleanup - Optimization of fast.reshape * Version 0.2.5 <2013-11-01 Fri> - New datasets: dermalridges, dermalridgesMZ - Grouped analysis updated in twinlm (e.g. sex limitation model) - Confidence limits for genetic and environmental effects are now based on standard (symmetric) Wald confidence limits. (use the 'transform' argument of the summary method to apply logit-transform) - Improved output in twinlm * Version 0.2.4 <2013-07-10 Wed> - fast.reshape :labelnum option for both wide and long format (see example) - Compilation flags removed from Makevars files * Version 0.2.3 <2013-05-22 Wed> - fast.reshape bug-fix (column names) * Version 0.2.2 <2013-05-21 Tue> - Updated twinlm. bptwin: OS analysis - Better starting values for twinlm - Fixed claytonaokes.cpp - New fast cox ph regression: phreg - Updated two-stage estimator - Improved fast.reshape * Version 0.2.0 <2013-03-27 Wed> - fast.reshape - easy.binomial.twostage * Version 0.1.4 <2012-09-07 Fri> - Fixed cor.cpp - New datasets: twinstut, twinbmi, prtsim * Version 0.1.3 <2012-07-05 Thu> - twinlm moved to mets package, and wraps the bptwin function * Version 0.1.2 <2012-05-14 Mon> - code clean-up and minor bug-fixes * Version 0.1.1 <2012-05-06 Sun> - Random effects CIF models moved from MultiComp to mets - new data sets: np, multcif - Documentation via roxygen2 - bug fixes * Version 0.1.0 <2012-04-25 Wed> - Initialization of the new package 'mets' with implementation of the Clayton-Oakes model with piecewise constant marginal hazards, and the bivariate probit random effects model (Liability model) for twin-data. mets/R/0000755000176200001440000000000013623061405011423 5ustar liggesusersmets/R/lifecourse.R0000644000176200001440000002343013623061405013710 0ustar liggesusers##' Life-course plot for event life data with recurrent events ##' ##' @title Life-course plot ##' @param formula Formula (Event(start,slut,status) ~ ...) ##' @param data data.frame ##' @param id Id variable ##' @param group group variable ##' @param type Type (line 'l', stair 's', ...) ##' @param lty Line type ##' @param col Colour ##' @param alpha transparency (0-1) ##' @param lwd Line width ##' @param recurrent.col col of recurrence type ##' @param recurrent.lty lty's of of recurrence type ##' @param legend position of optional id legend ##' @param pchlegend point type legends ##' @param by make separate plot for each level in 'by' (formula, name of column, or vector) ##' @param status.legend Status legend ##' @param place.sl Placement of status legend ##' @param xlab Label of X-axis ##' @param ylab Label of Y-axis ##' @param add Add to existing device ##' @param ... Additional arguments to lower level arguments ##' @author Thomas Scheike, Klaus K. Holst ##' @export ##' @examples ##' data = data.frame(id=c(1,1,1,2,2),start=c(0,1,2,3,4),slut=c(1,2,4,4,7), ##' type=c(1,2,3,2,3),status=c(0,1,2,1,2),group=c(1,1,1,2,2)) ##' ll = lifecourse(Event(start,slut,status)~id,data,id="id") ##' ll = lifecourse(Event(start,slut,status)~id,data,id="id",recurrent.col="type") ##' ##' ll = lifecourse(Event(start,slut,status)~id,data,id="id",group=~group,col=1:2) ##' op <- par(mfrow=c(1,2)) ##' ll = lifecourse(Event(start,slut,status)~id,data,id="id",by=~group) ##' par(op) ##' legends=c("censored","pregnant","married") ##' ll = lifecourse(Event(start,slut,status)~id,data,id="id",group=~group,col=1:2,status.legend=legends) ##' lifecourse <- function(formula,data,id="id",group=NULL, type="l",lty=1,col=1:10,alpha=0.3,lwd=1, recurrent.col=NULL, recurrent.lty=NULL, legend=NULL,pchlegend=NULL, by=NULL, status.legend=NULL,place.sl="bottomright", xlab="Time",ylab="",add=FALSE,...) {# {{{ if (!is.null(by)) { if (is.character(by) && length(by==1)) { by <- data[,by] } else if (inherits(by,"formula")) { by <- model.frame(by,data,na.action=na.pass) } cl <- match.call(expand.dots=TRUE) cl$by <- NULL datasets <- split(data,by) res <- c() for (d in datasets) { cl$data <- d res <- c(res, eval(cl,parent.frame())) } return(invisible(res)) } if (!is.null(group)) { if (is.character(group) && length(group==1)) { M <- data[,group] } else if (inherits(group,"formula")) { M <- model.frame(group,data,na.action=na.pass) } else { M <- group } ### if (!add) plot(formula,data=data,xlab=xlab,ylab=ylab,...,type="n") if (!add) { if (inherits(id,"formula")) id <- all.vars(id) if (inherits(group,"formula")) group <- all.vars(group) if (is.character(id) && length(id)==1) Id <- y <- getoutcome(formula) x <- attributes(y)$x if (length(x)==0) {# {{{ y <- response <- all.vars( update(formula,.~+1)) ### ccid <- cluster.index(data[,id]) ccm <- ccid$idclustmat+1 ccm <- ccm[!is.na(ccm)] ### x <- data[ccm,id] if (length(response)==3) { t1 <- data[ccm,response[1]] t2 <- data[ccm,response[2]] tstat <- data[ccm,response[3]] } else { t1 <- rep(0,length(ccm)) t2 <- data[ccm,response[1]] tstat <- data[ccm,response[2]] } X <- c(c(t1),c(t2)) Y <- rep(x,each=2) status <- tstat # }}} } else {# {{{ y <- response <- all.vars( update(formula,.~+1)) ### ccid <- cluster.index(data[,id]) ccm <- ccid$idclustmat+1 ccm <- ccm[!is.na(ccm)] if (length(response)==3) { t1 <- data[ccm,response[1]] t2 <- data[ccm,response[2]] tstat <- data[ccm,response[3]] } else { t1 <- rep(0,length(ccm)) t2 <- data[ccm,response[1]] tstat <- data[ccm,response[2]] } x <- data[ccm,x] X <- c(c(t1),c(t2)) Y <- rep(x,each=2) status <- tstat }# }}} plot(X,Y,xlab=xlab,ylab=ylab,...,type="n") if (!is.null(status.legend)) {# {{{ if (is.null(pchlegend)) { if (length(status.legend)!=length(unique(status))) { warning("Not all legends represented, legends could be wrong give pchlegend\n"); print(cbind(status.legend,sort(unique(status)))) } points(t2,x,pch=status) graphics::legend(place.sl,legend=status.legend,pch=sort(unique(status))) } else { points(t2,x,pch=pchlegend[status]) graphics::legend(place.sl,legend=status.legend,pch=pchlegend) } }# }}} } dd <- split(data,M) K <- length(dd) if (length(type)1) { fit <- lapply(seq_len(length(dd)),function(i) { if (messages>0) message("Strata '",names(dd)[i],"'") idx <- which(fac==names(dd)[i]) mycall$se.clusters <- lse.clusters[idx] mycall$formula <- formula mycall$data <- dd[[i]] eval(mycall) }) res <- list(model=fit) res$strata <- names(res$model) <- names(dd) class(res) <- c("bicomprisk.strata","twinlm.strata") res$N <- length(dd) return(res) } } covars <- as.character(attributes(terms(formula))$variables)[-(1:2)] ### adds weights, if (!is.null(wname)) covars <- c(covars,wname) indiv2 <- covars2 <- NULL data <- data[order(data[,id]),] idtab <- table(data[,id]) ##which(data[,id]%in%names(idtab==2)) data <- data[which(data[,id]%in%names(idtab==2)),] if (missing(num)) { idtab <- table(data[,id]) num <- "num" while (num%in%names(data)) num <- paste(num,"_",sep="") data[,num] <- unlist(lapply(idtab,seq_len)) } oldreshape <- 0 if (oldreshape==1) sep="." else sep="" timevar2 <- paste(timevar,1:2,sep=sep) causes2 <- paste(causes,1:2,sep=sep) if (length(covars)>0) covars2 <- paste(covars,1,sep=sep) for (i in seq_len(length(indiv))) indiv2 <- c(indiv2, paste(indiv[i],1:2,sep=sep)) if (oldreshape==1) ww0 <- reshape(data[,c(timevar,causes,covars,indiv,id,num,"lse.clusters")], direction="wide",idvar=id,timevar=num)[,c(id,"lse.clusters.1",timevar2,causes2,indiv2,covars2)] else ww0 <- fast.reshape(data[,c(timevar,causes,covars,indiv,id,num,"lse.clusters")],id=id,num=data$num,labelnum=TRUE)[,c(id,"lse.clusters1",timevar2,causes2,indiv2,covars2)] ww0 <- na.omit(ww0) status <- rep(0,nrow(ww0)) time <- ww0[,timevar2[1]] ## {{{ (i,j) causes idx2 <- which(ww0[,causes2[1]]==cause[1] & ww0[,causes2[2]]==cause[2]) if (length(idx2)>0) { status[idx2] <- 1 time[idx2] <- apply(ww0[idx2,timevar2[1:2],drop=FALSE],1,max) } ##(0,0), (0,j) idx2 <- which(ww0[,causes2[1]]==cens & (ww0[,causes2[2]]==cens | ww0[,causes2[2]]==cause[2])) if (length(idx2)>0) { status[idx2] <- 0 time[idx2] <- ww0[idx2,timevar2[1]] } ##(ic,0), (ic,j) idx2 <- which(ww0[,causes2[1]]!=cens & ww0[,causes2[1]]!=cause[1] & (ww0[,causes2[2]]==cens | ww0[,causes2[2]]==cause[2])) if (length(idx2)>0) { status[idx2] <- 2 time[idx2] <- ww0[idx2,timevar2[1]] } ##(i,0) idx2 <- which(ww0[,causes2[1]]==cause[1] & ww0[,causes2[2]]==cens) if (length(idx2)>0) { status[idx2] <- 0 time[idx2] <- ww0[idx2,timevar2[2]] } ##(ic,jc) idx2 <- which(ww0[,causes2[1]]!=cens & ww0[,causes2[1]]!=cause[1] & (ww0[,causes2[2]]!=cens & ww0[,causes2[2]]!=cause[2])) if (length(idx2)>0) { status[idx2] <- 2 time[idx2] <- apply(ww0[idx2,timevar2[1:2],drop=FALSE],1,min) } ##(0,jc),(i,jc) idx2 <- which((ww0[,causes2[1]]==cens | ww0[,causes2[1]]==cause[1]) & (ww0[,causes2[2]]!=cens & ww0[,causes2[2]]!=cause[2])) if (length(idx2)>0) { status[idx2] <- 2 time[idx2] <- ww0[idx2,timevar2[2]] } mydata0 <- mydata <- data.frame(time,status,ww0[,covars2],ww0[,indiv2]) names(mydata) <- c(timevar,causes,covars,indiv2) ## }}} if (return.data==2) return(list(data=mydata)) else { if (!prodlim) { ff <- paste("Event(",timevar,",",causes,",cens.code=",cens,") ~ 1",sep="") if (!is.null(wname)) covars <- covars[-which(covars %in% c(wname))] if (length(c(covars,indiv))>0) { xx <- c(covars,indiv2) for (i in seq_len(length(xx))) xx[i] <- paste("const(",xx[i],")",sep="") ff <- paste(c(ff,xx),collapse="+") if (missing(model)) model <- "fg" } if (missing(model)) model <- "fg" ### clusters for iid construction lse.clusters <- NULL if (!is.null(se.clusters.call)) { lse.clusters <- ww0[,"lse.clusters1"] } ### if (!(is.null(wname))) mydata <- ipw2(mydata,time=timevar,cause=causes) #,cens.code=cens) if (is.null(wname)) { add<-comp.risk(as.formula(ff),data=mydata, cause=1,n.sim=0,resample.iid=resample.iid,model=model,conservative=conservative, clusters=lse.clusters, max.clust=max.clust,...) } else { add<-comp.risk(as.formula(ff),data=mydata, cause=1,n.sim=0,resample.iid=resample.iid,model=model,conservative=conservative, clusters=lse.clusters, max.clust=max.clust, weights=mydata[,wname]*mydata$indi.weights,cens.weights=rep(1,nrow(mydata)),...) } padd <- predict(add,X=1,se=1,uniform=uniform,resample.iid=resample.iid) padd$cluster.names <- lse.clusters } else { if (!requireNamespace("prodlim",quietly=TRUE)) stop("prodlim requested but not installed") ff <- as.formula(paste("Hist(",timevar,",",causes,")~",paste(c("1",covars,indiv2),collapse="+"))) padd <- prodlim::prodlim(ff,data=mydata) } ### class(padd) <- c("bicomprisk",class(padd)) if (return.data==1) return(list(comp.risk=padd,data=mydata)) else return(padd) } ## }}} } ## plot.bicomprisk <- function(x,add=FALSE,...) { ## if ("predict.timereg"%in%class(a)) { ## if (!add) { plot.predict.timereg(x,...) } ## else { ## with(x,lines(time,P1,...)) ## } ## } else { ## plot(x,...) ## } ## return(invisible(x)) ##} mets/R/plot.bptwin.R0000644000176200001440000000217413623061405014032 0ustar liggesuserstrMean <- function(b,blen) { ## mytr <- function(x) x^2; dmytr <- function(x) 2*x mytr <- dmytr <- exp if (blen==0) return(b) k <- length(b) Bidx <- seq_len(blen)+(k-blen) b[Bidx[1]] <- mytr(b[Bidx[1]]) D <- diag(nrow=k) D[Bidx[1]:k,Bidx[1]] <- b[Bidx[1]] for (i in Bidx[-1]) { D[i:k,i] <- dmytr(b[i]) b[i] <- b[i-1]+mytr(b[i]) } attributes(b)$D <- D attributes(b)$idx <- Bidx return(b) } ##' @export plot.bptwin <- function(x,n=50,rg=range(x$B[,1]),xlab="Time",ylab="Concordance",...) { if (x$Blen>0) { ## rg <- range(x$B[,1]) t <- seq(rg[1],rg[2],length.out=n) B0 <- bs(t,degree=x$Blen) b0. <- coef(x)[x$midx0] b1. <- coef(x)[x$midx1] b0 <- trMean(b0.,x$Blen) b1 <- trMean(b1.,x$Blen) b00 <- tail(b0,x$Blen) b11 <- tail(b1,x$Blen) pr0 <- sapply(as.numeric(B0%*%b00+b0[1]), function(z) pbvn(upper=rep(z,2),sigma=x$Sigma0)) pr1 <- sapply(as.numeric(B0%*%b11+b1[1]), function(z) pbvn(upper=rep(z,2),sigma=x$Sigma1)) plot(pr0~t,type="l", xlab=xlab, ylab=ylab,...) lines(pr1~t,type="l",lty=2) } return(invisible(x)) } mets/R/sim.clayton.oakes.R0000644000176200001440000005562413623061405015123 0ustar liggesusers##' Simulate observations from the Clayton-Oakes copula model with ##' piecewise constant marginals. ##' ##' @title Simulate from the Clayton-Oakes frailty model ##' @param K Number of clusters ##' @param n Number of observations in each cluster ##' @param eta variance ##' @param beta Effect (log hazard ratio) of covariate ##' @param stoptime Stopping time ##' @param lam constant hazard ##' @param left Left truncation ##' @param pairleft pairwise (1) left truncation or individual (0) ##' @param trunc.prob Truncation probability ##' @param same if 1 then left-truncation is same also for univariate truncation ##' @author Thomas Scheike and Klaus K. Holst ##' @aliases simClaytonOakes simClaytonOakesLam ##' @export simClaytonOakes <- function(K,n,eta,beta,stoptime,lam=1,left=0,pairleft=0,trunc.prob=0.5,same=0) ## {{{ { ## K antal clustre, n=antal i clustre ### K <- 100; n=2; stoptime=2; eta=1/2; beta=0; lam=0.5;left=0.5; trunc.prob=0.5; pairleft=0; same=0 ### change such that eta is variance ### eta <- 1/eta x<-array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) C<-matrix(stoptime,K,n); Gam1 <-matrix(rgamma(K,eta)/eta,K,n) temp<-eta*log(-log(1-x[,,1])/(eta*Gam1*lam)+1)*exp(-beta*x[,,3]) x[,,2]<-ifelse(temp<=C,1,0); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) if (left>0) { if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { if (same==0) lefttime <- rexp(n*K)*left if (same==1) lefttime <- rep(rexp(K)*left,each=n) ### lefttime <- runif(K)*(stoptime-left) if (same==0) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! if (same==1) left <- rep(rbinom(K,1,trunc.prob),each=n) lefttime <- lefttime*left trunk <- ud[,1] > lefttime medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} if (pairleft==1) ud <- cbind(ud,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,rep(minstime,each=n),lefttime,trunk) ### if (left>0) { ### lefttime <- rexp(K)*left ### left <- rbinom(K,1,0.5) ## not trunation times! ### lefttime <- apply(cbind(lefttime*left,3),1,min) ### trunk <- (lefttime > minstime) ### medleft <- rep(trunk,each=n) ### } else { lefttime <- trunk <- rep(0,K);} ### ### ud <- cbind(ud,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) names(ud)<-c("time","status","x","cluster","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export simClaytonOakesLam <- function(n,k,cumhaz,vargam,entry=NULL) { ## {{{ base1 <- cumhaz dtt <- diff(c(0,base1[,1])) lams <- (diff(c(0,base1[,2]))/dtt)*exp(vargam*base1[,2]) Lams <- cbind(base1[,1],cumsum(dtt*lams)) if (is.null(entry)) entry <- rep(0,n*k) gamma <- rep(rgamma(n,1/vargam)*vargam,each=k) ddd <- pc.hazard(rbind(c(0,0),Lams),rr=gamma,entry=entry) ddd$cluster <- rep(1:n,each=k) ddd$gamma <- gamma attr(ddd,"cumhaz") <- Lams return(ddd) } ## }}} ##' Simulate observations from the Clayton-Oakes copula model with ##' Weibull type baseline and Cox marginals. ##' ##' @title Simulate from the Clayton-Oakes frailty model ##' @param K Number of clusters ##' @param n Number of observations in each cluster ##' @param eta 1/variance ##' @param beta Effect (log hazard ratio) of covariate ##' @param stoptime Stopping time ##' @param weiscale weibull scale parameter ##' @param weishape weibull shape parameter ##' @param left Left truncation ##' @param pairleft pairwise (1) left truncation or individual (0) ##' @author Klaus K. Holst ##' @export simClaytonOakesWei <- function(K,n,eta,beta,stoptime,weiscale=1,weishape=2,left=0,pairleft=0) { ## {{{ ###cat(" not quite \n"); ## K antal clustre, n=antal i clustre ### K=10; n=2; eta=1; beta=0.3; stoptime=3; lam=0.5; ### weigamma=2; left=0; pairleft=0 X <- rbinom(n*K,1,0.5) C<-rep(stoptime,n*K); Gam1 <-rep(rgamma(K,eta),each=n) temp <- rexp(K*n) ### temp <- rweibull(n*K,weishape,scale=weiscale)/(exp(X*beta)*Gam1) temp<- (eta*log(eta*temp/(eta*Gam1)+1)/(exp(beta*X)*weiscale^weishape))^{1/weishape} status<- ifelse(temp<=C,1,0); temp <- pmin(temp,C) xt <- matrix(temp,n,K) minstime <- apply(xt,2,min) id=rep(1:K,each=n) ud <- cbind(temp,status,X,id) if (left>0) { if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,0.5) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,0.5) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} if (pairleft==1) ud <- cbind(ud,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,rep(minstime,each=n),lefttime,trunk) colnames(ud)<-c("time","status","x","cluster","mintime","lefttime","truncated") ud <- data.frame(ud) return(ud) } ## }}} ##' @export simClaytonOakes.twin.ace <- function(K,varg,varc,beta,stoptime,Cvar=0,left=0,pairleft=0,trunc.prob=0.5,lam0=1) ## {{{ { ## K antal clustre, n=antal i clustre n <- 2 # twins with ace structure #change parametrization sumpar <- sum(varg+varc) varg <- varg/sumpar^2; varc <- varc/sumpar^2 x<-array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) if (Cvar==0) C<-matrix(stoptime,K,n) else C<-matrix(Cvar*runif(K*n)*stoptime,K,n) ### total variance of gene and env. ### random effects with ### means varg/(varg+varc) and variances varg/(varg+varc)^2 etao <- eta <- varc+varg if (etao==0) eta <- 1 Gams1 <-cbind( rgamma(K,varg)/eta, rgamma(K,varg*0.5)/eta, rgamma(K,varg*0.5)/eta, rgamma(K,varg*0.5)/eta, rgamma(K,varc)/eta ) ### print(apply(Gams1,2,mean)); print(apply(Gams1,2,var)) mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; mzrv <- Gams1[,1]+Gams1[,5] ### shared gene + env dzrv1 <- Gams1[,2]+Gams1[,3]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env dzrv2 <- Gams1[,2]+Gams1[,4]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env Gam1 <- cbind(mz*mzrv+dz*dzrv1,mz*mzrv+dz*dzrv2) ### print(apply(Gam1,2,mean)); print(apply(Gam1,2,var)) Gam1[Gam1==0] <- 1 ## to work also under independence ### print(mean(mzrv)); print(mean(dzrv1)); print(mean(dzrv2)); ### print(var(mzrv)); print(var(dzrv1)); print(var(dzrv2)); temp<-eta*log(-log(1-x[,,1])/(eta*Gam1)+1)*exp(-beta*x[,,3])/lam0 if (etao==0) temp <- matrix(rexp(n*K),K,n)*exp(-beta*x[,,3])/lam0 x[,,2]<-ifelse(temp<=C,1,0); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) zyg <- c(rep("MZ",K),rep("DZ",K)) if (left>0) { ## {{{ if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} ## }}} if (pairleft==1) ud <- cbind(ud,zyg,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,zyg,rep(minstime,each=n),lefttime,trunk) names(ud)<-c("time","status","x","cluster","zyg","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export simClaytonOakes.family.ace <- function(K,varg,varc,beta,stoptime,lam0=0.5,Cvar=0,left=0,pairleft=0,trunc.prob=0.5) ## {{{ { ## K antal clustre (families), n=antal i clustre n <- 4 # twins with ace structure x<- array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) if (Cvar==0) C<-matrix(stoptime,K,n) else C<-matrix(Cvar*runif(K*n)*stoptime,K,n) sumpar <- sum(varg+varc) varg <- varg/sumpar^2; varc <- varc/sumpar^2 ### total variance of gene and env. ### random effects with ### means varg/(varg+varc) and variances varg/(varg+varc)^2 eta <- varc+varg ### mother and father share environment ### children share half the genes with mother and father and environment mother.g <- cbind(rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta) father.g <- cbind(rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta, rgamma(K,varg*0.25)/eta) env <- rgamma(K,varc)/eta mother <- apply(mother.g,1,sum)+env father <- apply(father.g,1,sum)+env child1 <- apply(cbind(mother.g[,c(1,2)],father.g[,c(1,2)]),1,sum) + env child2 <- apply(cbind(mother.g[,c(1,3)],father.g[,c(1,3)]),1,sum) + env Gam1 <- cbind(mother,father,child1,child2) ### print(apply(Gam1,2,mean)); print(apply(Gam1,2,var)) temp<-eta*log(-log(1-x[,,1])/(eta*Gam1)+1)*exp(-beta*x[,,3])/lam0 x[,,2]<-ifelse(temp<=C,1,0); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) type <- rep(c("mother","father","child","child"),K) if (left>0) { ## {{{ if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} ## }}} if (pairleft==1) ud <- cbind(ud,type,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,type,rep(minstime,each=n),lefttime,trunk) names(ud)<-c("time","status","x","cluster","type","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export simCompete.twin.ace <- function(K,varg,varc,beta,stoptime,lam0=c(0.2,0.3), Cvar=0,left=0,pairleft=0,trunc.prob=0.5,overall=1,all.sum=1) ## {{{ { ## K antal clustre, n=antal i clustre n=2 # twins with ace structure sumpar <- sum(varg+varc) varg <- varg/sumpar^2; varc <- varc/sumpar^2 ## length(lam0) competing risk with constant hazards lam0 x<-array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) if (Cvar==0) C<-matrix(stoptime,K,n) else C<-matrix(Cvar*runif(K*n)*stoptime,K,n) ### total variance of gene and env. ### one for each cause and one shared (across causes) ### random effects with ### means varg/(varg+varc) and variances varg/(varg+varc)^2 if (length(varc)==1) varc <- rep(varc,length(lam0)+overall) if (length(varg)==1) varg <- rep(varg,length(lam0)+overall) eta <- varc+varg etat <- sum(eta) ### total variance for each cause + overall nc <- length(lam0); ### etat <- sum(eta[1:nc]) ### print(etat) ### print(varc) ### print(varg) ### print("MZ shared variance"); print(eta[1]/eta[1]^2); ### print("DZ shared variance"); ### print(c(mdz,vdz,vdz/mdz^2)); mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; ### ace overall if (overall==1) { varcl <- varc[nc+1]; vargl <- varg[nc+1] if (all.sum==1) etal <- etat else etal <- vargl+varcl Gams1 <-cbind( rgamma(K,vargl)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,varcl)/etal ) ### ex1 <- Gams1[,6] ### ex2 <- Gams1[,7] mzrv <- Gams1[,1]+ Gams1[,5] ### shared gene + env dzrv1 <- Gams1[,2]+Gams1[,3]+Gams1[,5] dzrv2 <- Gams1[,2]+Gams1[,4]+Gams1[,5] Gamoa <- cbind(mz*mzrv+dz*dzrv1,mz*mzrv+dz*dzrv2) } else Gamoa <- 0 temp1 <- matrix(0,K,length(lam0)) temp2 <- matrix(0,K,length(lam0)) Gamm <- c() for (i in 1:nc) { varcl <- varc[i]; vargl <- varg[i] if (all.sum==1) etal <- etat else etal <- vargl+varcl Gams1 <-cbind( rgamma(K,vargl)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,vargl*0.5)/etal, rgamma(K,varcl)/etal ) ### mzrv <- Gams1[,1]+Gams1[,5] ### shared gene + env dzrv1 <- Gams1[,2]+Gams1[,3]+Gams1[,5] dzrv2 <- Gams1[,2]+Gams1[,4]+Gams1[,5] Gam1 <- cbind(mz*mzrv+dz*dzrv1,mz*mzrv+dz*dzrv2) Gam1 <- Gam1+Gamoa Gamm <- cbind(Gamm,Gam1) ### ## {{{ ### mean(mzrv) ### var(mzrv) ### var(mzrv[mz==1]) ### mean(dzrv1) ### mean(dzrv2) ### var(dzrv1) ### var(dzrv2) ### apply(Gam1,2,mean); apply(Gam1,2,var) ### apply(Gam1[mz==1,],2,mean); apply(Gam1[mz==0,],2,mean) ### var(Gam1[mz==1,]); var(Gam1[mz==0,]) ### shdz <- Gams1[,2]+Gams1[,5] ### mean(shdz) ### ###1.25/etat ### var(shdz) ### mean(shdz/0.83) ### var(shdz/0.83) ### ## }}} ttemp<-matrix(rexp(2*K),K,2)/(Gam1*exp(beta*x[,,3])*lam0[i]) temp1[,i] <- ttemp[,1] temp2[,i] <- ttemp[,2] } ### print(cov(Gamm)) ### temp0 <- cbind( temp1, temp2) ### print(cov(temp0)) temp <- cbind( apply(temp1,1,min), apply(temp2,1,min)) cause1 <- apply(temp1,1,which.min) cause2 <- apply(temp2,1,which.min) ### for (zyg in c(0,1)) ### for (i in 1:2) for (j in 1:2) { ### med <- (i==cause1) & (j==cause2) & mz==zyg ### datl <- temp[med,] ### dato <- temp0[med,] ### print(c(zyg,i,j)) ### print(cor(datl)) ### print(c(zyg,i,j)) ### print(cor(dato)) ### } ### x[,,2]<- ifelse(temp<=C,1,0)*cbind(cause1,cause2); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) zyg <- c(rep("MZ",K),rep("DZ",K)) if (left>0) { ## {{{ if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} ## }}} if (pairleft==1) ud <- cbind(ud,zyg,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,zyg,rep(minstime,each=n),lefttime,trunk) names(ud)<-c("time","status","x","cluster","zyg","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export simCompete.simple <- function(K,varr,beta,stoptime,lam0=c(0.2,0.3), Cvar=0,left=0,pairleft=0,trunc.prob=0.5,overall=1,all.sum=1) ## {{{ { ## K antal clustre, n=antal i clustre n=2 # twins with ace structure ## length(lam0) competing risk with constant hazards lam0 x<-array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) if (Cvar==0) C<-matrix(stoptime,K,n) else C<-matrix(Cvar*runif(K*n)*stoptime,K,n) ## variance and mean of additve gamma via paramenters sp <- sum(varr) partheta <- varr/sp^2 eta <- partheta etat <- sum(eta) ### total variance for each cause + overall nc <- length(lam0); print(eta) print(etat) mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; ### ace overall if (overall==1) { ### if (all.sum==1) etal <- etat else etal <- vargl+varcl etal <- etat Gams1 <-cbind(rgamma(K,eta[nc+1])/etal) Gamoa <- Gams1 } else Gamoa <- 0 ### print(apply(Gamoa,2,mean)) ### print(apply(Gamoa,2,var)) temp1 <- matrix(0,K,length(lam0)) temp2 <- matrix(0,K,length(lam0)) for (i in 1:nc) { etal <- etat Gams1 <-cbind(rgamma(K,eta[i])/etal) Gam1 <- Gams1+Gamoa Gam1 <- cbind(Gam1,Gam1) ### print("_________________") ### print(apply(Gam1,2,mean)) ### print(apply(Gam1,2,var)) occ <- (1:nc)[-i] for (j in occ) { print(eta[j]) Gamo <- cbind(rgamma(K,eta[j])/etal,rgamma(K,eta[j])/etal) ### print(apply(Gamo,2,mean)) ### print(apply(Gamo,2,var)) Gam1 <- Gam1+Gamo } print(apply(Gam1,2,mean)) print(apply(Gam1,2,var)) ttemp<-matrix(rexp(2*K),K,2)/(Gam1*exp(beta*x[,,3])*lam0[i]) temp1[,i] <- ttemp[,1] temp2[,i] <- ttemp[,2] } temp <- cbind( apply(temp1,1,min), apply(temp2,1,min)) cause1 <- apply(temp1,1,which.min) cause2 <- apply(temp2,1,which.min) ### x[,,2]<- ifelse(temp<=C,1,0)*cbind(cause1,cause2); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) zyg <- c(rep("MZ",K),rep("DZ",K)) if (left>0) { ## {{{ if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} ## }}} if (pairleft==1) ud <- cbind(ud,zyg,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,zyg,rep(minstime,each=n),lefttime,trunk) names(ud)<-c("time","status","x","cluster","zyg","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export simFrailty.simple <- function(K,varr,beta,stoptime,lam0=c(0.2), Cvar=0,left=0,pairleft=0,trunc.prob=0.5,overall=1,all.sum=NULL) ## {{{ { n=2 ## length(lam0) competing risk with constant hazards lam0 x<-array(c(runif(n*K),rep(0,n*K),rbinom(n*K,1,0.5)),dim=c(K,n,3)) if (Cvar==0) C<-matrix(stoptime,K,n) else C<-matrix(Cvar*runif(K*n)*stoptime,K,n) if (length(varr)==1) varr <- rep(varr,length(lam0)+overall) eta <- varr etat <- sum(varr) if (!is.null(all.sum)) etat <- all.sum varr <- varr/etat ### total variance for each cause + overall nc <- length(lam0); mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; if (overall==1) { etal <- etat Gams1 <-cbind(rgamma(K,varr[nc+1])/etal) Gamoa <- Gams1 } else Gamoa <- 0 print(etat); print(varr) temp1 <- matrix(0,K,length(lam0)) temp2 <- matrix(0,K,length(lam0)) for (i in 1:nc) { etal <- etat Gams1 <-cbind(rgamma(K,varr[i])/etal) Gam1 <- Gams1+Gamoa Gam1 <- cbind(Gam1,Gam1) print(i); print(apply(Gam1,2,mean)); print(apply(Gam1,2,var)); print(apply(Gams1,2,mean)); print(apply(Gams1,2,var)); print(apply(as.matrix(Gamoa),2,mean)); print(apply(as.matrix(Gamoa),2,var)); ttemp<-matrix(rexp(2*K),K,2)/(Gam1*exp(beta*x[,,3])*lam0[i]) temp1[,i] <- ttemp[,1] temp2[,i] <- ttemp[,2] } temp <- cbind( apply(temp1,1,min), apply(temp2,1,min)) cause1 <- apply(temp1,1,which.min) cause2 <- apply(temp2,1,which.min) ### x[,,2]<- ifelse(temp<=C,1,0)*cbind(cause1,cause2); x[,,1]<-pmin(temp,C) minstime <- apply(x[,,1],1,min) ud <- as.data.frame(cbind(apply(x,3,t),rep(1:K,each=n))) zyg <- c(rep("MZ",K),rep("DZ",K)) if (left>0) { ## {{{ if (pairleft==1) { lefttime <- runif(K)*(stoptime-left) left <- rbinom(K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > minstime) medleft <- rep(trunk,each=n) } else { ### lefttime <- rexp(n*K)*left lefttime <- runif(K)*(stoptime-left) left <- rbinom(n*K,1,trunc.prob) ## not trunation times! lefttime <- apply(cbind(lefttime*left,3),1,min) trunk <- (lefttime > ud[,1]) medleft <- trunk } } else { lefttime <- trunk <- rep(0,K);} ## }}} if (pairleft==1) ud <- cbind(ud,zyg,rep(minstime,each=n),rep(lefttime,each=n),rep(trunk,each=n)) else ud <- cbind(ud,zyg,rep(minstime,each=n),lefttime,trunk) names(ud)<-c("time","status","x","cluster","zyg","mintime","lefttime","truncated") return(ud) } ## }}} ##' @export kendall.ClaytonOakes.twin.ace <- function(parg,parc,K=10000,test=0) ## {{{ { ## K antal clustre, n=antal i clustre ### total variance of gene and env. ### K <- 10; varg <- 1; varc <- 1; ### random effects with ### means varg/(varg+varc) and variances varg/(varg+varc)^2 sumpar <- sum(parg+parc) parg <- parg/sumpar^2; parc <- parc/sumpar^2 K <- K*2 eta <- parc+parg Gams1 <-cbind( rgamma(K,parg)/eta, rgamma(K,parg*0.5)/eta, rgamma(K,parg*0.5)/eta, rgamma(K,parg*0.5)/eta, rgamma(K,parc)/eta ) mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; id <- rep(1:(K/2),each=2) mzrv <- Gams1[,1]+Gams1[,5] ### shared gene + env dzrv1 <- Gams1[,2]+Gams1[,3]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env dzrv2 <- Gams1[,2]+Gams1[,4]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env Gam1 <- cbind(mz*mzrv+dz*dzrv1,mz*mzrv+dz*dzrv2) if (test==1) { cat("mz cor") print(apply(Gam1[mz==1,1:2],2,var)) print(cor(Gam1[mz==1,1:2])) cat("dz cor") print(apply(Gam1[mz==0,1:2],2,var)) print(cor(Gam1[mz==0,1:2])) } Gam1 <- data.frame(cbind(Gam1,mz,id)) ## Silence false R CMD CHECK warnings: V11 <- V12 <- V21 <- V22 <- NULL gams.pair <- fast.reshape(Gam1,id="id") gams.pair <- transform(gams.pair, kendall = ((V11-V12)*(V21-V22))/((V11+V12)*(V21+V22)) ) kendall <- gams.pair$kendall mz.kendall <- mean(kendall[gams.pair$mz1==1]) dz.kendall <- mean(kendall[gams.pair$mz1==0]) return(list(mz.kendall=mz.kendall,dz.kendall=dz.kendall)) } ## }}} ##' @export kendall.normal.twin.ace <- function(parg,parc,K=10000) ## {{{ { ## K antal clustre, n=antal i clustre ### total variance of gene and env. ### K <- 10; varg <- 1; varc <- 1; ### random effects with ### means varg/(varg+varc) and variances varg/(varg+varc)^2 K <- K*2 Gams1 <-cbind( parg^.5*rnorm(K,parg), (parg*0.5)^.5*rnorm(K), (parg*0.5)^.5*rnorm(K), (parg*0.5)^.5*rnorm(K), parc^.5*rnorm(K) ) mz <- c(rep(1,K/2),rep(0,K/2)); dz <- 1-mz; id <- rep(1:(K/2),each=2) mzrv <- Gams1[,1]+Gams1[,5] ### shared gene + env dzrv1 <- Gams1[,2]+Gams1[,3]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env dzrv2 <- Gams1[,2]+Gams1[,4]+Gams1[,5] ### 0.5 shared gene + 0.5 non-shared + env Gam1 <- cbind(mz*mzrv+dz*dzrv1,mz*mzrv+dz*dzrv2) Gam1 <- data.frame(cbind(exp(Gam1),mz,id)) ## Silence false R CMD CHECK warnings: V11 <- V12 <- V21 <- V22 <- NULL gams.pair <- fast.reshape(Gam1,id="id") gams.pair <- transform(gams.pair, kendall = ((V11-V12)*(V21-V22))/((V11+V12)*(V21+V22)) ) kendall <- gams.pair$kendall mz <- gams.pair$mz1 mz.kendall <- mean(kendall[mz==1]) dz.kendall <- mean(kendall[mz==0]) return(list(mz.kendall=mz.kendall,dz.kendall=dz.kendall)) } ## }}} ## ###kendall.ClaytonOakes.twin.ace(2,0) ## sim.clayton <- function(n=100,K=2,eta=0.5,beta,...) { ## m <- lvm(T~x) ## rates <- c(0.3,0.5); cuts <- c(0,5) ## distribution(m,~) <- coxExponential.lvm(rate=rates,timecut=cuts) ## } mets/R/plotcr.R0000644000176200001440000000670313623061405013057 0ustar liggesusers##' @export plotcr <- function(x,col,lty,legend=TRUE,which=1:2,cause=1:2, ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...) { if (inherits(try(find.package("prodlim"),silent=TRUE),"try-error")) { stop("Needs prodlim") } dots <- list(...) if (is.null(dots$xlab)) dots$xlab <- "Time" if ((!is.data.frame(x) | !is.matrix(x)) && ncol(x)<2) stop("Wrong type of data") if (ncol(x)==2) { if (is.null(dots$curvlab)) { causes <- setdiff(unique(x[,2]),0) dots$curvlab <- seq(length(causes)) } colnames(x)[1:2] <- c("t","status") co <- prodlim::prodlim(Hist(t,status)~1,data=data.frame(x)) ## co <- cuminc(x[,1],x[,2]) ## if (any(x[,1]<0)) { ## do.call(co,p) ## for (i in seq(length(co))) { ## co[[i]]$time <- co[[i]]$time[-1] ## co[[i]]$est <- co[[i]]$est[-1] ## } ##if (is.null(dots$xlim)) dots$xlim <- range(x[,1]) ## } ##do.call("plot", c(list(x=co), dots)) if (is.null(dots$lwd)) dots$lwd <- 1 if (missing(lty)) lty <- seq_len(length(co$cuminc)) if (missing(col)) col <- rep(1,length(co$cuminc)) if (is.null(dots$lwd)) dots$lwd <- 1 dots$lty <- lty[1] dots$col <- col[1] do.call("plot", c(list(x=co), dots)) dots$add <- TRUE for (i in seq_len(length(co$cuminc)-1)+1) { dots$lty <- lty[i] dots$col <- col[i] dots$cause <- i do.call("plot", c(list(x=co), dots)) } if (legend) legend("topleft",names(co$cuminc),col=col,lty=lty,pch=-1) return(invisible(co)) } if (ask) { oask <- devAskNewPage(TRUE) on.exit(devAskNewPage(oask)) } t <- as.matrix(x[,1:2]); cause0 <- as.matrix(x[,3:4]) causes <- sort(setdiff(unique(cause0),0)) if (is.null(dots$curvlab)) dots$curvlab <- seq(1:length(unique(causes))) if (missing(col)) col <- c("seagreen","darkred","darkblue","goldenrod","mediumpurple") if (1%in%which) { plot(t,type="n",...) count <- 1 for (i in causes) { points(t[cause0[,1]==causes[i],],col=Col(col[count],0.5),pch=2) points(t[cause0[,2]==causes[i],],col=Col(col[count],0.5),pch=6) count <- count+1 } points(t[cause0[,1]==0 & cause0[,2]==0,],col=Col("black",0.2),pch=1) if (legend) legend("topleft", c("Subj 1, Cause 1", "Subj 2, Cause 1", "Subj 1, Cause 2", "Subj 2, Cause 2", "Double Censoring"), pch=c(2,6,2,6,1), col=c(rep(col[1:length(causes)],each=2),"black")) } if (2%in%which) { dots$curvlab <- NULL colnames(x)[1:4] <- c("t1","t2","cause1","cause2") co1 <- prodlim::prodlim(Hist(t1,cause1)~1,data.frame(x)) co2 <- prodlim::prodlim(Hist(t2,cause2)~1,data.frame(x)) if (is.null(dots$lwd)) dots$lwd <- 1 if (missing(lty)) lty <- seq_len(length(co1$cuminc)) if (missing(col)) col <- rep(1,length(co1$cuminc)) if (is.null(dots$lwd)) dots$lwd <- 1 dots$lty <- lty[1] dots$col <- col[1] dots$cause <- cause[1] do.call("plot", c(list(x=co1), dots)) dots$add <- TRUE do.call("plot", c(list(x=co2), dots)) ## for (i in seq_len(length(co1$cuminc)-1)+1) { for (i in seq_len(length(cause)-1)+1) { dots$lty <- lty[i] dots$col <- col[i] dots$cause <- cause[i] do.call("plot", c(list(x=co1), dots)) do.call("plot", c(list(x=co2), dots)) } if (legend && length(cause)>1) legend("topleft",names(co1$cuminc)[cause],col=col,lty=lty,pch=-1,bg="white") } } mets/R/biprobit.strata.R0000644000176200001440000000345413623061405014663 0ustar liggesusersdo.twinlm.strata <- function(x,fun,...) { res <- lapply(x$model,function(m) do.call(fun,c(list(m),list(...)))) names(res) <- names(x$model) class(res) <- "do.twinlm.strata" newattr <- setdiff(names(attributes(x)),names(attributes(res))) attributes(res) <- c(attributes(res),attributes(x)[newattr]) return(res) } ##' @export print.do.twinlm.strata <- function(x,...) { for (i in seq_len(length(x))) { message(rep("-",60),sep="") message("Strata '",names(x)[i],"'",sep="") print(x[[i]]) } if (!is.null(attributes(x)$time)) { message(rep("-",60),sep="") cat("\n") cat("Event of interest before time ", attributes(x)$time, "\n", sep="") } return(invisible(x)) } ##' @export plot.twinlm.strata <- function(x,...) suppressMessages(do.twinlm.strata(x,"plot",...)) ##' @export print.twinlm.strata <- function(x,...) print.do.twinlm.strata(x$model,...) ##' @export summary.twinlm.strata <- function(object,...) do.twinlm.strata(object,"summary",...) ##' @export coef.twinlm.strata <- function(object,...) object$coef ##' @export logLik.twinlm.strata <- function(object,indiv=FALSE,list=FALSE,...) { ll <- lapply(object$model,function(x) logLik(x,indiv=indiv,...)) if (list) return(ll) if (!indiv) { res <- structure(sum(unlist(ll)),df=0,nall=0) for (i in seq(length(ll))) { attributes(res)$nall <- attributes(res)$nall+attributes(ll[[i]])$nall attributes(res)$df <- attributes(res)$df+attributes(ll[[i]])$df } ## attributes(res)$nobs <- attributes(res)$nall-attributes(res)$df attributes(res)$nobs <- attributes(res)$nall class(res) <- "logLik" return(res) } return(unlist(ll)) } ##' @export score.twinlm.strata <- function(x,...) { ss <- lapply(x$model,function(m) score(m,indiv=FALSE,...)) return(unlist(ss)) } mets/R/coef.biprobit.R0000644000176200001440000000017713623061405014300 0ustar liggesusers##' @export coef.biprobit <- function(object,matrix=FALSE,...) { if (matrix) return(object$coef) return(object$coef[,1]) } mets/R/fastcluster.R0000644000176200001440000000033613623061405014107 0ustar liggesusers##' @export fast.cluster <- function(x,...) { arglist <- list("FastCluster", time=as.integer(x), PACKAGE="mets") res <- do.call(".Call",arglist) return(as.vector(res)) } mets/R/biprobit.time.R0000644000176200001440000002766513623061405014335 0ustar liggesusers##' @export biprobit.time <- function(formula,data,id,..., breaks=NULL,n.times=20,pairs.only=TRUE,fix.cens.weights=FALSE, cens.formula,cens.model="aalen",weights="w",messages=FALSE, return.data=FALSE,theta.formula=~1,trunc.weights="w2", estimator="biprobit", summary.function) { ## {{{ m <- match.call(expand.dots = FALSE) m <- m[match(c("","data"),names(m),nomatch = 0)] Terms <- terms(cens.formula,data=data) m$formula <- Terms m[[1]] <- as.name("model.frame") M <- eval(m,envir=parent.frame()) censtime <- model.extract(M, "response") if (pairs.only) { ii <- sort(as.matrix(na.omit(fast.reshape(seq(nrow(data)),id=data[,id])))) data <- data[ii,,drop=FALSE] censtime <- censtime[ii] } ltimes <- 0 if (ncol(censtime)==3) {## {{{ ## Calculate probability of not being truncated via Clayton-Oakes (ad hoc combining causes) status <- censtime[,3] noncens <- !status time <- censtime[,2] ltimes <- censtime[,1] data$truncsurv <- Surv(ltimes,time,noncens) trunc.formula <- update(formula,truncsurv~.) ud.trunc <- aalen(trunc.formula,data=data,robust=0,n.sim=0,residuals=0,silent=1,max.clust=NULL, clusters=data[,id], ...) X <- model.matrix(trunc.formula,data) ##dependX0 <- model.matrix(theta.formula,data) dependX0 <- X twostage.fit <- two.stage(ud.trunc, data=data,robust=0,detail=0, theta.des=dependX0)#,Nit=20,step=1.0,notaylor=1) Xnam <- colnames(X) ww <- fast.reshape(cbind(X,".num"=seq(nrow(X)),".lefttime"=ltimes),varying=c(".num",".lefttime"),id=data[,id]) dependX <- as.matrix(ww[,Xnam,drop=FALSE]) nottruncpair.prob <- predict.two.stage(twostage.fit,X=ww[,Xnam], times=ww[,".lefttime1"],times2=ww[,".lefttime2"], theta.des=dependX)$St1t2 data[,trunc.weights] <- 0 data[ww[,".num1"],trunc.weights] <- nottruncpair.prob data[ww[,".num2"],trunc.weights] <- nottruncpair.prob } else { status <- censtime[,2] time <- censtime[,1] } ## }}} outcome <- as.character(terms(formula)[[2]]) jj <- jumptimes(time,data[,outcome],data[,id],sample=n.times) lastjump <- tail(jj,1) if (is.null(breaks)) { breaks <- jj } if (any(breaks>lastjump)) { breaks <- unique(pmin(breaks,tail(jj,1))) if (messages) message("Looking at event before time ",max(breaks)) } outcome0 <- paste(outcome,"_dummy") res <- list(); k <- 0 breaks <- rev(breaks) ids <- c() for (tau in breaks) { if (length(breaks)>1 && messages) message(tau) ## construct min(T_i,tau) or T_i and related censoring variable, ## thus G_c(min(T_i,tau)) or G_c(T_i) as weights if ((fix.cens.weights==1 & k==0) | (fix.cens.weights==0)) { data0 <- data time0 <- time status0 <- status } cond0 <- time0>tau if (!fix.cens.weights) { status0[cond0 & status==1] <- 3 ## Not-censored if T>tau } data0[,outcome] <- data[outcome] data0[cond0,outcome] <- FALSE ## Non-case if T>tau if (!fix.cens.weights) time0[cond0] <- tau if ((fix.cens.weights & k==0) | (!fix.cens.weights)) { if (ncol(censtime)==3) { ## truncation... suppressWarnings(data0$S <- Surv(ltimes,time0,status0==1)) } else { data0$S <- Surv(time0,status0==1) } ## data0$status0 <- status0 ## data0$time0 <- time0 ## data0$y0 <- data0[,outcome] dataw <- ipw(update(cens.formula,S~.), data=subset(data0,ltimes1) res <- c(res,list(summary(b,...))) } if (length(breaks)==1) { return(structure(b,time=breaks)) } if (missing(summary.function)) { summary.function <- function(x,...) x$all } mycoef <- lapply(rev(res),function(x) summary.function(x)) res <- list(varname="Time",var=rev(breaks),coef=mycoef,summary=rev(res),call=m,type="time",id=ids) class(res) <- "timemets" return(res) } ## }}} biprobit.time2 <- function(formula,data,id,..., breaks=Inf,pairs.only=TRUE, cens.formula,cens.model="aalen",weights="w") { ## {{{ m <- match.call(expand.dots = FALSE) m <- m[match(c("","data"),names(m),nomatch = 0)] Terms <- terms(cens.formula,data=data) m$formula <- Terms m[[1]] <- as.name("model.frame") M <- eval(m,envir=parent.frame()) censtime <- model.extract(M, "response") status <- censtime[,2] time <- censtime[,1] outcome <- as.character(terms(formula)[[2]]) if (is.null(breaks)) breaks <- quantile(time,c(0.25,0.5,0.75,1)) outcome0 <- paste(outcome,"_dummy") res <- list() for (tau in breaks) { if (length(breaks)>1) message(tau) data0 <- data time0 <- time cond0 <- time0>tau status0 <- status status0[cond0 & status==1] <- 3 ## Censored data0[cond0,outcome] <- FALSE time0[cond0] <- tau data0$S <- survival::Surv(time0,status0==1) dataw <- ipw(update(cens.formula,S~.), data=data0, cens.model=cens.model, cluster=id,weight.name=weights,obs.only=TRUE) message("control") suppressWarnings(b <- biprobit(formula, data=dataw, id=id, weights=weights, pairs.only=pairs.only,...)) res <- c(res,list(summary(b))) } if (length(breaks)==1) return(b) res <- list(varname="Time",var=breaks,coef=lapply(res,function(x) x$all),summary=res,call=m,type="time") class(res) <- "timemets" return(res) } ## }}} biprobit.time.trunc.test <- function(formula,data,id,..., breaks=NULL,n.times=20,pairs.only=TRUE,fix.cens.weights=FALSE, cens.formula,cens.model="aalen",weights="w",messages=FALSE, return.data=FALSE,theta.formula=~1,trunc.weights="w2", estimator="biprobit", summary.function) { ## {{{ m <- match.call(expand.dots = FALSE) m <- m[match(c("","data"),names(m),nomatch = 0)] Terms <- terms(cens.formula,data=data) m$formula <- Terms m[[1]] <- as.name("model.frame") M <- eval(m,envir=parent.frame()) censtime <- model.extract(M, "response") if (pairs.only) { ii <- sort(as.matrix(na.omit(fast.reshape(seq(nrow(data)),id=data[,id])))) data <- data[ii,,drop=FALSE] censtime <- censtime[ii] } ltimes <- 0 if (ncol(censtime)==3) { ## Calculate probability of not being truncated via Clayton-Oakes (ad hoc combining causes) status <- censtime[,3] noncens <- !status time <- censtime[,2] ltimes <- censtime[,1] data$truncsurv <- Surv(ltimes,time,noncens) trunc.formula <- update(formula,truncsurv~.) ud.trunc <- aalen(trunc.formula,data=data,robust=0,n.sim=0,residuals=0,silent=1,max.clust=NULL, clusters=data[,id], ...) X <- model.matrix(trunc.formula,data) ##dependX0 <- model.matrix(theta.formula,data) dependX0 <- X twostage.fit <- two.stage(ud.trunc, data=data,robust=0,detail=0, theta.des=dependX0)#,Nit=20,step=1.0,notaylor=1) Xnam <- colnames(X) ww <- fast.reshape(cbind(X,".num"=seq(nrow(X)),".lefttime"=ltimes),varying=c(".num",".lefttime"),id=data[,id]) dependX <- as.matrix(ww[,Xnam,drop=FALSE]) nottruncpair.prob <- predict.two.stage(twostage.fit,X=ww[,Xnam], times=ww[,".lefttime1"],times2=ww[,".lefttime2"], theta.des=dependX)$St1t2 data[,trunc.weights] <- 0 data[ww[,".num1"],trunc.weights] <- nottruncpair.prob data[ww[,".num2"],trunc.weights] <- nottruncpair.prob } else { status <- censtime[,2] time <- censtime[,1] } outcome <- as.character(terms(formula)[[2]]) jj <- jumptimes(time,data[,outcome],data[,id],sample=n.times) lastjump <- tail(jj,1) if (is.null(breaks)) { breaks <- jj } if (any(breaks>lastjump)) { breaks <- unique(pmin(breaks,tail(jj,1))) if (messages) message("Looking at event before time ",max(breaks)) } outcome0 <- paste(outcome,"_dummy") res <- list(); k <- 0 breaks <- rev(breaks) for (tau in breaks) { if (length(breaks)>1 && messages) message(tau) ## construct min(T_i,tau) or T_i and related censoring variable, ## thus G_c(min(T_i,tau)) or G_c(T_i) as weights if ((fix.cens.weights==1 & k==0) | (fix.cens.weights==0)) { data0 <- data time0 <- time status0 <- status } cond0 <- time0>tau if (!fix.cens.weights) { status0[cond0 & status==1] <- 3 ## Not-censored if T>tau } data0[,outcome] <- data[outcome] data0[cond0,outcome] <- FALSE ## Non-case if T>tau if (!fix.cens.weights) time0[cond0] <- tau if ((fix.cens.weights & k==0) | (!fix.cens.weights)) { if (ncol(censtime)==3) { ## truncation... suppressWarnings(data0$S <- Surv(ltimes,time0,status0==1)) } else { data0$S <- Surv(time0,status0==1) } ## data0$status0 <- status0 ## data0$time0 <- time0 ## data0$y0 <- data0[,outcome] dataw <- ipw(update(cens.formula,S~.), data=subset(data0,ltimes1) res <- c(res,list(summary(b,...))) } if (length(breaks)==1) { return(structure(b,time=breaks)) } if (missing(summary.function)) { summary.function <- function(x,...) x$all } mycoef <- lapply(rev(res),function(x) summary.function(x)) res <- list(varname="Time",var=rev(breaks),coef=mycoef,summary=rev(res),call=m,type="time") class(res) <- "timemets" return(res) } ## }}} mets/R/blocksample.R0000644000176200001440000000575113623061405014052 0ustar liggesusers##' @export dsample <- function(data,x,size=NULL,replace=TRUE,...) { if (missing(x)) { if (is.null(size)) size <- NROW(data) return(data[sample.int(NROW(data), size, replace=replace),,drop=FALSE]) } inp <- procform(x,data=data,return.formula=TRUE) if (length(inp$filter.expression)>0) data <- subset(data,eval(inp$filter.expression)) if (!is.null(inp$predictor)) idvar <- model.frame(inp$predictor, data=data, na.action=na.pass,...) if (!is.null(inp$response)) { if (is.null(size)) size <- NROW(data) data <- model.frame(inp$response, data=data, na.action=na.pass,...) } if (is.null(inp$predictor)) { if (is.null(size)) size <- NROW(data) return(data[sample.int(NROW(data), size, replace=replace),,drop=FALSE]) } blocksample(data,idvar=idvar,size=size,replace=replace,...) } ##' Sample blockwise from clustered data ##' ##' @title Block sampling ##' @param data Data frame ##' @param idvar Column defining the clusters ##' @param size Size of samples ##' @param replace Logical indicating wether to sample with replacement ##' @param \dots additional arguments to lower level functions ##' @return \code{data.frame} ##' @author Klaus K. Holst ##' @keywords models utilities ##' @aliases blocksample dsample ##' @details Original id is stored in the attribute 'id' ##' @export ##' @examples ##' ##' d <- data.frame(x=rnorm(5), z=rnorm(5), id=c(4,10,10,5,5), v=rnorm(5)) ##' (dd <- blocksample(d,size=20,~id)) ##' attributes(dd)$id ##' ##' \dontrun{ ##' blocksample(data.table::data.table(d),1e6,~id) ##' } ##' ##' ##' d <- data.frame(x=c(1,rnorm(9)), ##' z=rnorm(10), ##' id=c(4,10,10,5,5,4,4,5,10,5), ##' id2=c(1,1,2,1,2,1,1,1,1,2), ##' v=rnorm(10)) ##' dsample(d,~id, size=2) ##' dsample(d,.~id+id2) ##' dsample(d,x+z~id|x>0,size=5) ##' blocksample <- function(data, size, idvar=NULL, replace=TRUE, ...) { if (is.null(idvar)) { return(data[sample(NROW(data),size,replace=replace),,drop=FALSE]) } if (inherits(idvar,"formula")) { idvar <- all.vars(idvar) } if (NROW(idvar)==nrow(data)) { id0 <- idvar } else { if (inherits(data,"data.table")) { id0 <- as.data.frame(data[,idvar,with=FALSE])[,1] } else id0 <- data[,idvar] } if (NCOL(id0)>1) { id0 <- interaction(as.data.frame(id0)) } id0 <- as.matrix(id0)[,1,drop=TRUE] ii <- cluster.index(as.matrix(id0)) size <- ifelse(missing(size) || is.null(size),ii$uniqueclust,size) ids <- sample(seq(ii$uniqueclust), size=size,replace=replace) idx <- na.omit(as.vector(t(ii$idclustmat[ids,])))+1 newid <- rep(seq(size), ii$cluster.size[ids]) oldid <- id0[idx] res <- data[idx,] if (is.character(idvar) && length(idvar)==1) { res[,idvar] <- newid } else { res <- cbind(res,id=newid) colnames(res) <- make.unique(colnames(res)) } attributes(res)$id <- oldid return(res) } mets/R/pmvn.R0000644000176200001440000001016413623061405012530 0ustar liggesusers##' @export pbvn <- function(upper,rho,sigma) { if (!missing(sigma)) { rho <- cov2cor(sigma)[1,2] upper <- upper/diag(sigma)^0.5 } arglist <- list("bvncdf", a=upper[1], b=upper[2], r=rho, PACKAGE="mets") res <- do.call(".Call",arglist) return(res) } ##' Multivariate normal distribution function ##' ##' Multivariate normal distribution function ##' @aliases pmvn pbvn loglikMVN scoreMVN dmvn rmvn ##' @export ##' @examples ##' lower <- rbind(c(0,-Inf),c(-Inf,0)) ##' upper <- rbind(c(Inf,0),c(0,Inf)) ##' mu <- rbind(c(1,1),c(-1,1)) ##' sigma <- diag(2)+1 ##' pmvn(lower=lower,upper=upper,mu=mu,sigma=sigma) ##' @param lower lower limits ##' @param upper upper limits ##' @param mu mean vector ##' @param sigma variance matrix or vector of correlation coefficients ##' @param cor if TRUE sigma is treated as standardized (correlation matrix) pmvn <- function(lower,upper,mu,sigma,cor=FALSE) { if (missing(sigma)) stop("Specify variance matrix 'sigma'") if (missing(lower)) { if (missing(upper)) stop("Lower or upper integration bounds needed") lower <- upper; lower[] <- -Inf } p <- ncol(rbind(lower)) if (missing(upper)) { upper <- lower; upper[] <- Inf } if (missing(mu)) mu <- rep(0,p) sigma <- rbind(sigma) ncor <- p*(p-1)/2 if (ncol(sigma)!=p && ncol(sigma)!=ncor) stop("Incompatible dimensions of mean and variance") if (ncol(rbind(lower))!=p || ncol(rbind(upper))!=p) stop("Incompatible integration bounds") arglist <- list("pmvn0", lower=rbind(lower), upper=rbind(upper), mu=rbind(mu), sigma=rbind(sigma), cor=as.logical(cor[1]), PACKAGE="mets") res <- do.call(".Call",arglist) return(as.vector(res)) } introotpn <- function(p) { ## Find integer root of x^2-x-2*p=0 n <- 0.5*(1+sqrt(1+8*p)) if (floor(n)!=n) n <- NA return(n) } ##' @export rmvn <- function(n,mu,sigma,rho,...) { if (!missing(rho)) { if (is.vector(rho)) rho <- rbind(rho) if (missing(mu)) { p <- introotpn(NCOL(rho)) mu <- rep(0,p) } return (.Call("_mets_rmvn", n=as.integer(n), mu=rbind(mu), rho=rbind(rho))) } if (!missing(mu) && missing(sigma)) sigma <- diag(nrow=length(mu)) if (missing(sigma)) sigma <- matrix(1) if (is.vector(sigma)) sigma <- diag(sigma,ncol=length(sigma)) if (missing(mu)) mu <- rep(0,ncol(sigma)) PP <- with(svd(sigma), v%*%diag(sqrt(d),ncol=length(d))%*%t(u)) res <- matrix(rnorm(ncol(sigma)*n),ncol=ncol(sigma))%*%PP if (NROW(mu)==nrow(res) && NCOL(mu)==ncol(res)) return(res+mu) return(res+cbind(rep(1,n))%*%mu) } ##' @export dmvn <- function(x,mu,sigma,rho,log=FALSE,nan.zero=TRUE,...) { if (!missing(rho)) { if (is.vector(rho)) rho <- rbind(rho) if (is.vector(x)) x <- rbind(x) if (missing(mu)) { p <- NCOL(x) mu <- rep(0,p) } res <- .Call("_mets_dmvn", u=x, mu=rbind(mu), rho=rho) if (!log) res <- exp(res) return(res) } if (!missing(mu) && missing(sigma)) sigma <- diag(nrow=length(mu)) if (missing(sigma)) sigma <- matrix(1) if (is.vector(sigma)) sigma <- diag(sigma,ncol=length(sigma)) if (missing(mu)) mu <- rep(0,ncol(sigma)) if (length(sigma)==1) { k <- 1 isigma <- structure(cbind(1/sigma),det=as.vector(sigma)) } else { k <- ncol(sigma) isigma <- Inverse(sigma) } if (!missing(mu)) { if (NROW(mu)==NROW(x) && NCOL(mu)==NCOL(x)) { x <- x-mu } else { x <- t(t(x)-mu) } } logval <- -0.5*(base::log(2*base::pi)*k+ base::log(attributes(isigma)$det)+ rowSums((x%*%isigma)*x)) if (nan.zero) logval[is.nan(logval)] <- -Inf if (log) return(logval) return(exp(logval)) } mets/R/npc.R0000644000176200001440000000325013623061405012326 0ustar liggesusers##' @export npc <- function(T,cause,same.cens=TRUE,sep=FALSE) { mtime <- apply(T[,1:2],1,max) ot <- order(mtime) mtime <- mtime[ot] T <- T[ot,] if (!sep) { time1 <- as.vector(T[,1:2]); status1 <- as.vector(T[,3:4]) ud.cens1<-survival::survfit(Surv(time1,status1==0)~+1); Gfit1<-cbind(ud.cens1$time,ud.cens1$surv) Gfit2 <- Gfit1<-rbind(c(0,1),Gfit1); } else { time1 <- as.vector(T[,1]); status1 <- as.vector(T[,3]) ud.cens1<-survival::survfit(Surv(time1,status1==0)~+1); time2 <- as.vector(T[,2]); status2 <- as.vector(T[,4]) ud.cens2<-survival::survfit(Surv(time2,status2==0)~+1); Gfit1<-cbind(ud.cens1$time,ud.cens1$surv) Gfit1<-rbind(c(0,1),Gfit1); Gfit2<-cbind(ud.cens2$time,ud.cens2$surv) Gfit2<-rbind(c(0,1),Gfit2); } i1 <- fast.approx(Gfit1[,1],T[,1]) cweights1<-fast.approx(,Gfit1[,2])[[1]] cweights2<-fast.approx(Gfit2[,1],T[,2],Gfit2[,2])[[1]]; weight11 <- apply(cbind(cweights1,cweights2),1,min) if (same.cens) { conc <- (T[,3]==cause[1])*(T[,4]==cause[2])/weight11 } else { conc <-(T[,3]==cause[1])*(T[,4]==cause[2])/(cweights1*cweights2); } mtime <- mtime[!is.na(conc)] conc <- conc[!is.na(conc)] cbind(mtime,cumsum(conc)/length(conc)) } ##' @export nonparcuminc <- function(t,status,cens=0) { ord <- order(t); t <- t[ord]; status <- status[ord] ud.cens<-survival::survfit(Surv(t,status==cens)~1) Gfit<-cbind(ud.cens$time,ud.cens$surv) Gfit<-rbind(c(0,1),Gfit); causes <- setdiff(unique(status),cens) cweight<-fast.approx(Gfit[,1],t,Gfit[,2])[[1]]; cc <- t for (i in 1:length(causes)) { c1 <- status==causes[i] cc <- cbind(cc,cumsum(c1/cweight)/length(c1)) } return(cc) } mets/R/cumh.R0000644000176200001440000000636713623061405012516 0ustar liggesusers cumh <- function(formula,data,...,time, timestrata=quantile(data[,time],c(0.25,0.5,0.75,1)), cens.formula=NULL,cens.model="aalen", cumulative=FALSE, silent=FALSE) { time. <- substitute(time) if (!is.character(time.)) time. <- deparse(time.) time <- time. if (!is.null(cens.formula)) { m <- match.call(expand.dots = TRUE)[1:3] Terms <- terms(cens.formula, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") censMod <- eval(m, parent.frame()) censtime <- model.extract(m, "response") status <- censtime[,2] ### data[,"_status"] <- } res <- list(); i <- 0 ht <- c() outcome <- as.character(terms(formula)[[2]]) coefs <- c() y0 <- data[,outcome] for (i in seq(length(timestrata))) { t <- timestrata[i] data[,outcome] <- y0 newdata <- data if (!cumulative) { if (i==1) { idx <- data[,time]0 & missing(fillcol)) fillcol <- Col(col,alpha) count <- 0 for (tt in type) { count <- count+1 zz <- x$coeftype[[tt]][idx,,drop=FALSE] if (!add) { plot(zz[,1:2,drop=FALSE],type="l",ylim=ylim,lwd=lwd, ylab=ylab,xlab=xlab,col=col[count],...) } add <- TRUE xx <- with(x, c(zz[,1],rev(zz[,1]))) yy <- with(x, c(zz[,3],rev(zz[,4]))) polygon(xx,yy,col=fillcol[count]) lines(zz[,1:2,drop=FALSE],lwd=lwd,col=col[count],...) } if (legend) graphics::legend(legendpos,names(x$coeftype)[type],col=col,lwd=lwd,lty=1) invisible(x) } mets/R/utils.R0000644000176200001440000000444013623061405012710 0ustar liggesusers###{{{ RoundMat RoundMat <- function(cc,digits = max(3, getOption("digits") - 2),na=TRUE,...) { res <- format(round(cc,max(1,digits)),digits=digits) if (na) return(res) res[grep("NA",res)] <- "" res } ###}}} RoundMat ###{{{ multinomlogit multinomlogit <- function(x,tr=exp,dtr=exp) { n <- length(x) ex <- tr(x) dex <- dtr(x) sx <- sum(ex)+1 f <- c(ex,1) df <- c(dex,0) res <- f/sx dg <- -dex/sx^2 gradient <- matrix(ncol=n,nrow=n+1) I <- diag(n+1) for (i in seq_len(n)) { gradient[,i] <- df[i]*I[i,]/sx+dg[i]*f } attributes(res)$gradient <- gradient return(res) } ###}}} multinomlogit ###{{{ grouptable ##' @export grouptable <- function(data,id,group,var,lower=TRUE, labels,order, group.labels,group.order, combine=" & ",...) { if (!missing(order) || !missing(labels)) { data[,var] <- as.factor(data[,var]) if (missing(order)) order <- seq(length(labels)) if (missing(labels)) labels <- levels(data[,var]) data[,var] <- factor(data[,var],levels(data[,var])[order],labels=labels[order]) } wide <- fast.reshape(data,id=id,varying=-group) res <- lapply(split(wide,wide[,group]), function(x) { M <- with(x, table(get(paste(var,"1",sep="")), get(paste(var,"2",sep="")))) if (lower) { M[lower.tri(M)] <- M[lower.tri(M)]+M[upper.tri(M)] M[upper.tri(M)] <- NA } return(M) }) if (!missing(group.order) && length(group.order)==length(res)) res <- res[group.order] if (!missing(group.labels) && length(group.labels)==length(res)) names(res) <- group.labels if (length(res)==2 && !is.null(combine)) { M <- res[[1]] M[upper.tri(M)] <- res[[2]][lower.tri(res[[2]])] diag(M) <- paste(diag(M),diag(res[[2]]),sep=combine) M <- cbind(rownames(M),M) M <- rbind(c("",rownames(M)),M) colnames(M) <- rownames(M) <- rep("",nrow(M)) M[1,1] <- paste(names(res),collapse=combine) return(structure(M,class="table")) return(M); } res } ###}}} grouptable mets/R/print.biprobit.R0000644000176200001440000000014413623061405014512 0ustar liggesusers##' @export print.biprobit <- function(x,...) { printCoefmat(x$coef,...) return(invisible(x)) } mets/R/summary.biprobit.R0000644000176200001440000001633713623061405015066 0ustar liggesusers##' @export summary.biprobit <- function(object,level=0.05,transform,contrast,mean.contrast=NULL,mean.contrast2=NULL,cor.contrast=NULL,marg.idx=1,iid=FALSE,...) { alpha <- level/2 varcomp <- object$coef[length(coef(object)),1:2] varcomp <- rbind(object$model$tr(c(varcomp[1],varcomp[1]%x%cbind(1,1) + qnorm(1-alpha)*varcomp[2]%x%cbind(-1,1)))) colnames(varcomp)[2:3] <- paste(c(alpha*100,100*(1-alpha)),"%",sep="") rownames(varcomp) <- ifelse(is.null(object$model$varcompname),"Variance component",object$model$varcompname) if (!missing(contrast)) { contrast <- rbind(contrast) mean.contrast <- contrast[,seq(object$model$blen),drop=FALSE] cor.contrast <- contrast[,seq(object$model$zlen)+object$model$blen,drop=FALSE] if (!object$model$eqmarg) { mean.contrast2 <- mean.contrast[,seq(ncol(mean.contrast)/2)+ncol(mean.contrast)/2,drop=FALSE] mean.contrast <- mean.contrast[,seq(ncol(mean.contrast)/2),drop=FALSE] } } h <- function(p) log(p/(1-p)) ## logit ih <- function(z) 1/(1+exp(-z)) ## expit ##dlogit <- function(p) 1/(p*(1-p)) if (!missing(transform)) { h <- asin; ih <- sin if (is.null(transform)) { h <- ih <- identity } if (is.list(transform)) { h <- transform[[1]]; ih <- transform[[2]] } } convval <- function(val) { i1 <- which(val==1) i2 <- which(val==-1) val <- as.character(val) val[seq_len(length(val)-1)+1] <- paste("+ ", val[seq_len(length(val)-1)+1],sep="") val[i2] <- "- "; val[i1] <- "+ " val[intersect(1,i1)] <- "" return(val) } parfun <- function(p,ref=FALSE,mean.contrast,mean.contrast2,cor.contrast) { nn <- paste("[",gsub("r:","",rownames(object$coef),fixed=TRUE),"]",sep="") m <- rep(p[1],2) r <- p[object$model$blen+1] corref <- mref1 <- mref2 <- NULL if (ref) { corref <- nn[object$model$blen+1] mref1 <- mref2 <- nn[1] } if (!is.null(mean.contrast)) { m[1] <- sum(p[seq_along(mean.contrast)]*mean.contrast) if (ref) { idx1 <- which(mean.contrast!=0) mref <- nn[idx1] mref1 <- mref2 <- paste(convval(mean.contrast[idx1]),mref,sep="") } if (is.null(mean.contrast2) && !object$model$eqmarg) { idx1 <- which(mean.contrast!=0) idx2 <- idx1+1 if (length(object$npar$pred)>0) idx2 <- idx2+object$npar$pred/2 mean.contrast2 <- rep(0,object$model$blen) mean.contrast2[idx2] <- mean.contrast[idx1] } } if (!is.null(mean.contrast2)) { m[2] <- sum(p[seq_len(object$model$blen)]*mean.contrast2[seq_len(object$model$blen)]) if (ref) { idx1 <- which(mean.contrast2!=0) mref <- nn[idx1] mref2 <- paste(convval(mean.contrast2[idx1]),mref,sep="") } } else { if (object$model$eqmarg) { m <- rep(m[1],2) } } if (!object$model$eqmarg & is.null(mean.contrast) & is.null(mean.contrast2)) { idx <- 2 if (length(object$npar$pred)>0 && object$npar$pred!=0) idx <- object$npar$pred/2+1 m[2] <- p[idx] mref2 <- nn[idx] } if (!is.null(cor.contrast)) { p.idx <- seq_len(object$model$zlen)+object$model$blen if (length(cor.contrast)==length(p)) p.idx <- seq(length(p)) r <- sum(p[p.idx]*cor.contrast) if (ref) { idx1 <- which(cor.contrast!=0) corref <- nn[p.idx[idx1]] corref <- paste(convval(cor.contrast[idx1]),corref,sep="") } } return(list(m=m,r=r,mref1=mref1,mref2=mref2,corref=corref)) } probs <- function(p,...) { pp <- parfun(p,...) m <- pp[[1]] r <- pp[[2]] S <- object$SigmaFun(r,cor=FALSE) ##mu.cond <- function(x) m[1]+S[1,2]/S[2,2]*(x-m[2]) ##var.cond <- S[1,1]-S[1,2]^2/S[2,2] p11 <- pmvn(lower=c(0,0),mu=m,sigma=S) p01 <- pmvn(lower=c(-Inf,0),upper=c(0,Inf),mu=m,sigma=S) p10 <- pmvn(lower=c(0,-Inf),upper=c(Inf,0),mu=m,sigma=S) p00 <- 1-p11-p10-p01 marg1 <- p11+p10 marg2 <- p11+p01 cond1 <- p11/marg2 lambda <- cond1/marg1 discond1 <- p10/(1-marg2) logOR <- log(cond1)-log(1-cond1)-log(discond1)+log(1-discond1) ##rho <- S[1,2]/S[1,1] if (object$model$eqmarg) { return(c(h(c(p11,cond1,marg1)),lambda,logOR,r)) } return(c(h(c(p11,p10,p01,p00,marg1,marg2)),logOR,r)) } alpha <- level/2 CIlab <- paste(c(alpha*100,100*(1-alpha)),"%",sep="") mycoef <- coef(object) cor.contrast <- rbind(cor.contrast) mean.contrast <- rbind(mean.contrast) mean.contrast2 <- rbind(mean.contrast2) KK <- lapply(list(cor.contrast,mean.contrast,mean.contrast2),nrow) if (all(is.null(unlist(KK)))) K <- 1 else K <- max(unlist(KK)) IID <- res <- pa <- c() for (i in seq(K)) { prob <- probs(mycoef,cor.contrast=cor.contrast[i,],mean.contrast=mean.contrast[i,],mean.contrast2=mean.contrast2[i,]) Dprob <- numDeriv::jacobian(probs,mycoef,cor.contrast=cor.contrast[i,],mean.contrast=mean.contrast[i,],mean.contrast2=mean.contrast2[i,]) sprob <- diag((Dprob)%*%vcov(object)%*%t(Dprob))^0.5 pp <- cbind(prob,prob-qnorm(1-alpha)*sprob,prob+qnorm(1-alpha)*sprob) pp[nrow(pp),] <- object$model$tr(pp[nrow(pp),]) pp[nrow(pp)-1,] <- exp(pp[nrow(pp)-1,]) if (!object$model$eqmarg) { pp[1:6,] <- ih(pp[1:6,]) nn <- c("P(Y1=1,Y2=1)","P(Y1=1,Y2=0)","P(Y1=0,Y2=1)","P(Y1=0,Y2=0)","P(Y1=1)","P(Y2=1)","OR","Tetrachoric correlation") } else { pp[1:3,] <- ih(pp[1:3,]) nn <- c("Concordance","Casewise Concordance","Marginal","Rel.Recur.Risk","OR","Tetrachoric correlation") } if (K>1) nn <- paste("c",i,":",nn,sep="") if (nrow(pp)-length(nn)>0) nn <- c(nn,rep("",nrow(pp)-length(nn))) rownames(pp) <- nn colnames(pp) <- c("Estimate",CIlab) P <- nrow(pp) pa <- c(pa, list(parfun(object$coef[,1],ref=TRUE,cor.contrast=cor.contrast[i,],mean.contrast[i,],mean.contrast2[i,]))) res <- rbind(res,pp) if (iid) { ff <- function(p) { res <- probs(p,cor.contrast=cor.contrast[i,],mean.contrast=mean.contrast[i,],mean.contrast2=mean.contrast2[i,]) nn <- names(res) res[length(res)] <- object$model$tr(res[length(res)]) res[length(res)-1] <- exp(res[length(res)-1]) idx <- 1:6 if (object$model$eqmarg) idx <- 1:3 res[idx] <- ih(res[idx]) res } ee <- lava::estimate(object,ff,labels=nn,id=object$id) IID <- c(IID,list(ee)) } } contrast <- any(c(!is.null(cor.contrast),!is.null(mean.contrast),!is.null(mean.contrast2))) res <- list(all=res,varcomp=varcomp,prob=res,coef=object$coef,score=colSums(object$score),logLik=object$logLik,msg=object$msg,N=object$N,ncontrasts=K,nstat=P, par=pa,model=object$model,contrast=contrast, time=attributes(object)$time, estimate=IID) class(res) <- "summary.biprobit" res } mets/R/score.biprobit.R0000644000176200001440000000023013623061405014465 0ustar liggesusers##' @export score.biprobit <- function(x,indiv=FALSE,...) { if (indiv) { s <- x$score; attributes(s)$logLik <- NULL; return(s) } colSums(x$score) } mets/R/dtable.R0000644000176200001440000001372013623061405013004 0ustar liggesusers##' tables for data frames ##' ##' tables for data frames ##' @param data if x is formula or names for data frame then data frame is needed. ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param x name of variable, or fomula, or names of variables on data frame. ##' @param ... Optional additional arguments ##' @param level 1 for all marginal tables, 2 for all 2 by 2 tables, and null for the full table, possible versus group variable ##' @param response For level=2, only produce tables with columns given by 'response' (index) ##' @param flat produce flat tables ##' @param total add total counts/proportions ##' @param prop Proportions instead of counts (vector of margins) ##' @param summary summary function ##' @author Klaus K. Holst and Thomas Scheike ##' @examples ##' data("sTRACE",package="timereg") ##' ##' dtable(sTRACE,~status) ##' dtable(sTRACE,~status+vf) ##' dtable(sTRACE,~status+vf,level=1) ##' dtable(sTRACE,~status+vf,~chf+diabetes) ##' ##' dtable(sTRACE,c("*f*","status"),~diabetes) ##' dtable(sTRACE,c("*f*","status"),~diabetes, level=2) ##' dtable(sTRACE,c("*f*","status"),level=1) ##' ##' dtable(sTRACE,~"*f*"+status,level=1) ##' dtable(sTRACE,~"*f*"+status+I(wmi>1.4)|age>60,level=2) ##' dtable(sTRACE,"*f*"+status~I(wmi>0.5)|age>60,level=1) ##' dtable(sTRACE,status~dcut(age)) ##' ##' dtable(sTRACE,~status+vf+sex|age>60) ##' dtable(sTRACE,status+vf+sex~+1|age>60, level=2) ##' dtable(sTRACE,.~status+vf+sex|age>60,level=1) ##' dtable(sTRACE,status+vf+sex~diabetes|age>60) ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, flat=FALSE) ##' ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, level=1) ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2) ##' ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=1, total=TRUE) ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=2, total=TRUE) ##' dtable(sTRACE,status+vf+sex~diabetes|age>60, level=2, prop=1:2, summary=summary) ##' ##' @aliases dtable dtab ##' @export dtable <- function(data,y=NULL,x=NULL,...,level=-1,response=NULL,flat=TRUE,total=FALSE,prop=FALSE,summary=NULL) { daggregate(data,y,x,..., fun=function(z) { res <- sum <- c() if (level==1 || ncol(z)==1) { for (i in seq_len(ncol(z))) { nn <- colnames(z)[i] val <- table(z[,i],...) if (prop[1]>0) val <- prop.table(val) names(attr(val,"dimnames")) <- nn val <- list(val) names(val) <- nn res <- c(res, val) if (!is.null(summary)) { sval <- list(do.call(summary,list(val[[1]]))) names(sval) <- nn c(sum, sval) } } res <- list(table=res,summary=sum,...) class(res) <- "dtable" return(res) } if (level>1) { if (level>2) response <- ncol(z) idx1 <- seq(1,ncol(z)-1) if (level>2 || !is.null(response)) { idx1 <- response idx2 <- setdiff(seq(ncol(z)),idx1) } for (i in idx1) { if (!(level>2 || !is.null(response))) { idx2 <- seq(i+1,ncol(z)) } for (j in idx2) { n1 <- colnames(z)[j] n2 <- colnames(z)[i] val <- table(z[,c(j,i)],...) if (prop[1]>0) { if (all(1:2 %in% prop)) { val <- prop.table(val) } else { val <- prop.table(val,prop) } } if (total) { tot <- prop if (length(prop)==1) tot <- setdiff(1:2,prop) val <- addmargins(val,tot) } val <- list(val) names(val) <- paste0(n1,", ",n2) res <- c(res, val) if (!is.null(summary)) { sval <- list(do.call(summary,list(val[[1]]))) #names(sval) <- names(val) sum <- c(sum, sval) } } } res <- list(table=res,summary=sum) class(res) <- "dtable" return(res) } res <- table(z,...) if (!is.null(summary)) { sum <- do.call(summary,c(list(res),list(...))) } if (prop[1]>0) res <- prop.table(res,prop) if (total>0) res <- addmargins(res,prop) if (flat) res <- ftable(res,...) res <- list(table=res,summary=sum) class(res) <- "dtable" return(res) }) } ##' @export dtab <- function(data,y=NULL,x=NULL,...) dtable(data,y=NULL,x=NULL,...) ##' @export print.dtable <- function(x,sep="\n",...) { cat(sep) if (inherits(x$table, c("table","ftable"))) { print(x$table) if (!is.null(x$summary)) print(x$summary) return(invisible(x)) } for (i in seq_along(x$table)) { print(x$table[[i]],...) if (!is.null(x$summary)) print(x$summary[[i]],...) cat(sep) } } mets/R/recurrent.marginal.R0000644000176200001440000035557213623061405015371 0ustar liggesusers##' Fast recurrent marginal mean when death is possible ##' ##' Fast Marginal means of recurrent events. Using the Lin and Ghosh (2000) ##' standard errors. ##' Fitting two models for death and recurent events these are ##' combined to prducte the estimator ##' \deqn{ \int_0^t S(u|x=0) dR(u|x=0) } the mean number of recurrent events, here ##' \deqn{ S(u|x=0) } is the probability of survival for the baseline group, and ##' \deqn{ dR(u|x=0) } is the hazard rate of an event among survivors for the baseline. ##' Here \deqn{ S(u|x=0) } is estimated by \deqn{ exp(-\Lambda_d(u|x=0) } with ##' \deqn{\Lambda_d(u|x=0) } being the cumulative baseline for death. ##' ##' Assumes no ties in the sense that jump times needs to be unique, this is particularly so for the stratified version. ##' ##' @param recurrent phreg object with recurrent events ##' @param death phreg object with deaths ##' @param fixbeta to force the estimation of standard errors to think of regression coefficients as known/fixed ##' @param km if true then uses Kaplan-Meier for death, otherwise exp(- Nelson-Aalen ) ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' ##' @references ##' Ghosh and Lin (2002) Nonparametric Analysis of Recurrent events and death, ##' Biometrics, 554--562. ##' @examples ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' rr <- simRecurrent(1000,base1,death.cumhaz=dr) ##' rr$x <- rnorm(nrow(rr)) ##' rr$strata <- floor((rr$id-0.01)/500) ##' ##' ## to fit non-parametric models with just a baseline ##' xr <- phreg(Surv(entry,time,status)~cluster(id),data=rr) ##' dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) ##' par(mfrow=c(1,3)) ##' bplot(dr,se=TRUE) ##' title(main="death") ##' bplot(xr,se=TRUE) ##' ### robust standard errors ##' rxr <- robust.phreg(xr,fixbeta=1) ##' bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=4) ##' ##' ## marginal mean of expected number of recurrent events ##' out <- recurrentMarginal(xr,dr) ##' bplot(out,se=TRUE,ylab="marginal mean",col=2) ##' ##' ######################################################################## ##' ### with strata ################################################## ##' ######################################################################## ##' xr <- phreg(Surv(entry,time,status)~strata(strata)+cluster(id),data=rr) ##' dr <- phreg(Surv(entry,time,death)~strata(strata)+cluster(id),data=rr) ##' par(mfrow=c(1,3)) ##' bplot(dr,se=TRUE) ##' title(main="death") ##' bplot(xr,se=TRUE) ##' rxr <- robust.phreg(xr,fixbeta=1) ##' bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) ##' ##' out <- recurrentMarginal(xr,dr) ##' bplot(out,se=TRUE,ylab="marginal mean",col=1:2) ##' ##' ######################################################################## ##' ### cox case ################################################## ##' ######################################################################## ##' xr <- phreg(Surv(entry,time,status)~x+cluster(id),data=rr) ##' dr <- phreg(Surv(entry,time,death)~x+cluster(id),data=rr) ##' par(mfrow=c(1,3)) ##' bplot(dr,se=TRUE) ##' title(main="death") ##' bplot(xr,se=TRUE) ##' rxr <- robust.phreg(xr) ##' bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) ##' ##' out <- recurrentMarginal(xr,dr) ##' bplot(out,se=TRUE,ylab="marginal mean",col=1:2) ##' ##' ######################################################################## ##' ### CIF ############################################################# ##' ######################################################################## ##' ### use of function to compute cumulative incidence (cif) with robust standard errors ##' data(bmt) ##' bmt$id <- 1:nrow(bmt) ##' xr <- phreg(Surv(time,cause==1)~cluster(id),data=bmt) ##' dr <- phreg(Surv(time,cause!=0)~cluster(id),data=bmt) ##' ##' out <- recurrentMarginal(xr,dr,km=TRUE) ##' bplot(out,se=TRUE,ylab="cumulative incidence") ##' ##' @aliases tie.breaker recmarg recurrentMarginalIPCW ##' @export recurrentMarginal <- function(recurrent,death,fixbeta=NULL,km=TRUE,...) {# {{{ xr <- recurrent dr <- death ### sets fixbeta based on wheter xr has been optimized in beta (so cox case) if (is.null(fixbeta)) if (is.null(xr$opt) | is.null(xr$coef)) fixbeta<- 1 else fixbeta <- 0 ### marginal expected events int_0^t G(s) \lambda_r(s) ds # {{{ strat <- dr$strata[dr$jumps] ### x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 ## survival at t- to also work in competing risks situation if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) x <- xr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 cumhazR <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) cumhazDR <- cbind(xx$time,cumsumstrata(St*S0i,xx$strata,xx$nstrata)) mu <- cumhazDR[,2] # }}} ### robust standard errors ### 1. sum_k ( int_0^t S(s)/S_0^r(s) dM_k.^r(s) )^2 resIM1 <- squareintHdM(xr,ft=St,fixbeta=fixbeta) ### 2. mu(t)^2 * sum_k ( int_0^t 1/S_0^d(s) dM_k.^d(s) )^2 resIM2 <- squareintHdM(dr,ft=NULL,fixbeta=fixbeta) ### 3. sum_k( int_0^t mu(s) /S_0^d(s) dM_k.^d(s))^2 resIM3 <- squareintHdM(dr,ft=mu,fixbeta=fixbeta) varA <- resIM1$varInt+mu^2*resIM2$varInt+resIM3$varInt ## covariances between different terms 13 23 12 12 ## to allow different strata for xr and dr, but still nested strata if ((xr$nstrata>1 & dr$nstrata==1)) { cM1M3 <- covIntH1dM1IntH2dM2(resIM1,resIM3,fixbeta=fixbeta,mu=NULL) cM1M2 <- covIntH1dM1IntH2dM2(resIM1,resIM2,fixbeta=fixbeta,mu=mu) } else { cM1M3 <- covIntH1dM1IntH2dM2(resIM3,resIM1,fixbeta=fixbeta,mu=NULL) cM1M2 <- covIntH1dM1IntH2dM2(resIM2,resIM1,fixbeta=fixbeta,mu=mu) } cM2M3 <- covIntH1dM1IntH2dM2(resIM2,resIM3,fixbeta=fixbeta,mu=mu) varA <- varA+2*cM1M3$cov12A-2*cM1M2$cov12A-2*cM2M3$cov12A ### varA <- varA-2*cM1M3$cov12A+2*cM1M2$cov12A+2*cM2M3$cov12A cov12aa <- cov13aa <- cov23aa <- 0 if (fixbeta==0) { varA <-varA + cM2M3$covbeta - cM1M3$covbeta + cM1M2$covbeta } varrs <- data.frame(mu=mu,cumhaz=mu,se.mu=varA^.5,time=xr$time, se.cumhaz=varA^.5,strata=xr$strata,St=St) varrs <- varrs[c(xr$cox.prep$jumps)+1,] ### to use basehazplot.phreg ### making output such that basehazplot can work also out <- list(mu=varrs$mu,se.mu=varrs$se.mu,times=varrs$time, St=varrs$St, cumhaz=cbind(varrs$time,varrs$mu),se.cumhaz=cbind(varrs$time,varrs$se.mu), strata=varrs$strata,nstrata=xr$nstrata,jumps=1:nrow(varrs), strata.name=xr$strata.name,strata.level=recurrent$strata.level) return(out) }# }}} ###recurrentMarginal <- function(recurrent,death,fixbeta=NULL,km=FALSE,...) ###{# {{{ ### xr <- recurrent ### dr <- death ### ### ### sets fixbeta based on wheter xr has been optimized in beta (so cox case) ### if (is.null(fixbeta)) ### if (is.null(xr$opt) | is.null(xr$coef)) fixbeta<- 1 else fixbeta <- 0 ### ### ### marginal expected events int_0^t G(s) \lambda_r(s) ds ### # {{{ ### strat <- dr$strata[dr$jumps] ### ### ### x <- dr ### xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- 1/x$S0^2 ### ## survival at t- to also work in competing risks situation ### if (!km) { ### cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) ### St <- exp(-cumhazD) ### } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) ### x <- xr ### xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- 1/x$S0^2 ### cumhazR <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) ### cumhazDR <- cbind(xx$time,cumsumstrata(St*S0i,xx$strata,xx$nstrata)) ### mu <- cumhazDR[,2] #### }}} ### ### test <- 0 ### ### robust standard errors ### ### 1. sum_k ( int_0^t S(s)/S_0^r(s) dM_k.^r(s) )^2 ### if (test==1) { #### {{{ ### x <- xr ### xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- 1/x$S0^2 ### Z <- xx$X ### U <- E <- matrix(0,nrow(xx$X),x$p) ### E[xx$jumps+1,] <- x$E ### U[xx$jumps+1,] <- x$U ### ### ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) ### cumS0i2 <- cumsumstrata(St*S0i2,xx$strata,xx$nstrata) ### if (fixbeta==0) { ### EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### Ht <- apply(St*E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### HtR <- Ht ### } ### if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) ### else rr <- c(xx$sign*exp(xx$offset)) ### id <- xx$id ### mid <- max(id)+1 ### ### also weights ### w <- c(xx$weights) ### xxx <- w*(St*S0i-rr*c(cumS0i2)) ### ssf <- cumsumidstratasum(xxx,id,mid,xx$strata,xx$nstrata)$sumsquare ### ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) ### covv <- covfridstrata(xxx,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) ### varA1 <- c(ssf+ss+2*covv) ### cumS0i2R <- cumS0i2; xxxR <- xxx; rrR <- rr ### ### if (fixbeta==0) {# {{{ ### invhess <- -solve(x$hessian) ### MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-EdLam0)*rr*c(xx$weights) ### UU <- apply(MGt,2,sumstrata,id,max(id)+1) ### betaiidR <- UU %*% invhess ###### betaiidR <- iid(x) ### vbeta <- crossprod(betaiidR) ### varbetat <- rowSums((Ht %*% vbeta)*Ht) ### ### writing each beta for all individuals ### betakt <- betaiidR[id+1,,drop=FALSE] ### ### ### covk1 <- apply(xxx*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2) ### ### ### varA1 <- varA1+varbetat-2*apply((covk1-covk2)*Ht,1,sum) ### }# }}} #### }}} ### } ### resIM1 <- squareintHdM(xr,ft=St,fixbeta=fixbeta,...) ### ### ### ### 2. mu(t)^2 * sum_k ( int_0^t 1/S_0^d(s) dM_k.^d(s) )^2 ### resIM2 <- squareintHdM(dr,ft=NULL,fixbeta=fixbeta,...) ### ### if (test==1) { #### {{{ ### x <- dr ### xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- 1/x$S0^2 ### if (fixbeta==0) { ### Z <- xx$X ### U <- E <- matrix(0,nrow(xx$X),x$p) ### E[xx$jumps+1,] <- x$E ### U[xx$jumps+1,] <- x$U ### Ht <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### } ### ### ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) ### cumS0i2 <- cumsumstrata(S0i2,xx$strata,xx$nstrata) ### if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) ### else rr <- c(xx$sign*exp(xx$offset)) ### id <- xx$id ### mid <- max(id)+1 ### ### also weights ### w <- c(xx$weights) ### xxx1 <- w*(S0i-rr*c(cumS0i2)) ### ssf <- cumsumidstratasum(xxx1,id,mid,xx$strata,xx$nstrata)$sumsquare ### ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) ### covv <- covfridstrata(xxx1,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) ### varA2 <- mu^2*c(ssf+ss+2*covv) ### cumS0i2D1 <- cumS0i2 ### xxxD1 <- xxx1 ### rrD1 <- rr ### if (fixbeta==0) {# {{{ ### HtD1 <- mu*Ht ### invhess <- -solve(x$hessian) ### MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-Ht)*rr*c(xx$weights) ### UU <- apply(MGt,2,sumstrata,id,max(id)+1) ### betaiidD <- UU %*% invhess ###### betaiidD1 <- iid(x) ### vbetaD <- crossprod(betaiidD) ### varbetat <- rowSums((HtD1 %*% vbetaD)*HtD1) ### ### writing each beta for all individuals ### betakt <- betaiidD[id+1,,drop=FALSE] ### ### ### covk1 <- apply(xxx1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2D1) ### ### ### varA2 <- varA2+varbetat-2*apply((covk1-covk2)*HtD1*mu,1,sum) ### }# }}} ### #### }}} ### } ### ### ### 3. sum_k( int_0^t mu(s) /S_0^d(s) dM_k.^d(s))^2 ### if (test==1) { #### {{{ ### x <- dr ### xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- 1/x$S0^2 ### if (fixbeta==0) { ### Z <- xx$X ### U <- E <- matrix(0,nrow(xx$X),x$p) ### E[xx$jumps+1,] <- x$E ### } ###### U[xx$jumps+1,] <- x$U ### xr$cox.prep$time - xx$time ### xr$cox.prep$time[xr$cox.prep$jumps+1] ### xr$cox.prep$time[dr$cox.prep$jumps+1] ### ### ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) ### cumS0i2 <- cumsumstrata(mu*S0i2,xx$strata,xx$nstrata) ### ### if (fixbeta==0) { ### EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### Ht <- apply(mu*E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### HtD <- Ht ### } ### if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) ### else rr <- c(xx$sign*exp(xx$offset)) ### id <- xx$id ### mid <- max(id)+1 ### ### also weights ### w <- c(xx$weights) ### xxx <- w*(mu*S0i-rr*c(cumS0i2)) ### ssf <- cumsumidstratasum(xxx,id,mid,xx$strata,xx$nstrata)$sumsquare ### ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) ### covv <- covfridstrata(xxx,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) ### varA3 <- c(ssf+ss+2*covv) ### cumS0i2D <- cumS0i2 ### rrD <- rr ### xxxD <- xxx ### ### if (fixbeta==0) {# {{{ ### invhess <- -solve(x$hessian) ### varbetat <- rowSums((Ht %*% vbetaD)*Ht) ### ### writing each beta for all individuals ### covk1 <- apply(xxx*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2) ### ### ### varA3 <- varA3+varbetat-2*apply((covk1-covk2)*Ht,1,sum) ### }# }}} ### varA <- varA1+varA2+varA3 #### }}} ### } ### resIM3 <- squareintHdM(dr,ft=mu,fixbeta=fixbeta,...) ### varA <- resIM1$varInt+mu^2*resIM2$varInt+resIM3$varInt ### ### if (test==1) {# {{{ ### print("=====var ================="); ### print(summary(varA1)) ### print(summary(varA2)); ### print(summary(varA3)); ### print("--------------------------"); ### print(summary(resIM1$varInt)) ### print(summary(mu^2*resIM2$varInt)) ### print(summary(resIM3$varInt)) ### print("======================"); ### }# }}} ### ### ### covariances between different terms 13 23 12 12 ### if (test==1) { ### # {{{ ### cov23<-c(cumsumidstratasumCov(xxxD,xxxD1,id,mid,xx$strata,xx$nstrata)$sumsquare) ### cov232<-c(revcumsumidstratasum(w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2D*cumS0i2D1) ###### cov232<-c(revcumsumidstratasumCov(w*rrD,w*w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2D*cumS0i2D1) ### cov233 <- covfridstrata(xxxD,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) ###### cov233 <- covfridstrataCov(xxxD,w*rrD1,xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) ### cov234 <- covfridstrata(xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) ###### cov234 <- covfridstrataCov(xxxD1,w*rrD1,xxxD,w*rrD,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) ### cov23A <- -c(cov23+(cov232+cov233+cov234))*mu ###### print(summary(cov23)) ###### print(summary(cov232)) ###### print(summary(cov233)) ###### print(summary(cov234)) ###### print(" ====================== 23 slut ") ###### ### ### cov12 <- c(cumsumidstratasumCov(xxxR,xxxD1,id,mid,xx$strata,xx$nstrata)$sumsquare) ### cov122 <- c(revcumsumidstratasumCov(w*rrR,w*rrD1,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2R*cumS0i2D1) ### cov123 <- covfridstrataCov(xxxR,w*rrR,xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) ### cov124 <- covfridstrataCov(xxxD1,w*rrD1,xxxR,w*rrR,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2R) ### cov12A <- -c(cov12+cov122+cov123+cov124)*mu ### print("________________12____________________"); ### print(summary(c(xxxR))); print(summary(c(xxxD1))); ### print(summary(c(rrD1))); print(summary(c(rrR))) ### print(summary(c(cumS0i2R))); print(summary(c(cumS0i2D1))) ### print(summary(cov12)); ### print(summary(cov122)); ### print(summary(c(cov123))); ### print(summary(c(cov124))); ### print("______________________________________"); ### ###### ### cov13 <- c(cumsumidstratasumCov(xxxR,xxxD,id,mid,xx$strata,xx$nstrata)$sumsquare) ### cov132 <- c(revcumsumidstratasumCov(w*rrR,w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2R*cumS0i2D) ### cov133 <- covfridstrataCov(xxxR,w*rrR,xxxD,w*rrD,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) ### cov134 <- covfridstrataCov(xxxD,w*rrD,xxxR,w*rrR,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2R) ###### ### cov13A <- c(cov13+(cov132+cov133+cov134)) ### varAg <- varA+2*cov12A+2*cov23A+2*cov13A #### }}} ### } ### ### ###cM1M3 <- covIntH1dM1IntH2dM2(resIM3,resIM1,fixbeta=fixbeta,mu=NULL) ###cM1M2 <- covIntH1dM1IntH2dM2(resIM2,resIM1,fixbeta=fixbeta,mu=mu) ###cM2M3 <- covIntH1dM1IntH2dM2(resIM2,resIM3,fixbeta=fixbeta,mu=mu) ### ######print(lapply(cM1M3,summary)) ######cM1M3 <- covIntH1dM1IntH2dM2(resIM1,resIM3,fixbeta=fixbeta,mu=NULL) ######print(lapply(cM1M3,summary)) ######print("____________________________") ######print(lapply(cM1M2,summary)) ######cM1M2 <- covIntH1dM1IntH2dM2(resIM1,resIM2,fixbeta=fixbeta,mu=mu) ######print(lapply(cM1M2,summary)) ######print("____________________________") ###### ######print(lapply(cM2M3,summary)) ######cM2M3 <- covIntH1dM1IntH2dM2(resIM2,resIM3,fixbeta=fixbeta,mu=mu) ######print(lapply(cM2M3,summary)) ######print("____________________________") ### ### ### if (test==1) {# {{{ ### print("=======cov AAA==============="); ### print(summary(cov13A)) ### print(summary(cov12A)) ### print(summary(cov23A)) ### print("_______________________________"); ### print(summary(cM1M3$cov12A)) ### print(summary(-1*cM1M2$cov12A)) ### print(summary(-1*cM2M3$cov12A)) ### print("======================"); ### }# }}} ### varA <- varA+2*cM1M3$cov12A-2*cM1M2$cov12A-2*cM2M3$cov12A ### ### if (test==1) {# {{{ ### print(" var Ag"); ### print(summary(varAg)); ### print(" var A"); ### print(summary(varA)); ### }# }}} ### ### cov12aa <- cov13aa <- cov23aa <- 0 ### if (fixbeta==0 & test==1 ) { ### ### covariances between different terms and beta's ### # {{{ ### covbetaRD <- t(betaiidR) %*% betaiidD ### DHt <- HtD1-HtD ### ### covbeta1.23 <- -2*rowSums((HtR %*% covbetaRD)*DHt) ### covbeta1.12 <- -2*rowSums((HtR %*% covbetaRD)*HtD1) ### covbeta1.13 <- 2*rowSums((HtR %*% covbetaRD)*HtD) ### covbetaD.23 <- -2*rowSums((HtD %*% vbetaD)*(HtD1)) ### ### ### D versus betaD from two terms cov23 wrt beta ### betakt <- betaiidD[id+1,,drop=FALSE] ### covk1 <-apply(xxxD1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrD1*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2D1) ### covD1.D <- 2*apply((covk1-covk2)*mu*HtD,1,sum) ### ### ### covk1 <-apply(xxxD*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrD*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2D) ### covD.D1 <- 2*apply((covk1-covk2)*HtD1,1,sum) ### cov23aa <- covbetaD.23 + covD1.D + covD.D1 ### ### ### cov12 wrt betaD and betaR ### betakt <- betaiidD[id+1,,drop=FALSE] ### covk1 <-apply(xxxR*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrR*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2R) ### covRD12 <- 2*apply((covk1-covk2)*HtD1,1,sum) ### ### ### betakt <- betaiidR[id+1,,drop=FALSE] ### covk1 <-apply(xxxD1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrD1*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2D1) ### covRD21 <- 2*apply((covk1-covk2)*mu*HtR,1,sum) ### cov12aa <- covbeta1.12 + covRD12+covRD21 ###### print("--------12------") ###### print(summary(covbeta1.12)) ###### print(summary(covRD12)) ###### print(summary(covRD21)) ###### print("--------------") ### ### ### ### cov13 wrt betaD and betaR ### betakt <- betaiidD[id+1,,drop=FALSE] ### covk1 <-apply(xxxR*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrR*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2R) ### covRD13 <- -2*apply((covk1-covk2)*HtD,1,sum) ### ### ### betakt <- betaiidR[id+1,,drop=FALSE] ### covk1 <-apply(xxxD*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") ### covk2 <-apply(w*rrD*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") ### covk2 <- c(covk2)*c(cumS0i2D) ### covRD31 <- -2*apply((covk1-covk2)*HtR,1,sum) ### cov13aa <- covbeta1.13 + covRD13+covRD31 ### varAg <-varA+ cov23aa+cov13aa+cov12aa #### }}} ### } ### ### if (test==1) { ### print("=========cov beta============"); ### print(summary(cov13aa)) ### print(summary(cov12aa)) ### print(summary(cov23aa)) ### print("_______________________________"); ### print(summary(-1*cM1M3$covbeta)); ### print(summary(cM1M2$covbeta)) ### print(summary(cM2M3$covbeta)); ### print("======================"); ### } ### ### if (fixbeta==0) { ### varA <-varA+ cM2M3$covbeta - cM1M3$covbeta + cM1M2$covbeta ### if (test==1) { ### print(summary(varAg)) ### print(summary(varA)) ### } ### } ### ### varrs <- data.frame(mu=mu,cumhaz=mu,se.mu=varA^.5,time=xr$time, ### se.cumhaz=varA^.5,strata=xr$strata,St=St) ### varrs <- varrs[c(xr$cox.prep$jumps)+1,] ### ### ### to use basehazplot.phreg ### ### making output such that basehazplot can work also ### out <- list(mu=varrs$mu,se.mu=varrs$se.mu,times=varrs$time, ### St=varrs$St, ### cumhaz=cbind(varrs$time,varrs$mu),se.cumhaz=cbind(varrs$time,varrs$se.mu), ### strata=varrs$strata,nstrata=xr$nstrata,jumps=1:nrow(varrs), ### strata.name=xr$strata.name,strata.level=recurrent$strata.level) ### return(out) ###}# }}} ##' @export recurrentMarginalIPCW <- function(rr,km=TRUE,times=NULL,...) {# {{{ # to ovoid R check warning death <- revnr <- NULL rr$revnr <- NULL rr$cens <- 0 rr <- count.history(rr) ### dsort(rr) <- ~id-start nid <- max(rr$id) rr$revnr <- cumsumstrata(rep(1,nrow(rr)),rr$id-1,nid) dsort(rr) <- ~id+start rr <- dtransform(rr,cens=1,revnr==1 & death==0) xr <- phreg(Surv(entry,time,status==1)~Count1+death+cluster(id),data=rr,no.opt=TRUE) cr <- phreg(Surv(entry,time,cens)~cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) ### censoring weights strat <- cr$strata[cr$jumps] ### x <- cr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 ## survival at t- to also work in competing risks situation if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) #### x <- xr xx <- xr$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 ## stay with N(D_i) when t is large so no -1 when death signm <- xx$sign signm[xx$X[,2]==1 & xx$sign==-1] <- 0 ### Nt <- revcumsumstrata(xx$X[,1]*xx$sign,xx$strata,xx$nstrata) Nt <- Nt/St ## counting N(D) forward in time skal ikke checke ud når man dør N_(D_i) er i spil efter D_i NtD <- cumsumstrata(xx$X[,1]*(xx$X[,2]==1)*(xx$sign==1)/St,xx$strata,xx$nstrata) risk <- revcumsumstrata(xx$sign,xx$strata,xx$nstrata) timeJ <- xx$time[xx$jumps+1] avNtD <- (NtD+Nt)[xx$jumps+1]/nid xxJ <- xx$jumps+1 cumhaz <- cbind(timeJ,avNtD) ## correction for censoring terms ### x <- cr ### xx <- x$cox.prep ### E <- S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/x$S0 ### S0i2[xx$jumps+1] <- x$E ### E[xx$jumps+1] <- 1/x$S0^2 ### ### ### cumS0i2 <- c(cumsumstrata(xx$X[,1]*risk*S0i2,xx$strata,xx$nstrata)) ### cor1 <- (cumsum(E - cumsum(E*risk*cumS0i2)) ### corMC <- (-cor1)/nid ### xrc <- phreg(Surv(entry,time,status==1)~Count1+cluster(id),data=rr,no.opt=TRUE) ### corMC <- cumsum(c(xrc$E)) ### corMC <- Cpred(cbind(xrc$jumptimes,corMC),timeJ)[,2] ### ### cumhaz.eff <- cbind(timeJ,avNtD+corMC) ### return(list(cumhaz=cumhaz,cumhaz.eff=cumhaz.eff)) return(list(cumhaz=cumhaz)) }# }}} ##' @export recurrentMarginalgam <- function(recurrent,death,fixbeta=NULL,km=TRUE,...) {# {{{ xr <- recurrent dr <- death ### sets fixbeta based on wheter xr has been optimized in beta (so cox case) if (is.null(fixbeta)) if (is.null(xr$opt) | is.null(xr$coef)) fixbeta<- 1 else fixbeta <- 0 ### marginal expected events int_0^t G(s) \lambda_r(s) ds # {{{ strat <- dr$strata[dr$jumps] ### x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 ## survival at t- to also work in competing risks situation if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) x <- xr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 cumhazR <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) cumhazDR <- cbind(xx$time,cumsumstrata(St*S0i,xx$strata,xx$nstrata)) mu <- cumhazDR[,2] # }}} ### robust standard errors ### 1. sum_k ( int_0^t S(s)/S_0^r(s) dM_k.^r(s) )^2 # {{{ x <- xr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) cumS0i2 <- cumsumstrata(St*S0i2,xx$strata,xx$nstrata) if (fixbeta==0) { EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) Ht <- apply(St*E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) HtR <- Ht } if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) else rr <- c(xx$sign*exp(xx$offset)) id <- xx$id mid <- max(id)+1 ### also weights w <- c(xx$weights) xxx <- w*(St*S0i-rr*c(cumS0i2)) ssf <- cumsumidstratasum(xxx,id,mid,xx$strata,xx$nstrata)$sumsquare ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) covv <- covfridstrata(xxx,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) varA1 <- c(ssf+ss+2*covv) cumS0i2R <- cumS0i2; xxxR <- xxx; rrR <- rr if (fixbeta==0) {# {{{ invhess <- -solve(x$hessian) MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-EdLam0)*rr*c(xx$weights) UU <- apply(MGt,2,sumstrata,id,max(id)+1) betaiidR <- UU %*% invhess ### betaiidR <- iid(x) vbeta <- crossprod(betaiidR) varbetat <- rowSums((Ht %*% vbeta)*Ht) ### writing each beta for all individuals betakt <- betaiidR[id+1,,drop=FALSE] ### covk1 <- apply(xxx*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2) ### varA1 <- varA1+varbetat-2*apply((covk1-covk2)*Ht,1,sum) }# }}} # }}} ### 2. mu(t)^2 * sum_k ( int_0^t 1/S_0^d(s) dM_k.^d(s) )^2 # {{{ x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 if (fixbeta==0) { Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U Ht <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) } ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) cumS0i2 <- cumsumstrata(S0i2,xx$strata,xx$nstrata) if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) else rr <- c(xx$sign*exp(xx$offset)) id <- xx$id mid <- max(id)+1 ### also weights w <- c(xx$weights) xxx1 <- w*(S0i-rr*c(cumS0i2)) ssf <- cumsumidstratasum(xxx1,id,mid,xx$strata,xx$nstrata)$sumsquare ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) covv <- covfridstrata(xxx1,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) varA2 <- mu^2*c(ssf+ss+2*covv) cumS0i2D1 <- cumS0i2 xxxD1 <- xxx1 rrD1 <- rr if (fixbeta==0) {# {{{ HtD1 <- mu*Ht invhess <- -solve(x$hessian) MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-Ht)*rr*c(xx$weights) UU <- apply(MGt,2,sumstrata,id,max(id)+1) betaiidD <- UU %*% invhess ### betaiidD1 <- iid(x) vbetaD <- crossprod(betaiidD) varbetat <- rowSums((HtD1 %*% vbetaD)*HtD1) ### writing each beta for all individuals betakt <- betaiidD[id+1,,drop=FALSE] ### covk1 <- apply(xxx1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2D1) ### varA2 <- varA2+varbetat-2*apply((covk1-covk2)*HtD1*mu,1,sum) }# }}} # }}} ### 3. sum_k( int_0^t mu(s) /S_0^d(s) dM_k.^d(s))^2 # {{{ x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 if (fixbeta==0) { Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E } ### U[xx$jumps+1,] <- x$U xr$cox.prep$time - xx$time xr$cox.prep$time[xr$cox.prep$jumps+1] xr$cox.prep$time[dr$cox.prep$jumps+1] ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) cumS0i2 <- cumsumstrata(mu*S0i2,xx$strata,xx$nstrata) if (fixbeta==0) { EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) Ht <- apply(mu*E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) HtD <- Ht } if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) else rr <- c(xx$sign*exp(xx$offset)) id <- xx$id mid <- max(id)+1 ### also weights w <- c(xx$weights) xxx <- w*(mu*S0i-rr*c(cumS0i2)) ssf <- cumsumidstratasum(xxx,id,mid,xx$strata,xx$nstrata)$sumsquare ss <- c(revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2^2) covv <- covfridstrata(xxx,w*rr,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2) varA3 <- c(ssf+ss+2*covv) cumS0i2D <- cumS0i2 rrD <- rr xxxD <- xxx if (fixbeta==0) {# {{{ invhess <- -solve(x$hessian) varbetat <- rowSums((Ht %*% vbetaD)*Ht) ### writing each beta for all individuals covk1 <- apply(xxx*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2) ### varA3 <- varA3+varbetat-2*apply((covk1-covk2)*Ht,1,sum) }# }}} varA <- varA1+varA2+varA3 # }}} ### covariances between different terms 13 23 12 12 # {{{ cov23<-c(cumsumidstratasumCov(xxxD,xxxD1,id,mid,xx$strata,xx$nstrata)$sumsquare) cov232<-c(revcumsumidstratasum(w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2D*cumS0i2D1) ### cov232<-c(revcumsumidstratasumCov(w*rrD,w*w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2D*cumS0i2D1) cov233 <- covfridstrata(xxxD,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) ### cov233 <- covfridstrataCov(xxxD,w*rrD1,xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) cov234 <- covfridstrata(xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) ### cov234 <- covfridstrataCov(xxxD1,w*rrD1,xxxD,w*rrD,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) cov23A <- -c(cov23+(cov232+cov233+cov234))*mu ### print(summary(cov23)) ### print(summary(cov232)) ### print(summary(cov233)) ### print(summary(cov234)) ### print(" ====================== 23 slut ") ### cov12 <- c(cumsumidstratasumCov(xxxR,xxxD1,id,mid,xx$strata,xx$nstrata)$sumsquare) cov122 <- c(revcumsumidstratasumCov(w*rrR,w*rrD1,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2R*cumS0i2D1) cov123 <- covfridstrataCov(xxxR,w*rrR,xxxD,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D1) cov124 <- covfridstrataCov(xxxD1,w*rrD1,xxxR,w*rrR,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2R) cov12A <- -c(cov12+(cov122+cov123+cov124))*mu ### cov13 <- c(cumsumidstratasumCov(xxxR,xxxD,id,mid,xx$strata,xx$nstrata)$sumsquare) cov132 <- c(revcumsumidstratasumCov(w*rrR,w*rrD,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(cumS0i2R*cumS0i2D) cov133 <- covfridstrataCov(xxxR,w*rrR,xxxD,w*rrD,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2D) cov134 <- covfridstrataCov(xxxD,w*rrD,xxxR,w*rrR,id,mid,xx$strata,xx$nstrata)$covs*c(cumS0i2R) ### cov13A <- c(cov13+(cov132+cov133+cov134)) varA <- varA+2*cov12A+2*cov23A+2*cov13A # }}} cov12aa <- cov13aa <- cov23aa <- 0 if (fixbeta==0) { ### covariances between different terms and beta's # {{{ covbetaRD <- t(betaiidR) %*% betaiidD ### DHt <- HtD1-HtD ### covbeta1.23 <- -2*rowSums((HtR %*% covbetaRD)*DHt) covbeta1.12 <- -2*rowSums((HtR %*% covbetaRD)*HtD1) covbeta1.13 <- 2*rowSums((HtR %*% covbetaRD)*HtD) covbetaD.23 <- -2*rowSums((HtD %*% vbetaD)*(HtD1)) ### D versus betaD from two terms cov23 wrt beta betakt <- betaiidD[id+1,,drop=FALSE] covk1 <-apply(xxxD1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrD1*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2D1) covD1.D <- 2*apply((covk1-covk2)*mu*HtD,1,sum) ### covk1 <-apply(xxxD*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrD*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2D) covD.D1 <- 2*apply((covk1-covk2)*HtD1,1,sum) cov23aa <- (covbetaD.23 + covD1.D + covD.D1) ### print("D1D_________________") ### print(summary(covbetaD.23)) ### print(summary(covD1.D)) ### print(summary(covD.D1)) ### cov12 wrt betaD and betaR betakt <- betaiidD[id+1,,drop=FALSE] covk1 <-apply(xxxR*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrR*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2R) covRD12 <- 2*apply((covk1-covk2)*HtD1,1,sum) ### betakt <- betaiidR[id+1,,drop=FALSE] covk1 <-apply(xxxD1*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrD1*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2D1) covRD21 <- 2*apply((covk1-covk2)*mu*HtR,1,sum) cov12aa <- covbeta1.12 + covRD12+covRD21 ### print("RD12_________________") ### print(summary(covbeta1.12)) ### print(summary(covRD12)) ### print(summary(covRD21)) ### cov13 wrt betaD and betaR betakt <- betaiidD[id+1,,drop=FALSE] covk1 <-apply(xxxR*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrR*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2R) covRD13 <- -2*apply((covk1-covk2)*HtD,1,sum) ### betakt <- betaiidR[id+1,,drop=FALSE] covk1 <-apply(xxxD*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrD*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(cumS0i2D) covRD31 <- -2*apply((covk1-covk2)*HtR,1,sum) cov13aa <- covbeta1.13 + covRD13+covRD31 ### print("RD13_________________") ### print(summary(covbeta1.13)) ### print(summary(covRD13)) ### print(summary(covRD31)) varA <-varA+ cov23aa+cov13aa+cov12aa # }}} } ### varrs <- data.frame(mu=mu,cumhaz=mu,se.mu=varA^.5,time=xr$time,se.cumhaz=varA^.5,strata=xr$strata,St=St) ### varA1=varA1,varA2=varA2,varA3=varA3,cov12=2*cov12A+cov12aa,cov13=2*cov13A+cov13aa, ### cov23=2*cov23A+cov23aa); varrs <- varrs[c(xr$cox.prep$jumps)+1,] ### to use basehazplot.phreg ### making output such that basehazplot can work also out <- list(mu=varrs$mu,se.mu=varrs$se.mu,times=varrs$time, St=varrs$St, cumhaz=cbind(varrs$time,varrs$mu),se.cumhaz=cbind(varrs$time,varrs$se.mu), strata=varrs$strata,nstrata=xr$nstrata,jumps=1:nrow(varrs),strata.name=xr$strata.name, strata.level=recurrent$strata.level) ### vari=varrs[,c("varA1","varA2","varA3")],covs=varrs[,c("cov12","cov13","cov23")]) return(out) }# }}} ##' @export recmarg <- function(recurrent,death,Xr=NULL,Xd=NULL,km=TRUE,...) {# {{{ xr <- recurrent dr <- death if (!is.null(Xr)) rr <- exp(sum(xr$coef * Xr)) else rr <- 1 if (!is.null(Xd)) rrd <- exp(sum(dr$coef * Xd)) else rrd <- 1 ### marginal expected events int_0^t G(s) \lambda_r(s) ds # {{{ strat <- dr$strata[dr$jumps] x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD*rrd) } else St <- exp(rrd*c(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) ### x <- xr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 cumhazDR <- cbind(xx$time,cumsumstrata(St*S0i,xx$strata,xx$nstrata)) mu <- rr*cumhazDR[,2] # }}} varrs <- data.frame(mu=mu,time=xr$time,strata=xr$strata,St=St) varrs <- varrs[c(xr$cox.prep$jumps)+1,] ### to use basehazplot.phreg ### making output such that basehazplot can work also out <- list(mu=varrs$mu,time=varrs$time, St=varrs$St,cumhaz=cbind(varrs$time,varrs$mu), strata=varrs$strata,nstrata=xr$nstrata,jumps=1:nrow(varrs), strata.name=xr$strata.name,strata.level=recurrent$strata.level) return(out) }# }}} ##' @export squareintHdM <- function(phreg,ft=NULL,fixbeta=NULL,...) {# {{{ ### sum_k ( int_0^t f(s)/S_0^r(s) dM_k.^r(s) )^2 ### strata "r" from object and "k" id from cluster if (class(phreg)!="phreg") stop("Must be phreg object\n"); ### sets fixbeta based on wheter xr has been optimized in beta (so cox case) if (is.null(fixbeta)) if (is.null(phreg$opt) | is.null(phreg$coef)) fixbeta<- 1 else fixbeta <- 0 x <- phreg xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 S0i2[xx$jumps+1] <- 1/x$S0^2 Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U ### cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) if (is.null(ft)) ft <- rep(1,length(xx$time)) cumS0i2 <- c(cumsumstrata(ft*S0i2,xx$strata,xx$nstrata)) if (fixbeta==0) { EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) Ht <- apply(ft*E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) } else Ht <- NULL if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) else rr <- c(xx$sign*exp(xx$offset)) id <- xx$id mid <- max(id)+1 ### also weights w <- c(xx$weights) xxx <- (ft*S0i-rr*cumS0i2) ssf <- cumsumidstratasum(xxx,id,mid,xx$strata,xx$nstrata)$sumsquare ss <- revcumsumidstratasum(w*rr,id,mid,xx$strata,xx$nstrata)$lagsumsquare*cumS0i2^2 covv <- covfridstrata(xxx,w*rr,id,mid,xx$strata,xx$nstrata)$covs*cumS0i2 varA1 <- c(ssf+ss-2*covv) vbeta <- betaiidR <- NULL if (fixbeta==0) {# {{{ invhess <- -solve(x$hessian) MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-EdLam0)*rr*c(xx$weights) UU <- apply(MGt,2,sumstrata,id,mid) betaiidR <- UU %*% invhess vbeta <- crossprod(betaiidR) varbetat <- rowSums((Ht %*% vbeta)*Ht) ### writing each beta for all individuals betakt <- betaiidR[id+1,,drop=FALSE] ### covk1 <- apply(xxx*betakt,2,cumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="sum") covk2 <- apply(w*rr*betakt,2,revcumsumidstratasum,id,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*cumS0i2 covv <- covk1-covk2 ### varA1 <- varA1+varbetat-2*apply(covv*Ht,1,sum) }# }}} return(list(xx=xx,Ht=Ht,varInt=varA1,xxx=xxx,rr=rr, cumhaz=cumhaz,cumS0i2=cumS0i2,mid=mid,id=id, betaiid=betaiidR,vbeta=vbeta,covv=covv)) } # }}} ##' @export covIntH1dM1IntH2dM2 <- function(square1,square2,fixbeta=1,mu=NULL) {# {{{ ### strata and id same for two objects xx <- square1$xx; xx2 <- square2$xx xxxR <- square1$xxx; xxxD1 <- square2$xxx rrR <- square1$rr; rrD1 <- square2$rr id <- id1 <- square1$id; id2 <- square2$id mid <- square1$mid; w <- c(xx$weights) if (is.null(mu)) mu <- rep(1,length(xx$strata)) cov12 <- c(cumsumidstratasumCov(xxxR,xxxD1,id,mid,xx$strata,xx$nstrata)$sumsquare) cov122 <- c(revcumsumidstratasumCov(w*rrR,w*rrD1,id,mid,xx$strata,xx$nstrata)$lagsumsquare)*c(square1$cumS0i2*square2$cumS0i2) cov123 <- covfridstrataCov(xxxR,w*rrR,xxxD1,w*rrD1,id,mid,xx$strata,xx$nstrata)$covs*c(square2$cumS0i2) cov124 <- covfridstrataCov(xxxD1,w*rrD1,xxxR,w*rrR,id,mid,xx$strata,xx$nstrata)$covs*c(square1$cumS0i2) cov12A <- c(cov12+cov122+cov123+cov124) test <- 0 if (test==1) {# {{{ print("________cov cov ___________________________"); print(summary(c(xxxR))); print(summary(c(xxxD1))); print(summary(c(rrD1))); print(summary(c(rrR))) print(summary(c(square1$cumS0i2))); print(summary(c(square2$cumS0i2))); print("-----------"); print(summary(cov12)); print(summary(cov122)); print(summary(c(cov123))); print(summary(c(cov124))); print("______________________________________"); jumps <- c(square1$xx$jumps,square2$xx$jumps)+1 print(summary(jumps)) print(summary(cov12[jumps])); print(summary(cov122[jumps])); print(summary(c(cov123[jumps]))); print(summary(c(cov124[jumps]))); }# }}} cov12aa <- 0 if (fixbeta==0) { ### covariances between different terms and beta's # {{{ betaiidR <- square1$betaiid; betaiidD <- square2$betaiid HtR <- square1$Ht; HtD <- square2$Ht covbetaRD <- t(betaiidR) %*% betaiidD covbeta <- -1*rowSums((HtR %*% covbetaRD)*HtD) ### print(summary(covbeta)) ### cov12 wrt betaD and betaR betakt <- betaiidD[id1+1,,drop=FALSE] covk1 <-apply(xxxR*betakt,2,cumsumidstratasum,id1,mid,xx$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrR*betakt,2,revcumsumidstratasum,id1,mid,xx$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(square1$cumS0i2) covRD12 <- apply((covk1-covk2)*HtD,1,sum) ### betakt <- betaiidR[id2+1,,drop=FALSE] covk1 <-apply(xxxD1*betakt,2,cumsumidstratasum,id2,mid,xx2$strata,xx$nstrata,type="sum") covk2 <-apply(w*rrD1*betakt,2,revcumsumidstratasum,id2,mid,xx2$strata,xx$nstrata,type="lagsum") covk2 <- c(covk2)*c(square2$cumS0i2) covRD21 <- apply((covk1-covk2)*HtR,1,sum) cov12aa <- 2*(covbeta + covRD12+covRD21) test <- 0 if (test==1) { print("--------------") print(summary(2*mu*covbeta)) print(summary(2*mu*covRD12)) print(summary(2*mu*covRD21)) print("--------------") } } # }}} cov12 <- (cov12A-cov12aa)*mu return(list(cov=cov12,cov12A=cov12A*mu,covbeta=cov12aa*mu)) } # }}} ##' @export tie.breaker <- function(data,stop="time",start="entry",status="status",id=NULL,ddt=NULL,exit.unique=TRUE) {# {{{ if (!is.null(id)) id <- data[,id] ord <- 1:nrow(data) stat <- data[,status] time <- data[,stop] dupexit <- duplicated(time) time1 <- data[stat==1,stop] time0 <- data[stat!=1,stop] lt0 <- length(time0) ddp <- duplicated(c(time0,time1)) if (exit.unique) ties <-ddp[(lt0+1):nrow(data)] else ties <- duplicated(c(time1)) nties <- sum(ties) ordties <- ord[stat==1][ties] if (is.null(ddt)) { abd <- abs(diff(data[,stop])) abd <- min(abd[abd>0]) ddt <- abd*0.5 } time[ordties] <- time[ordties]+runif(nties)*ddt data[ordties,stop] <- time[ordties] ties <- (ord %in% ordties) if (!is.null(id)) { lagties <- dlag(ties) ### also move next start time if id the same change.start <- lagties==TRUE & id==dlag(id) change.start[is.na(change.start)] <- FALSE ocs <- ord[change.start] data[ocs,start] <- data[ocs-1,stop] data[,"tiebreaker"] <- FALSE data[ocs,"tiebreaker"] <- TRUE } return(data) } # }}} ##' Simulation of recurrent events data based on cumulative hazards ##' ##' Simulation of recurrent events data based on cumulative hazards ##' ##' Must give hazard of death and recurrent events. Possible with two ##' event types and their dependence can be specified but the two recurrent events need ##' to have the same random effect, simRecurrentII more flexible ! ##' ##' @param n number of id's ##' @param cumhaz cumulative hazard of recurrent events ##' @param death.cumhaz cumulative hazard of death ##' @param cumhaz2 cumulative hazard of recurrent events of type 2 ##' @param gap.time if true simulates gap-times with specified cumulative hazard ##' @param max.recurrent limits number recurrent events to 100 ##' @param dhaz rate for death hazard if it is extended to time-range of first event ##' @param haz2 rate of second cause if it is extended to time-range of first event ##' @param dependence =0 independence, =1 all share same random effect with variance var.z ##' =2 random effect exp(normal) with correlation structure from cor.mat, ##' first random effect is z1 and shared for a possible second cause, second random effect is for death ##' @param var.z variance of random effects ##' @param cor.mat correlation matrix for var.z variance of random effects ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' ##' ###################################################################### ##' ### simulating simple model that mimicks data ##' ###################################################################### ##' rr <- simRecurrent(5,base1,death.cumhaz=dr) ##' dlist(rr,.~id,n=0) ##' ##' rr <- simRecurrent(1000,base1,death.cumhaz=dr) ##' par(mfrow=c(1,3)) ##' showfitsim(causes=1,rr,dr,base1,base1) ##' ##' ###################################################################### ##' ### simulating simple model that mimicks data ##' ### now with two event types and second type has same rate as death rate ##' ###################################################################### ##' ##' rr <- simRecurrent(1000,base1,death.cumhaz=dr,cumhaz2=base4) ##' dtable(rr,~death+status) ##' par(mfrow=c(2,2)) ##' showfitsim(causes=2,rr,dr,base1,base4) ##' ##' ###################################################################### ##' ### simulating simple model ##' ### random effect for all causes (Z shared for death and recurrent) ##' ###################################################################### ##' ##' rr <- simRecurrent(1000,base1,death.cumhaz=dr,dependence=1,var.gamma=0.4) ##' ### marginals do fit after input after integrating out ##' par(mfrow=c(2,2)) ##' showfitsim(causes=1,rr,dr,base1,base1) ##' ##' @aliases showfitsim simRecurrentGamma covIntH1dM1IntH2dM2 recurrentMarginalgam squareintHdM addCums ##' @export simRecurrent <- function(n,cumhaz,death.cumhaz=NULL,cumhaz2=NULL, gap.time=FALSE,max.recurrent=100,dhaz=NULL,haz2=NULL, dependence=0,var.z=2,cor.mat=NULL,...) {# {{{ dtime <- NULL ## to avoid R-check ### drawing relative risk frailty terms to generate dependence if (dependence==0) { z1 <- z2 <- zd <- rep(1,n) # {{{ } else if (dependence==1) { ### zz <- rgamma(n,1/var.gamma[1])*var.gamma[1] zz <- exp(rnorm(n,1)*var.z[1]^.5) z1 <- zz; z2 <- zz; zd <- zz } else if (dependence==2) { stdevs <- var.z^.5 b <- stdevs %*% t(stdevs) covv <- b * cor.mat z <- matrix(rnorm(3*n),n,3) z <- (z%*% chol(covv)) z1 <- exp(z[,1]); zd <- exp(z[,3]) apply(exp(z),2,mean); cov(exp(z)) } else if (dependence==3) { zz <- rgamma(n,1/var.z[1])*var.z[1] z1 <- zz; z2 <- zz; zd <- rep(1,n) } # }}} cumhaz <- rbind(c(0,0),cumhaz) ## range max of cumhaz and cumhaz2 if (!is.null(cumhaz2)) { out <- extendCums(cumhaz,cumhaz2,both=TRUE,hazb=haz2) cumhaz <- out$cumA cumhaz2 <- out$cumB } ## extend cumulative for death to full range of cause 1 if (!is.null(death.cumhaz)) { out <- extendCums(cumhaz,death.cumhaz,hazb=dhaz) cumhazd <- out$cumB } ll <- nrow(cumhaz) max.time <- tail(cumhaz[,1],1) ## sum two cumulatives to get combined events if (!is.null(cumhaz2)) {# {{{ times <- sort(unique(c(cumhaz[,1],cumhaz2[,1]))) cumhaz1t <- approx(cumhaz[,1],cumhaz[,2],times,rule=2)$y cumhaz2t <- approx(cumhaz2[,1],cumhaz2[,2],times,rule=2)$y cumhaz1 <- cumhaz cumhaz <- cbind(times,cumhaz1t+cumhaz2t) }# }}} ### recurrent first time tall <- timereg::rchaz(cumhaz,z1) tall$id <- 1:n ### death time simulated if (!is.null(death.cumhaz)) { timed <- timereg::rchaz(cumhazd,zd) tall$dtime <- timed$time tall$fdeath <- timed$status } else { tall$dtime <- max.time; tall$fdeath <- 0; cumhazd <- NULL } ### fixing the first time to event tall$death <- 0 tall <- dtransform(tall,death=1,time>dtime) tall <- dtransform(tall,status=0,time>dtime) tall <- dtransform(tall,time=dtime,time>dtime) tt <- tall nrr <- n i <- 1; while (any(tt$timedtime) tt <- dtransform(tt,status=0,time>dtime) tt <- dtransform(tt,time=dtime,time>dtime) nt <- nrow(tt) tall <- rbind(tall,tt,row.names=NULL) nrr <- nrr+nt } dsort(tall) <- ~id+entry+time ### cause 2 is there then decide if jump is 1 or 2 if (!is.null(cumhaz2)) {# {{{ haz1 <- apply(cumhaz1,2,diff) haz1 <- haz1[,2]/haz1[,1] ## hazard2 at times haz2 <- apply(cumhaz2,2,diff) haz2 <- haz2[,2]/haz2[,1] ll1 <- nrow(cumhaz1) ll2 <- nrow(cumhaz2) haz1t <- timereg::Cpred(cbind(cumhaz1[-ll1,1],haz1),tall$time)[,2] haz2t <- timereg::Cpred(cbind(cumhaz2[-ll2,1],haz2),tall$time)[,2] p2t <- haz2t/(haz1t+haz2t) tall$p2t <- p2t tall$status <- (1+rbinom(nrow(tall),1,p2t))*(tall$status>=1) }# }}} tall$start <- tall$entry tall$stop <- tall$time attr(tall,"death.cumhaz") <- cumhazd attr(tall,"cumhaz") <- cumhaz attr(tall,"cumhaz2") <- cumhaz2 return(tall) }# }}} lin.approx <- function(x2,xfx,x=1) {# {{{ ### x=1 gives f(x2) ### x=-1 gives f^-1(x2) breaks <- xfx[,x] fx <- xfx[,-x] ri <- sindex.prodlim(breaks,x2) rrr <- (x2-breaks[ri])/(breaks[ri+1]-breaks[ri]) res <- rrr*(fx[ri+1]-fx[ri])+fx[ri] res[is.na(res)] <- tail(fx,1) return(res) }# ## }}} ##' @export addCums <- function(cumB,cumA,max=5) {# {{{ times <- sort(unique(c(cumB[,1],cumA[,1]))) times <- times[timesdtime) tall <- dtransform(tall,status=0,time>dtime) tall <- dtransform(tall,time=dtime,time>dtime) tt <- tall i <- 1; while (any(tt$timedtime) tt <- dtransform(tt,status=0,time>dtime) tt <- dtransform(tt,time=dtime,time>dtime) nt <- nrow(tt) tall <- rbind(tall,tt,row.names=NULL) } dsort(tall) <- ~id+entry+time ### cause 2 is there then decide if jump is 1 or 2 if (!is.null(haz2)) {# {{{ p2t <- haz2/(haz+haz2) tall$p2t <- p2t tall$status <- (1+rbinom(nrow(tall),1,p2t))*(tall$status>=1) }# }}} tall$start <- tall$entry tall$stop <- tall$time attr(tall,"death.cumhaz") <- cumhazd attr(tall,"cumhaz") <- cumhaz attr(tall,"cumhaz2") <- cumhaz2 ### haz*haz2*(var.z+1) return(tall) }# }}} ##' Simulation of recurrent events data based on cumulative hazards II ##' ##' Simulation of recurrent events data based on cumulative hazards ##' ##' Must give hazard of death and two recurrent events. Possible with two ##' event types and their dependence can be specified but the two recurrent events need ##' to share random effect. Based on drawing the from cumhaz and cumhaz2 and ##' taking the first event rather ##' the cumulative and then distributing it out. Key advantage of this is that ##' there is more flexibility wrt random effects ##' ##' @param n number of id's ##' @param cumhaz cumulative hazard of recurrent events ##' @param cumhaz2 cumulative hazard of recurrent events of type 2 ##' @param death.cumhaz cumulative hazard of death ##' @param gap.time if true simulates gap-times with specified cumulative hazard ##' @param max.recurrent limits number recurrent events to 100 ##' @param dhaz rate for death hazard if it is extended to time-range of first event ##' @param haz2 rate of second cause if it is extended to time-range of first event ##' @param dependence 0:independence; 1:all share same random effect with variance var.z; 2:random effect exp(normal) with correlation structure from cor.mat; 3:additive gamma distributed random effects, z1= (z11+ z12)/2 such that mean is 1 , z2= (z11^cor.mat(1,2)+ z13)/2, z3= (z12^(cor.mat(2,3)+z13^cor.mat(1,3))/2, with z11 z12 z13 are gamma with mean and variance 1 , first random effect is z1 and for N1 second random effect is z2 and for N2 third random effect is for death ##' @param var.z variance of random effects ##' @param cor.mat correlation matrix for var.z variance of random effects ##' @param cens rate of censoring exponential distribution ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' ##' cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) ##' ##' ###################################################################### ##' ### simulating simple model that mimicks data ##' ### now with two event types and second type has same rate as death rate ##' ###################################################################### ##' ##' rr <- simRecurrentII(1000,base1,base4,death.cumhaz=dr) ##' dtable(rr,~death+status) ##' par(mfrow=c(2,2)) ##' showfitsim(causes=2,rr,dr,base1,base4) ##' ##' @export simRecurrentII <- function(n,cumhaz,cumhaz2,death.cumhaz=NULL, gap.time=FALSE,max.recurrent=100,dhaz=NULL,haz2=NULL, dependence=0,var.z=0.22,cor.mat=NULL,cens=NULL,...) {# {{{ fdeath <- dtime <- NULL # to avoid R-check if (dependence==0) { z <- z1 <- z2 <- zd <- rep(1,n) # {{{ } else if (dependence==1) { z <- rgamma(n,1/var.z[1])*var.z[1] ### z <- exp(rnorm(n,1)*var.z[1]^.5) z1 <- z; z2 <- z; zd <- z if (!is.null(cor.mat)) { zd <- rep(1,n); } } else if (dependence==2) { stdevs <- var.z^.5 b <- stdevs %*% t(stdevs) covv <- b * cor.mat z <- matrix(rnorm(3*n),n,3) z <- exp(z%*% chol(covv)) ### print(summary(z)) ### print(cor(z)) z1 <- z[,1]; z2 <- z[,2]; zd <- z[,3]; } else if (dependence==3) { z <- matrix(rgamma(3*n,1),n,3) z1 <- (z[,1]^cor.mat[1,1]+z[,2]^cor.mat[1,2]+z[,3]^cor.mat[1,3]) z2 <- (z[,1]^cor.mat[2,1]+z[,2]^cor.mat[2,2]+z[,3]^cor.mat[2,3]) zd <- (z[,1]^cor.mat[3,1]+z[,2]^cor.mat[3,2]+z[,3]^cor.mat[3,3]) z <- cbind(z1,z2,zd) ### print(summary(z)) ### print(cor(z)) } else if (dependence==4) { zz <- rgamma(n,1/var.z[1])*var.z[1] z1 <- zz; z2 <- zz; zd <- rep(1,n) z <- z1 } else stop("dependence 0-4"); # }}} cumhaz <- rbind(c(0,0),cumhaz) ## range max of cumhaz and cumhaz2 out <- extendCums(cumhaz,cumhaz2,both=TRUE,hazb=haz2) cumhaz <- out$cumA cumhaz2 <- out$cumB ## extend cumulative for death to full range of cause 1 if (!is.null(death.cumhaz)) { out <- extendCums(cumhaz,death.cumhaz,hazb=dhaz) cumhazd <- out$cumB } ll <- nrow(cumhaz) max.time <- tail(cumhaz[,1],1) ### recurrent first time tall1 <- timereg::rchaz(cumhaz,z1) tall2 <- timereg::rchaz(cumhaz2,z2) tall <- tall1 tall$status <- ifelse(tall1$timectime] <- 0; tall$dtime[tall$dtime>ctime] <- ctime[tall$dtime>ctime] } } else { tall$dtime <- max.time; tall$fdeath <- 0; cumhazd <- NULL if (!is.null(cens)) { ctime <- rexp(n)/cens tall$fdeath[tall$dtime>ctime] <- 0; tall$dtime[tall$dtime>ctime] <- ctime[tall$dtime>ctime] } } ### fixing the first time to event tall$death <- 0 tall <- dtransform(tall,death=fdeath,time>dtime) tall <- dtransform(tall,status=0,time>dtime) tall <- dtransform(tall,time=dtime,time>dtime) tt <- tall ### setting aside memory tt1 <- tt2 <- tt ### gemsim <- as.data.frame(matrix(0,max.recurrent*n,ncol(tall))) ### names(gemsim) <- names(tall) ### gemsim[1:n,] <- tall; nrr <- n i <- 1; while (any(tt$timedtime) tt <- dtransform(tt,status=0,time>dtime) tt <- dtransform(tt,time=dtime,time>dtime) nt <- nrow(tt) ### gemsim[(nrr+1):(nrr+nt),] <- tt tall <- rbind(tall,tt[1:nn,],row.names=NULL) ### nrr <- nrr+nt } ### tall <- gemsim[1:nrr,] dsort(tall) <- ~id+entry+time tall$start <- tall$entry tall$stop <- tall$time attr(tall,"death.cumhaz") <- cumhazd attr(tall,"cumhaz") <- cumhaz attr(tall,"cumhaz2") <- cumhaz2 attr(tall,"z") <- z return(tall) }# }}} ##' @export showfitsim <- function(causes=2,rr,dr,base1,base4,which=1:3) {# {{{ if (1 %in% which) { drr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) basehazplot.phreg(drr,ylim=c(0,8)) lines(dr,col=2) } ### if (2 %in% which) { xrr <- phreg(Surv(entry,time,status==1)~cluster(id),data=rr) basehazplot.phreg(xrr,add=TRUE) ### basehazplot.phreg(xrr) lines(base1,col=2) if (causes>=2) { xrr2 <- phreg(Surv(entry,time,status==2)~cluster(id),data=rr) basehazplot.phreg(xrr2,add=TRUE) lines(base4,col=2) } } if (3 %in% which) { meanr1 <- recurrentMarginal(xrr,drr) basehazplot.phreg(meanr1,se=TRUE) if (causes>=2) { meanr2 <- recurrentMarginal(xrr2,drr) basehazplot.phreg(meanr2,se=TRUE,add=TRUE,col=2) } } }# }}} ##' Simulation of illness-death model ##' ##' Simulation of illness-death model ##' ##' simMultistate with same death intensity from states 1 and 2 ##' simMultistateII with different death intensities from states 1 and 2 ##' ##' Must give cumulative hazards on some time-range ##' ##' @param n number of id's ##' @param cumhaz cumulative hazard of recurrent events ##' @param cumhaz2 cumulative hazard of recurrent events of type 2 ##' @param death.cumhaz cumulative hazard of death from state 1 ##' @param death.cumhaz2 cumulative hazard of death from state 2 ##' @param rr relative risk adjustment for cumhaz ##' @param rr2 relative risk adjustment for cumhaz2 ##' @param rd relative risk adjustment for death.cumhaz ##' @param rd2 relative risk adjustment for death.cumhaz2 ##' @param gap.time if true simulates gap-times with specified cumulative hazard ##' @param max.recurrent limits number recurrent events to 100 ##' @param dependence 0:independence; 1:all share same random effect with variance var.z; 2:random effect exp(normal) with correlation structure from cor.mat; 3:additive gamma distributed random effects, z1= (z11+ z12)/2 such that mean is 1 , z2= (z11^cor.mat(1,2)+ z13)/2, z3= (z12^(cor.mat(2,3)+z13^cor.mat(1,3))/2, with z11 z12 z13 are gamma with mean and variance 1 , first random effect is z1 and for N1 second random effect is z2 and for N2 third random effect is for death ##' @param var.z variance of random effects ##' @param cor.mat correlation matrix for var.z variance of random effects ##' @param cens rate of censoring exponential distribution ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' dr2 <- drcumhaz ##' dr2[,2] <- 1.5*drcumhaz[,2] ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' cens <- rbind(c(0,0),c(2000,0.5),c(5110,3)) ##' ##' iddata <- simMultistate(100,base1,base1,dr,dr2,cens=cens) ##' dlist(iddata,.~id|id<3,n=0) ##' ##' ### estimating rates from simulated data ##' c0 <- phreg(Surv(start,stop,status==0)~+1,iddata) ##' c3 <- phreg(Surv(start,stop,status==3)~+strata(from),iddata) ##' c1 <- phreg(Surv(start,stop,status==1)~+1,subset(iddata,from==2)) ##' c2 <- phreg(Surv(start,stop,status==2)~+1,subset(iddata,from==1)) ##' ### ##' par(mfrow=c(2,3)) ##' bplot(c0) ##' lines(cens,col=2) ##' bplot(c3,main="rates 1-> 3 , 2->3") ##' lines(dr,col=1,lwd=2) ##' lines(dr2,col=2,lwd=2) ##' ### ##' bplot(c1,main="rate 1->2") ##' lines(base1,lwd=2) ##' ### ##' bplot(c2,main="rate 2->1") ##' lines(base1,lwd=2) ##' ##' @aliases extendCums ##' @export simMultistate <- function(n,cumhaz,cumhaz2,death.cumhaz,death.cumhaz2, rr=NULL,rr2=NULL,rd=NULL,rd2=NULL, gap.time=FALSE,max.recurrent=100, dependence=0,var.z=0.22,cor.mat=NULL,cens=NULL,...) {# {{{ fdeath <- dtime <- NULL # to avoid R-check status <- dhaz <- NULL; dhaz2 <- NULL if (dependence==0) { z <- z1 <- z2 <- zd <- zd2 <- rep(1,n) # {{{ } else if (dependence==1) { z <- rgamma(n,1/var.z[1])*var.z[1] ### z <- exp(rnorm(n,1)*var.z[1]^.5) z1 <- z; z2 <- z; zd <- z if (!is.null(cor.mat)) { zd <- rep(1,n); } } else if (dependence==2) { stdevs <- var.z^.5 b <- stdevs %*% t(stdevs) covv <- b * cor.mat z <- matrix(rnorm(3*n),n,3) z <- exp(z%*% chol(covv)) ### print(summary(z)) ### print(cor(z)) z1 <- z[,1]; z2 <- z[,2]; zd <- z[,3]; } else if (dependence==3) { z <- matrix(rgamma(3*n,1),n,3) z1 <- (z[,1]^cor.mat[1,1]+z[,2]^cor.mat[1,2]+z[,3]^cor.mat[1,3]) z2 <- (z[,1]^cor.mat[2,1]+z[,2]^cor.mat[2,2]+z[,3]^cor.mat[2,3]) zd <- (z[,1]^cor.mat[3,1]+z[,2]^cor.mat[3,2]+z[,3]^cor.mat[3,3]) z <- cbind(z1,z2,zd) ### print(summary(z)) ### print(cor(z)) } else stop("dependence 0-3"); # }}} ## covariate adjustment if (is.null(rr)) rr <- z1; if (is.null(rr2)) rr2 <- z2; if (is.null(rd)) rd <- zd; if (is.null(rd2)) rd2 <- zd2; ll <- nrow(cumhaz) ### extend of cumulatives cumhaz <- rbind(c(0,0),cumhaz) cumhaz2 <- rbind(c(0,0),cumhaz2) death.cumhaz <- rbind(c(0,0),death.cumhaz) death.cumhaz2 <- rbind(c(0,0),death.cumhaz2) haz <- haz2 <- NULL ## range max of cumhaz and cumhaz2 out <- extendCums(cumhaz,cumhaz2,both=TRUE) cumhaz <- out$cumA cumhaz2 <- out$cumB ## extend cumulative for death to full range of cause 1 out <- extendCums(cumhaz,death.cumhaz,both=FALSE) cumhazd <- out$cumB ## extend cumulative for death to full range of cause 1 out <- extendCums(cumhaz,death.cumhaz2,both=FALSE) cumhazd2 <- out$cumB max.time <- tail(cumhaz[,1],1) if (!is.null(cens)) { if (is.matrix(cens)) { out <- extendCums(cumhaz,cens,both=FALSE) cens <- out$cumB } } tall <- timereg::rcrisk(cumhaz,cumhazd,rr,rd,cens=cens) tall$id <- 1:n ### fixing the first time to event tall$death <- 0 ### cause 2 is death state 3, cause 1 is state 2 tall <- dtransform(tall,status=3,status==2) tall <- dtransform(tall,death=1,status==3) tall <- dtransform(tall,status=2,status==1) ### dead or censored deadid <- (tall$status==3 | tall$status==0) tall$from <- 1 tall$to <- tall$status ## id's that are dead: tall[deadid,] ## go furhter with those that are not yet dead or censored tt <- tall[!deadid,,drop=FALSE] ## also check that we are before max.time tt <- subset(tt,tt$time0) & (i < max.recurrent)) {# {{{ i <- i+1 nn <- nrow(tt) z1r <- rr[tt$id] zdr <- rd[tt$id] z2r <- rr2[tt$id] zd2r <- rd2[tt$id] if (i%%2==0) { ## in state 2 ## out of 2 for those in 2 tt1 <- timereg::rcrisk(cumhaz2,cumhazd2,z2r,zd2r,entry=tt$time,cens=cens) tt1$death <- 0 ### status 2 is death state 3, status 1 is state 1 tt1 <- dtransform(tt1,status=3,status==2) tt1 <- dtransform(tt1,death=1,status==3) tt1$from <- 2 tt1$to <- tt1$status ## take id from tt tt1$id <- tt$id ### add to data tall <- rbind(tall,tt1,row.names=NULL) deadid <- (tt1$status==3 | tt1$status==0) ### those that are still under risk tt <- tt1[!deadid,,drop=FALSE] ## also keep only those before max.time tt <- subset(tt,tt$timectime] <- 0; tall$dtime[tall$dtime>ctime] <- ctime[tall$dtime>ctime] } } ### fixing the first time to event tall$death <- 0 tall <- dtransform(tall,death=fdeath,time>dtime) tall <- dtransform(tall,status=0,time>dtime) tall <- dtransform(tall,time=dtime,time>dtime) tt <- tall tt1 <- tt2 <- tt i <- 1; while (any(tt$timedtime) tt <- dtransform(tt,status=0,time>dtime) tt <- dtransform(tt,time=dtime,time>dtime) nt <- nrow(tt) tall <- rbind(tall,tt[1:nn,],row.names=NULL) } dsort(tall) <- ~id+entry+time tall$start <- tall$entry tall$stop <- tall$time attr(tall,"death.cumhaz") <- cumhazd attr(tall,"cumhaz") <- cumhaz attr(tall,"cumhaz2") <- cumhaz2 attr(tall,"z") <- z return(tall) }# }}} ##' @export extendCums <- function(cumA,cumB,both=TRUE,hazb=NULL,haza=NULL) {# {{{ max1 <- tail(cumA[,1],1) max2 <- tail(cumB[,1],1) ## extend to max of both or max of cumA if (both) mmax <- max(max1,max2) else mmax <- max1 ## extend cumulative for cause 2 to full range of cause 1 cumB <- rbind(c(0,0),cumB) ### linear extrapolation of mortality using given dhaz or if (tail(cumB[,1],1) -1/shape ##' @param share1 how random effect for death splits into two parts ##' @param vargamD variance of random effect for death ##' @param vargam12 shared random effect for N1 and N2 ##' @param cens rate of censoring exponential distribution ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' ##' rr <- simRecurrentTS(1000,base1,base4,death.cumhaz=dr) ##' dtable(rr,~death+status) ##' showfitsim(causes=2,rr,dr,base1,base4) ##' ##' @export simRecurrentTS <- function(n,cumhaz,cumhaz2,death.cumhaz=NULL, nu=rep(1,3),share1=0.3,vargamD=2,vargam12=0.5, gap.time=FALSE,max.recurrent=100,cens=NULL,...) {# {{{ k <- 1 nu1 <- nu[1]; nu2 <- nu[2]; nu3 <- nu[3] ###nu1 <- 1; nu2 <- 1; nu3 <- 0.4 share2 <- (1-share1) vargam <- vargamD vargam12 <- 0.5 agam1 <- share1/vargam agam2 <- share2/vargam betagam=1/vargam gamma1 <- rep(rgamma(n,agam1)*vargam,each=k) gamma2 <- rep(rgamma(n,agam2)*vargam,each=k) agam12 <- 1/vargam12 betagam12 <- 1/vargam12 gamma12 <- rep(rgamma(n,agam12)*vargam12,each=k) ### agamD <- agam1+agam2 z1 <- (gamma1^nu1)*gamma12 z2 <- (gamma2^nu2)*gamma12^nu3 gamD <- gamma1+gamma2 zd <- gamD egamma12nu3 <- (gamma(agam12+nu3)/gamma(agam12))*1/(betagam12)^nu3 ### zs <- cbind(z1,z2,zd) fdeath <- dtime <- NULL # to avoid R-check dhaz <- haz2 <- dhaz <- NULL ### cumhaz <- rbind(c(0,0),cumhaz) ll <- nrow(cumhaz) max.time <- tail(cumhaz[,1],1) ################################################################ ### approximate hazards to make marginals fit (approximately) ################################################################ orig.death <- death.cumhaz ### base1 <- death.cumhaz gt <- exp(vargam*base1[,2]) dtt <- diff(c(0,base1[,1])) lams <- (diff(c(0,base1[,2]))/dtt)*gt death.cumhaz <- cbind(base1[,1],cumsum(dtt*lams)) base1 <- cumhaz dbase1 <- Cpred(rbind(c(0,0),death.cumhaz),base1[,1])[,2] ### dtt <- diff(c(0,base1[,1])) gt <- (gamma(agam1+nu1)/gamma(agam1))*(1/(betagam+dbase1))^nu1 lams <- (diff(c(0,base1[,2]))/dtt)*(1/gt) cumhaz <- cbind(base1[,1],cumsum(dtt*lams)) base1 <- cumhaz2 dbase1 <- Cpred(rbind(c(0,0),death.cumhaz),base1[,1])[,2] dtt <- diff(c(0,base1[,1])) gt <- (gamma(agam2+nu2)/gamma(agam2))*(1/(betagam+dbase1))^nu2 lams <-(1/egamma12nu3)*(diff(c(0,base1[,2]))/dtt)*(1/gt) cumhaz2 <- cbind(base1[,1],cumsum(dtt*lams)) cumhaz <- rbind(c(0,0),cumhaz) cumhaz2 <- rbind(c(0,0),cumhaz2) death.cumhaz <- rbind(c(0,0),death.cumhaz) ## range max of cumhaz and cumhaz2 out <- extendCums(cumhaz,cumhaz2,both=TRUE,hazb=haz2) cumhaz <- out$cumA cumhaz2 <- out$cumB ## extend cumulative for death to full range of cause 1 out <- extendCums(cumhaz,death.cumhaz,hazb=dhaz) cumhazd <- out$cumB max.time <- tail(cumhaz[,1],1) ### recurrent first time tall1 <- timereg::rchaz(cumhaz,rr=z1) tall2 <- timereg::rchaz(cumhaz2,rr=z2) tall <- tall1 tall$status <- ifelse(tall1$timectime] <- 0; tall$dtime[tall$dtime>ctime] <- ctime[tall$dtime>ctime] } } else { tall$dtime <- max.time; tall$fdeath <- 0; cumhazd <- NULL if (!is.null(cens)) { ctime <- rexp(n)/cens tall$fdeath[tall$dtime>ctime] <- 0; tall$dtime[tall$dtime>ctime] <- ctime[tall$dtime>ctime] } }# }}} ### fixing the first time to event tall$death <- 0 tall <- dtransform(tall,death=fdeath,time>dtime) tall <- dtransform(tall,status=0,time>dtime) tall <- dtransform(tall,time=dtime,time>dtime) tt <- tall ### setting aside memory tt1 <- tt2 <- tt i <- 1; while (any(tt$timedtime) tt <- dtransform(tt,status=0,time>dtime) tt <- dtransform(tt,time=dtime,time>dtime) nt <- nrow(tt) tall <- rbind(tall,tt[1:nn,],row.names=NULL) } dsort(tall) <- ~id+entry+time tall$start <- tall$entry tall$stop <- tall$time attr(tall,"death.cumhaz") <- cumhazd attr(tall,"cumhaz") <- cumhaz attr(tall,"cumhaz2") <- cumhaz2 attr(tall,"zs") <- zs attr(tall,"gamma.death") <- c(agam1,agam2,betagam,vargamD) attr(tall,"gamma.N12") <- c(agam12,betagam12,vargam12) return(tall) }# }}} ##' Counts the number of previous events of two types for recurrent events processes ##' ##' Counts the number of previous events of two types for recurrent events processes ##' ##' @param data data-frame ##' @param status name of status ##' @param id id ##' @param types types of the events (code) related to status ##' @param names.count name of Counts, for example Count1 Count2 when types=c(1,2) ##' @param lag if true counts previously observed, and if lag=FALSE counts up to know ##' @author Thomas Scheike ##' @examples ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' ##' ###################################################################### ##' ### simulating simple model that mimicks data ##' ### now with two event types and second type has same rate as death rate ##' ###################################################################### ##' ##' rr <- simRecurrentII(1000,base1,base4,death.cumhaz=dr) ##' rr <- count.history(rr) ##' dtable(rr,~"Count*"+status,level=1) ##' ##' @export count.history <- function(data,status="status",id="id",types=1:2,names.count="Count",lag=TRUE) {# {{{ stat <- data[,status] clusters <- data[,id] if (is.numeric(clusters)) { clusters <- fast.approx(unique(clusters), clusters) - 1 max.clust <- max(clusters) } else { max.clust <- length(unique(clusters)) clusters <- as.integer(factor(clusters, labels = seq(max.clust))) - 1 } data[,"lbnr__id"] <- cumsumstrata(rep(1,nrow(data)),clusters,max.clust+1) for (i in types) { if (lag==TRUE) data[,paste(names.count,i,sep="")] <- cumsumidstratasum((stat==i),rep(0,nrow(data)),1,clusters,max.clust+1)$lagsum else data[,paste(names.count,i,sep="")] <- cumsumidstratasum((stat==i),rep(0,nrow(data)),1,clusters,max.clust+1)$sum } return(data) }# }}} ##' Estimation of probability of more that k events for recurrent events process ##' ##' Estimation of probability of more that k events for recurrent events process ##' where there is terminal event, based on this also estimate of variance of recurrent events. The estimator is based on cumulative incidence of exceeding "k" events. ##' In contrast the probability of exceeding k events can also be computed as a ##' counting process integral, and this is implemented in prob.exceedRecurrent ##' ##' @param data data-frame ##' @param type type of evnent (code) related to status ##' @param status name of status ##' @param death name of death indicator ##' @param start start stop call of Hist() of prodlim ##' @param stop start stop call of Hist() of prodlim ##' @param id id ##' @param times time at which to get probabilites P(N1(t) >= n) ##' @param exceed n's for which which to compute probabilites P(N1(t) >= n) ##' @param cifmets if true uses cif of mets package rather than prodlim ##' @param strata to stratify according to variable, only for cifmets=TRUE, when strata is given then only consider the output in the all.cifs ##' @param all.cifs if true then returns list of all fitted objects in cif.exceed ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @references ##' Scheike, Eriksson, Tribler (2019) ##' The mean, variance and correlation for bivariate recurrent events ##' with a terminal event, JRSS-C ##' ##' @examples ##' ##' ######################################## ##' ## getting some rates to mimick ##' ######################################## ##' ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' ##' cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) ##' rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=dr) ##' rr <- count.history(rr) ##' dtable(rr,~death+status) ##' ##' oo <- prob.exceedRecurrent(rr,1) ##' bplot(oo) ##' ##' par(mfrow=c(1,2)) ##' with(oo,plot(time,mu,col=2,type="l")) ##' ### ##' with(oo,plot(time,varN,type="l")) ##' ##' ##' ### Bivariate probability of exceeding ##' oo <- prob.exceedBiRecurrent(rr,1,2,exceed1=c(1,5,10),exceed2=c(1,2,3)) ##' with(oo, matplot(time,pe1e2,type="s")) ##' nc <- ncol(oo$pe1e2) ##' legend("topleft",legend=colnames(oo$pe1e2),lty=1:nc,col=1:nc) ##' ##' ##' \donttest{ ##' ### do not test to avoid dependence on prodlim ##' ### now estimation based on cumualative incidence, but do not test to avoid dependence on prodlim ##' library(prodlim) ##' pp <- prob.exceed.recurrent(rr,1,status="status",death="death",start="entry",stop="time",id="id") ##' with(pp, matplot(times,prob,type="s")) ##' ### ##' with(pp, matlines(times,se.lower,type="s")) ##' with(pp, matlines(times,se.upper,type="s")) ##' } ##' @export ##' @aliases prob.exceedRecurrent prob.exceedBiRecurrent prob.exceedRecurrentStrata prob.exceedBiRecurrentStrata prob.exceed.recurrent <- function(data,type,status="status",death="death", start="start",stop="stop",id="id",times=NULL,exceed=NULL,cifmets=FALSE, strata=NULL,all.cifs=FALSE,...) {# {{{ ### setting up data stat <- data[,status] dd <- data[,death] tstop <- data[,stop] tstart <- data[,start] clusters <- data[,id] if (sum(stat==type)==0) stop("none of type events") if (!is.null(strata) & !cifmets) stop("strata only for cifmets=TRUE\n") if (is.numeric(clusters)) { clusters <- fast.approx(unique(clusters), clusters) - 1 max.clust <- max(clusters) } else { max.clust <- length(unique(clusters)) clusters <- as.integer(factor(clusters, labels = seq(max.clust))) - 1 } count <- cumsumstrata((stat==type),clusters,max.clust+1) ### count <- cumsumidstratasum((stat==type),rep(0,nrow(data)),1,clusters,max.clust+1)$lagsum mc <- max(count)+1 idcount <- clusters*mc + count idcount <- cumsumstrata(rep(1,length(idcount)),idcount,mc*(max.clust+1)) if (is.null(times)) times <- sort(unique(tstop[stat==type])) if (is.null(exceed)) exceed <- sort(unique(count)) if (!cifmets) { if (is.null(strata)) form <- as.formula(paste("Hist(entry=",start,",",stop,",statN)~+1",sep="")) else form <- as.formula(paste("Hist(entry=",start,",",stop,",statN)~+",strata,sep="")) } else { if (is.null(strata)) form <- as.formula(paste("Event(entry=",start,",",stop,",statN)~+1",sep="")) else form <- as.formula(paste("Event(entry=",start,",",stop,",statN)~strata(",strata,")",sep="")) } cif.exceed <- NULL if (all.cifs) cif.exceed <- list() probs.orig <- se.probs <- probs <- matrix(0,length(times),length(exceed)) se.lower <- matrix(0,length(times),length(exceed)) se.upper <- matrix(0,length(times),length(exceed)) i <- 1 for (n1 in exceed[-1]) {# {{{ i <- i+1 ### first time that get to n1 keep <- (count=",exceed[-1],sep="")) colnames(se.probs) <- c(paste("N=",exceed[1],sep=""),paste("exceed>=",exceed[-1],sep="")) return(list(time=times,times=times,prob=probs,se.prob=se.probs,meanN=meanN,probs.orig=probs.orig[,-1], se.lower=se.lower,se.upper=se.upper,meanN2=meanN2,varN=meanN2-meanN^2,exceed=exceed[-1],formula=form, cif.exceed=cif.exceed)) }# }}} ##' @export prob.exceedRecurrent <- function(data,type,km=TRUE,status="status",death="death", start="start",stop="stop",id="id",names.count="Count",...) {# {{{ formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~ cluster(",id,")",sep="")) form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type,")~cluster(",id,")",sep="")) ### form1C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type,")~strata(",names.count,type,")+cluster(",id,")",sep="")) dr <- phreg(formdr,data=data) base1 <- phreg(form1,data=data) base1.2 <- phreg(form1C,data=data) ###cc <- base1$cox.prep ###risk <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) ######### risk stratified after count 1 ###cc <- base1.2$cox.prep ###risk1 <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) ###pstrata <- risk1/risk ###pstrata[risk1==0] <- 0 ### marginal int_0^t G(s) P(N1(t-)==k|D>t) \lambda_{1,N1=k}(s) ds ### strata og count skal passe sammen # {{{ strat <- dr$strata[dr$jumps] x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) x <- base1 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 risktot <- x$S0 mu <- c(cumsumstrata(St*S0i,xx$strata,xx$nstrata)) ### x <- base1.2 xx <- x$cox.prep lss <- length(xx$strata) ### S0i2 <- S0i <- rep(0,lss) ### S0i[xx$jumps+1] <- 1/x$S0 riskstrata <- x$S0 xstrata <- xx$strata vals1 <- sort(unique(data[,paste("Count",type,sep="")])) valjumps <- vals1[xx$strata+1] fk <- (valjumps+1)^2-valjumps^2 ### EN2 <- c(cumsumstrata(fk*St*pstrata*S0i,rep(0,lss),1)) EN2 <- c(cumsumstrata(fk*St*S0i,rep(0,lss),1)) pcumhaz <- cbind(xx$time,cumsumstrata(St*S0i,xx$strata,xx$nstrata)) # }}} EN2 <- EN2[xx$jumps+1] cumhaz <- pcumhaz[xx$jumps+1,] mu <- mu[xx$jumps+1] pstrata <- riskstrata/risktot exceed.name <- paste("Exceed>=",vals1+1,sep="") out=list(cumhaz=cumhaz,time=cumhaz[,1],varN=EN2-mu^2,mu=mu, nstrata=base1.2$nstrata,strata=base1.2$strata[xx$jumps+1], jumps=1:nrow(cumhaz),riskstrata=pstrata,risktot=risktot, strat.cox.name=base1.2$strata.name, strat.cox.level=base1.2$strata.level,exceed=vals1+1, strata.name=exceed.name,strata.level=exceed.name) ### use recurrentMarginal estimator til dette via strata i base1 ### strata og count skal passe sammen ### see beregning via recurrent marginal function ### base1$cox.prep$strata <- base1.2$cox.prep$strata ### base1$cox.prep$nstrata <- base1.2$cox.prep$nstrata ### base1$nstrata <- base1.2$cox.prep$nstrata ### base1$strata <- base1.2$strata ### base1$strata.name <- base1.2$strata.name ### base1$strata.level <- base1.2$strata.level ### mm <- recurrentMarginal(base1,dr,km=km,...) ### out=c(mm,list(varN=EN2-mu^2)) return(out) }# }}} ##' @export prob.exceedRecurrentStrata <- function(data,type,km=TRUE,status="status",death="death", start="start",stop="stop",id="id",names.count="Count",strata=NULL,...) {# {{{ if (is.null(strata)) { formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~ cluster(",id,")",sep="")) ## bring count as covariate to use later and get sorted as data form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type,")~",names.count,type,"+cluster(",id,")",sep="")) } else { formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~strata(",strata,")+cluster(",id,")",sep="")) ## bring count as covariate to use later and get sorted as data form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type,")~",names.count,type,"+strata(",strata,")+cluster(",id,")",sep="")) } dr <- phreg(formdr,data=data,no.opt=TRUE) base1 <- phreg(form1,data=data,no.opt=TRUE) ### marginal int_0^t G(s) P(N1(t-)==k|D>t) \lambda_{1,N1=k}(s) ds ### strata og count skal passe sammen # {{{ strat <- dr$strata[dr$jumps] x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) x <- base1 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 risktot <- x$S0 mu <- c(cumsumstrata(St*S0i,xx$strata,xx$nstrata)) ### vals1 <- xx$X[,1] fk <- (vals1+1)^2-vals1^2 EN2 <- c(cumsumstrata(fk*St*S0i,xx$strata,xx$nstrata)) inc <- St[xx$jumps+1]*S0i[xx$jumps+1] ## new-strata names valjump <- vals1[xx$jumps+1] xxs <- xx$strata[xx$jumps+1] newstrata <- mystrata(list(id=xxs,exceed=valjump)) nnn <- !duplicated(newstrata$sindex) nnstrata <- attr(newstrata,"nlevel") newstrata <- newstrata$sindex exceed <- valjump[nnn]+1 if (!is.null(strata)) exceed.levels <- paste(base1$strata.level[xxs[nnn]+1], paste("Exceed",exceed,sep=">="),sep="-") else exceed.levels <- paste("Exceed",exceed,sep=">=") newstrata <- as.numeric(strata(xx$strata[xx$jumps+1],valjump))-1 nnstrata <- length(unique(newstrata)) pcumhaz <- cbind(x$jumptimes,cumsumstrata(inc,newstrata,nnstrata)) # }}} EN2 <- EN2[xx$jumps+1] mu <- mu[xx$jumps+1] cumhaz <- pcumhaz pstrata <- NULL out=list(cumhaz=cumhaz,time=cumhaz[,1],varN=EN2-mu^2,mu=mu, nstrata=nnstrata,strata=newstrata, strat.cox.name=base1$strata.name, strat.cox.level=base1$strata.level,exceed=exceed, jumps=1:nrow(cumhaz),riskstrata=pstrata,risktot=risktot, strata.name="",strata.level=exceed.levels) return(out) }# }}} ##' @export prob.exceedBiRecurrent <- function(data,type1,type2,km=TRUE,status="status",death="death", start="start",stop="stop",id="id",names.count="Count",exceed1=NULL,exceed2=NULL) {# {{{ formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~ cluster(",id,")",sep="")) form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~cluster(",id,")",sep="")) form2 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~cluster(",id,")",sep="")) ### ###form1C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~strata(",names.count,type1,",",names.count,type2,")+cluster(",id,")",sep="")) ###form2C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~ ### strata(",names.count,type1,",",names.count,type2,")+cluster(",id,")",sep="")) form2Ccc <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~ ",names.count,type1,"+",names.count,type2,"+"," strata(",names.count,type1,",",names.count,type2,")+cluster(",id,")",sep="")) form1Ccc <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~ ",names.count,type1,"+",names.count,type2,"+"," strata(",names.count,type1,",",names.count,type2,")+cluster(",id,")",sep="")) ### stratified and with counts in covariate matrix bb2.12 <- phreg(form2Ccc,data=data,no.opt=TRUE) bb1.12 <- phreg(form1Ccc,data=data,no.opt=TRUE) dr <- phreg(formdr,data=data) base1 <- phreg(form1,data=data) base2 <- phreg(form2,data=data) cc <- base1$cox.prep risk1 <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) ###### risk stratified after count 1 og count2 cc <- bb1.12$cox.prep risk1.12 <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) pstrata1 <- risk1.12/risk1 pstrata1[1] <- 0 cc <- base2$cox.prep risk2 <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) ###### risk stratified after count 1 og count2 cc <- bb2.12$cox.prep risk2.12 <- revcumsumstrata(cc$sign,cc$strata,cc$nstrata) pstrata2 <- risk2.12/risk2 pstrata2[1] <- 0 ### marginal int_0^t G(s) P(N1(t-)==k|D>t) \lambda_{1,N1=k}(s) ds ### strata og count skal passe sammen # {{{ strat <- dr$strata[dr$jumps] Gt <- exp(-dr$cumhaz[,2]) ### x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) x <- base1 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 mu <- c(cumsumstrata(St*S0i,rep(0,lss),1)) ### x <- bb1.12 xx1 <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx1$jumps+1] <- 1/x$S0 dcumhaz1 <- cbind(xx1$time,pstrata1*St*S0i) ### cumsumstrata(pstrata1*St*S0i,xx1$strata,xx1$nstrata)) x <- bb2.12 xx2 <- x$cox.prep lss <- length(xx2$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx2$jumps+1] <- 1/x$S0 dcumhaz2 <- cbind(xx2$time,pstrata2*St*S0i) ### cumsumstrata(pstrata2*St*S0i,xx2$strata,xx2$nstrata)) n1 <- length(xx1$jumps) n2 <- length(xx2$jumps) ojumps <- order(c(xx1$jumps,xx2$jumps)) jumps <- sort(c(xx1$jumps,xx2$jumps)) times <- xx1$time[jumps+1] dcumhaz1 <- dcumhaz1[jumps+1,] dcumhaz2 <- dcumhaz2[jumps+1,] x1 <- xx1$X[jumps+1,] x2 <- xx2$X[jumps+1,] ### dcumhaz1 <- dcumhaz1[xx1$jumps+1,] ### dcumhaz2 <- dcumhaz2[xx2$jumps+1,] ### x1 <- xx1$X[xx1$jumps+1,] ### x2 <- xx2$X[xx2$jumps+1,] # }}} if (is.null(exceed1)) exceed1 <- 1:max(x1[,1]) if (is.null(exceed2)) exceed2 <- 1:max(x1[,2]) pe1e2 <- matrix(0,n1+n2,length(exceed1)*length(exceed2)) m <- 0; nn <- c() for (i in exceed1) for (j in exceed2) { m <- m+1 strat1 <- (x1[,2]>=j)*(x1[,1]==(i-1)) strat2 <- (x2[,1]>=i)*(x2[,2]==(j-1)) pe1e2[,m] <- cumsum(strat1*dcumhaz1[,2]) + cumsum(strat2*dcumhaz2[,2]) nn <- c(nn,paste("N_1(t)>=",i,",N_2(t)>=",j,sep="")) } colnames(pe1e2) <- nn out=list(time=times,pe1e2=pe1e2,x1=x1,x2=x2, nstrata=base1$nstrata, strata.name=base1$strata.name,strata.level=base1$strata.levels) class(out) <- "BiRecurrent" return(out) }# }}} ##' @export plot.BiRecurrent <- function(x,stratas=NULL,add=FALSE,...) {# {{{ strat <- x$strata ## all strata if (is.null(stratas)) stratas <- 0:(x$nstrata-1) for (s in stratas) { if (add==FALSE) with(x, matplot(time[strata==s],pe1e2[strata==s,],type="s",...)) else with(x, matlines(time[strata==s],pe1e2[strata==s,],type="s",...)) nc <- ncol(x$pe1e2) legend("topleft",colnames(x$pe1e2),lty=1:nc,col=1:nc) } }# }}} ##' @export prob.exceedBiRecurrentStrata <- function(data,type1,type2,km=TRUE,status="status", death="death",start="start",stop="stop",id="id",names.count="Count", strata=NULL,twinstrata=FALSE,exceed1=NULL,exceed2=NULL) {# {{{ if (is.null(strata)) { formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~ cluster(",id,")",sep="")) ## use count and status as covariates to use later and get sorted as data form <- as.formula(paste("Surv(",start,",",stop,",",status,"!=0)~",status,"+",names.count,type1,"+",names.count,type2,"+cluster(",id,")",sep="")) } else { formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~strata(",strata,")+cluster(",id,")",sep="")) ## use count and status as covariates to use later and get sorted as data form <- as.formula(paste("Surv(",start,",",stop,",",status,"!=0)~",status,"+", names.count,type1,"+",names.count,type2,"+","strata(",strata,")+cluster(",id,")",sep="")) if (twinstrata) { ## to allow different strata for the two twins form <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~",status,"+", names.count,type1,"+",names.count,type2,"+","strata(",strata,type2,")+cluster(",id,")",sep="")) } } ###print(formdr); print(form) dr <- phreg(formdr,data=data) base <- phreg(form,data=data,no.opt=TRUE) ### P(N_1 >= k1, N2 >= k2) is estimated by ### sum_i int_0^t G_strat(s-) I(Ni1(t-)==k1-1,Ni2(t)>= k2) /Y_{strat} (s) dN_{i1,strat}(s) ### + sum_i int_0^t G_strat(s-) I(Ni1(t)>= k1,Ni2(t-)==k2-1) /Y_{strat} (s) dN_{i2,strat}(s) ### = sum_i int_0^t G_strat(s-) ( I(Ni1(t-)==k1-1,Ni2(t)>= k2,type=1) + I(Ni1(t)>= k1,Ni2(t-)==k2-1,type=2)) /Y_{strat} (s) dN_{i.,strat}(s) # {{{ strat <- dr$strata[dr$jumps] x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 if (!km) { cumhazD <- c(cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum) St <- exp(-cumhazD) } else St <- c(exp(cumsumstratasum(log(1-S0i),xx$strata,xx$nstrata)$lagsum)) xx <- base$cox.prep lss <- length(xx$strata) xxjump <- xx$jumps+1 S0i <- 1/base$S0 times <- base$jumptimes ## jumps for N1 and N2, sorted xxstrata <- xx$strata[xxjump] St <- St[xxjump] statusj <- xx$X[xxjump,1] count1 <- xx$X[xxjump,2] count2 <- xx$X[xxjump,3] if (is.null(exceed1)) { exceed1 <- sort(unique(count1))+1 } if (is.null(exceed2)) { exceed2 <- sort(unique(count2))+1 } n <- length(xxjump) m <- 1; nn <- c(); pe1e2 <- matrix(0,n,length(exceed1)*length(exceed2)) for (i in exceed1) for (j in exceed2) { escape <- (count2>=j)*(count1==(i-1))*(statusj==1)+(count1>=i)*(count2==(j-1))*(statusj==2) pe1e2[,m] <- cumsumstrata(escape*St*S0i,xxstrata,xx$nstrata) nn <- c(nn,paste("N_1(t)>=",i,",N_2(t)>=",j,sep="")) m <- m+1 } colnames(pe1e2) <- nn # }}} out=list(time=times,pe1e2=pe1e2,strata=xxstrata,nstrata=xx$nstrata, cumhazard=cbind(times,pe1e2), jumps=1:length(times), nstrata=xx$nstrata, strata.name=base$strata.name,strata.level=base$strata.levels) class(out) <- "BiRecurrent" return(out) }# }}} ##' Estimation of covariance for bivariate recurrent events with terminal event ##' ##' Estimation of probability of more that k events for recurrent events process ##' where there is terminal event ##' ##' @param data data-frame ##' @param type1 type of first event (code) related to status ##' @param type2 type of second event (code) related to status ##' @param status name of status ##' @param death name of death indicator ##' @param start start stop call of Hist() of prodlim ##' @param stop start stop call of Hist() of prodlim ##' @param id id ##' @param names.count name of count for number of previous event of different types, here generated by count.history() ##' @author Thomas Scheike ##' @references ##' Scheike, Eriksson, Tribler (2019) ##' The mean, variance and correlation for bivariate recurrent events ##' with a terminal event, JRSS-C ##' ##' @examples ##' ##' ######################################## ##' ## getting some data to work on ##' ######################################## ##' data(base1cumhaz) ##' data(base4cumhaz) ##' data(drcumhaz) ##' dr <- drcumhaz ##' base1 <- base1cumhaz ##' base4 <- base4cumhaz ##' rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=dr) ##' rr <- count.history(rr) ##' rr$strata <- 1 ##' dtable(rr,~death+status) ##' ##' covrp <- covarianceRecurrent(rr,1,2,status="status",death="death", ##' start="entry",stop="time",id="id",names.count="Count") ##' par(mfrow=c(1,3)) ##' plot(covrp) ##' ##' ### with strata, each strata in matrix column, provides basis for fast Bootstrap ##' covrpS <- covarianceRecurrentS(rr,1,2,status="status",death="death", ##' start="entry",stop="time",strata="strata",id="id",names.count="Count") ##' ##' @aliases plot.covariace.recurrent covarianceRecurrentS Bootcovariancerecurrence BootcovariancerecurrenceS ##' @export covarianceRecurrent <- function(data,type1,type2,status="status",death="death", start="start",stop="stop",id="id",names.count="Count") {# {{{ formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~ cluster(",id,")",sep="")) form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~cluster(",id,")",sep="")) form2 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~cluster(",id,")",sep="")) ### form1C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~strata(",names.count,type2,")+cluster(",id,")",sep="")) form2C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~strata(",names.count,type1,")+cluster(",id,")",sep="")) dr <- phreg(formdr,data=data) ###basehazplot.phreg(dr) ### base1 <- phreg(form1,data=data) base1.2 <- phreg(form1C,data=data) ### base2 <- phreg(form2,data=data) base2.1 <- phreg(form2C,data=data) ###marginal.mean1 <- recurrentMarginal(base1,dr) ###marginal.mean2 <- recurrentMarginal(base2,dr) marginal.mean1 <- recmarg(base1,dr) marginal.mean2 <- recmarg(base2,dr) cc <- base2$cox.prep risk <- c(revcumsumstrata(cc$sign,cc$strata,cc$nstrata)) ###### risk stratified after count 1 cc <- base2.1$cox.prep risk1 <- c(revcumsumstrata(cc$sign,cc$strata,cc$nstrata)) ssshed1 <- risk1/risk ssshed1[is.na(ssshed1)] <- 1 sshed1 <- list(cumhaz=cbind(cc$time,ssshed1), strata=cc$strata,nstrata=cc$nstrata, jumps=1:length(cc$time), strata.name=paste("prob",type1,sep=""), strata.level=base2.1$strata.level) ### riskstrata <- .Call("riskstrataR",cc$sign,cc$strata,cc$nstrata)$risk nrisk <- apply(riskstrata,2,revcumsumstrata,rep(0,nrow(riskstrata)),1) ntot <- apply(nrisk,1,sum) vals1 <- sort(unique(data[,paste("Count",type1,sep="")])) mean1risk <- apply(t(nrisk)*vals1,2,sum)/ntot mean1risk[is.na(mean1risk)] <- 0 cc <- base1$cox.prep S0 <- rep(0,length(cc$strata)) risk <- c(revcumsumstrata(cc$sign,cc$strata,cc$nstrata)) ### cc <- base1.2$cox.prep S0 <- rep(0,length(cc$strata)) risk2 <- c(revcumsumstrata(cc$sign,cc$strata,cc$nstrata)) ssshed2 <- risk2/risk ssshed2[is.na(ssshed2)] <- 1 ### sshed2 <- list(cumhaz=cbind(cc$time,ssshed2), strata=cc$strata,nstrata=cc$nstrata, jumps=1:length(cc$time), strata.name=paste("prob",type2,sep=""), strata.level=base1.2$strata.level) ### riskstrata <- .Call("riskstrataR",cc$sign,cc$strata,cc$nstrata)$risk nrisk <- apply(riskstrata,2,revcumsumstrata,rep(0,nrow(riskstrata)),1) ntot <- apply(nrisk,1,sum) vals2 <- sort(unique(data[,paste("Count",type2,sep="")])) mean2risk <- apply(t(nrisk)*vals2,2,sum)/ntot mean2risk[is.na(mean2risk)] <- 0 mu1 <-timereg::Cpred(rbind(c(0,0),marginal.mean1$cumhaz),cc$time)[,2] mu2 <-timereg::Cpred(rbind(c(0,0),marginal.mean2$cumhaz),cc$time)[,2] out <- list(based=dr,base1=base1,base2=base2, base1.2=base1.2,base2.1=base2.1, marginal.mean1=marginal.mean1,marginal.mean2=marginal.mean2, prob1=sshed1,prob2=sshed2, mean1risk=mean1risk,mean2risk=mean2risk) ### marginal sum_k int_0^t G(s) k P(N1(t-)==k|D>t) \lambda_{2,N1=k}(s) ds ### strata og count skal passe sammen # {{{ strat <- dr$strata[dr$jumps] Gt <- exp(-dr$cumhaz[,2]) ### x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 cumhazD <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) St <- exp(-cumhazD[,2]) ### x <- base1.2 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 xstrata <- xx$strata cumhazDR <- cbind(xx$time,cumsumstrata(vals2[xstrata+1]*St*ssshed2*S0i,rep(0,lss),1)) x <- base1 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 cumhazIDR <- cbind(xx$time,cumsumstrata(St*mean2risk*S0i,rep(0,lss),1)) mu1.i <- cumhazIDR[,2] mu1.2 <- cumhazDR[,2] ### x <- base2.1 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 cumhazDR <- cbind(xx$time,cumsumstrata(vals1[xx$strata+1]*St*ssshed1*S0i,rep(0,lss),1)) ### x <- base2 xx <- x$cox.prep lss <- length(xx$strata) S0i2 <- S0i <- rep(0,lss) S0i[xx$jumps+1] <- 1/x$S0 cumhazIDR <- cbind(xx$time,cumsumstrata(St*mean1risk*S0i,rep(0,lss),1)) mu2.i <- cumhazIDR[,2] mu2.1 <- cumhazDR[,2] # }}} out=c(out,list(EN1N2= mu1.2+mu2.1,mu2.1=mu2.1,mu1.2=mu1.2, mu2.i=mu2.i,mu1.i=mu1.i, EIN1N2=mu2.i+mu1.i,EN1EN2=mu1*mu2,time=cc$time)) class(out) <- "covariance.recurrent" return(out) }# }}} ##' @export plot.covariance.recurrent <- function(x,main="Covariance",these=1:3,...) {# {{{ legend <- NULL # to avoid R-check if ( 1 %in% these) { nna <- (!is.na(x$mu1.2)) & (!is.na(x$mu1.i)) mu1.2n <- x$mu1.2[nna] mu1.in <- x$mu1.i[nna] time <- x$time[nna] plot(time,mu1.2n,type="l",ylim=range(c(mu1.2n,mu1.in)),...) lines(time,mu1.in,col=2) legend("topleft",c(expression(integral(N[2](s)*dN[1](s),0,t)),"independence"),lty=1,col=1:2) title(main=main) } ### if (2 %in% these) { nna <- (!is.na(x$mu2.1)) & (!is.na(x$mu2.i)) mu2.1n <- x$mu2.1[nna] mu2.in <- x$mu1.i[nna] time <- x$time[nna] plot(time,mu2.1n,type="l",ylim=range(c(mu2.1n,mu2.in)),...) lines(time,mu2.in,col=2) legend("topleft",c(expression(integral(N[1](s)*dN[2](s),0,t)),"independence"),lty=1,col=1:2) title(main=main) } ### if (3 %in% these) { nna <- (!is.na(x$EN1N2)) & (!is.na(x$EIN1N2)) & (!is.na(x$EN1EN2)) EN1N2n <- x$EN1N2[nna] EIN1N2n <- x$EIN1N2[nna] EN1EN2n <- x$EN1EN2[nna] time <- x$time[nna] plot(time,EN1N2n,type="l",lwd=2,ylim=range(c(EN1N2n,EN1EN2n,EIN1N2n)),...) lines(time,EN1EN2n,col=2,lwd=2) lines(time,EIN1N2n,col=3,lwd=2) legend("topleft",c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty=1,col=1:3) title(main=main) } } # }}} meanRisk <- function(base1,base1.2) {# {{{ cc <- base1.2$cox.prep S0 <- rep(0,length(cc$strata)) mid <- max(cc$id)+1 risk2 <- revcumsumidstratasum(cc$sign,cc$id,mid,cc$strata,cc$nstrata)$sumidstrata means <- .Call("meanriskR",cc$sign,cc$id,mid,cc$strata,cc$nstrata) mean2risk <- means$meanrisk mean2risk[is.na(mean2risk)] <- 0 risk <- means$risk ssshed2 <- risk2/risk ssshed2[is.na(ssshed2)] <- 0 vals2 <- unique(cc$id) means2 <- list(cumhaz=cbind(cc$time,mean2risk), strata=cc$strata,nstrata=cc$nstrata, jumps=1:length(cc$time), strata.name="meansrisk", strata.level=base1.2$strata.level) sshed2 <- list(cumhaz=cbind(cc$time,ssshed2), strata=cc$id,nstrata=mid, jumps=1:length(cc$time), strata.name="prob", strata.level=paste(vals2),real.strata=cc$strata) return(list(meanrisk=means2,vals=vals2,probs=sshed2,jumps=cc$jumps+1)) }# }}} intN2dN1 <- function(dr,base1,base1.2,pm) {# {{{ x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 cumhazD <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) St <- exp(-cumhazD[,2]) ### x <- base1.2 xx <- x$cox.prep xstrata <- xx$id jumps <- xx$jumps+1 mid <- max(xx$id)+1 ## risk after both id~Count and strata risk2 <- revcumsumidstratasum(xx$sign,xx$id,mid,xx$strata,xx$nstrata)$sumidstrata S0i <- 1/risk2[jumps] vals <- xx$id[jumps] St <- St[jumps] probs <- pm$probs$cumhaz[jumps,2] cumhazDR <- cbind(xx$time[jumps],cumsumstrata(St*vals*probs*S0i,xx$strata[jumps],xx$nstrata)) x <- base1 xx <- x$cox.prep S0i <- c(1/x$S0) meanrisk <- pm$meanrisk$cumhaz[jumps,2] cumhazIDR <- cbind(xx$time[jumps],cumsumstrata(St*meanrisk*S0i,xx$strata[jumps],xx$nstrata)) mu1.i <- cumhazIDR[,2] mu1.2 <- cumhazDR[,2] return(list(cumhaz=cumhazDR,cumhazI=cumhazIDR,mu1.i=mu1.i,mu1.2=mu1.2, time=cumhazDR[,1], strata=xx$strata[jumps],nstrata=xx$nstrata,jumps=1:length(mu1.i), strata.name="intN2dN1",strata.level=x$strata.level)) }# }}} recmarg2 <- function(recurrent,death,...) {# {{{ xr <- recurrent dr <- death ### marginal expected events int_0^t G(s) \lambda_r(s) ds # {{{ x <- dr xx <- x$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 cumhazD <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) St <- exp(-cumhazD[,2]) ### x <- xr xx <- x$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) S0i <- 1/x$S0 jumps <- xx$jumps+1 cumhazDR <- cbind(xx$time[jumps],cumsumstrata(St[jumps]*S0i,xx$strata[jumps],xx$nstrata)) mu <- cumhazDR[,2] # }}} varrs <- data.frame(mu=mu,time=cumhazDR[,1],strata=xr$strata[jumps],St=St[jumps]) out <- list(mu=varrs$mu,times=varrs$time,St=varrs$St,cumhaz=cumhazDR, strata=varrs$strata,nstrata=xr$nstrata,jumps=1:nrow(varrs), strata.name=xr$strata.name) return(out) }# }}} ##' @export covarianceRecurrentS <- function(data,type1,type2,times=NULL,status="status",death="death", start="start",stop="stop",id="id",names.count="Count", strata="NULL",plot=0,output="matrix") {# {{{ if (is.null(times)) times <- seq(0,max(data[,stop]),length=100) ### passing strata as id to be able to use for stratified calculations if (is.null(strata)) stop("must give strata, for example one strata\n"); ## uses Counts1 as cluster to pass to risk set calculations formdr <- as.formula(paste("Surv(",start,",",stop,",",death,")~strata(",strata,")",sep="")) form1 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~strata(",strata,")",sep="")) form2 <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~strata(",strata,")",sep="")) ### form1C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type1,")~cluster(",names.count,type2,")+strata(",strata,")",sep="")) form2C <- as.formula(paste("Surv(",start,",",stop,",",status,"==",type2,")~cluster(",names.count,type1,")+strata(",strata,")",sep="")) dr <- phreg(formdr,data=data) ###basehazplot.phreg(dr) ### base1 <- phreg(form1,data=data) base1.2 <- phreg(form1C,data=data) ### base2 <- phreg(form2,data=data) base2.1 <- phreg(form2C,data=data) rm1 <- recmarg2(base1,dr) rm2 <- recmarg2(base2,dr) if (plot==1) { basehazplot.phreg(rm1) basehazplot.phreg(rm2) } pm1 <- meanRisk(base2,base2.1) pm2 <- meanRisk(base1,base1.2) if (plot==1) { basehazplot.phreg(pm1$meanrisk) basehazplot.phreg(pm2$meanrisk) } ### marginal sum_k int_0^t G(s) k P(N1(t-)==k|D>t) \lambda_{2,N1=k}(s) ds ### sum_k int_0^t G(s) E(N1(t-)==k|D>t) \lambda_{2}(s) ds iN2dN1 <- intN2dN1(dr,base1,base1.2,pm2) iN1dN2 <- intN2dN1(dr,base2,base2.1,pm1) ###print("hej") if (plot==1) { par(mfrow=c(2,2)) basehazplot.phreg(iN2dN1) plot(iN2dN1$time,iN2dN1$cumhazI[,2],type="l") basehazplot.phreg(iN1dN2) } #### writing output in matrix form for each strata for the times mu1g <- matrix(0,length(times),rm1$nstrata) mu2g <- matrix(0,length(times),rm1$nstrata) mu1.2 <- matrix(0,length(times),rm1$nstrata) mu2.1 <- matrix(0,length(times),rm1$nstrata) mu1.i <- matrix(0,length(times),rm1$nstrata) mu2.i <- matrix(0,length(times),rm1$nstrata) mu1 <- matrix(0,length(times),rm1$nstrata) mu2 <- matrix(0,length(times),rm1$nstrata) if (output=="matrix") { all <- c() i <- 1 ### going through strata for (i in 1:rm1$nstrata) { j <- i-1 mu1[,i] <- timereg::Cpred(rm1$cumhaz[rm1$strata==j,],times)[,2] mu2[,i] <- timereg::Cpred(rm2$cumhaz[rm2$strata==j,],times)[,2] mu1.2[,i] <- timereg::Cpred( iN2dN1$cumhaz[rm1$strata==j,],times)[,2] mu1.i[,i] <- timereg::Cpred(iN2dN1$cumhazI[rm1$strata==j,],times)[,2] mu2.1[,i] <- timereg::Cpred( iN1dN2$cumhaz[rm2$strata==j,],times)[,2] mu2.i[,i] <- timereg::Cpred(iN1dN2$cumhazI[rm2$strata==j,],times)[,2] } mu1mu2 <- mu1*mu2 out=c(list(EN1N2=mu1.2+mu2.1, EIN1N2=mu1.i+mu2.i, EN1EN2=mu1mu2, mu1.2=mu1.2, mu1.i=mu1.i, mu2.1=mu2.1, mu2.i=mu2.i, mu1=mu1,mu2=mu2, nstrata=rm1$nstrata, time=times)) } else out <- list(iN2dN1=iN2dN1,iN1dN2=iN1dN2,rm1=rm1,rm2=rm2,pm1=pm1,pm2=pm2) return(out) }# }}} ##' @export BootcovariancerecurrenceS <- function(data,type1,type2,status="status",death="death", start="start",stop="stop",id="id",names.count="Count",times=NULL,K=100) {# {{{ if (is.null(times)) times <- seq(0,max(data[,stop]),length=100) mu1.2 <- matrix(0,length(times),K) mu2.1 <- matrix(0,length(times),K) mu1.i <- matrix(0,length(times),K) mu2.i <- matrix(0,length(times),K) mupi <- matrix(0,length(times),K) mupg <- matrix(0,length(times),K) mu1mu2 <- matrix(0,length(times),K) n <- length(unique(data[,id])) formid <- as.formula(paste("~",id)) rrb <- blocksample(data, size = n*K, formid) rrb$strata <- floor((rrb[,id]-0.01)/n) rrb$jump <- (rrb[,status] %in% c(type1,type2)) | (rrb[,death]==1) rrb <- tie.breaker(rrb,status="jump",start=start,stop=stop,id=id) mm <- covarianceRecurrentS(rrb,type1,type2,status=status,death=death, start=start,stop=stop,id=id,names.count=names.count, strata="strata",times=times) mm <- c(mm,list(se.mui=apply(mm$EIN1N2,1,sd),se.mug=apply(mm$EN1N2,1,sd))) return(mm) }# }}} ##' @export Bootcovariancerecurrence <- function(data,type1,type2,status="status",death="death", start="start",stop="stop",id="id",names.count="Count",times=NULL,K=100) {# {{{ strata <- NULL # to avoid R-check if (is.null(times)) times <- seq(0,max(data[,stop]),length=100) mu1.2 <- matrix(0,length(times),K) mu2.1 <- matrix(0,length(times),K) mu1.i <- matrix(0,length(times),K) mu2.i <- matrix(0,length(times),K) mupi <- matrix(0,length(times),K) mupg <- matrix(0,length(times),K) mu1mu2 <- matrix(0,length(times),K) n <- length(unique(data[,id])) formid <- as.formula(paste("~",id)) rrb <- blocksample(data, size = n*K, formid) rrb$strata <- floor((rrb[,id]-0.01)/n) ## rrb$jump <- (rrb[,status]!=0) | (rrb[,death]==1) rrb$jump <- (rrb[,status] %in% c(type1,type2)) | (rrb[,death]==1) rrb <- tie.breaker(rrb,status="jump",start=start,stop=stop,id=id) for (i in 1:K) { rrbs <- subset(rrb,strata==i-1) errb <- covarianceRecurrent(rrbs,type1,type2,status=status,death=death, start=start,stop=stop,id=id,names.count=names.count) all <- timereg::Cpred(cbind(errb$time,errb$EIN1N2,errb$EN1N2,errb$EN1EN2, errb$mu1.2,errb$mu2.1,errb$mu1.i,errb$mu2.i),times) mupi[,i] <- all[,2] mupg[,i] <- all[,3] mu1mu2[,i] <- all[,4] mu1.2[,i] <- all[,5]; mu2.1[,i] <- all[,6]; mu1.i[,i] <- all[,7]; mu2.i[,i] <- all[,8] } return(list(mupi=mupi,mupg=mupg,mu1mu2=mu1mu2,time=times, EN1N2=mupg,EIN1N2=mupi,EN1EN=mu1mu2, mu1.2=mu1.2,mu1.i=mu1.i,mu2.1=mu2.1,mu2.i=mu1.i, mup=apply(mupi,1,mean),mug=apply(mupg,1,mean), dmupg=apply(mupg-mupi,1,mean),mmu1mu2=apply(mu1mu2,1,mean), se.mui=apply(mupi,1,sd),se.mug=apply(mupg,1,sd) ### se.dmug=apply(mupg-mu1mu2,1,sd),se.dmui=apply(mupi-mu1mu2,1,sd), ### se.difmugmup=apply(mupg-mupi,1,sd), se.mu1mu2=apply(mu1mu2,1,sd) )) }# }}} iidCovarianceRecurrent <- function (rec1,death,xrS,xr,means) {# {{{ ### makes iid decompition for covariance under independence between events axr <- rec1 adr <- death St <- exp(-adr$cum[, 2]) timesr <- axr$cum[, 1] timesd <- adr$cum[, 1] times <- c(timesr[-1], timesd[-1]) or <- order(times) times <- times[or] meano <- cbind(means$time,means$mean2risk) imeano <- sindex.prodlim(means$time, times, strict = FALSE) meano <- meano[imeano,2] keepr <- order(or)[1:length(timesr[-1])] rid <- sindex.prodlim(timesd, times, strict = FALSE) rir <- sindex.prodlim(timesr, times, strict = FALSE) Stt <- St[rid] ariid <- axr$cum[rir, 2] mu <- cumsum(meano * Stt * diff(c(0, ariid))) muS <- cumsum( Stt * diff(c(0, ariid))) nc <- length(axr$B.iid) muiid <- matrix(0, length(times), nc) cc <- xrS$cox.prep rrs <- .Call("riskstrataR",cc$sign*cc$strata,cc$id,max(cc$id)+1)$risk rr <- .Call("riskstrataR",cc$sign,cc$id,max(cc$id)+1)$risk ntot <- revcumsumstrata(cc$sign,rep(0,nrow(rr)),1) rr <- apply(rr,2,revcumsumstrata,rep(0,nrow(rr)),1) rrs <- apply(rrs,2,revcumsumstrata,rep(0,nrow(rr)),1) xrid <- sindex.prodlim(cc$time, times, strict = FALSE) rr <- rr[xrid,] rrs <- rrs[xrid,] ntot <- ntot[xrid] rrs <- apply(Stt* diff(c(0,ariid))*rrs,2,cumsum) ### dmu <- diff(c(0,mu)) rrcum <- apply(Stt*meano*diff(c(0,ariid))*rr,2,cumsum) miid <- (rrs-rrcum)/ntot for (i in 1:nc) { mriid <- axr$B.iid[[i]] mdiid <- adr$B.iid[[i]] mriid <- mriid[rir] mdiid <- mdiid[rid] dmridd <- diff(c(0, mriid)) dmdidd <- diff(c(0, mdiid)) muiid[, i] <- cumsum(Stt * meano* dmridd) - mu * cumsum(dmdidd) + cumsum(mu * dmdidd) + miid[,i] } var1 <- apply(muiid^2, 1, sum) se.mu <- var1[keepr]^0.5 mu = mu[keepr] timeso <- times times <- times[keepr] out = list(iidtimes=timeso,muiid=muiid,times=times, mu = mu, var.mu = var1[keepr], se.mu = se.mu, St = St, Stt = Stt[keepr], cumhaz=cbind(times,mu),se.cumhaz=cbind(times,se.mu), nstrata=1,strata=rep(0,length(mu)),jumps=1:length(mu)) }# }}} mets/R/phreg.R0000644000176200001440000020335513623061405012663 0ustar liggesusers###{{{ phreg0 phreg0 <- function(X,entry,exit,status,id=NULL,strata=NULL,beta,stderr=TRUE,method="NR",...) {# {{{ p <- ncol(X) if (missing(beta)) beta <- rep(0,p) if (p==0) X <- cbind(rep(0,length(exit))) if (!is.null(strata)) { # {{{ stratalev <- levels(strata) strataidx <- lapply(stratalev,function(x) which(strata==x)) if (!all(unlist(lapply(strataidx,function(x) length(x)>0)))) stop("Strata without any observation") dd <- lapply(strataidx, function(ii) { entryi <- entry[ii] trunc <- !is.null(entryi) if (!trunc) entryi <- rep(0,length(exit[ii])) .Call("FastCoxPrep", entryi,exit[ii],status[ii], as.matrix(X)[ii,,drop=FALSE], id[ii], trunc, PACKAGE="mets") }) if (!is.null(id)) id <- unlist(lapply(dd,function(x) x$id[x$jumps+1])) obj <- function(pp,U=FALSE,all=FALSE) { val <- lapply(dd,function(d) with(d, .Call("FastCoxPL",pp,X,XX,sign,jumps,PACKAGE="mets"))) ploglik <- Reduce("+",lapply(val,function(x) x$ploglik)) gradient <- Reduce("+",lapply(val,function(x) x$gradient)) hessian <- Reduce("+",lapply(val,function(x) x$hessian)) if (all) { U <- do.call("rbind",lapply(val,function(x) x$U)) hessiantime <- do.call("rbind",lapply(val,function(x) x$hessianttime)) time <- lapply(dd,function(x) x$time[x$ord+1]) ord <- lapply(dd,function(x) x$ord+1) jumps <- lapply(dd,function(x) x$jumps+1) jumptimes <- lapply(dd,function(x) x$time[x$ord+1][x$jumps+1]) S0 <- lapply(val,function(x) x$S0) nevent <- unlist(lapply(S0,length)) return(list(ploglik=ploglik,gradient=gradient,hessian=hessian, U=U,S0=S0,nevent=nevent,hessianttime=hessiantime, ord=ord,time=time,jumps=jumps,jumptimes=jumptimes)) } structure(-ploglik,gradient=-gradient,hessian=-hessian) }# }}} } else { # {{{ trunc <- !is.null(entry) if (!trunc) entry <- rep(0,length(exit)) system.time(dd <- .Call("FastCoxPrep", entry,exit,status,X, as.integer(seq_along(entry)), !is.null(entry), PACKAGE="mets")) if (!is.null(id)) id <- dd$id[dd$jumps+1] obj <- function(pp,U=FALSE,all=FALSE) { val <- with(dd, .Call("FastCoxPL",pp,X,XX,sign,jumps,PACKAGE="mets")) if (all) { val$time <- dd$time[dd$ord+1] val$ord <- dd$ord+1 val$jumps <- dd$jumps+1 val$jumptimes <- val$time[val$jumps] val$nevent <- length(val$S0) return(val) } with(val, structure(-ploglik, gradient=-gradient, hessian=-hessian)) } }# }}} opt <- NULL if (p>0) { if (tolower(method)=="nr") { opt <- lava::NR(beta,obj,...) opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; names(cc) <- colnames(X) if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else { val <- obj(0,all=TRUE) val[c("ploglik","gradient","hessian","U")] <- NULL } ### computes Breslow estimator cumhaz <- NULL res <- c(val, list(strata=strata, entry=entry, exit=exit, status=status, p=p, X=X, id=id, opt=opt,cum=cumhaz)) class(res) <- "phreg" res } # }}} ###}}} phreg0 ###{{{ phreg01 phreg01 <- function(X,entry,exit,status,id=NULL,strata=NULL,offset=NULL,weights=NULL, strata.name=NULL,cumhaz=TRUE, beta,stderr=TRUE,method="NR",no.opt=FALSE,Z=NULL,propodds=NULL,AddGam=NULL, case.weights=NULL,...) { p <- ncol(X) if (missing(beta)) beta <- rep(0,p) if (p==0) X <- cbind(rep(0,length(exit))) if (is.null(strata)) { strata <- rep(0,length(exit)); nstrata <- 1; strata.level <- NULL; } else { strata.level <- levels(strata) ustrata <- sort(unique(strata)) nstrata <- length(ustrata) strata.values <- ustrata if (is.numeric(strata)) strata <- fast.approx(ustrata,strata)-1 else { strata <- as.integer(factor(strata,labels=seq(nstrata)))-1 } } if (is.null(offset)) offset <- rep(0,length(exit)) if (is.null(weights)) weights <- rep(1,length(exit)) strata.call <- strata Zcall <- matrix(1,1,1) ## to not use for ZX products when Z is not given if (!is.null(Z)) Zcall <- Z ## possible casewights to use for bootstrapping and other things if (is.null(case.weights)) case.weights <- rep(1,length(exit)) trunc <- (!is.null(entry)) if (!trunc) entry <- rep(0,length(exit)) if (!is.null(id)) { ids <- unique(id) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(entry))-1; ## orginal id coding into integers id.orig <- id+1; dd <- .Call("FastCoxPrepStrata", entry,exit,status,X, id, trunc,strata,weights,offset,Zcall,case.weights,PACKAGE="mets") dd$nstrata <- nstrata obj <- function(pp,U=FALSE,all=FALSE) {# {{{ if (is.null(propodds) & is.null(AddGam)) val <- with(dd, .Call("FastCoxPLstrata",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX,caseweights,PACKAGE="mets")) else if (is.null(AddGam)) val <- with(dd, .Call("FastCoxPLstrataPO",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX,propodds,PACKAGE="mets")) else val <- with(dd, .Call("FastCoxPLstrataAddGam",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX, AddGam$theta,AddGam$dimthetades,AddGam$thetades,AddGam$ags,AddGam$varlink,AddGam$dimjumprv,AddGam$jumprv,AddGam$JumpsCauses,PACKAGE="mets")) if (all) { val$time <- dd$time val$ord <- dd$ord+1 val$jumps <- dd$jumps+1 val$jumptimes <- val$time[val$jumps] val$weightsJ <- dd$weights[val$jumps] val$case.weights <- dd$case.weights[val$jumps] val$strata.jumps <- val$strata[val$jumps] val$nevent <- length(val$S0) val$nstrata <- dd$nstrata val$strata <- dd$strata return(val) } with(val,structure(-ploglik,gradient=-gradient,hessian=-hessian)) }# }}} opt <- NULL if (p>0) { if (no.opt==FALSE) { if (tolower(method)=="nr") { tim <- system.time(opt <- lava::NR(beta,obj,...)) opt$timing <- tim opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; names(cc) <- colnames(X) if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(0,all=TRUE) } se.cumhaz <- lcumhaz <- lse.cumhaz <- NULL II <- NULL ### computes Breslow estimator if (cumhaz==TRUE) { # {{{ if (no.opt==FALSE & p!=0) { II <- - tryCatch(solve(val$hessian),error= function(e) matrix(0,nrow(val$hessian),ncol(val$hessian)) ) } else II <- matrix(0,p,p) strata <- val$strata[val$jumps] nstrata <- val$nstrata jumptimes <- val$jumptimes ## Brewslow estimator cumhaz <- cbind(jumptimes,cumsumstrata(1/val$S0,strata,nstrata)) if ((no.opt==FALSE & p!=0)) { DLambeta.t <- apply(val$E/c(val$S0),2,cumsumstrata,strata,nstrata) varbetat <- rowSums((DLambeta.t %*% II)*DLambeta.t) ### covv <- apply(covv*DLambeta.t,1,sum) Covariance is "0" by construction } else varbetat <- 0 var.cumhaz <- cumsumstrata(1/val$S0^2,strata,nstrata)+varbetat se.cumhaz <- cbind(jumptimes,(var.cumhaz)^.5) colnames(cumhaz) <- c("time","cumhaz") colnames(se.cumhaz) <- c("time","se.cumhaz") } # }}} else {cumhaz <- se.cumhaz <- lcumhaz <- lse.cumhaz <- NULL} res <- c(val, list(cox.prep=dd, strata.call=strata.call, strata.level=strata.level, entry=entry, exit=exit, status=status, p=p, X=X, offsets=offset, weights=weights, id=id.orig, opt=opt, cumhaz=cumhaz, se.cumhaz=se.cumhaz, lcumhaz=lcumhaz, lse.cumhaz=lse.cumhaz, II=II,strata.name=strata.name,propodds=propodds)) class(res) <- "phreg" res } ###}}} phreg0 ###{{{ phreg ##' Fast Cox PH regression ##' ##' Fast Cox PH regression ##' Robust variance is default variance with the summary. ##' ##' influence functions (iid) will follow numerical order of given cluster variable ##' so ordering after $id will give iid in order of data-set. ##' ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param offset offsets for cox model ##' @param weights weights for Cox score equations ##' @param ... Additional arguments to lower level funtions ##' @author Klaus K. Holst, Thomas Scheike ##' @aliases phreg phreg.par robust.phreg readPhreg ##' @examples ##' data(TRACE) ##' dcut(TRACE) <- ~. ##' out1 <- phreg(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) ##' ## tracesim <- timereg::sim.cox(out1,1000) ##' ## sout1 <- phreg(Surv(time,status==1)~vf+chf+strata(wmicat.4),data=tracesim) ##' ## robust standard errors default ##' summary(out1) ##' ##' par(mfrow=c(1,2)) ##' bplot(out1) ##' ## bplot(sout1,se=TRUE) ##' ##' ## computing robust variance for baseline ##' rob1 <- robust.phreg(out1) ##' bplot(rob1,se=TRUE,robust=TRUE) ##' ##' ## making iid decomposition of regression parameters ##' betaiiid <- iid(out1) ##' ##' @export phreg <- function(formula,data,offset=NULL,weights=NULL,...) {# {{{ cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (!is.Surv(Y)) stop("Expected a 'Surv'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} ### if (!is.null(attributes(Terms)$specials$offset)) { ### ts <- survival::untangle.specials(Terms, "offset") ### pos.offset <- ts$terms ### Terms <- Terms[-ts$terms] ### offset <- m[[ts$vars]] ### } else pos.offset <- NULL X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) res <- c(phreg01(X,entry,exit,status,id,strata,offset,weights,strata.name,...), list(call=cl,model.frame=m,formula=formula,strata.pos=pos.strata,cluster.pos=pos.cluster)) class(res) <- "phreg" res }# }}} ##' @export readPhreg <- function (object, newdata, nr=TRUE, ...) {# {{{ exit <- entry <- status <- clusters <- NULL if (missing(newdata)) { # {{{ X <- object$X strataNew <- object$strata if (!nr) { exit <- object$exit; entry <- object$entry; status <- object$status; clusters <- object$id } } else { ## make design for newdata xlev <- lapply(object$model.frame,levels) ff <- unlist(lapply(object$model.frame,is.factor)) upf <- update(object$formula,~.) tt <- terms(upf) if (nr) tt <- delete.response(tt) X <- model.matrix(tt,data=newdata,xlev=xlev)[,-1,drop=FALSE] if (!nr) { allvar <- all.vars(tt) pr <- length(allvar)-ncol(object$model.frame)+1 if (pr==2) { exit <- newdata[,allvar[1]] status <- newdata[,allvar[2]] } else { entry <- newdata[,allvar[1]] exit <- newdata[,allvar[2]] status <- newdata[,allvar[3]] } } clusterTerm<- grep("^cluster[(][A-z0-9._:]*",colnames(X),perl=TRUE) ## remove clusterTerm from design if (length(clusterTerm)==1) { clusters <- X[,clusterTerm] X <- X[,-clusterTerm,drop=FALSE] id <- clusters id.orig <- id; if (!is.null(id)) { ids <- unique(id) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } clusters <- id } else clusters <- (1:nrow(newdata))-1 } strataTerm<- grep("^strata[(][A-z0-9._:]*",colnames(X),perl=TRUE) ## remove strataTerm from design, and construct numeric version of strata if (length(strataTerm)>=1) { strataNew <- X[,strataTerm,drop=FALSE] if (length(strataTerm)>=1) { ## construct strata levels numeric strataNew <- c(strataNew %*% seq(1,length(strataTerm))) } X <- X[,-strataTerm,drop=FALSE] } else strataNew <- rep(0,nrow(X)) }# }}} return(list(X=X,strata=strataNew,entry=entry,exit=exit,status=status, clusters=clusters)) }# }}} ###}}} phreg ###{{{ phregR ##' Fast Cox PH regression and calculations done in R to make play and adjustments easy ##' ##' Fast Cox PH regression with R implementation to play and adjust in R function: FastCoxPLstrataR ##' ##' Robust variance is default variance with the summary. ##' ##' influence functions (iid) will follow numerical order of given cluster variable ##' so ordering after $id will give iid in order of data-set. ##' ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param offset offsets for cox model ##' @param weights weights for Cox score equations ##' @param ... Additional arguments to lower level funtions ##' @author Klaus K. Holst, Thomas Scheike ##' @aliases FastCoxPLstrataR ##' ##' @export phregR <- function(formula,data,offset=NULL,weights=NULL,...) {# {{{ cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (!is.Surv(Y)) stop("Expected a 'Surv'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} ### if (!is.null(attributes(Terms)$specials$offset)) { ### ts <- survival::untangle.specials(Terms, "offset") ### pos.offset <- ts$terms ### Terms <- Terms[-ts$terms] ### offset <- m[[ts$vars]] ### } else pos.offset <- NULL X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) res <- c(phreg01R(X,entry,exit,status,id,strata,offset,weights,strata.name,...), list(call=cl,model.frame=m,formula=formula,strata.pos=pos.strata,cluster.pos=pos.cluster)) class(res) <- "phreg" res }# }}} phreg01R <- function(X,entry,exit,status,id=NULL,strata=NULL,offset=NULL,weights=NULL, strata.name=NULL,cumhaz=TRUE, beta,stderr=TRUE,method="NR",no.opt=FALSE,Z=NULL,propodds=NULL,AddGam=NULL, case.weights=NULL,...) {# {{{ p <- ncol(X) if (missing(beta)) beta <- rep(0,p) if (p==0) X <- cbind(rep(0,length(exit))) if (is.null(strata)) { strata <- rep(0,length(exit)); nstrata <- 1; strata.level <- NULL; } else { strata.level <- levels(strata) ustrata <- sort(unique(strata)) nstrata <- length(ustrata) strata.values <- ustrata if (is.numeric(strata)) strata <- fast.approx(ustrata,strata)-1 else { strata <- as.integer(factor(strata,labels=seq(nstrata)))-1 } } if (is.null(offset)) offset <- rep(0,length(exit)) if (is.null(weights)) weights <- rep(1,length(exit)) strata.call <- strata Zcall <- matrix(1,1,1) ## to not use for ZX products when Z is not given if (!is.null(Z)) Zcall <- Z ## possible casewights to use for bootstrapping and other things if (is.null(case.weights)) case.weights <- rep(1,length(exit)) trunc <- (!is.null(entry)) if (!trunc) entry <- rep(0,length(exit)) if (!is.null(id)) { ids <- unique(id) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(entry))-1; ## orginal id coding into integers id.orig <- id+1; dd <- .Call("FastCoxPrepStrata", entry,exit,status,X, id,trunc,strata,weights,offset,Zcall,case.weights,PACKAGE="mets") dd$nstrata <- nstrata obj <- function(pp,U=FALSE,all=FALSE) {# {{{ if (is.null(propodds) & is.null(AddGam)) cc <- system.time( val <- with(dd, FastCoxPLstrataR(pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX,caseweights)) ) else if (is.null(AddGam)) val <- with(dd, .Call("FastCoxPLstrataPO",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX,propodds,PACKAGE="mets")) else val <- with(dd, .Call("FastCoxPLstrataAddGam",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX, AddGam$theta,AddGam$dimthetades,AddGam$thetades,AddGam$ags,AddGam$varlink,AddGam$dimjumprv,AddGam$jumprv,AddGam$JumpsCauses,PACKAGE="mets")) ### ccR <- ### system.time( ### valR <- with(dd, .Call("FastCoxPLstrata",pp,X,XX,sign,jumps, strata,nstrata,weights,offset,ZX,caseweights, ### PACKAGE="mets")) ### ) ### print(cc) ### print(ccR) if (all) { val$time <- dd$time val$ord <- dd$ord+1 val$jumps <- dd$jumps+1 val$jumptimes <- val$time[val$jumps] val$weightsJ <- dd$weights[val$jumps] val$case.weights <- dd$case.weights[val$jumps] val$strata.jumps <- val$strata[val$jumps] val$nevent <- length(val$S0) val$nstrata <- dd$nstrata val$strata <- dd$strata return(val) } with(val,structure(-ploglik,gradient=-gradient,hessian=-hessian)) }# }}} opt <- NULL if (p>0) { if (no.opt==FALSE) { if (tolower(method)=="nr") { tim <- system.time(opt <- lava::NR(beta,obj,...)) opt$timing <- tim opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; names(cc) <- colnames(X) if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(0,all=TRUE) } se.cumhaz <- lcumhaz <- lse.cumhaz <- NULL II <- NULL ### computes Breslow estimator if (cumhaz==TRUE) { # {{{ if (no.opt==FALSE & p!=0) { II <- - tryCatch(solve(val$hessian),error= function(e) matrix(0,nrow(val$hessian),ncol(val$hessian)) ) } else II <- matrix(0,p,p) strata <- val$strata[val$jumps] nstrata <- val$nstrata jumptimes <- val$jumptimes ## Brewslow estimator cumhaz <- cbind(jumptimes,cumsumstrata(1/val$S0,strata,nstrata)) if ((no.opt==FALSE & p!=0)) { DLambeta.t <- apply(val$E/c(val$S0),2,cumsumstrata,strata,nstrata) varbetat <- rowSums((DLambeta.t %*% II)*DLambeta.t) ### covv <- apply(covv*DLambeta.t,1,sum) Covariance is "0" by construction } else varbetat <- 0 var.cumhaz <- cumsumstrata(1/val$S0^2,strata,nstrata)+varbetat se.cumhaz <- cbind(jumptimes,(var.cumhaz)^.5) colnames(cumhaz) <- c("time","cumhaz") colnames(se.cumhaz) <- c("time","se.cumhaz") } # }}} else {cumhaz <- se.cumhaz <- lcumhaz <- lse.cumhaz <- NULL} res <- c(val, list(cox.prep=dd, strata.call=strata.call, strata.level=strata.level, entry=entry, exit=exit, status=status, p=p, X=X, offsets=offset, weights=weights, id=id.orig, opt=opt, cumhaz=cumhaz, se.cumhaz=se.cumhaz, lcumhaz=lcumhaz, lse.cumhaz=lse.cumhaz, II=II,strata.name=strata.name,propodds=propodds)) class(res) <- "phreg" res }# }}} ##' @export FastCoxPLstrataR <- function(beta, X, XX, Sign, Jumps, strata, nstrata, weights, offsets, ZX, caseweights) {# {{{ p=length(beta) strata=c(strata) Xb = c(X %*% beta+offsets) eXb = c(exp(Xb)*weights); if (nrow((Sign))==length(eXb)) { ## Truncation eXb = c(Sign)*eXb; } S0 = c(revcumsumstrata(eXb,strata,nstrata)) E=apply(eXb*X,2,revcumsumstrata,strata,nstrata)/S0; Jumps=Jumps+1 E = E[Jumps,]; E2=.Call("vecMatMat",E,E)$vXZ; XX2=apply(XX*eXb,2,revcumsumstrata,strata,nstrata)/S0; ## mat XX2=revcumsumstrataMatCols(XX,eXb,S0,strata,nstrata); XX2 = XX2[Jumps,]; weightsJ=weights[Jumps]; caseweightsJ=caseweights[Jumps]; S0 = S0[Jumps]; grad = (X[Jumps,]-E); ## Score val = (Xb[Jumps]-log(S0)); ## Partial log-likelihood ## colvec iweightsJ=1/weightsJ; S02 = S0/(caseweightsJ*weightsJ); ## S0 with weights to estimate baseline grad2= grad*(caseweightsJ*weightsJ); ## score with weights gradient=apply(grad2,2,sum) val2 = caseweightsJ*weightsJ*val; ## Partial log-likelihood with weights hesst = -(XX2-E2); ## hessian contributions in jump times ### hess = matrix(apply(hesst,2,sum),p,p); hesst2 = hesst*(caseweightsJ*weightsJ); ## hessian over time with weights hess2 = matrix(apply(hesst2,2,sum),p,p); ## hessian with weights out=list(jumps=Jumps, ploglik=sum(val2),U=grad2, gradient=matrix(gradient,1,p), hessian=hess2, hessianttime=hesst2, S2S0=XX2, E=E, S0=S02 ) return(out) }# }}} ###}}} ###{{{ simcox ##' @export simCox <- function(n=1000, seed=1, beta=c(1,1), entry=TRUE) { if (!is.null(seed)) set.seed(seed) m <- lvm() regression(m,T~X1+X2) <- beta distribution(m,~T+C) <- coxWeibull.lvm(scale=1/100) distribution(m,~entry) <- coxWeibull.lvm(scale=1/10) m <- eventTime(m,time~min(T,C=0),"status") d <- sim(m,n); if (!entry) d$entry <- 0 else d <- subset(d, time>entry,select=-c(T,C)) return(d) } ###}}} simcox ###{{{ vcov ##' @export vcov.phreg <- function(object,...) { res <- crossprod(ii <- iid(object,...)) attributes(res)$ncluster <- attributes(ii)$ncluster attributes(res)$invhess <- attributes(ii)$invhess colnames(res) <- rownames(res) <- names(coef(object)) res } ###}}} vcov ###{{{ coef ##' @export coef.phreg <- function(object,...) { object$coef } ###}}} coef ###{{{ iid & Robust variances ##' @export iid.phreg <- function(x,type="robust",all=FALSE,...) {# {{{ invhess <- -solve(x$hessian) orig.order <- FALSE if (is.null(x$propodds)) { if (type=="robust") { # {{{ cox model xx <- x$cox.prep ii <- invhess S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U cumhaz <- cbind(xx$time,cumsumstrata(S0i,xx$strata,xx$nstrata)) EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) ### Martingale as a function of time and for all subjects to handle strata MGt <- U[,drop=FALSE]-(Z*cumhaz[,2]-EdLam0)*rr*c(xx$weights) if (orig.order) { oo <- (1:nrow(xx$X))[xx$ord+1] oo <- order(oo) ### back to order of iid variable MGt <- MGt[oo,,drop=FALSE] ## sum after id later so not needed id <- xx$id[oo] } else id <- xx$id } else { MGt <- x$U; MG.base <- 1/x$S0; }# }}} } else { if (type=="robust") { # {{{ prop-odds model logitSurv xx <- x$cox.prep ii <- invhess S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 Z <- xx$X U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U cumhazA <- cumsumstratasum(S0i,xx$strata,xx$nstrata,type="all") cumhaz <- c(cumhazA$sum) cumhazm <- cumhazA$lagsum ### EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) rro <- c(exp(Z %*% coef(x) + xx$offset)) S0star <- revcumsumstrata(rr/(1+rro*cumhazm),xx$strata,xx$nstrata) S0 <- revcumsumstrata(rr,xx$strata,xx$nstrata) S1 <- apply(Z*rr,2,revcumsumstrata,xx$strata,xx$nstrata) Et <- S1/c(S0) lt <- apply((Z-Et)*c(rr*rro/(1+rro*cumhazm)),2,revcumsumstrata,xx$strata,xx$nstrata) Estar <- S0star/S0 EstardLam <- cumsumstrata(Estar*S0i,xx$strata,xx$nstrata) k <- exp(-EstardLam) basecor <- apply(lt*c(k*S0i),2,revcumsumstrata,xx$strata,xx$nstrata) basecor <- basecor/c(k*S0) www <- x$propoddsW*x$weightsJ U[xx$jumps+1,] <- U[xx$jumps+1,] - c(www)* basecor[xx$jumps+1,] baseDLam0 <- apply(basecor*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### Martingale as a function of time and for all subjects to handle strata MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0-baseDLam0)*rr*c(xx$weights) if (orig.order) { oo <- (1:nrow(xx$X))[xx$ord+1] oo <- order(oo) ### back to order of data-set MGt <- MGt[oo,,drop=FALSE] id <- xx$id[oo] } else id <- xx$id } else { MGt <- x$U; MG.base <- 1/x$S0; }# }}} } ncluster <- NULL if (type=="robust" & (!is.null(x$id) | any(x$entry>0))) { if (type=="martingale") id <- x$id[x$jumps] ### ii <- mets::cluster.index(id) UU <- apply(MGt,2,sumstrata,id,max(id)+1) ### names of clusters given in call if (!is.null(x$id)) rownames(UU) <- unique(x$id) ncluster <- nrow(UU) } else { UU <- MGt } structure(UU%*%invhess,invhess=invhess,ncluster=ncluster) } # }}} ##' @export residuals.phreg <- function(object,cumsum=FALSE,...) {# {{{ orig.order <- FALSE x <- object if (is.null(x$propodds)) { # {{{ cox model xx <- x$cox.prep dN <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 dN[xx$jumps+1] <- 1 cumhaz <- cumsumstrata(S0i,xx$strata,xx$nstrata) Z <- xx$X ### EdLam0 <- apply(S0i,2,cumsumstrata,xx$strata,xx$nstrata) if (is.null(coef(x))) rr <- c(xx$sign*exp(xx$offset)) else rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) ### dMartingale as a function of time and for all subjects to handle strata Lamt <- (cumhaz)*rr*c(xx$weights) dMGt <- dN-Lamt if (orig.order) { oo <- (1:nrow(xx$X))[xx$ord+1] oo <- order(oo) ### back to order of iid variable dMGt <- dMGt[oo,,drop=FALSE] ## sum after id later so not needed id <- xx$id[oo] } else id <- xx$id } else { ## }}} # {{{ prop-odds model logitSurv xx <- x$cox.prep dN <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 dN[xx$jumps+1] <- 1 U <- E <- matrix(0,nrow(xx$X),x$p) E[xx$jumps+1,] <- x$E U[xx$jumps+1,] <- x$U S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/x$S0 cumhazA <- cumsumstratasum(S0i,xx$strata,xx$nstrata,type="all") cumhaz <- c(cumhazA$sum) cumhazm <- cumhazA$lagsum ### EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) rr <- c(xx$sign*exp(Z %*% coef(x) + xx$offset)) rro <- c(exp(Z %*% coef(x) + xx$offset)) S0star <- revcumsumstrata(rr/(1+rro*cumhazm),xx$strata,xx$nstrata) S0 <- revcumsumstrata(rr,xx$strata,xx$nstrata) S1 <- apply(Z*rr,2,revcumsumstrata,xx$strata,xx$nstrata) Et <- S1/c(S0) lt <- apply((Z-Et)*c(rr*rro/(1+rro*cumhazm)),2,revcumsumstrata,xx$strata,xx$nstrata) Estar <- S0star/S0 EstardLam <- cumsumstrata(Estar*S0i,xx$strata,xx$nstrata) k <- exp(-EstardLam) basecor <- apply(lt*c(k*S0i),2,revcumsumstrata,xx$strata,xx$nstrata) basecor <- basecor/c(k*S0) www <- x$propoddsW*x$weightsJ U[xx$jumps+1,] <- U[xx$jumps+1,] - c(www)* basecor[xx$jumps+1,] baseDLam0 <- apply(basecor*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### Martingale as a function of time and for all subjects to handle strata MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0-baseDLam0)*rr*c(xx$weights) if (orig.order) { oo <- (1:nrow(xx$X))[xx$ord+1] oo <- order(oo) ### back to order of data-set MGt <- MGt[oo,,drop=FALSE] id <- xx$id[oo] } else id <- xx$id }# }}} ncluster <- NULL if (!cumsum) { mid <- max(id)+1 Mt <- sumstrata(dMGt,id,mid) cumhaz <- sumstrata(Lamt,id,mid) ### names of clusters given in call ### if (!is.null(x$id)) names(Mt) <- unique(x$id) ### if (!is.null(x$id)) names(cumhaz) <- unique(x$id) ### ncluster <- nrow(UU) out <- list(residuals=c(Mt),cumhaz=c(cumhaz)) } else { mid <- max(id)+1 out <- data.frame(dMGt=c(dMGt),Lamt=Lamt,status=dN, time=c(xx$time),id=c(xx$id)+1,sign=xx$sign) dsort(out) <- ~time+status+id-sign Mt <- cumsumstrata(out$dMGt,out$id-1,mid) cumhaz <- cumsumstrata(out$Lamt,out$id-1,mid) out <- cbind(out,Mt,cumhaz) out <- subset(out,sign==1) ddrop(out) <- ~sign+dMGt+Lamt } return(out) } # }}} ##' @export robust.basehaz.phreg <- function(x,type="robust",fixbeta=NULL,...) {# {{{ IsdM <- squareintHdM(x,ft=NULL,fixbeta=fixbeta,...) ### varA <- IsdM$varInt[x$jumps] strata <- x$strata[x$jumps] cumhaz <- x$cumhaz se.cumhaz <- cbind(cumhaz[,1],varA^.5) colnames(se.cumhaz) <- c("time","se.cumhaz") return(list(cumhaz=cumhaz,se.cumhaz=se.cumhaz,strata=strata)) } # }}} ##' @export robust.phreg robust.phreg <- function(x,fixbeta=NULL,...) { if (is.null(fixbeta)) if (is.null(x$opt) | is.null(x$coef)) fixbeta<- 1 else fixbeta <- 0 if (fixbeta==0) { gamma.iid <- iid.phreg(x) robvar <- crossprod(gamma.iid) } else robvar <- gamma.iid <- NULL baseline <- robust.basehaz.phreg(x,fixbeta=fixbeta,...); ## add arguments so that we can call basehazplot.phreg res <- c(x,list(gamma.iid=gamma.iid,robvar=robvar,robse.cumhaz=baseline$se.cumhaz)) class(res) <- "phreg" return(res) } ###}}} ###{{{ summary ##' @export summary.phreg <- function(object,type=c("robust","martingale"),...) { cc <- ncluster <- V <- NULL if (!is.null(object$propodds)) { cat("Proportional odds model, log-OR regression \n"); } if (length(object$p)>0 & object$p>0 & !is.null(object$opt)) { I <- -solve(object$hessian) if ( (length(class(object))==2) && class(object)[2]=="cif.reg") { V <- object$var ncluster <- nrow(object$Uiid) } else { V <- vcov(object,type=type[1]) ncluster <- object$n } cc <- cbind(coef(object),diag(V)^0.5,diag(I)^0.5) cc <- cbind(cc,2*(pnorm(abs(cc[,1]/cc[,2]),lower.tail=FALSE))) colnames(cc) <- c("Estimate","S.E.","dU^-1/2","P-value") if (length(class(object))==1) if (!is.null(ncluster <- attributes(V)$ncluster)) rownames(cc) <- names(coef(object)) } Strata <- levels(object$strata) if (!is.null(Strata)) { n <- unlist(lapply(object$time,length)) } else { n <- length(object$time) } res <- list(coef=cc,n=n,nevent=object$nevent,strata=Strata,ncluster=ncluster,var=V) class(res) <- "summary.phreg" res } ###}}} summary ###{{{ print.summary ##' @export print.summary.phreg <- function(x,max.strata=5,...) { cat("\n") nn <- cbind(x$n, x$nevent) rownames(nn) <- levels(x$strata); colnames(nn) <- c("n","events") if (is.null(rownames(nn))) rownames(nn) <- rep("",NROW(nn)) if (length(x$strata)>max.strata) { nn <- rbind(c(colSums(nn),length(x$strata))); colnames(nn) <- c("n","events","stratas") rownames(nn) <- "" } print(nn,quote=FALSE) if (!is.null(x$ncluster)) cat("\n ", x$ncluster, " clusters\n",sep="") if (!is.null(x$coef)) { cat("\n") printCoefmat(x$coef,...) } cat("\n") } ###}}} print.summary ##' @export tailstrata <- function(strata,nstrata) {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); res <- .Call("tailstrataR",length(strata),strata,nstrata,PACKAGE="mets") if (any(res$found<0.5)) { warning("Not all strata found"); cat((1:nstrata)[res$found>0.5]); } return(res$where) }# }}} ##' @export sumstrata <- function(x,strata,nstrata) {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (length(x)!=length(strata)) stop("length of x and strata must be same\n"); res <- .Call("sumstrataR",x,strata,nstrata,PACKAGE="mets")$res return(res) }# }}} ##' @export cumsumstrata <- function(x,strata,nstrata) {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (length(x)!=length(strata)) stop("length of x and strata must be same\n"); res <- .Call("cumsumstrataR",x,strata,nstrata,PACKAGE="mets")$res return(res) }# }}} ##' @export revcumsumstrata <- function(x,strata,nstrata) {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (length(x)!=length(strata)) stop("length of x and strata must be same\n"); res <- .Call("revcumsumstrataR",x,strata,nstrata,PACKAGE="mets")$res return(res) }# }}} ##' @export revcumsum <- function(x) {# {{{ res <- .Call("revcumsumR",x,PACKAGE="mets")$res return(res) }# }}} ##' @export revcumsumstratasum <- function(x,strata,nstrata,type="all") {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (length(x)!=length(strata)) stop("length of x and strata must be same\n"); if (type=="sum") res <- .Call("revcumsumstratasumR",x,strata,nstrata)$sum if (type=="lagsum") res <- .Call("revcumsumstratasumR",x,strata,nstrata)$lagsum if (type=="all") res <- .Call("revcumsumstratasumR",x,strata,nstrata) return(res) }# }}} ##' @export cumsumstratasum <- function(x,strata,nstrata,type="all") {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (length(x)!=length(strata)) stop("length of x and strata must be same\n"); if (type=="sum") res <- .Call("cumsumstratasumR",x,strata,nstrata)$sum if (type=="lagsum") res <- .Call("cumsumstratasumR",x,strata,nstrata)$lagsum if (type=="all") res <- .Call("cumsumstratasumR",x,strata,nstrata) return(res) }# }}} ##' @export matdoubleindex <- function(x,rows,cols,xvec=NULL) {# {{{ if (!is.matrix(x)) stop("x must be matrix") ncols <- ncol(x); nrows <- nrow(x) ###if (any(rows>nrows) | any(cols>ncols)) stop("indeces out of matrix \n"); ###if (any(rows<=0) | any(cols<=0)) stop("indeces out of matrix \n"); ## to avoid warnings when going to C, get rid of Inf cols[cols==Inf] <- ncol(x)+1; rows[rows==Inf] <- nrow(x)+1; if (length(rows)==1) rows <- rep(rows,length(cols)) if (length(cols)==1) cols <- rep(cols,length(rows)) if (length(cols)!=length(rows)) stop("rows and cols different lengths\n"); if (is.null(xvec)) { assign <- 0; xvec <- 1} else { assign <- 1; if (length(cols)!=length(xvec)) stop("rows and cols and xvec differ \n"); } res <- .Call("Matdoubleindex",x,rows-1,cols-1,length(cols),assign,xvec)$mat return(res) }# }}} ##' @export mdi <- function(x,...) matdoubleindex(x,...) ##' @export covfr <- function(x,y,strata,nstrata) {# {{{ if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); res <- .Call("covrfR",x,y,strata,nstrata) return(res) }# }}} ##' @export revcumsumidstratasum <- function(x,id,nid,strata,nstrata,type="all") {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (type=="sum") res <- .Call("revcumsumidstratasumR",x,id,nid,strata,nstrata)$sum if (type=="lagsum") res <- .Call("revcumsumidstratasumR",x,id,nid,strata,nstrata)$lagsum if (type=="lagsumsquare") res <- .Call("revcumsumidstratasumR",x,id,nid,strata,nstrata)$lagsumsquare if (type=="all") res <- .Call("revcumsumidstratasumR",x,id,nid,strata,nstrata) return(res) }# }}} ##' @export revcumsumidstratasumCov <- function(x,y,id,nid,strata,nstrata,type="all") {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (type=="sum") res <- .Call("revcumsumidstratasumCovR",x,y,id,nid,strata,nstrata)$sum if (type=="lagsum") res <- .Call("revcumsumidstratasumCovR",x,y,id,nid,strata,nstrata)$lagsum if (type=="lagsumsquare") res <- .Call("revcumsumidstratasumCovR",x,y,id,nid,strata,nstrata)$lagsumsquare if (type=="all") res <- .Call("revcumsumidstratasumCovR",x,y,id,nid,strata,nstrata) return(res) }# }}} ##' @export cumsumidstratasumCov <- function(x,y,id,nid,strata,nstrata,type="all") {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (type=="sum") res <- .Call("cumsumidstratasumCovR",x,y,id,nid,strata,nstrata)$sum else res <- .Call("cumsumidstratasumCovR",x,y,id,nid,strata,nstrata) return(res) }# }}} ##' @export cumsumidstratasum <- function(x,id,nid,strata,nstrata,type="all") {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); if (type=="sum") res <- .Call("cumsumidstratasumR",x,id,nid,strata,nstrata)$sum else res <- .Call("cumsumidstratasumR",x,id,nid,strata,nstrata) return(res) }# }}} ##' @export covfridstrata <- function(x,y,id,nid,strata,nstrata) {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); res <- .Call("covrfstrataR",x,y,id,nid,strata,nstrata) return(res) }# }}} ##' @export covfridstrataCov <- function(x,y,x1,y1,id,nid,strata,nstrata) {# {{{ if (any(id<0) | any(id>nid-1)) stop("id index not ok\n"); if (any(strata<0) | any(strata>nstrata-1)) stop("strata index not ok\n"); res <- .Call("covrfstrataCovR",x,y,x1,y1,id,nid,strata,nstrata) return(res) }# }}} ##' Kaplan-Meier with robust standard errors ##' ##' Kaplan-Meier with robust standard errors ##' Robust variance is default variance with the summary. ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param conf.type transformation ##' @param conf.int level of confidence intervals ##' @param robust for robust standard errors based on martingales ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @aliases km ##' @examples ##' data(TRACE) ##' TRACE$cluster <- sample(1:100,1878,replace=TRUE) ##' out1 <- km(Surv(time,status==9)~strata(vf,chf),data=TRACE) ##' out2 <- km(Surv(time,status==9)~strata(vf,chf)+cluster(cluster),data=TRACE) ##' ##' par(mfrow=c(1,2)) ##' bplot(out1,se=TRUE) ##' bplot(out2,se=TRUE) ##' @export km <- function(formula,data=data,conf.type="log",conf.int=0.95,robust=TRUE,...) {# {{{ coxo <- phreg(formula,data=data) coxo <- robust.phreg(coxo) chaz <- coxo$cumhaz[,2] time <- coxo$cumhaz[,1] if (robust) std.err <- coxo$robse.cumhaz[,2] else std.err <- coxo$se.cumhaz[,2] strat <- coxo$strata[coxo$jumps] S0i <- 1/coxo$S0 kmt <- exp(cumsumstrata(log(1-S0i),strat,coxo$nstrata)) temp <- list(surv=kmt) zval <- qnorm(1 - (1 - conf.int)/2, 0, 1) ### different conf-types if (conf.type == "plain") {# {{{ temp1 <- temp$surv + zval * std.err * temp$surv temp2 <- temp$surv - zval * std.err * temp$surv temp <- c(temp, list(upper = pmin(temp1, 1), lower = pmax(temp2, 0), conf.type = "plain", conf.int = conf.int)) } if (conf.type == "log") { xx <- ifelse(temp$surv == 0, 1, temp$surv) temp1 <- ifelse(temp$surv == 0, NA, exp(log(xx) + zval * std.err)) temp2 <- ifelse(temp$surv == 0, NA, exp(log(xx) - zval * std.err)) temp <- c(temp, list(upper = pmin(temp1, 1), lower = temp2, conf.type = "log", conf.int = conf.int)) } if (conf.type == "log-log") { who <- (temp$surv == 0 | temp$surv == 1) temp3 <- ifelse(temp$surv == 0, NA, 1) xx <- ifelse(who, 0.1, temp$surv) temp1 <- exp(-exp(log(-log(xx)) + zval * std.err/log(xx))) temp1 <- ifelse(who, temp3, temp1) temp2 <- exp(-exp(log(-log(xx)) - zval * std.err/log(xx))) temp2 <- ifelse(who, temp3, temp2) temp <- c(temp, list(upper = temp1, lower = temp2, conf.type = "log-log", conf.int = conf.int)) }# }}} ### to use basehazplot.phreg temp <- c(temp, list(cumhaz=cbind(time,kmt),se.cumhaz=cbind(time,kmt*std.err),time=time, strata=strat,nstrata=coxo$nstrata, jumps=1:length(kmt),strata.name=coxo$strata.name,strata.level=coxo$strata.level)) class(temp) <- c("km","phreg") return(temp) }# }}} ##' Cumulative incidence with robust standard errors ##' ##' Cumulative incidence with robust standard errors ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param cause NULL looks at all, otherwise specify which cause to consider ##' @param cens.code censoring code "0" is default ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @aliases cif ##' @examples ##' data(TRACE) ##' TRACE$cluster <- sample(1:100,1878,replace=TRUE) ##' out1 <- cif(Event(time,status)~+1,data=TRACE,cause=9) ##' out2 <- cif(Event(time,status)~+1+cluster(cluster),data=TRACE,cause=9) ##' ##' out1 <- cif(Event(time,status)~strata(vf,chf),data=TRACE,cause=9) ##' out2 <- cif(Event(time,status)~strata(vf,chf)+cluster(cluster),data=TRACE,cause=9) ##' ##' par(mfrow=c(1,2)) ##' bplot(out1,se=TRUE) ##' bplot(out2,se=TRUE) ##' @export cif <- function(formula,data=data,cause=1,cens.code=0,...) {# {{{ cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (class(Y)!="Event") stop("Expected a 'Event'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } if (!is.null(stratapos <- attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else strata.name <- NULL if (!is.null(offsetpos <- attributes(Terms)$specials$offset)) { ts <- survival::untangle.specials(Terms, "offset") Terms <- Terms[-ts$terms] offset <- m[[ts$vars]] } X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) id.orig <- id; if (!is.null(id)) { ids <- sort(unique(id)) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(exit))-1; statusE <- 1*(status==cause) statusD <- 1*(status!=cens.code) if (ncol(Y)==3) { if (!is.null(strata)) { formE <- as.formula(paste("Surv(entry,exit,statusE)~strata(strata)+cluster(id_1_)",sep="")) formD <- as.formula(paste("Surv(entry,exit,statusD)~strata(strata)+cluster(id_1_)",sep="")) } else { formE <- as.formula(paste("Surv(entry,exit,statusE)~1+cluster(id_1_)",sep="")) formD <- as.formula(paste("Surv(entry,exit,statusD)~1+cluster(id_1_)",sep="")) } } else { if (!is.null(strata)) { formE <- as.formula(paste("Surv(exit,statusE)~strata(strata)+cluster(id_1_)",sep="")) formD <- as.formula(paste("Surv(exit,statusD)~strata(strata)+cluster(id_1_)",sep="")) } else { formE <- as.formula(paste("Surv(exit,statusE)~cluster(id_1_)",sep="")) formD <- as.formula(paste("Surv(exit,statusD)~cluster(id_1_)",sep="")) } } data$id_1_ <- id if (sum(statusE)==0) warning("No events of type 1\n"); coxE <- phreg(formE,data=data,...) coxS <- phreg(formD,data=data,...) ### cif cifo <- recurrentMarginal(coxE,coxS) ### to use basehazplot.phreg class(cifo) <- c("cif","phreg") return(cifo) }# }}} ##' Proportional odds survival model ##' ##' Semiparametric Proportional odds model, that has the advantage that ##' \deqn{ ##' logit(S(t|x)) = \log(\Lambda(t)) + x \beta ##' } ##' so covariate effects give OR of survival. ##' ##' This is equivalent to using a hazards model ##' \deqn{ ##' Z \lambda(t) \exp(x \beta) ##' } ##' where Z is gamma distributed with mean and variance 1. ##' ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param offset offsets for exp(x beta) terms ##' @param weights weights for score equations ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' data(TRACE) ##' dcut(TRACE) <- ~. ##' out1 <- logitSurv(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) ##' summary(out1) ##' gof(out1) ##' bplot(out1) ##' ##' @export logitSurv <- function(formula,data,offset=NULL,weights=NULL,...) {# {{{ out <- phreg(formula,data,offset=offset,weights=weights,propodds=1,...) return(out) }# }}} ###{{{ predict with se for baseline predictPhreg <- function(x,jumptimes,S0,beta,time=NULL,X=NULL,surv=FALSE,band=FALSE,...) { strata <- x$strata[x$jumps]# {{{ nstrata <- x$nstrata ## Brewslow estimator if (is.null(x$cumhaz)) { ##II <- x$II ##x$jumptimes II <- -solve(x$hessian) chaz <- cbind(jumptimes,cumsumstrata(1/S0,strata,nstrata)) DLambeta.t <- apply(x$E/c(x$S0),2,cumsumstrata,strata,nstrata) varbetat <- apply((DLambeta.t %*% II)*DLambeta.t,1,sum) se.chaz <- cbind(jumptimes,(cumsumstrata(1/S0^2,strata,nstrata)+varbetat)^.5) } else { chaz <- x$cumhaz se.chaz <- x$se.cumhaz } if (!is.null(time)) { ### do within strata chaz <- Cpred(chaz,time) se.chaz <- Cpred(se.chaz,time) } colnames(chaz) <- c("time","chaz") colnames(se.chaz) <- c("time","se.chaz") if (band==TRUE) { ## on log-scale for one strata# {{{ ii <- -solve(x$hessian) Ubeta <- x$U betaiid <- t(ii %*% t(Ubeta)) cumhaz <- x$cumhaz[,1,drop=FALSE] se.chaz <- x$se.cumhaz[,1] ### rr <- c( exp(sum(c(X) %*% x$coef))) Pt <- outer(cumhaz[,2],c(X)) DLambeta.t <- apply(x$E/c(x$S0),2,cumsumstrata,strata,nstrata) Pt <- DLambeta.t - Pt ### se of cumulaive hazard for this covariate , can use different versions of variance for beta varbetat <- rowSums((Pt %*% ii)*Pt) se.chazexb <- cbind(jumptimes,rr*(cumsumstrata(1/S0^2,strata,nstrata)+varbetat)^.5) ### sig <- 0.95 ### n.sim <- 1000 ### simband <- .Call("simBandCumHazCox",rr/x$S0,Pt,betaiid,n.sim,sig,se.chazexb[,2],PACKAGE="mets") ### ## coefficients for uniform bands on log-scale ### uband <- apply(simband$supUsim,2,percen,per=1-sig); }# }}} if (!is.null(X)) { H <- exp(X%*%beta) if (nrow(chaz)==length(H)) { chaz[,2] <- chaz[,2]*H } else { chaz2 <- c() X <- rbind(X) for (i in seq(nrow(X))) chaz2 <- rbind(chaz2, cbind(chaz[,1],chaz[,2]*H[i], rep(1,nrow(chaz))%x%X[i,,drop=FALSE])) chaz <- chaz2; nn <- c("time","chaz",names(beta)) colnames(chaz) <- nn } } if (surv) { chaz[,2] <- exp(-chaz[,2]) colnames(chaz)[2] <- "surv" } return(chaz) }# }}} ##' Predictions from proportional hazards model ##' ##' @param object phreg object ##' @param newdata data.frame ##' @param times Time where to predict variable, default is all time-points from the object sorted ##' @param individual.time when TRUE then newdata and times have same length and makes only predictions for these individual times. ##' @param tminus to make predictions in T- that is just before, useful for IPCW techniques ##' @param se with standard errors and upper and lower confidence intervals. ##' @param robust to get robust se's. ##' @param conf.type transformation for suvival estimates, default is log ##' @param conf.int significance level ##' @param km to use Kaplan-Meier for baseline \deqn{S_{s0}(t)= (1 - dA_{s0}(t))} where s is strata. ##' @param ... Additional arguments to plot functions ##' @aliases tailstrata revcumsumstrata revcumsumstratasum cumsumstrata sumstrata covfr covfridstrata covfridstrataCov cumsumidstratasum cumsumidstratasumCov cumsumstratasum revcumsum revcumsumidstratasum revcumsumidstratasumCov robust.basehaz.phreg matdoubleindex mdi ##' @export predict.phreg <- function(object,newdata, times=NULL,individual.time=FALSE,tminus=FALSE,se=TRUE,robust=FALSE,conf.type="log",conf.int=0.95,km=FALSE,...) {# {{{ default is all time-points from the object ### take baseline and strata from object# {{{ strata <- object$strata[object$jumps] nstrata <- object$nstrata jumptimes <- object$cumhaz[,1] chaz <- object$cumhaz[,2] if (se) { if (!robust) { se.chaz <- object$se.cumhaz[,2] varbeta <- object$II Pt <- apply(object$E/c(object$S0),2,cumsumstrata,strata,nstrata) } else { if (is.null(object$opt) | is.null(object$coef)) fixbeta<- 1 else fixbeta <- 0 IsdM <- squareintHdM(object,ft=NULL,fixbeta=fixbeta,...) ### se.chaz <- IsdM$varInt[object$jumps]^.5 covv <- IsdM$covv[object$jumps,,drop=FALSE] varbeta <- IsdM$vbeta Pt <- IsdM$Ht[object$jumps,,drop=FALSE] } } # }}} ### setting up newdata with factors and strata desX <- readPhreg(object,newdata) X <- desX$X strataNew <- desX$strata ### print(length(strata)); ### if (se) print(length(se.chaz)); ### print(dim(X)); print(head(X)); print(length(strataNew)) if (is.null(times)) times <- sort(unique(c(object$exit))) if (individual.time & is.null(times)) times <- c(object$exit) se.cumhaz <- NULL if (!individual.time) { surv <- matrix(0,nrow(X),length(times)) if (se) se.cumhaz <- matrix(0,nrow(X),length(times)) } else { surv <- matrix(0,nrow(X),1) if (se) se.cumhaz <- matrix(0,nrow(X),1) } hazt <- length(times) for (j in unique(strataNew)) { where <- sindex.prodlim(c(0,jumptimes[strata==j]),times,strict=tminus) hhazt <- hazt <- c(0,chaz[strata==j]) if (km) { hazt <- c(1,exp(cumsum(log(1-diff(hazt))))); hazt[is.na(hazt)] <- 0 } hazt <- hazt[where] hhazt <- hhazt[where] if (se) se.hazt <- c(0,se.chaz[strata==j])[where] Xs <- X[strataNew==j,,drop=FALSE] ### offs <- object$offsets[object$strata==j] if (object$p==0) RR <- rep(1,nrow(Xs)) else RR <- c(exp( Xs %*% coef(object))) if (se) { # {{{ based on Hazard's if (object$p>0) { Ps <- Pt[strata==j,,drop=FALSE] Ps <- rbind(0,Ps)[where,,drop=FALSE] ## print(Xs); print(varbeta); print(dim(Ps)); print((Xs %*% varbeta)) Xbeta <- Xs %*% varbeta seXbeta <- rowSums(Xbeta*Xs)^.5 cov2 <- cov1 <- Xbeta %*% t(Ps*hhazt) if (robust) { covvs <- covv[strata==j,,drop=FALSE] covvs <- rbind(0,covvs)[where,,drop=FALSE] covv1 <- Xs %*% t((covvs*hhazt)) cov1 <- cov1-covv1 } } else cov1 <- 0 }# }}} if (is.null(object$propodds)) { if (!km) { if (!individual.time) surv[strataNew==j,] <- exp(- RR%o%hazt) else surv[strataNew==j,] <- exp(-RR*hazt[strataNew==j]) } else { if (!individual.time) surv[strataNew==j,] <- NULL else surv[strataNew==j,] <- hazt[strataNew==j]^RR } } else { if (!individual.time) surv[strataNew==j,] <- 1/(1+RR%o%hazt) else surv[strataNew==j,] <- 1/(1+RR*hazt[strataNew==j]) } if (se) {# {{{ if (object$p>0) { if (!individual.time) se.cumhaz[strataNew==j,] <- ((RR %o% se.hazt)^2+(c(RR*seXbeta) %o% hhazt)^2-2*RR^2*cov1)^.5 else se.cumhaz[strataNew==j,] <- RR* (se.hazt^2+(c(seXbeta)*hhazt)^2-2*diag(cov1))^.5 } else { if (!individual.time) se.cumhaz[strataNew==j,] <- RR %o% (se.hazt) else se.cumhaz[strataNew==j,] <- RR* se.hazt[strataNew==j] } }# }}} } zval <- qnorm(1 - (1 - conf.int)/2, 0, 1) std.err <- se.cumhaz cisurv <- list() cisurv$upper <- NULL cisurv$lower <- NULL ### different conf-types for surv if (se) {# {{{ if (conf.type == "plain") {# {{{ temp1 <- surv + zval * std.err * surv temp2 <- surv - zval * std.err * surv cisurv <- list(upper = pmin(temp1, 1), lower = pmax(temp2, 0), conf.type = "plain", conf.int = conf.int) } if (conf.type == "log") { xx <- ifelse(surv == 0, 1, surv) temp1 <- ifelse(surv == 0, NA, exp(log(xx) + zval * std.err)) temp2 <- ifelse(surv == 0, NA, exp(log(xx) - zval * std.err)) cisurv <- list(upper = pmin(temp1, 1), lower = temp2, conf.type = "log", conf.int = conf.int) } if (conf.type == "log-log") { who <- (surv == 0 | surv == 1) temp3 <- ifelse(surv == 0, NA, 1) xx <- ifelse(who, 0.1, surv) temp1 <- exp(-exp(log(-log(xx)) + zval * std.err/log(xx))) temp1 <- ifelse(who, temp3, temp1) temp2 <- exp(-exp(log(-log(xx)) - zval * std.err/log(xx))) temp2 <- ifelse(who, temp3, temp2) cisurv <- list(upper = temp1, lower = temp2, conf.type = "log-log", conf.int = conf.int) }# }}} }# }}} if (object$p>0) RR <- exp(X %*% coef(object)) else RR <- rep(1,nrow(X)) out <- list(surv=surv,times=times, surv.upper=cisurv$upper,surv.lower=cisurv$lower,cumhaz=-log(surv),se.cumhaz=se.cumhaz, X=Xs, RR=RR) if (length(class(object))==2 && substr(class(object)[2],1,3)=="cif") { out <- c(out,list(cif=1-out$surv,cif.lower=1-out$surv.upper, cif.upper=1-out$surv.lower)) } class(out) <- c("predictphreg") if (length(class(object))==2) class(out) <- c("predictphreg",class(object)[2]) return(out) }# }}} ##' @export plot.predictphreg <- function(x,se=FALSE,add=FALSE,ylim=NULL,xlim=NULL,lty=NULL,col=NULL,type=c("surv","cumhaz","cif"),ylab=NULL,xlab=NULL, polygon=TRUE,level=0.95,whichx=NULL,robust=FALSE,...) {# {{{ if (type[1]=="surv" & is.null(ylab)) ylab <- "Survival probability" if (type[1]=="cif" & is.null(ylab)) ylab <- "Cumulative probability" if (type[1]=="surv" & length(class(x))==2) ylab <- "Cumulative probability" if (type[1]=="cumhaz" & is.null(ylab)) ylab <- "Cumulative hazard" if (is.null(xlab)) xlab <- "time" level <- -qnorm((1-level)/2) if (type[1]=="surv") rr <- c(0,1) if (type[1]=="cumhaz") rr <- range(c(0,x$cumhaz)) ylimo <- ylim if (is.null(ylim)) ylim <- rr if (is.null(xlim)) xlim <- range(x$times) if (is.null(x$se.cumhaz) & se==TRUE) { warning("predict.phreg must be with se=TRUE\n"); se <- FALSE } if (se==TRUE) { if (is.null(x$se.cumhaz)) stop("predict.phreg must be with se=TRUE\n"); if (type[1]=="surv") rrse <- range(c(x$surv.upper,x$surv.lower)) if (type[1]=="cumhaz") { cumhaz.upper <- x$cumhaz+level*x$se.cumhaz cumhaz.lower <- x$cumhaz-level*x$se.cumhaz rrse <- range(c(cumhaz.upper,cumhaz.lower)) } ### if (type[1]=="surv") rrse <- c(max(0,rrse[1]),min(rrse[2],1)) if (type[1]=="surv") rrse <- c(0,1) if (type[1]=="cumhaz") rrse <- c(max(0,rrse[1]),rrse[2]) if (is.null(ylimo)) ylim <- rrse } ## all covriates nx <- nrow(x$surv) if (is.null(whichx)) whichx <- 1:nx stratas <- whichx ltys <- lty cols <- col if (length(whichx)>0 ) { ## with X if (!is.matrix(lty)) { if (is.null(lty)) ltys <- 1:length(whichx) else if (length(lty)!=length(whichx)) ltys <- rep(lty[1],length(whichx)) else ltys <- lty } else ltys <- lty if (!is.matrix(col)) { if (is.null(col)) cols <- 1:length(stratas) else if (length(col)!=length(stratas)) cols <- rep(col[1],length(stratas)) } else cols <- col } else { if (is.matrix(col)) cols <- col if (is.null(col)) cols <- 1 else cols <- col[1] if (is.matrix(lty)) ltys <- lty if (is.null(lty)) ltys <- 1 else ltys <- lty[1] } if (!is.matrix(ltys)) ltys <- cbind(ltys,ltys,ltys) if (!is.matrix(cols)) cols <- cbind(cols,cols,cols) i <- 1 j <- whichx[i] cifreg <- FALSE if ((length(class(x))==2) && (substr(class(x)[2],1,3)=="cif")) cifreg <- TRUE if (type[1]=="surv") { xx <- x$surv if (cifreg) xx <- x$cif } else if (type[1]=="cif") { xx <- 1-x$surv } else xx <- x$cumhaz if (se) { if (type[1]=="surv") { upper <- x$surv.upper; lower <- x$surv.lower if (cifreg) { upper <- x$cif.upper; lower <- x$cif.lower} } else if (type[1]=="cif") { upper <- 1-x$surv.lower; lower <- 1-x$surv.upper } else { upper <- cumhaz.upper; lower <- cumhaz.lower} } if (!add) plot(x$times,xx[j,],type="s",lty=ltys[i,1],col=cols[i,1],ylim=ylim,ylab=ylab,xlim=xlim,xlab=xlab,...) else lines(x$times,xx[j,],type="s", lty=ltys[i,1],col=cols[i,1],...) if (length(whichx)>1) for (i in seq(2,length(whichx))) lines(x$times,xx[whichx[i],],type="s",lty=ltys[i,1],col=cols[i,1],...) if (se==TRUE) { for (i in seq(1,length(whichx))) { j <- whichx[i] ul <- upper[j,]; nl <- lower[j,]; if (!polygon) { lines(x$times,nl,type="s",lty=ltys[i,2],col=cols[i,2]) lines(x$times,ul,type="s",lty=ltys[i,3],col=cols[i,3]) } else { ll <- length(x$times) tt <- c(x$times,rev(x$times)) yy <- c(nl,rev(ul)) ttp <- c(x$times[1],rep(x$times[-c(1,ll)],each=2),x$times[ll]) tt <- c(ttp,rev(ttp)) yy <- c(rep(nl[-ll],each=rep(2)),rep(rev(ul[-ll]),each=2)) col.alpha<-0.1 col.ci<-cols[i,1] col.trans <- sapply(col.ci, FUN=function(x) do.call(grDevices::rgb,as.list(c(grDevices::col2rgb(x)/255,col.alpha)))) polygon(tt,yy,lty=0,col=col.trans) } } } where <- "topleft"; if (type[1]=="surv") where <- "topright" ### if (legend & (!add)) ### graphics::legend(where,legend=legend,col=cols[,1],lty=ltys[,1]) }# }}} ###}}} predict ###{{{ plot ##' Plotting the baslines of stratified Cox ##' ##' Plotting the baslines of stratified Cox ##' @param x phreg object ##' @param se to include standard errors ##' @param time to plot for specific time variables ##' @param add to add to previous plot ##' @param ylim to give ylim ##' @param xlim to give xlim ##' @param lty to specify lty of components ##' @param col to specify col of components ##' @param legend to specify col of components ##' @param ylab to specify ylab ##' @param xlab to specify xlab ##' @param polygon to get standard error in shaded form ##' @param level of standard errors ##' @param stratas wich strata to plot ##' @param robust to use robust standard errors if possible ##' @param ... Additional arguments to lower level funtions ##' @author Klaus K. Holst, Thomas Scheike ##' @aliases basehazplot.phreg bplot basecumhaz plotConfRegion ##' @examples ##' data(TRACE) ##' dcut(TRACE) <- ~. ##' out1 <- phreg(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE) ##' ##' par(mfrow=c(2,2)) ##' bplot(out1) ##' bplot(out1,stratas=c(0,3)) ##' bplot(out1,stratas=c(0,3),col=2:3,lty=1:2,se=TRUE) ##' bplot(out1,stratas=c(0),col=2,lty=2,se=TRUE,polygon=FALSE) ##' bplot(out1,stratas=c(0),col=matrix(c(2,1,3),1,3), ##' lty=matrix(c(1,2,3),1,3),se=TRUE,polygon=FALSE) ##' @export basehazplot.phreg <- function(x,se=FALSE,time=NULL,add=FALSE,ylim=NULL,xlim=NULL, lty=NULL,col=NULL,legend=TRUE,ylab=NULL,xlab=NULL, polygon=TRUE,level=0.95,stratas=NULL,robust=FALSE,...) {# {{{ if (class(x)[1]=="phreg" & is.null(ylab)) ylab <- "Cumulative hazard" if (class(x)[1]=="km" & is.null(ylab)) ylab <- "Survival probability" if (class(x)[1]=="cif" & is.null(ylab)) ylab <- "Probability" if (is.null(xlab)) xlab <- "time" level <- -qnorm((1-level)/2) ### if (log==FALSE) rr <- range(x$cumhaz[,-1]) ### else rr <- range(log(x$cumhaz[,-1]),na.rm=TRUE) strat <- x$strata[x$jumps] ylimo <- ylim if (is.null(ylim)) ylim <- rr if (is.null(xlim)) xlim <- range(x$cumhaz[,1]) if (se==TRUE) { if (is.null(x$se.cumhaz) & is.null(x$robse.cumhaz) ) stop("phreg must be with cumhazard=TRUE\n"); rrse <- range(c(x$cumhaz[,-1]+level*x$se.cumhaz[,-1])) if (class(x)[1]=="km") rrse <- c(min(x$lower,na.rm=TRUE),1) ### else rrse <- range(log(c(x$cumhaz[,-1]+level*x$se.cumhaz[,-1])),na.rm=TRUE) if (is.null(ylimo)) ylim <- rrse } ## all strata if (is.null(stratas)) stratas <- 0:(x$nstrata-1) ltys <- lty cols <- col if (length(stratas)>0 & x$nstrata>1) { ## with strata lstrata <- x$strata.level[(stratas+1)] stratn <- substring(x$strata.name,8,nchar(x$strata.name)-1) stratnames <- paste(stratn,lstrata,sep=":") if (!is.matrix(lty)) { if (is.null(lty)) ltys <- 1:length(stratas) else if (length(lty)!=length(stratas)) ltys <- rep(lty[1],length(stratas)) } else ltys <- lty if (!is.matrix(col)) { if (is.null(col)) cols <- 1:length(stratas) else if (length(col)!=length(stratas)) cols <- rep(col[1],length(stratas)) } else cols <- col } else { stratnames <- "Baseline" if (is.matrix(col)) cols <- col if (is.null(col)) cols <- 1 else cols <- col[1] if (is.matrix(lty)) ltys <- lty if (is.null(lty)) ltys <- 1 else ltys <- lty[1] } if (!is.matrix(ltys)) ltys <- cbind(ltys,ltys,ltys) if (!is.matrix(cols)) cols <- cbind(cols,cols,cols) first <- 0 for (i in seq(stratas)) { j <- stratas[i] cumhazard <- x$cumhaz[strat==j,,drop=FALSE] if (!is.null(cumhazard)) { if (nrow(cumhazard)>1) { if (add | first==1) lines(cumhazard,type="s",lty=ltys[i,1],col=cols[i,1]) else { first <- 1 plot(cumhazard,type="s",lty=ltys[i,1],col=cols[i,1],ylim=ylim,ylab=ylab,xlab=xlab, xlim=xlim,...) } if (se==TRUE) { if (robust==TRUE) secumhazard <- x$robse.cumhaz[strat==j,,drop=FALSE] else secumhazard <- x$se.cumhaz[strat==j,,drop=FALSE] ul <-cbind(cumhazard[,1],cumhazard[,2]+level*secumhazard[,2]) nl <-cbind(cumhazard[,1],cumhazard[,2]-level*secumhazard[,2]) if (class(x)[1]=="km") { ul[,2] <- x$upper[x$strata==j]; nl[,2] <- x$lower[x$strata==j]; wna <- which(is.na(ul[,2])) ul[wna,2] <- 0 nl[wna,2] <- 0 } if (!polygon) { lines(nl,type="s",lty=ltys[i,2],col=cols[i,2]) lines(ul,type="s",lty=ltys[i,3],col=cols[i,3]) } else { ## type="s" confidence regions ll <- length(nl[,1]) timess <- nl[,1] ttp <- c(timess[1],rep(timess[-c(1,ll)],each=2),timess[ll]) tt <- c(ttp,rev(ttp)) yy <- c(rep(nl[-ll,2],each=rep(2)),rep(rev(ul[-ll,2]),each=2)) ### tt <- c(nl[,1],rev(ul[,1])) ### yy <- c(nl[,2],rev(ul[,2])) col.alpha<-0.1 col.ci<-cols[j+1] col.trans <- sapply(col.ci, FUN=function(x) do.call(grDevices::rgb,as.list(c(grDevices::col2rgb(x)/255,col.alpha)))) polygon(tt,yy,lty=0,col=col.trans) } } } } } where <- "topleft"; if (class(x)[1]=="km") where <- "topright" if (legend & (!add)) graphics::legend(where,legend=stratnames,col=cols[,1],lty=ltys[,1]) }# }}} ##' @export plotConfRegion <- function(x,band,add=TRUE,polygon=TRUE,col=1,...) {# {{{ nl <- cbind(x,band[,1]) ul <- cbind(x,band[,2]) if (!polygon) { lines(nl,type="s",...) lines(ul,type="s",...) } else { ll <- length(nl[,1]) timess <- nl[,1] ttp <- c(timess[1],rep(timess[-c(1,ll)],each=2),timess[ll]) tt <- c(ttp,rev(ttp)) yy <- c(rep(nl[-ll,2],each=rep(2)),rep(rev(ul[-ll,2]),each=2)) col.alpha<-0.1 col.ci<-col[1] col.trans <- sapply(col.ci, FUN=function(x) do.call(grDevices::rgb,as.list(c(grDevices::col2rgb(x)/255,col.alpha)))) polygon(tt,yy,lty=0,col=col.trans,...) } }# }}} ##' @export bplot <- function(x,...) basehazplot.phreg(x,...) ##' @export basecumhaz <- function(x,type="matrix",robust=FALSE,...) {# {{{ ## all strata strat <- x$strata[x$jumps] stratas <- 0:(x$nstrata-1) ### se.cum <- cum <- x$cumhaz se.cum <- cum <- c() strata <- rep(0,nrow(x$cumhaz)) if (type=="matrix") { se.cum <- cum <- x$cumhazard } if (robust==TRUE) secum <- x$robse.cumhaz else secum <- x$se.cumhaz if (is.null(secum)) nose <- TRUE else nose <- FALSE start <- 1 for (i in stratas) { cumhazard <- x$cumhaz[strat==i,,drop=FALSE] if (!is.null(cumhazard)) { nr <- nrow(cumhazard) if (nr>=1) { slut <- start-1+nr ### cum[start:slut,] <- cumhazard cum <- rbind(cum,cumhazard) ### if (!nose) se.cum[start:slut,] <- secum[strat==i,] if (!nose) se.cum <- rbind(se.cum,secum[strat==i,]) strata[start:slut] <- i start <- slut+1 } } } list(cumhaz=cum,se.cumhaz=se.cum,strata=strata) }# }}} ##' @export lines.phreg <- function(x,...,add=TRUE) plot(x,...,add=add) ###}}} plot ###{{{ plot ##' @export plot.phreg <- function(x,surv=TRUE,X=NULL,time=NULL,add=FALSE,...) { if (!is.null(X) && nrow(X)>1) { P <- lapply(split(X,seq(nrow(X))),function(xx) predict(x,X=xx,time=time,surv=surv)) } else { P <- predict(x,X=X,time=time,surv=surv) } if (!is.list(P)) { if (add) { lines(P,type="s",...) } else { plot(P,type="s",...) } return(invisible(P)) } if (add) { lines(P[[1]][,1:2],type="s",lty=1,col=1,...) } else { plot((P[[1]])[,1:2],type="s",lty=1,col=1,...) } for (i in seq_len(length(P)-1)+1) { lines(P[[i]][,1:2],type="s",lty=i,col=i,...) } return(invisible(P)) } ##' @export lines.phreg <- function(x,...,add=TRUE) plot(x,...,add=add) ###}}} plot ###{{{ print ##' @export print.phreg <- function(x,...) { cat("Call:\n") dput(x$call) print(summary(x),...) } ###}}} print mets/R/sim-nordic-twin.R0000644000176200001440000002655113623061405014602 0ustar liggesusers F1addfg<-function(t,lam0=0.13,beta=c(-0.5),x=0) # FG { ## {{{ baset <- lam0*pnorm((t-.70)/0.15) return( 1 - exp(-baset*exp(c(x * beta)))) } ## }}} ##' @export corsim.prostate <- function(n,theta=1,thetaslope=0,censS=c(0,1),pcens=0.5,test=0,mt=1,same.cens=TRUE,country=TRUE, delayed=FALSE,ptrunc=0.5,lam0=0.13,truncS=c(0,1)) { ## {{{ ###n <- 10; theta <- 1; thetaslope <- 0; mt <- 1 if (country==TRUE) xl <- sample(1:4,n,replace=TRUE) else xl <- rep(1,n) x <- (xl==1) tt<-seq(0,1,length=100) ### ###n=100;theta=1;lam0=0.5;beta=0.3;crate=2 thetat <- exp(log(theta)) F11x<-F1addfg(1,x=x,lam0=lam0) F12x<-F1addfg(1,x=x,lam0=lam0) ### thetaslut <- exp(log(theta)+thetaslope*(1-1/2)) p11 <- thetaslut*F11x*F12x/((1-F11x)+thetaslut*F11x) p12 <- F11x-p11 p21 <- F12x-p11 p22 <- 1-F12x-F11x+p11 ###print(apply(cbind(p11,p12,p21),1,sum)) ###print(cbind(p11,p12,p21,p22)) if (test==1) { ## {{{ for (i in 1:2) { print(x[i,]); F11xt<-F1addfg(tt,x=x[i,]) F12xt<-F1addfg(tt,x=x[i,]) p11t <- thetat* F11xt*F12xt/((1-F11xt)+thetat*F11xt) cortt <- ((p11t)/(F12xt-p11t))/(F11xt/(1-F11xt)) ###plot(tt,log(cortt)) if (i==1) { plot(tt,p11t,type="l",ylim=c(0,0.1),xlim=c(0,mt)) ###lines(tt,F11x[i]-p11t,col=2) ###lines(tt,F12x[i]-p11t,col=2) } else lines(tt,p11t,col=2); ###if (sum(diff(p11t<0))>0) stop("dec\n"); ###p11 <- max(p11t) ###p12 <- F11x[i]-p11 ###p21 <- F12x[i]-p11 ###p22 <- 1- F12x[i]-F11x[i]+p11 ###pnn <- 1- F12x[i]-F11x[i]+p11 } } ## }}} ###apply(cbind(p11,p12,p21,p22),1,sum) ### print(table(F11x)) print(table(p11)) types <- rep(0,n) causes <- matrix(0,n,2) stime<-matrix(1+1,n,2); for (i in 1:n) { ## {{{ ptype <- runif(1) if (ptype<=p11[i]) { types[i] <- 1 myhazx<-F1addfg(tt,x=x[i,])/F12x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist\n"); stime[i,2]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) f1<- F1addfg(tt,x=x[i,]) myhazx<- (F12x[i]/p11[i]) * (thetat*f1/((1-f1)+thetat*f1)) ### if (abs(max(myhazx)-1)> 0.001) stop("not dist\n"); stime[i,1]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(1,1) } if ((ptype>p11[i]) & (ptype<=p12[i]+p11[i])) { types[i] <- 2 f1 <- F1addfg(tt,x=x[i,]) myhazx<- ( f1 - thetat*F12x[i]*f1/((1-f1)+thetat*f1))/p12[i]; myhazx <- f1/F11x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist 2 \n"); stime[i,1]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(1,2) stime[i,2] <- runif(1)*1 } if ((ptype>p11[i]+p12[i]) && (ptype<=p21[i]+p12[i]+p11[i])) { types[i] <- 3 f2 <- F1addfg(tt,x=x[i,]) myhazx <- (f2 - (thetat*F11x[i]*f2/((1-F11x[i])+thetat*F11x[i])))/p21[i]; myhazx <- f2/F12x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist3 \n"); stime[i,2]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(2,1) stime[i,1] <- runif(1)*1 } if (ptype>p11[i]+p12[i]+p21[i] ) { types[i] <- 4 causes[i,] <- c(2,2) stime[i,1:2] <- runif(2)*1 } } ## }}} stime <- c(stime) cause <- c(causes) ###print(summary(stime)) ###print(sum(stime==mt)) ###same.cens=TRUE if (same.cens==TRUE) { ctime <- rep(rbinom(n,1,pcens)*runif(n,censS),each=2) ctime[ctime==0] <- 1; } else { ctime<- rbinom(2*n,1,pcens)*runif(2*n,censS) ctime[ctime==0] <- 1; } cens <- (ctime< stime) time <- ifelse(cens,ctime,stime) cause <- ifelse(cens,0,cause) id <- rep(1:n,rep(2,n)) country <- c() country[xl==1] <- "SWE" country[xl==2] <- "DK" country[xl==3] <- "FIN" country[xl==4] <- "NOR" if (delayed) { if (same.cens==TRUE) { etime <- rep(rbinom(n,1,ptrunc)*(runif(n,truncS)),each=2) } else etime<- rbinom(2*n,1,ptrunc)*(runif(2*n,truncS)) } else etime <- rep(0,2*n) data<-data.frame(time=mt*time,cause=cause,xl=rep(xl,each=2), country=rep(country,each=2),id=id,cens=cens,stime=mt*stime,type=rep(types,each=2), f1=rep(F11x,each=2),p11=rep(p11,each=2),p12=rep(p12,each=2),p21=rep(p21,each=2), p22=rep(p22,each=2),entry=mt*etime,truncated=(time0) cause[status==0]<-0; data<-data.frame(time=time,ctime=ctime,status=status,X=x,cause=cause) return(data) } ## }}} sim.F1<-function(n,lam0=0.5,beta=0.3,Cint=c(0,1)) { ## {{{ x<-runif(n); tt<-seq(0,1,length=100) F11x<-F1(1,x=x,beta=beta,lam0=lam0) cause1<-rbinom(n,1,F11x) ### stime<-rep(2,n); for (i in 1:n) { if (cause1[i]==1) { myhazx<-F1(tt,x=x[i],beta=beta,lam0=lam0)/F11x[i] stime[i]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) } } ctime<-runif(n,Cint) time<-pmin(ctime,stime) status<-(stime0) mis <- c(mis,idx[,1]) res <- c(res,list(xx)) } } mis <- unique(mis) if (length(mis)>0) { for (i in seq_along(res)) { if (length(res[[i]])>0) res[[i]] <- res[[i]][-mis,,drop=FALSE] } } if (!missing(nam)) names(res) <- nam return(res) } DD <- resh(data.frame(x),X,Z,weights,nam=c("y","x","z","w"),onecol=3) Y00 <- matrix(c(0,0, 1,0, 0,1, 1,1),ncol=2,byrow=TRUE) if (is.null(X) && is.null(Z)) { pos <- factor(interaction(DD$y)) ipos <- unique(as.numeric(pos)) Tab <- rbind(as.vector(table(DD$y))); colnames(Tab) <- c("00","10","01","11") Y0 <- Y00 NN <- as.vector(Tab) midx1 <- 1; midx2 <- 2 X0 <- matrix(1,ncol=2,nrow=4) Z0 <- matrix(1,ncol=1,nrow=4) namX <- "(Intercept)" namZ <- "r:(Intercept)" } else { pos2 <- fast.pattern(cbind(DD$x,DD$z)) pos <- interaction(interaction(DD$y),pos2$group) XZ0 <- pos2$pattern; colnames(XZ0) <- c(colnames(DD$x),colnames(DD$z)) NN2 <- unlist(by(DD$y,pos,nrow)) NN <- rep(0,4*nrow(XZ0)) ipos <- unique(as.numeric(pos)) NN[ipos] <- NN2[ipos] ## tt <- with(DD, by(y,as.list(as.data.frame(cbind(x,z))),FUN=function(x) as.vector(table(x[,1:2])),simplify=FALSE)) ## XZ0 <- do.call("expand.grid",lapply(attributes(tt)$dimnames,as.numeric)) ## rem <- which(unlist(lapply(tt,is.null))) ## if (length(rem)>0) { ## tt <- tt[-rem] ## XZ0 <- XZ0[-rem,,drop=FALSE] ## } ## NN <- Reduce("c",tt); ## Reduce("cbind",tt) suppressWarnings(Tab <- cbind(matrix(NN,ncol=4,byrow=TRUE),XZ0)); colnames(Tab)[1:4] <- c("00","10","01","11") Y0 <- matrix(rep(t(Y00),length(NN)/4),ncol=2,byrow=TRUE) if (is.null(X)) X0 <- matrix(1,ncol=2,nrow=nrow(Y0)) else { X0 <- as.matrix(XZ0[rep(seq(nrow(XZ0)),each=4),seq(ncol(X)*2),drop=FALSE]) } if (is.null(Z)) Z0 <- matrix(1,ncol=1,nrow=nrow(Y0)) else { Z1 <- as.matrix(XZ0[,ncol(XZ0)-ncol(Z)+seq(ncol(Z)),drop=FALSE]) Z0 <- Z1[rep(seq(nrow(XZ0)),each=4),,drop=FALSE] colnames(Z0) <- colnames(Z1) } } nx <- ncol(X0)/2 midx1 <- seq(nx) midx2 <- midx1+nx midx <- seq(2*nx) blen <- ifelse(eqmarg,nx,2*nx) zlen <- ncol(Z0) plen <- blen+zlen MyData <- ExMarg(Y0,X0,W0=NULL,NULL, midx1=1,midx2=2,eqmarg=eqmarg,allmarg=FALSE,Z0) datanh <- function(r) 1/(1-r^2) dtanh <- function(z) 4*exp(2*z)/(exp(2*z)+1)^2 vartr <- tanh dvartr <- dtanh; varitr <- atanh trname <- "tanh"; itrname <- "atanh" varcompname <- "Tetrachoric correlation" ##msg <- "Variance of latent residual sterm = 1 (standard probit link)" msg <- NULL model <- list(tr=vartr,name=trname,inv=itrname,invname=itrname,deriv=dvartr,varcompname=varcompname,eqmarg=eqmarg,blen=blen,zlen=zlen,...) SigmaFun <- function(p,Z=MyData$Z0,cor=TRUE,...) { if (!cor) { r <- vartr(p[1]) Sigma <- matrix(c(1,r,r,1),2) attributes(Sigma)$dvartr <- dvartr return(Sigma) } val <- Z%*%p dr <- apply(Z,2,function(x) x*dvartr(val)) structure(list(rho=vartr(val),lp=val,drho=dr),dvartr=dvartr,vartr=vartr) } if (length(weights)<2) { w0 <- NN } else { w1 <- apply(DD$w,1,biweight) w2 <- unlist(by(w1,pos,sum)) w0 <- rep(0,4*nrow(Tab)) w0[ipos] <- w2[ipos] } if (!missing(cells)) { idx <- unlist(apply(MyData$Y0,1,function(x) all(x==cells))) w0[!idx] <- 0 } if (!is.null(control$start)) { p0 <- control$start control$start <- NULL } else { p0 <- rep(0,plen) events <- Tab[,2]+Tab[,3]+2*Tab[,4] totals <- rowSums(Tab[,1:4,drop=FALSE]) if (is.null(X)) xx1 <- rep(1,length(totals)) else xx1 <- Tab[,midx1+4,drop=FALSE] b1 <- glm(cbind(events,totals)~-1+xx1,family=binomial("probit")) p0[midx1] <- coef(b1) if (!eqmarg) { if (is.null(X)) xx2 <- rep(1,length(totals)) else xx2 <- Tab[,midx2+4,drop=FALSE] b2 <- glm(cbind(events,totals)~-1+xx2,family=binomial("probit")) p0[midx2] <- coef(b2) } } U0 <- function(p) { MyData0 <- MyData MyData0$Y0[,] <- 0 val0 <- Ubiprobit(p,SigmaFun,eqmarg,nx,MyData0,indiv=TRUE) P <- exp(attr(val0,"logLik")) res <- log(1-P) dlogP <- val0 dres <- (-P/(1-P)) %x% rbind(rep(1,ncol(val0))) structure(res,score=dres) } U <- function(p,w0) { val <- Ubiprobit(p,SigmaFun,eqmarg,nx,MyData,indiv=TRUE) if (pair.ascertained) { ## log Pij - log (1-P00) ## U := Uij + dP00/(1-P00) = Uij+ DlogP00*P00/(1-P00) MyData0 <- MyData MyData0$Y0[,] <- 0 dlogP00 <- Ubiprobit(p,SigmaFun,eqmarg,nx,MyData0,indiv=TRUE) logP00 <- attr(dlogP00,"logLik") P00 <- exp(logP00) ll00 <- log(1-P00) dll00 <- -(P00/(1-P00)) %x% rbind(rep(1,ncol(dlogP00))) dll00 <- dll00 * dlogP00 val1 <- val attr(val,"logLik") <- attr(val,"logLik") - ll00 val <- val-dll00 } logl <- w0*as.vector(attributes(val)$logLik) score <- apply(val,2,function(x) w0*x) return(structure(score,logLik=logl)) } f0 <- function(p) -sum(attributes(U(p,w0))$logLik) ## f00 <- function(p) -sum(attributes(U(c(0,p),w0))$logLik) g0 <- function(p) -as.numeric(colSums(U(p,w0))) aa <- U(c(0.203,0),c(0,1,1,1)) exp(attr(aa,"logLik")) if (!is.null(p)) op <- list(par=p) else { suppressWarnings(op <- nlminb(p0,f0,gradient=g0,control=control)) } iI <- Inverse(numDeriv::jacobian(g0,op$par)) V <- iI UU <- U(op$par,w0) logLik <- sum(attributes(UU)$logLik) UU <- U(op$par,1) if (length(weights)>1) { UU <- apply(UU[pos,],2,function(x) w1*x) } else { UU <- UU[pos,] } meat <- crossprod(UU) if (length(weights>1)) V <- iI%*%meat%*%iI mycall <- match.call() cc <- cbind(op$par,sqrt(diag(V))) cc <- cbind(cc,cc[,1]/cc[,2],2*(pnorm(abs(cc[,1]/cc[,2]),lower.tail=FALSE))) colnames(cc) <- c("Estimate","Std.Err","Z","p-value") if (!eqmarg) rownames(cc) <- c(paste(namX,rep(c(1,2),each=length(namX)),sep="."), namZ) else rownames(cc) <- c(namX,namZ) rownames(V) <- colnames(V) <- rownames(cc) npar <- list(intercept=1, pred=blen-2+eqmarg) if (!eqmarg) npar <- lapply(npar,function(x) x*2) npar$var <- zlen N <- with(MyData, c(pairs=sum(NN))) val <- c(list(coef=cc, N=N, vcov=V, bread=iI, score=rbind(UU), logLik=logLik, opt=op, call=mycall, model=model, msg=msg, table=Tab, npar=npar, SigmaFun=SigmaFun),add) class(val) <- "biprobit" return(val) } ##' Bivariate Probit model ##' ##' @export ##' @aliases biprobit biprobit.vector biprobit.time ##' @param x formula (or vector) ##' @param data data.frame ##' @param id The name of the column in the dataset containing the cluster id-variable. ##' @param rho Formula specifying the regression model for the dependence parameter ##' @param num Optional name of order variable ##' @param strata Strata ##' @param eqmarg If TRUE same marginals are assumed (exchangeable) ##' @param indep Independence ##' @param weights Weights ##' @param biweight Function defining the bivariate weight in each cluster ##' @param samecens Same censoring ##' @param randomeffect If TRUE a random effect model is used (otherwise correlation parameter is estimated allowing for both negative and positive dependence) ##' @param vcov Type of standard errors to be calculated ##' @param pairs.only Include complete pairs only? ##' @param allmarg Should all marginal terms be included ##' @param control Control argument parsed on to the optimization routine. Starting values may be parsed as '\code{start}'. ##' @param messages Control amount of messages shown ##' @param constrain Vector of parameter constraints (NA where free). Use this to set an offset. ##' @param table Type of estimation procedure ##' @param p Parameter vector p in which to evaluate log-Likelihood and score function ##' @param ... Optional arguments ##' @examples ##' data(prt) ##' prt0 <- subset(prt,country=="Denmark") ##' a <- biprobit(cancer~1+zyg, ~1+zyg, data=prt0, id="id") ##' b <- biprobit(cancer~1+zyg, ~1+zyg, data=prt0, id="id",pairs.only=TRUE) ##' predict(b,newdata=lava::Expand(prt,zyg=c("MZ"))) ##' predict(b,newdata=lava::Expand(prt,zyg=c("MZ","DZ"))) ##' ##' \donttest{ ## Reduce Ex.Timings ##' library(lava) ##' m <- lvm(c(y1,y2)~x) ##' covariance(m,y1~y2) <- "r" ##' constrain(m,r~x+a+b) <- function(x) tanh(x[2]+x[3]*x[1]) ##' distribution(m,~x) <- uniform.lvm(a=-1,b=1) ##' ordinal(m) <- ~y1+y2 ##' d <- sim(m,1000,p=c(a=0,b=-1)); d <- d[order(d$x),] ##' dd <- fast.reshape(d) ##' ##' a <- biprobit(y~1+x,rho=~1+x,data=dd,id="id") ##' summary(a, mean.contrast=c(1,.5), cor.contrast=c(1,.5)) ##' with(predict(a,data.frame(x=seq(-1,1,by=.1))), plot(p00~x,type="l")) ##' ##' pp <- predict(a,data.frame(x=seq(-1,1,by=.1)),which=c(1)) ##' plot(pp[,1]~pp$x, type="l", xlab="x", ylab="Concordance", lwd=2, xaxs="i") ##' confband(pp$x,pp[,2],pp[,3],polygon=TRUE,lty=0,col=Col(1)) ##' ##' pp <- predict(a,data.frame(x=seq(-1,1,by=.1)),which=c(9)) ## rho ##' plot(pp[,1]~pp$x, type="l", xlab="x", ylab="Correlation", lwd=2, xaxs="i") ##' confband(pp$x,pp[,2],pp[,3],polygon=TRUE,lty=0,col=Col(1)) ##' with(pp, lines(x,tanh(-x),lwd=2,lty=2)) ##' ##' xp <- seq(-1,1,length.out=6); delta <- mean(diff(xp)) ##' a2 <- biprobit(y~1+x,rho=~1+I(cut(x,breaks=xp)),data=dd,id="id") ##' pp2 <- predict(a2,data.frame(x=xp[-1]-delta/2),which=c(9)) ## rho ##' confband(pp2$x,pp2[,2],pp2[,3],center=pp2[,1]) ##' ##' ##' } ##' ##' ## Time ##' \dontrun{ ##' a <- biprobit.time(cancer~1, rho=~1+zyg, id="id", data=prt, eqmarg=TRUE, ##' cens.formula=Surv(time,status==0)~1, ##' breaks=seq(75,100,by=3),fix.censweights=TRUE) ##' ##' a <- biprobit.time2(cancer~1+zyg, rho=~1+zyg, id="id", data=prt0, eqmarg=TRUE, ##' cens.formula=Surv(time,status==0)~zyg, ##' breaks=100) ##' ##' a1 <- biprobit.time2(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="MZ"), eqmarg=TRUE, ##' cens.formula=Surv(time,status==0)~1, ##' breaks=100,pairs.only=TRUE) ##' ##' a2 <- biprobit.time2(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="DZ"), eqmarg=TRUE, ##' cens.formula=Surv(time,status==0)~1, ##' breaks=100,pairs.only=TRUE) ##' ##' prt0$trunc <- prt0$time*runif(nrow(prt0))*rbinom(nrow(prt0),1,0.5) ##' a3 <- biprobit.time(cancer~1, rho=~1, id="id", data=subset(prt0,zyg=="DZ"), eqmarg=TRUE, ##' cens.formula=Surv(trunc,time,status==0)~1, ##' breaks=100,pairs.only=TRUE) # ##' ##' plot(a,which=3,ylim=c(0,0.1)) ##'} biprobit <- function(x, data, id, rho=~1, num=NULL, strata=NULL, eqmarg=TRUE, indep=FALSE, weights=NULL, biweight, samecens=TRUE, randomeffect=FALSE, vcov="robust", pairs.only=FALSE, allmarg=samecens&!is.null(weights), control=list(trace=0), messages=1, constrain=NULL, table=pairs.only, p=NULL, ...) { mycall <- match.call() if (missing(biweight)) { biweight <- mycall$biweight <- function(x) { u=min(x); ifelse(u==0,0,1/min(u)) } } formulaId <- unlist(Specials(x,"cluster")) if (is.null(formulaId)) { formulaId <- unlist(Specials(x,"id")) } ## formulaOffset <- unlist(Specials(x,"offset")) formulaStrata <- unlist(Specials(x,"strata")) formulaSt <- paste("~.-cluster(",formulaId,")", "-id(",formulaId,")", "-strata(",paste(formulaStrata,collapse="+"),")",sep="") formula <- update(x,formulaSt) if (!is.null(formulaId)) { id <- formulaId mycall$id <- id } if (!is.null(formulaStrata)) strata <- formulaStrata mycall$x <- formula if (!is.null(strata)) { dd <- split(data,interaction(data[,strata])) fit <- lapply(seq(length(dd)),function(i) { if (messages>0) message("Strata '",names(dd)[i],"'") mycall$data <- dd[[i]] eval(mycall) }) res <- list(model=fit) res$strata <- names(res$model) <- names(dd) class(res) <- c("twinlm.strata","biprobit") res$coef <- unlist(lapply(res$model,coef)) res$vcov <- blockdiag(lapply(res$model,vcov.biprobit)) res$N <- length(dd) res$idx <- seq(length(coef(res$model[[1]]))) rownames(res$vcov) <- colnames(res$vcov) <- names(res$coef) return(res) } if (missing(id)) { if (!is.null(weights)) { weights <- data[,weights] return(glm(formula,data=data,family=binomial(probit),weights=weights,...)) } return(glm(formula,data=data,family=binomial(probit),...)) } yx <- getoutcome(formula) if (pairs.only) { X <- Z <- NULL zf <- getoutcome(rho); if (length(attr(zf,"x"))>0) Z <- model.matrix(rho,data); if (table && NCOL(Z)<10 && length(unique(sample(Z,min(1000,length(Z)))))<10) { ## Not quantitative? if (!is.null(weights)) weights <- data[,weights] if (length(attr(yx,"x")>0)) X <- model.matrix(x,data); return(biprobit.vector(data[,yx],X=X,Z=Z,id=data[,id],weights,biweight=biweight,eqmarg=eqmarg,add=list(formula=formula,rho.formula=rho),control=control,p=p,...)) } } mycall <- match.call() DD <- procdatabiprobit(formula,data,id,num=num,weights=weights,pairs.only=pairs.only,rho,...) rnames1 <- DD$rnames1 nx <- length(rnames1) ## if (nx==0) stop("Zero design not allowed") midx1 <- seq(nx) midx2 <- midx1+nx midx <- seq(2*nx) blen <- ifelse(eqmarg,nx,2*nx) zlen <- ncol(DD$Z0) plen <- blen+zlen datanh <- function(r) 1/(1-r^2) dtanh <- function(z) 4*exp(2*z)/(exp(2*z)+1)^2 vartr <- tanh dvartr <- dtanh; varitr <- atanh trname <- "tanh"; itrname <- "atanh" Sigma1 <- diag(2) Sigma2 <- matrix(c(0,1,1,0),2,2) dS0 <- rbind(c(0,1,1,0)) varcompname <- "Tetrachoric correlation" msg <- NULL if (randomeffect) msg <- "Variance of latent residual term = 1 (standard probit link)" if (randomeffect) { dS0 <- rbind(rep(1,4)) vartr <- dvartr <- exp; inv <- log trname <- "exp"; itrname <- "log" Sigma2 <- 1 varcompname <- NULL } model <- list(tr=vartr,name=trname,inv=itrname,invname=itrname,deriv=dvartr,varcompname=varcompname,dS=dS0,eqmarg=eqmarg,randomeffect=randomeffect,blen=blen,zlen=zlen) MyData <- with(DD,ExMarg(Y0,XX0,W0,dS0,midx1,midx2,eqmarg=eqmarg,allmarg=allmarg,Z0,id=id)) if (samecens & !is.null(weights)) { MyData$W0 <- cbind(apply(MyData$W0,1,biweight)) if (!is.null(MyData$Y0_marg)) { MyData$W0_marg <- cbind(apply(MyData$W0_marg,1,biweight)) } } SigmaFun <- function(p,Z=MyData$Z0,cor=!randomeffect,...) { if (!cor) { r <- vartr(p[1]) Sigma <- matrix(c(1,r,r,1),2) if (indep) Sigma <- diag(2) attributes(Sigma)$dvartr <- dvartr return(Sigma) } val <- Z%*%p dr <- apply(Z,2,function(x) x*dvartr(val)) structure(list(rho=vartr(val),lp=val,drho=dr),dvartr=dvartr,vartr=vartr) } U <- function(p,indiv=FALSE) { gamma <- p[seq(zlen)+blen] ##if (bound) gamma <- min(gamma,20) Sigma <- SigmaFun(gamma) if (randomeffect) { lambda <- eigen(Sigma)$values if (any(lambda<1e-12 | lambda>1e9)) stop("Variance matrix out of bounds") } Mu_marg <- NULL if (eqmarg) { B <- cbind(p[midx1]) Mu <- with(MyData, cbind(XX0[,midx1,drop=FALSE]%*%B,XX0[,midx2,drop=FALSE]%*%B)) if (!is.null(MyData$Y0_marg)) Mu_marg <- with(MyData, XX0_marg%*%B) } else { B1 <- cbind(p[midx1]) B2 <- cbind(p[midx2]) Mu <- with(MyData, cbind(XX0[,midx1,drop=FALSE]%*%B1,XX0[,midx2,drop=FALSE]%*%B2)) if (!is.null(MyData$Y0_marg)) Mu_marg <- with(MyData, rbind(X0_marg1%*%B1,X0_marg2%*%B2)) } if (randomeffect) { U <- with(MyData, .Call("biprobit2", Mu,XX0, Sigma,dS0*attributes(Sigma)$dvartr(p[plen]),Y0,W0, !is.null(W0),TRUE,eqmarg,FALSE, PACKAGE="mets")) } else { U <- with(MyData, .Call("biprobit2", Mu,XX0, Sigma$rho,Sigma$drho, Y0,W0, !is.null(W0),TRUE,eqmarg,TRUE, PACKAGE="mets")) } if (!is.null(MyData$Y0_marg)) { if (randomeffect) { U_marg <- with(MyData, .Call("uniprobit", Mu_marg,XX0_marg, Sigma[1,1],dS0_marg*attributes(Sigma)$dvartr(p[plen]),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) } else { U_marg0 <- matrix(0,length(MyData$Y0_marg),ncol=plen) U_marg <- with(MyData, .Call("uniprobit", Mu_marg,XX0_marg, 1,matrix(ncol=0,nrow=0),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) U_marg0[,seq(blen)] <- U_marg[[1]] U_marg[[1]] <- U_marg0 } U$score <- rbind(U$score,U_marg$score) U$loglik <- c(U$loglik,U_marg$loglik) } if (indiv) { val <- U$score if (!is.null(MyData$idmarg) && !pairs.only) { val <- with(MyData, cluster.index(c(id,idmarg),mat=U$score)) } ## val <- U$score[MyData$id,,drop=FALSE] ## N <- length(MyData$id) ## idxs <- seq_len(N) ## for (i in seq_len(N)) { ## idx <- which((MyData$idmarg)==(MyData$id[i]))+N ## idxs <- c(idxs,idx) ## val[i,] <- val[i,]+colSums(U$score[idx,,drop=FALSE]) ## } ## val <- rbind(val, U$score[-idxs,,drop=FALSE]) attributes(val)$logLik <- U$loglik return(val) } val <- colSums(U$score) attributes(val)$logLik <- sum(U$loglik) return(val) } p0 <- rep(0,plen) if (!is.null(control$start)) { p0 <- control$start control$start <- NULL } else { g <- suppressWarnings(glm(formula,data,family=binomial(probit))) p0[midx1] <- coef(g) if (!eqmarg) p0[midx2] <- coef(g) } f <- function(p) crossprod(U(p))[1] f0 <- function(p) -sum(attributes(U(p))$logLik) g0 <- function(p) -as.numeric(U(p)) h0 <- function(p) crossprod(U(p,indiv=TRUE)) if (!is.null(constrain)) { if (length(constrain)!=length(p0)) stop("Wrong length of constraints (should be NA at positions not to be fixed)") fix <- which(!is.na(constrain)) free <- which(is.na(constrain)) p0 <- p0[free] U0 <- U U <- function(p,indiv=FALSE) { p1 <- constrain p1[free] <- p res <- U0(p1,indiv) if (is.matrix(res)) { return(structure(res[,free,drop=FALSE],logLik=attributes(res)$logLik)) } return(structure(res[free],logLik=attributes(res)$logLik)) } } if (is.null(control$method)) { ## control$method <- ifelse(samecens & !is.null(weights), "bhhh","quasi") control$method <- "quasi" } control$method <- tolower(control$method) if (is.null(p)) { if (control$method=="score") { control$method <- NULL op <- nlminb(p0,f,control=control,...) } else if (control$method=="quasi") { control$method <- NULL suppressWarnings(op <- nlminb(p0,f0,gradient=g0,control=control)) ## } ## else if (control$method=="bhhh") { ## controlnr <- list(stabil=FALSE, ## gamma=0.1, ## gamma2=1, ## ngamma=5, ## iter.max=200, ## epsilon=1e-12, ## tol=1e-9, ## trace=1, ## stabil=FALSE) ## controlnr[names(control)] <- control ## op <- lava:::NR(start=p0,NULL,g0, h0,control=controlnr) } else { control$method <- NULL op <- nlminb(p0,f0,control=control) } } else op <- list(par=p) UU <- U(op$par,indiv=TRUE) idx <- seq(nrow(UU)) if (!is.null(MyData$idmarg)) idx <- with(MyData,cluster.index(c(id,idmarg)))$firstclustid+1 idvar <- with(MyData, c(id0,idmarg0))[idx] J <- crossprod(UU) ## iJ <- Inverse(J) iI <- Inverse(-numDeriv::jacobian(U,op$par)) V <- switch(vcov, robust=, sandwich=iI%*%J%*%iI,##iJ%*%I%*%iJ, score=, outer=Inverse(J), hessian=iI ) cc <- cbind(op$par,sqrt(diag(V))) cc <- cbind(cc,cc[,1]/cc[,2],2*(pnorm(abs(cc[,1]/cc[,2]),lower.tail=FALSE))) if (!is.null(constrain)) { cc0 <- matrix(NA,nrow=length(constrain),ncol=4) cc0[free,] <- cc cc0[fix,1] <- constrain[fix] cc <- cc0 V0 <- matrix(0,nrow=length(constrain),ncol=length(constrain)) V0[free,free] <- V V <- V0 } colnames(cc) <- c("Estimate","Std.Err","Z","p-value") p1 <- "("; p2 <- ")" if (itrname=="log") rhonam <- "U" else { rhonam <- DD$znames p1 <- p2 <- ""; itrname <- "r:" } if (!eqmarg) rownames(cc) <- c(paste(rnames1,rep(c(1,2),each=length(rnames1)),sep="."), paste(itrname,p1,rhonam,p2,sep="")) else rownames(cc) <- c(rnames1,paste(itrname,p1,rhonam,p2,sep="")) rownames(V) <- colnames(V) <- rownames(cc) npar <- list(intercept=attributes(terms(formula))$intercept, pred=nrow(attributes(terms(formula))$factor)-1) if (!eqmarg) npar <- lapply(npar,function(x) x*2) npar$var <- 1##nrow(cc)-sum(unlist(npar)) N <- with(MyData, c(n=nrow(XX0)*2+length(margidx), pairs=nrow(XX0))) val <- list(coef=cc,N=N,vcov=V,bread=iI,score=UU,logLik=attributes(UU)$logLik,opt=op, call=mycall, model=model,msg=msg,npar=npar, SigmaFun=SigmaFun,rho.formula=rho,formula=formula,constrain=constrain, id=idvar) class(val) <- "biprobit" return(val) } procdatabiprobit <- function(formula,data,id,num=NULL,weights=NULL,pairs.only=FALSE,rho=~1,...) { data <- data[order(data[,id]),] idtab <- table(data[,id]) if (pairs.only) { data <- data[which(as.character(data[,id])%in%names(idtab)[idtab==2]),] idtab <- table(data[,id]) } ff <- paste(as.character(formula)[3],"+", paste(c(id,num),collapse="+")) yvar <- paste(deparse(formula[[2]]),collapse="") if (!is.null(weights)) ff <- paste(weights,"+",ff) ff <- paste("~",yvar,"+",ff) if (is.logical(data[,yvar])) data[,yvar] <- data[,yvar]*1 if (is.factor(data[,yvar])) data[,yvar] <- as.numeric(data[,yvar])-1 formula0 <- as.formula(ff) opt <- options(na.action="na.pass") Data <- model.matrix(formula0,data) options(opt) rnames1 <- setdiff(colnames(Data),c(yvar,num,id,weights)) X0 <- as.matrix(Data[,rnames1]) ex <- 1+!is.null(num) rho <- update(rho,paste("~.+", paste(c(id,num),collapse="+"))) Z0 <- model.matrix(rho,data); znames <- setdiff(colnames(Z0),c(id,num)) znames1 <- paste(znames,1,sep="") Z0 <- as.matrix(subset(fast.reshape(Z0,id=id),select=znames1)) colnames(Z0) <- znames1 Wide <- fast.reshape(as.data.frame(Data),id=id,num=num,sep=".",labelnum=TRUE) W0 <- NULL yidx <- paste(yvar,1:2,sep=".") rmidx <- c(id,yidx) if (!is.null(weights)) { W <- cbind(data[,weights]) widx <- paste(weights,1:2,sep=".") W0 <- as.matrix(Wide[,widx]) rmidx <- c(rmidx,widx) } Y0 <- as.matrix(Wide[,yidx]) XX0 <- as.matrix(Wide[,setdiff(colnames(Wide),rmidx)]) XX0[is.na(XX0)] <- 0 list(Y0=Y0,XX0=XX0,W0=W0,Z0=Z0,znames=znames,rnames1=rnames1,id=Wide[,id]) } Ubiprobit <- function(p,Rho,eqmarg,nx,MyData,indiv=FALSE) { midx1 <- seq(nx) midx2 <- midx1+nx midx <- seq(2*nx) blen <- ifelse(eqmarg,nx,2*nx) zlen <- length(p)-blen plen <- blen+zlen gamma <- p[blen+seq(zlen)] Sigma <- Rho(gamma) ## lambda <- eigen(Sigma)$values ## if (any(lambda<1e-12 | lambda>1e9)) stop("Variance matrix out of bounds") Mu_marg <- NULL if (eqmarg) { B <- cbind(p[midx1]) Mu <- with(MyData, cbind(XX0[,midx1,drop=FALSE]%*%B,XX0[,midx2,drop=FALSE]%*%B)) ## Mu <- with(MyData, matrix(X0%*%B,ncol=2,byrow=TRUE)) if (!is.null(MyData$Y0_marg)) Mu_marg <- with(MyData, XX0_marg%*%B) } else { B1 <- cbind(p[midx1]) B2 <- cbind(p[midx2]) Mu <- with(MyData, cbind(XX0[,midx1,drop=FALSE]%*%B1,XX0[,midx2,drop=FALSE]%*%B2)) if (!is.null(MyData$Y0_marg)) Mu_marg <- with(MyData, rbind(X0_marg1%*%B1,X0_marg2%*%B2)) } U <- with(MyData, .Call("biprobit2", Mu,XX0, Sigma$rho,Sigma$drho,Y0,W0, !is.null(W0),TRUE,eqmarg,TRUE, PACKAGE="mets")) if (!is.null(MyData$Y0_marg)) { U_marg0 <- matrix(0,length(MyData$Y0_marg),ncol=plen) U_marg <- with(MyData, .Call("uniprobit", Mu_marg,XX0_marg, 1,matrix(ncol=0,nrow=0),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) U_marg0[,seq(blen)] <- U_marg[[1]] U_marg[[1]] <- U_marg0 U$score <- rbind(U$score,U_marg$score) U$loglik <- c(U$loglik,U_marg$loglik) } if (indiv) { val <- with(MyData, cluster.index(c(id,idmarg),mat=U$score)) attributes(val)$logLik <- U$loglik return(val) } val <- colSums(U$score) attributes(val)$logLik <- sum(U$loglik) return(val) } mets/R/fastapprox.R0000644000176200001440000000306013623061405013734 0ustar liggesusers##' Fast approximation ##' ##' Fast approximation ##' @param time Original ordered time points ##' @param new.time New time points ##' @param equal If TRUE a list is returned with additional element ##' @param type Type of matching, nearest index, nearest greater than ##' or equal (right), number of elements smaller than y otherwise ##' the closest value above new.time is returned. ##' @param sorted Set to true if new.time is already sorted ##' @param ... Optional additional arguments ##' @author Klaus K. Holst ##' @examples ##' id <- c(1,1,2,2,7,7,10,10) ##' fast.approx(unique(id),id) ##' ##' t <- 0:6 ##' n <- c(-1,0,0.1,0.9,1,1.1,1.2,6,6.5) ##' fast.approx(t,n,type="left") ##' @export fast.approx <- function(time,new.time,equal=FALSE,type=c("nearest","right","left"),sorted=FALSE,...) { if (!sorted) { ord <- order(new.time,decreasing=FALSE) new.time <- new.time[ord] } A <- NULL if (NCOL(time)>1) { A <- time time <- A[,1,drop=TRUE] } if (is.unsorted(time)) warnings("'time' will be sorted") type <- agrep(type[1],c("nearest","right","left"))-1 arglist <- list("FastApprox", time=sort(time), newtime=new.time, equal=equal, type=type, PACKAGE="mets") res <- do.call(".Call",arglist) if (!sorted) { oord <- order(ord) if (!equal) return(res[oord]) res <- lapply(res,function(x) x[oord]) } if (!is.null(A)) { A[res,,drop=FALSE] } return(res) } mets/R/lifetable.R0000644000176200001440000004503113623061405013500 0ustar liggesusers##' @export `lifetable` <- function(x,...) UseMethod("lifetable") ##' Create simple life table ##' ##' @title Life table ##' @param x time formula (Surv) or matrix/data.frame with columns time,status or entry,exit,status ##' @param strata strata ##' @param data data.frame ##' @param breaks time intervals ##' @param weights weights variable ##' @param confint if TRUE 95\% confidence limits are calculated ##' @param ... additional arguments to lower level functions ##' @author Klaus K. Holst ##' @aliases lifetable lifetable.matrix lifetable.formula ##' @usage ##' \method{lifetable}{matrix}(x, strata = list(), breaks = c(), ##' weights=NULL, confint = FALSE, ...) ##' ##' \method{lifetable}{formula}(x, data=parent.frame(), breaks = c(), ##' weights=NULL, confint = FALSE, ...) ##' @examples ##' library(timereg) ##' data(TRACE) ##' ##' d <- with(TRACE,lifetable(Surv(time,status==9)~sex+vf,breaks=c(0,0.2,0.5,8.5))) ##' summary(glm(events ~ offset(log(atrisk))+factor(int.end)*vf + sex*vf, ##' data=d,poisson)) ##' @export lifetable.matrix <- function(x,strata=list(),breaks=c(),weights=NULL,confint=FALSE,...) { if (ncol(x)==3) { status <- x[,3] entry <- x[,1] time <- x[,2] } else { status <- x[,2] time <- x[,1] entry <- rep(0,length(time)) } LifeTable(time,status,entry,strata=strata,breaks=breaks,weights=weights,confint,...) } ##' @export lifetable.formula <- function(x,data=parent.frame(),breaks=c(),weights=NULL,confint=FALSE,...) { mf <- match.call(expand.dots = FALSE) m <- match(c("x", "data", "weights"), names(mf), 0L) mf <- mf[c(1L, m)] mf$drop.unused.levels <- TRUE mf[[1L]] <- quote(stats::model.frame) names(mf)[which(names(mf)=="x")] <- "formula" mf <- eval(mf, parent.frame()) weights <- as.vector(model.weights(mf)) ##mf <- model.frame(x,data) Y <- model.extract(mf, "response") Terms <- terms(x, data = data) if (!is.Surv(Y)) stop("Expected a 'Surv'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } strata <- list() X <- model.matrix(Terms, data) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)>0) { strata <- as.list(model.frame(Terms,data)[,-1,drop=FALSE]) } LifeTable(exit,status,entry, strata=strata,breaks=breaks,weights=weights,confint=confint,...) } ## lifetable.data.table <- function(x,entry,exit,status,strata,breaks,...) { ## requireNamespace("data.table") ## breaks <- sort(unique(breaks)) ## nbreaks <- length(breaks) ## ## prs <- parse(text=paste0("pmin(x,",exit,")-pmax(x-1,",entry,")")) ## ## dt[,eval(prs),by=strata] ## system.time(dur1 <- x[, ## lapply(breaks[-1],function(x) ## eval(parse(text=paste0("pmin(x,",exit,")-pmax(x-1,",entry,")"))) ## ),by=strata]) ## dur1[dur1<0] <- NA ## system.time(endur1 <- x[, ## lapply(breaks[-nbreaks],function(x) ## eval(parse(text=paste0("x+1-pmax(x,",entry,")"))) ## ),by=strata]) ## enter <- dur1[,lapply(.SD,function(x) sum(!is.na(x))),by=strata] ## atrisk <- dur1[,lapply(.SD,function(x) sum(x,na.rm=TRUE)),by=strata] ## vidx <- seq(length(strata)+1,ncol(atrisk)) ## suppressWarnings(names(atrisk)[vidx] <- paste0("_R",seq_along(vidx))) ## system.time(eventcens <- x[, ## lapply(breaks[-1],function(x) ## eval(parse(text=paste0("((pmin(x,",exit,")-pmax(x-1,",entry,"))<(x-pmax(x-1,",entry,")))*(1+",status,")"))) ## ),by=strata]) ## lost <- eventcens[,lapply(.SD,function(x) sum(x==1,na.rm=TRUE)),by=strata] ## events <- eventcens[,lapply(.SD,function(x) sum(x==2,na.rm=TRUE)),by=strata] ## suppressWarnings(names(events)[vidx] <- paste0("_E",seq_along(vidx))) ## res <- fast.reshape(cbind(events,atrisk[,vidx,with=FALSE])) ## return(res) ## res <- subset(data.frame(enter=enter, ## atrisk=atrisk, ## lost=lost, ## events=events, ## ## int.start=c(-Inf,breaks), ## ## int.end=c(breaks,Inf), ## int.start=breaks[-length(breaks)], ## int.end=breaks[-1], ## surv=0, ## rate=events/atrisk)) ## } LifeTable <- function(time,status,entry=NULL,weights=NULL,strata=list(),breaks=c(),confint=FALSE,interval=TRUE,mesg=FALSE) { if (is.null(entry)) entry <- rep(0,NROW(time)) if (mesg) message(dim(time)) if ((is.matrix(time) || is.data.frame(time)) && ncol(time)>1) { if (ncol(time)>=3L) { if (ncol(time)==4L) weights <- time[,4] status <- time[,3] entry <- time[,1] time <- time[,2] } else { status <- time[,2] time <- time[,1] entry <- rep(0,length(time)) } } if (mesg) message(dim(time)) if ((is.matrix(time) || is.data.frame(time)) && ncol(time)>1) { if (ncol(time)==3) { status <- time[,3] entry <- time[,1] time <- time[,2] } else { status <- time[,2] time <- time[,1] entry <- rep(0,length(time)) } } if (length(strata)>0) { a <- by(cbind(entry,time,status,weights), strata, FUN=LifeTable, breaks=breaks, confint=confint) cl <- lapply(strata,class) nulls <- which(unlist(lapply(a,is.null))) nonnulls <- setdiff(seq_along(a),nulls) nn <- do.call("expand.grid",attributes(a)$dimnames) if (length(nulls)>0) nn <- nn[-nulls,,drop=FALSE] nam <- nn[rep(seq(NROW(nn)),each=NROW(a[[nonnulls[1]]])),,drop=FALSE] xx <- list() for (i in seq(ncol(nam))) { if (cl[i]%in%c("numeric","integer")) xx <- c(xx,list(as.numeric(as.character(nam[,i])))) else xx <- c(xx, list(do.call(paste("as.",as.character(cl[i]),sep=""),list(nam[,i])))) } xx <- as.data.frame(xx); colnames(xx) <- colnames(nam) res <- Reduce("rbind",a) res <- cbind(res,xx) return(res) } if (length(breaks)==0) breaks <- c(0,max(time,na.rm=TRUE)) if (length(breaks)==1) breaks <- c(0,breaks) breaks <- sort(unique(breaks)) ## en <- matrix(unlist(lapply(c(-Inf, breaks),function(x) pmax(x,entry))), ## ncol=length(breaks)+1) ## ex <- matrix(unlist(lapply(c(breaks, Inf),function(x) pmin(x,time))), ## ncol=length(breaks)+1) en <- matrix(unlist(lapply(breaks[-length(breaks)],function(x) pmax(x,entry))), ncol=length(breaks)-1) ex <- matrix(unlist(lapply(breaks[-1],function(x) pmin(x,time))), ncol=length(breaks)-1) dur <- ex-en dur[dur<=0] <- NA eventcens <- dur; eventcens[!is.na(dur)] <- 0 lastobs <- apply(eventcens,1,function(x) tail(which(!is.na(x)),1)) eventcens[cbind(seq(nrow(eventcens)),lastobs)] <- status+1 if (!is.null(weights)) { W <- weights %x% rbind(rep(1,ncol(dur))) W[is.na(dur)] <- NA enter <- colSums(W,na.rm=TRUE) atrisk <- colSums(dur*W,na.rm=TRUE) Sum <- function(x) { res <- sum(x,na.rm=TRUE); ifelse(length(res)>0L, res, 0L) } lost <- apply(eventcens, 2, function(x) res <- Sum(weights[which(x==1)])) events <- apply(eventcens, 2, function(x) res <- Sum(weights[which(x==2)])) } else { enter <- colSums(!is.na(dur)) atrisk <- colSums(dur,na.rm=TRUE) lost <- colSums(eventcens==1,na.rm=TRUE) events <- colSums(eventcens==2,na.rm=TRUE) } rate <- events/atrisk; rate[is.nan(rate)] <- 0 res <- subset(data.frame(enter=enter, atrisk=atrisk, lost=lost, events=events, ## int.start=c(-Inf,breaks), ## int.end=c(breaks,Inf), int.start=breaks[-length(breaks)], int.end=breaks[-1], rate=rate)) if (interval) res$interval <- factor(paste0("[",res$int.start,";",res$int.end,")")) cumsum.na <- function(x,...) { x[is.na(x)] <- 0; cumsum(x) } if (length(strata)==0) res$surv <- with(res, exp(-cumsum.na(rate*(int.end-int.start)))) if (confint) { ff <- events ~ offset(log(atrisk)) if (length(breaks)>2) ff <- update(ff,.~.+factor(int.end)-1) g <- glm(ff,data=res,poisson) suppressMessages(ci <- rbind(exp(stats::confint(g)))) res[,"2.5%"] <- ci[,1] res[,"97.5%"] <- ci[,2] } res } eh <- function(formula,intervals,family=poisson(log),...) { if (missing(intervals)) stop("Please supply list of time-intervals") g <- glm(formula,family=family,...) structure(g,class=c("glm","eh"),intervals=intervals) } ##' Summary for survival analyses via the 'lifetable' function ##' ##' Summary for survival analyses via the 'lifetable' function ##' @title Extract survival estimates from lifetable analysis ##' @param object glm object (poisson regression) ##' @param ... Contrast arguments ##' @param timevar Name of time variable ##' @param time Time points (optional) ##' @param int.len Time interval length (optional) ##' @param confint If TRUE confidence limits are supplied ##' @param level Level of confidence limits ##' @param individual Individual predictions ##' @param length.out Length of time vector ##' @aliases eventpois pcif ##' @export ##' @author Klaus K. Holst eventpois <- function(object,...,timevar,time,int.len,confint=FALSE,level=0.95,individual=FALSE,length.out=25) { if (missing(timevar)) { timevar <- names(attributes(object)$intervals)[1] times <- attributes(object)$intervals int.len <- diff(times) } nn <- names(coef(object)) if (is.null(timevar)) { idx <- unlist(sapply(c("\\(Intercept\\)","bs\\(","ns\\("),function(x) grep(x,nn))) keep <- setdiff(seq_along(nn),idx) cc <- estimate(object,exp,keep=keep,labels=nn[keep])$coefmat colnames(cc)[1] <- "RR" cc[,5] <- coef(summary(object))[keep,4] return(cc) } timevar_re0 <- gsub("\\$|\\^","",glob2rx(timevar)) timevar_re <- paste0(timevar_re0,"[0-9]+\\.*[0-9]*") idx <- regexpr(timevar_re,nn) dots <- list(...) if (all(idx<0)) { timevar_re0 <- gsub("\\$|\\^","",glob2rx(paste0("factor(",timevar,")"))) timevar_re <- paste0(timevar_re0,"[0-9]+\\.*[0-9]*") idx <- regexpr(timevar_re,nn) } tvar <- unique(regmatches(nn,idx)) if (missing(time)) { time <- sort(unique(as.numeric(gsub(timevar_re0,"",tvar)))) if (length(time)==0) { i0 <- seq(nrow(object$data)) ## browser() ## if ("rate"%in%colnames(object$data)) { ## ii0 <- which(object$data[,"rate"]>0) ## i0 <- intersect(i0,ii0) ## } ## for (i in seq_along(dots)) { ## i0 <- intersect(i0,which(object$data[,names(dots)[i]]==dots[[i]])) ## } rg <- range(object$data[i0,timevar],na.rm=TRUE) time <- seq(rg[1],rg[2],length.out=length.out) } else { ##time <- seq(1,rg[2]) } } if (missing(int.len)) { int.len <- diff(c(0,time)) } else if (int.len==1) int.len <- rep(int.len,nrow(res)) tt <- terms(object) offsetvar <- NULL if (attr(tt,"offset")) { offsetvar <- all.vars(tt)[attr(tt,"offset")] dots[[offsetvar]] <- 1 } responsevar <- getoutcome(tt) vv <- setdiff(all.vars(formula(tt)),c(offsetvar,responsevar)) dots0 <- dots dots[[timevar]] <- time dotnames <- c() if (individual) { newdata <- as.data.frame(dots) for (v in vv) { if (v%ni%names(dots)) newdata[,v] <- object$data[1,v] else dotnames <- c(dotnames,v) } } else { for (v in vv) { if (v%ni%names(dots)) { dots[[v]] <- object$data[1,v] } else { dotnames <- c(dotnames,v) } } args <- c(list(`_data`=model.frame(object)),dots) newdata <- do.call(Expand, args) newdata <- dsort(newdata,c(setdiff(dotnames,timevar),timevar)) } Terms <- delete.response(tt) m <- model.frame(Terms, newdata, xlev = object$xlevels) X <- model.matrix(Terms, m, contrasts.arg = object$contrasts) ## NA-robust matrix product beta0 <- coef(object); beta0[is.na(beta0)] <- -.Machine$double.xmax V <- vcov(object) V0 <- structure(matrix(0,length(beta0),length(beta0)),dimnames=list(names(beta0),names(beta0))) idx <- which(rownames(V0)%in%rownames(V)) V0[idx,idx] <- V coefs <- X%*%beta0 res <- cbind(time-int.len,int.len,exp(coefs)) colnames(res) <- c("time","int.len","rate") if (nrow(coefs)<=length(time)) { if (!confint) { res <- cbind(res,cumsum(res[,3]*int.len)) res <- cbind(res,exp(-res[,4])) } else { S0 <- X%*%V0%*%t(X) system.time(e0 <- estimate(NULL,coef=coefs,vcov=S0,function(x) cumsum(exp(x)*int.len))) ## Cumulative hazard system.time(e1 <- estimate(e0, function(x) exp(-x),level=level)) ## Survival res <- cbind(res,e0$coefmat[,1],e1$coefmat[,c(1,3:4)]) } colnames(res)[4:5] <- c("chaz","surv") } if (!is.null(offsetvar)) newdata[,offsetvar] <- NULL times <- list() if (!individual) { aa <- unique(newdata[,setdiff(dotnames,c(timevar,offsetvar)),drop=FALSE]) vv <- colnames(aa) for (i in seq(nrow(aa))) { idx <- seq(nrow(object$data)) for (j in seq_along(vv)) { val <- aa[i,j] if (is.factor(val)) val <- as.character(val) idx <- intersect(idx,which(object$data[,vv[j]]==val)) } times <- c(times, list(sort(unique(object$data[idx,timevar])))) } } structure(as.data.frame(cbind(res,newdata)), args=dots0, variables=aa, times=times, individual=individual, class=c("eventpois","data.frame") ) } ##' @export plot.eventpois <- function(x,var,confint=TRUE,cont=TRUE,length.out=200,type="surv", line.type="l",lty=c(1:8),col=1,lwd=1,add=FALSE, use.time=TRUE, legend, xlab="Time",ylab="Survival probability",xlim,ylim,...) { type <- agrep(type,c("clogclog","hazard","survival")) if (!add) { if (missing(xlim)) xlim <- c(0,max(x[,1]+x[,2])) if (missing(ylim)) { ylim <- switch(type, '1'=c(-30,max(log(sum(x[,2]*x[,3])))), '2'=c(0,max(x[,3])), c(0,1)) } plot(0,type="n",xlab=xlab,ylab=ylab,xlim=xlim,ylim=ylim,...) } ##args <- attr(x,"args") ##aa <- expand.grid(args) aa <- attr(x,"variables") vv <- colnames(aa) if (attr(x,"individual")) aa <- aa[1,,drop=FALSE] if (missing(legend)) legend <- nrow(aa)>1 if (length(lty)0)) e0 <- x[idx,,drop=FALSE] dt <- tail(e0,1) time0 <- c(e0[,1],dt[,1]+dt[,2]) if (use.time) { ##browser() time0 <- attr(x,"time")[[i]]-1 e0 <- e0[na.omit(match(time0,e0[,"time"])),,drop=FALSE] time0 <- time0[match(e0[,"time"],time0)] dt <- tail(e0,1) time0 <- c(time0,dt[,1]+dt[,2]) } chaz0 <- cumsum(e0[,3]*e0[,2]) tt <- seq(min(time0),max(time0),length.out=length.out) ff <- approxfun(time0,c(0,chaz0),method="linear") if (type==3) { lines(tt,exp(-ff(tt)),lty=lty[i],col=col[i],lwd=lwd[i],...) } else if (type==1) { lines(tt,log(ff(tt)),lty=lty[i],col=col[i],lwd=lwd[i],...) } else { lines(time0,e0[,3],lty=lty[i],col=col[i],lwd=lwd[i],...) } } if (legend) { lab <- apply(aa,1,function(x) paste(x,collapse=",")) graphics::legend("bottomleft",lab,lty=lty,col=col,lwd=lwd,bg="white") } return(aa) ## if (surv) lines(x[,c(1,5)],lty=lty[1],type=type,...) ## else lines(x[,c(1,3)],lty=lty[1],type=type,...) ## if (ncol(x)>4 && confint && surv) { ## lines(x[,c(1,6)],lty=lty[2],type=type,...) ## lines(x[,c(1,7)],lty=lty[2],type=type,...) ## } } ##' @export pcif <- function(models,timevar,survival,...,delta=0.01,stop.time,trunc=TRUE) { if (!is.list(models)) models <- list(models) ee <- lapply(models,eventpois,timevar=timevar,...) t0 <- c(0,ee[[1]][,timevar]) int.len <- diff(t0) if (!missing(survival)) { G <- c(1,eventpois(survival,...)$surv) } else { chaz <- c(0,Reduce("+",lapply(ee,function(x) x$chaz))) G <- exp(-chaz) } rates <- lapply(ee,function(x) x$rate) if (missing(stop.time)) stop.time <- max(ee[[1]][,1]) tt <- seq(0,stop.time,by=delta) GG <- approx(x=t0,y=G,xout=tt,method="linear") rr <- lapply(rates,function(rate) approx(x=t0,y=c(rate,0),xout=tt,method="constant",f=0)) FF <- lapply(rr,function(x) { cif0 <- c(0,cumsum(x$y*GG$y*delta)) cif0 <- cif0[-length(cif0)] }) S <- Reduce("+",FF) idx <- which(S>1) if (trunc & length(idx)>0) { for (i in seq_along(FF)) { FF[[i]][idx] <- FF[[i]][idx]/S[idx] } } FF0 <- Reduce(cbind,FF); colnames(FF0) <- paste0("F",seq(ncol(FF0))) as.data.frame(cbind(time=tt,FF0,G=GG$y)) } mets/R/onload.R0000644000176200001440000000072413623061405013025 0ustar liggesusers'.onAttach' <- function(libname, pkgname="mets") { desc <- utils::packageDescription(pkgname) ## packageStartupMessage("Loading '", desc$Package, "' package...\n", ## "\tVersion: ", desc$Version, "\n", ## "\tOverview: help(package=", desc$Package, ")"); packageStartupMessage(desc$Package, " version ",desc$Version); } .onUnload <- function (libpath) { library.dynam.unload("mets", libpath) } mets/R/methodstwinlm.R0000644000176200001440000003030313623061405014443 0ustar liggesusers###{{{ print.twinlm ##' @export print.twinlm <- function(x,...) { print(summary(x,...)) invisible(x) } ###}}} print.twinlm ###{{{ summary.twinlm summarygroup.twinlm <- function(object,...) { mz <- grep("MZ",names(object$model)) cc <- lapply(mz,function(i) coef(object$model[[i]],label=TRUE)) ii <- lapply(cc, function(x) sapply(x, function(i) lava::parpos(object$estimate$model,i))) c0 <- coef(object$estimate) c2 <- coef(object$estimate,level=2) pnam <- names(c0) coefs <- c() acde <- c() nn <- c() lambdas <- c("~a","~c","~d","~e") for (i in seq(length(mz))) { res <- coef(object$estimate,level=1)[ii[[i]],,drop=FALSE] pp <- sapply(lambdas,function(x) ii[[i]][grep(x,rownames(res),fixed=TRUE)]) nam <- c("A","C","D","E")[which(unlist(lapply(pp,function(x) length(x)>0)))] pp <- unlist(pp); names(pp) <- nam acde <- c(acde,list(acde.twinlm(object,pp))) nn0 <- cc[[i]] if (nn0[1]=="mu") nn0[1] <- "(Intercept)" for (k in c("a","c","d","e")) nn0 <- gsub("lambda["%++%k%++%"]","SD("%++%toupper(k)%++%"):",nn0,fixed=TRUE) nam <- rownames(res) idx <- unlist(lapply(c("Intercept","SD(","z(A):","z(D):"),function(x) grep(x,nn0,fixed=TRUE))) nam.keep.idx <- setdiff(seq(length(nam)),idx) nn0[nam.keep.idx] <- unlist(lapply(strsplit(nam[nam.keep.idx],"~"), function(x) gsub(".2|.1","",x[2]))) rownames(res) <- nn0 coefs <- c(coefs,list(res)) }; names(coefs) <- names(object$model)[mz] vcov <- vcov(object$estimate) suppressWarnings(kinship <- constraints(object$estimate)[,c(1,5,6),drop=FALSE]) fit <- c(logLik=logLik(object),AIC=AIC(object),BIC=BIC(object)) structure(list(coef=c0,coefmat=coefs,vcov=vcov,acde=acde,kinship=kinship,fit=fit),class="summary.twinlm.group") } ##' @export print.summary.twinlm.group <- function(x,...) { for (i in seq(length(x$coefmat))) { cat(names(x$coefmat)[i],"\n") printCoefmat(x$coefmat[[i]],...) print(x$acde[[i]]) cat("\n") } cat("\n") print(x$kinship) cat("\n") print(x$fit) invisible(x) } ##' @export summary.twinlm <- function(object,transform=FALSE,...) { if (!is.null(object$group) && !object$group.equal) { return(summarygroup.twinlm(object,...)) } e <- object$estimate zygtab <- object$zygtab ## zygtab <- with(object, table(data[,zyg])) ## names(zygtab) <- paste(names(zygtab),"pairs",sep="-") theta <- pars(e) theta.sd <- sqrt(diag(e$vcov)) myest <- cbind(theta,theta.sd,(Z <- theta/theta.sd),2*(pnorm(abs(Z),lower.tail=FALSE))) colnames(myest) <- c("Estimate","Std. Error", "Z value", "Pr(>|z|)") if (object$type%in%c("u","flex","sat")) { corMZ <- corDZ <- NULL if (object$constrain) { i1 <- lava::parpos(object$estimate$model,p="atanh(rhoMZ)")[1] i2 <- lava::parpos(object$estimate$model,p="atanh(rhoDZ)")[1] if (length(i1)>0) { corest <- coef(object$estimate,level=0)[c(i1,i2)] sdest <- vcov(object$estimate)[cbind(c(i1,i2),c(i1,i2))]^0.5 ciest <- tanh(cbind(corest,corest)+qnorm(0.975)*cbind(-sdest,sdest)) corest <- tanh(corest) corMZ <- c(corest[1],ciest[1,]) corDZ <- c(corest[2],ciest[2,]) } } aa <- capture.output(e) res <- list(estimate=aa, zyg=zygtab, varEst=NULL, varSigma=NULL, heritability=NULL, corMZ=corMZ, corDZ=corDZ, logLik=logLik(e), AIC=AIC(e), BIC=BIC(e), type=object$type, vcov=vcov(e) ) class(res) <- "summary.twinlm" return(res) } KinshipGroup <- NULL if (!is.null(object$group)) { zA.idx <- grep("z(A):",names(coef(object)),fixed=TRUE) zD.idx <- grep("z(A):",names(coef(object)),fixed=TRUE) KinshipGroup <- constraints(e)[,c(1,5,6),drop=FALSE] } r1 <- gsub(".1","",coef(Model(Model(e))[[1]], mean=e$meanstructure, silent=TRUE), fixed=TRUE) rownames(myest) <- seq(nrow(myest)) idx <- seq(nrow(myest)); rownames(myest)[idx] <- r1 coefpost <- paste(lava.options()$symbol[1],c("a1","c1","d1","e1"),sep="") coefpost2 <- paste(lava.options()$symbol[1],c("a2","c2","d2","e2"),sep="") myest.varpos <- unlist(sapply(coefpost,function(x) grep(x,rownames(myest)))) lambda.idx <- sapply(coefpost,function(x) grep(x,names(coef(e)))) lambda.idx2 <- sapply(coefpost2,function(x) grep(x,names(coef(e)))) for (k in seq_len(length(lambda.idx))) if (length(lambda.idx[[k]])==0) lambda.idx[[k]] <- lambda.idx2[[k]] lambda.w <- which(sapply(lambda.idx, function(x) length(x)>0)) rownames(myest)[myest.varpos] <- paste("sd(",c("A)","C)","D)","E)"),sep="")[lambda.w] varEst <- rep(0,4) varEst[lambda.w] <- myest[myest.varpos,1] varSigma <- matrix(0,4,4); varSigma[lambda.w,lambda.w] <- e$vcov[unlist(lambda.idx),unlist(lambda.idx)] L <- gaussian("identity") if (transform) L <- binomial("logit") varcomp <- c() genpos <- c() pos <- 0L { varcomp <- c() if ("a1"%in%latent(e)) { varcomp <- "lambda[a]"; pos <- pos+1 genpos <- c(genpos,pos) } if ("c1"%in%latent(e)) { varcomp <- c(varcomp,"lambda[c]"); pos <- pos+1 } if ("d1"%in%latent(e)) { varcomp <- c(varcomp,"lambda[d]"); pos <- pos+1; genpos <- c(genpos,pos) } isOrdinal <- (object$ordinal>0)*1 if (isOrdinal) varEst[4] <- 1 if ("e1"%in%latent(e) & !isOrdinal) { varcomp <- c(varcomp,"lambda[e]"); pos <- pos+1 } f <- paste("h2~",paste(varcomp,collapse="+")) constrain(e, as.formula(f)) <- function(x) { L$linkfun(sum(x[genpos]^2)/sum(x^2+isOrdinal)) } } ci.logit <- L$linkinv(constraints(e,k=1)["h2",5:6]) h <- function(x) (x[1]^2)/(sum(x^2)) dh <- function(x) { y <- x^2 cbind(1/sum(y)^2*c(2*x[1]*(sum(y)-y[1]), -2*x[2:4]*y[1])) } ## f(x1,x2,x3,x4) = x1/(x1+x2+x3+x4) = x1/s ## Quotient rule: (u/v)' = (u'v - uv')/v^2 ## f1(x1,x2,x3,x4) = (s - x1)/s^2 = (x2+x3+x4)/s^2 ## f2(x1,x2,x3,x4) = -1/(s)^2 h2 <- function(x) (x[1]^2+x[3]^2)/sum(x^2) dh2 <- function(x) { y <- x^2 cbind(1/sum(y)^2*c( 2*x[1]*(sum(y)-(y[1]+y[3])), -2*x[2]*(y[1]+y[3]), 2*x[3]*(sum(y)-(y[1]+y[3])), -2*x[4]*(y[1]+y[3]) )) } hval <- cbind(h(varEst), (t(dh(varEst))%*%varSigma%*%(dh(varEst)))^0.5) colnames(hval) <- c("Estimate", "Std.Err"); rownames(hval) <- "h squared" h2val <- cbind(h2(varEst), (t(dh2(varEst))%*%varSigma%*%(dh2(varEst)))^0.5) colnames(h2val) <- c("Estimate", "Std.Err"); rownames(h2val) <- "h squared" atanhcorMZf <- function(x) atanh(sum(x[1:3]^2)/sum(x^2)) atanhcorDZf <- function(x) atanh(sum(x[1:3]^2*c(0.5,1,0.25))/sum(x^2)) e1 <- atanhcorMZf(varEst) D1 <- numDeriv::grad(atanhcorMZf,varEst) s1 <- (t(D1)%*%varSigma%*%(D1))^0.5 ci1 <- e1+qnorm(0.975)*c(-1,1)*s1[1] e2 <- atanhcorDZf(varEst) D2 <- numDeriv::grad(atanhcorDZf,varEst) s2 <- (t(D2)%*%varSigma%*%(D2))^0.5 ci2 <- e2+qnorm(0.975)*c(-1,1)*s2[1] corMZ <- c(tanh(c(e1,ci1))) corDZ <- c(tanh(c(e2,ci2))) acde <- acde.twinlm(object,transform=transform) coef <- rbind(acde) hrow <- rbind(c(h2val,ci.logit)); rownames(hrow) <- "Broad-sense heritability" colnames(hrow)[1:2] <- c("Estimate","Std.Err") all <- rbind(hrow[,c(1,3,4),drop=FALSE],coef,corMZ,corDZ) res <- list(estimate=myest, zyg=zygtab, varEst=varEst, KinshipGroup=KinshipGroup, varSigma=varSigma, heritability=hrow, corMZ=corMZ, corDZ=corDZ, acde=acde, logLik=logLik(e), AIC=AIC(e), BIC=BIC(e), type=object$type, coef=coef, all=all, vcov=vcov(e)); class(res) <- "summary.twinlm" return(res) } ###}}} summary.twinlm ###{{{ print.summary.twinlm ##' @export print.summary.twinlm <- function(x,signif.stars=FALSE,...) { if (x$type%in%c("flex","u","sat")) { cat(x$estimate,sep="\n") } else { printCoefmat(x$estimate,signif.stars=signif.stars,...) cat("\n") print(x$zyg,quote=FALSE) if (!is.null(x$acde)) { cat("\nVariance decomposition:\n") print(RoundMat(x$acde,...),quote=FALSE) } cat("\n\n") ## cat("Broad-sense heritability (total genetic factors):\n") h <- with(x, heritability[,c(1,3,4),drop=FALSE]); h <- na.omit(h) print(RoundMat(h,...),quote=FALSE) cat("\n") } if (!is.null(x$corMZ)) { cc <- with(x, rbind(corMZ,corDZ)) rownames(cc)[1:2] <- c("Correlation within MZ:","Correlation within DZ:") if (!is.null(x$KinshipGroup)) { cc <- rbind(cc,x$KinshipGroup) } colnames(cc) <- c("Estimate","2.5%","97.5%") print(RoundMat(cc,...),quote=FALSE) } cat("\n") print(x$logLik) cat("AIC:", x$AIC, "\n") cat("BIC:", x$BIC, "\n") invisible(x) } ###}}} print.summary.twinlm ###{{{ compare.twinlm ##' @export compare.twinlm <- function(object,...) { if (length(list(...))==0) return(compare(object$estimate)) getS3method("compare","default")(object,...) } ###}}} compare.twinlm ###{{{ plot.twinlm ##' @export plot.twinlm <- function(x,diag=TRUE,labels=TRUE,...) { op <- par(mfrow=c(2,1)) plot(x$model,...) par(op) } ###}}} ###{{{ vcov.twinlm ##' @export vcov.twinlm <- function(object,...) { return(object$vcov) } ###}}} vcov.twinlm ###{{{ logLik.twinlm ##' @export logLik.twinlm <- function(object,...) logLik(object$estimate,...) ###}}} logLik.twinlm ###{{{ score.twinlm ##' @export score.twinlm <- function(x,...) score(x$estimate,...) ###}}} score.twinlm ###{{{ model.frame.twinlm ##' @export model.frame.twinlm <- function(formula,...) { return(formula$estimate$model$data) } ###}}} model.frame.twinlm ###{{{ acde ##"acde" <- function(x,...) UseMethod("acde") acde.twinlm <- function(x,index,transform=FALSE,estimate.return=FALSE,...) { if (missing(index)) { m <- x$estimate$model$lvm[[1]] lambdas <- c("lambda[a]","lambda[c]","lambda[d]","lambda[e]") pp <- sapply(lambdas,function(x) grep(x,as.vector(m$par),fixed=TRUE)) ACDE <- unlist(lapply(pp,function(x) length(x)>0)) pp <- unlist(lapply(pp[ACDE], function(x) as.vector(m$par)[x[1]])) index <- sapply(pp,function(p) lava::parpos(x$estimate$model,p)) names(index) <- c("A","C","D","E")[ACDE] } ord <- x$ordinal>0 ## f <- function(p) structure(log(p/(1-p)),grad=cbind(0,1/(p*(1-p)),0)) if (transform) { suppressWarnings(res <- estimate(x,function(p) lapply(index, function(z) lava::logit((p[z]^2/sum(c(p[index]^2,ord))))), vcov=vcov(x))) if (estimate.return) return(res) res <- res$coefmat[,c(1,3,4),drop=FALSE] res <- lava::tigol(res) } else { suppressWarnings(res <- estimate(x,function(p) lapply(index, function(z) { p[z]^2/sum(c(p[index]^2),ord) }), vcov=vcov(x))) if (estimate.return) return(res) res <- res$coefmat[,c(1,3,4),drop=FALSE] } res } ###}}} acde ##' @export coef.twinlm <- function(object,...) coef(object$estimate,...) ##' @export iid.twinlm <- function(x,...) { U <- score(x$estimate,indiv=TRUE) U <- lapply(U,function(x) {x[is.na(x)] <- 0; return(x)}) U <- Reduce(rbind,U) iI <- vcov(x) U%*%iI } mets/R/pch.R0000644000176200001440000000065113623061405012322 0ustar liggesusers##' Piecewise constant hazard distribution ##' ##' Piecewise constant hazard distribution ##' @aliases rpch ppch ##' @export ##' @param n sample size ##' @param lambda rate parameters ##' @param breaks time cut-points ##' @aliases rpch ppch rpch <- function(n, lambda=1, breaks=c(0,Inf)) { res <- .Call("_mets_rpch", n=n, lambda=lambda, time=breaks) return(res) } mets/R/sim.coxph.R0000644000176200001440000000021513623061405013454 0ustar liggesusers##' @export sim.cox <- function(x,...) { timereg::sim.cox(cox=x,...) } ##' @export simulate.cox <- function(object,...) sim(object,...) mets/R/claytonakes.R0000644000176200001440000002071213623061405014065 0ustar liggesusers##' Clayton-Oakes frailty model ##' ##' @title Clayton-Oakes model with piece-wise constant hazards ##' @param formula formula specifying the marginal proportional (piecewise constant) hazard structure with the right-hand-side being a survival object (Surv) specifying the entry time (optional), the follow-up time, and event/censoring status at follow-up. The clustering can be specified using the special function \code{cluster} (see example below). ##' @param data Data frame ##' @param cluster Variable defining the clustering (if not given in the formula) ##' @param var.formula Formula specifying the variance component structure (if not given via the cluster special function in the formula) using a linear model with log-link. ##' @param cuts Cut points defining the piecewise constant hazard ##' @param type when equal to \code{two.stage}, the Clayton-Oakes-Glidden estimator will be calculated via the \code{timereg} package ##' @param start Optional starting values ##' @param control Control parameters to the optimization routine ##' @param var.invlink Inverse link function for variance structure model ##' @param ... Additional arguments ##' @author Klaus K. Holst ##' @examples ##' set.seed(1) ##' d <- subset(simClaytonOakes(500,4,2,1,stoptime=2,left=2),truncated) ##' e <- ClaytonOakes(survival::Surv(lefttime,time,status)~x+cluster(~1,cluster), ##' cuts=c(0,0.5,1,2),data=d) ##' e ##' ##' ##' d2 <- simClaytonOakes(500,4,2,1,stoptime=2,left=0) ##' d2$z <- rep(1,nrow(d2)); d2$z[d2$cluster%in%sample(d2$cluster,100)] <- 0 ##' ## Marginal=Cox Proportional Hazards model: ##' ts <- ClaytonOakes(survival::Surv(time,status)~timereg::prop(x)+cluster(~1,cluster), ##' data=d2,type="two.stage") ##' ## Marginal=Aalens additive model: ##' ts2 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~1,cluster), ##' data=d2,type="two.stage") ##' ## Marginal=Piecewise constant: ##' e2 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~-1+factor(z),cluster), ##' cuts=c(0,0.5,1,2),data=d2) ##' e2 ##' plot(ts) ##' plot(e2,add=TRUE) ##' ##' e3 <- ClaytonOakes(survival::Surv(time,status)~x+cluster(~1,cluster),cuts=c(0,0.5,1,2), ##' data=d,var.invlink=identity) ##' e3 ##' @export ClaytonOakes <- function(formula,data=parent.frame(),cluster,var.formula=~1,cuts=NULL,type="piecewise",start,control=list(),var.invlink=exp,...) { mycall <- match.call() dots <- list(...) formulaId <- Specials(formula,"cluster") formulaStrata <- Specials(formula,"strata") formulaSt <- "~." formulaProp <- Specials(formula,"prop") if (!is.null(formulaId)) { var.formulaId <- ~1 if (length(formulaId)>1) { var.formula <- as.formula(formulaId[[1]]) formulaId <- formulaId[[2]] } cluster <- formulaId mycall$cluster <- cluster formulaSt <- paste(formulaSt,paste("-cluster(",paste(var.formula,collapse=""), ",",formulaId,")")) } formulaSt <- paste(formulaSt,paste("-strata(",paste(formulaStrata,collapse="+"),")")) formula <- update(formula,formulaSt) if (!is.null(formulaStrata)) { strata <- formulaStrata mycall$strata <- strata } if (missing(cluster)) stop("Missing 'cluster' variable") ngamma <- 0 data <- data[order(data[,cluster]),] Z <- model.matrix(var.formula,data) ngamma <- ncol(Z) if (type!="piecewise") { timeregmod <- ifelse(length(formulaProp)>0,"cox.aalen","aalen") if (is.null(dots$robust)) dots$robust <- 0 args <- c(list(formula=formula,data=data,max.clust=NULL,clusters=data[,cluster]),dots) marg <- do.call(timeregmod, args) return(two.stage(marg,data=data,theta.des=Z,var.link=1,...)) } timevar <- terms(formula)[[2]] if (is.call(timevar)) { delayedentry <- (length(timevar)==4)*1 entry <- NULL if (delayedentry==1) entry <- as.character(timevar[[2]]) causes <- timevar[[3+delayedentry]] timevar <- timevar[[2+delayedentry]] } timevar <- as.character(timevar) causes <- as.character(causes) covars <- as.character(attributes(terms(formula))$variables)[-(1:2)] X <- NULL nbeta <- 0 if (length(covars)>0) { ## X <- model.matrix(as.formula(paste("~-1+",paste(covars,collapse="+"))),data) X <- model.matrix(update(formula,.~.+1),data)[,-1,drop=FALSE] nbeta <- ncol(X) } if (is.data.frame(data)) { mydata <- data.frame(T=data[,timevar],status=data[,causes],cluster=data[,cluster],entry=0) if (!is.null(entry)) { mydata$entry <- data[,entry] } } else { mydata <- data.frame(T=get(timevar,envir=data),status=get(causes,envir=data),cluster=get(cluster,envir=data),entry=0) if (!is.null(entry)) mydata$entry <- get(entry,envir=data) } if (is.null(cuts)) { cuts <- c(0,max(mydata$T)) } if (max(mydata$T)>tail(cuts,1)) stop("Interval does not embed time observations") if (any(with(mydata, Tthreshold ee$values[idx] <- 1/ee$values[idx]; if (!all(idx)) ee$values[!idx] <- 0 V <- with(ee, vectors%*%diag(values)%*%t(vectors)) } else { V <- matrix(NA,length(p0),length(p0)) } } res <- list(coef=opt$par,vcov=V,cuts=cuts,nbeta=nbeta,ngamma=ngamma,betanames=colnames(X),gammanames=colnames(Z),opt=opt,invlink=var.invlink,invlinkname=invlinkname) class(res) <- "claytonoakes" return(res) } ################################################## ##' @export print.claytonoakes <- function(x,...) { print(summary(x)) } ##' @export print.summary.claytonoakes <- function(x,...) { printCoefmat(x$coef[,c(1,3,4)],...) cat("\nDependence parameters:\n") printCoefmat(x$var,...) invisible(x) } ##' @export summary.claytonoakes <- function(object,...) { mycoef <- matrix(nrow=length(object$coef),ncol=4) mycoef[,1:2] <- cbind(object$coef,sqrt(diag(object$vcov))) mycoef[,3:4] <- cbind(mycoef[,1]-qnorm(0.975)*mycoef[,2],mycoef[,1]+qnorm(0.975)*mycoef[,2]) colnames(mycoef) <- c("Estimate","Std.Err","2.5%","97.5%") if (length(object$cuts)) cutnames <- levels(cut(0,breaks=object$cuts)) varname <- switch(object$invlinkname,exp="log-Var:",identity="Var:",paste("inv",object$invlinkname,"-Var:",sep="")) rownames(mycoef) <- c(paste(varname,object$gammanames,sep=""),object$betanames,cutnames) mycoef[-seq(object$ngamma),] <- exp(mycoef[-seq(object$ngamma),]) varcoef <- object$invlink(mycoef[seq(object$ngamma),c(1,3,4),drop=FALSE]) rownames(varcoef) <- object$gammanames varcoef <- cbind(varcoef,1/(1+2/varcoef)) colnames(varcoef)[c(1,4)] <- c("Variance","Kendall's tau") res <- list(coef=mycoef,var=varcoef) class(res) <- "summary.claytonoakes" res } ##' @export plot.claytonoakes <- function(x,chaz=TRUE,add=!is.null(dev.list()),col="darkblue",...) { haz <- summary(x)$coef[-seq(x$nbeta+x$ngamma),,drop=FALSE] t <- x$cuts L <- approxfun(t,f=1,cumsum(c(0,haz[,1]*diff(t))),method="linear") if (add) { lines(t,L(t),col=col,...) } else { plot(t,L(t),type="l",col=col,...) } invisible(x) } predict.claytonoakes <- function(x,...) { } mets/R/casewise.R0000644000176200001440000003434713623061405013364 0ustar liggesusers##' Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independence ##' ##' @title Estimates the casewise concordance based on Concordance and marginal estimate using timereg and performs test for independence ##' @details Uses cluster based conservative standard errors for marginal ##' @param conc Concordance ##' @param marg Marginal estimate ##' @param test Type of test for independence assumption. "conc" makes test on concordance scale and "case" means a test on the casewise concordance ##' @param p check that marginal probability is greater at some point than p ##' @author Thomas Scheike ##' @aliases casewise.test slope.process casewise.bin ##' @examples ##' \donttest{ ## Reduce Ex.Timings ##' library("timereg") ##' data("prt",package="mets"); ##' ##' prt <- prt[which(prt$id %in% sample(unique(prt$id),7500)),] ##' ### marginal cumulative incidence of prostate cancer ##' times <- seq(60,100,by=2) ##' outm <- comp.risk(Event(time,status)~+1,data=prt,cause=2,times=times) ##' ##' cifmz <- predict(outm,X=1,uniform=0,resample.iid=1) ##' cifdz <- predict(outm,X=1,uniform=0,resample.iid=1) ##' ##' ### concordance for MZ and DZ twins ##' cc <- bicomprisk(Event(time,status)~strata(zyg)+id(id), ##' data=prt,cause=c(2,2)) ##' cdz <- cc$model$"DZ" ##' cmz <- cc$model$"MZ" ##' ##' ### To compute casewise cluster argument must be passed on, ##' ### here with a max of 100 to limit comp-time ##' outm <-comp.risk(Event(time,status)~+1,data=prt, ##' cause=2,times=times,max.clust=100) ##' cifmz <-predict(outm,X=1,uniform=0,resample.iid=1) ##' cc <-bicomprisk(Event(time,status)~strata(zyg)+id(id),data=prt, ##' cause=c(2,2),se.clusters=outm$clusters) ##' cdz <- cc$model$"DZ" ##' cmz <- cc$model$"MZ" ##' ##' cdz <- casewise.test(cdz,cifmz,test="case") ## test based on casewise ##' cmz <- casewise.test(cmz,cifmz,test="conc") ## based on concordance ##' ##' plot(cmz,ylim=c(0,0.7),xlim=c(60,100)) ##' par(new=TRUE) ##' plot(cdz,ylim=c(0,0.7),xlim=c(60,100)) ##' ##' slope.process(cdz$casewise[,1],cdz$casewise[,2],iid=cdz$casewise.iid) ##' ##' slope.process(cmz$casewise[,1],cmz$casewise[,2],iid=cmz$casewise.iid) ##' ##' } ##' @export casewise.test <- function(conc,marg,test="no-test",p=0.01) { ## {{{ ### conc=cdz; marg=cifdz; p=0.01 ### conc=cmz; marg=cifmz ### names(cdz) ### cdz$casewise if (sum(marg$P1>p)==0) stop("No timepoints where marginal > ",p,"\n"); time1 <- conc$time; time2 <- marg$time[marg$P1>0.01] mintime <- max(time1[1],time2[1]) maxtime <- min(max(time1),max(time2)) timer <- seq(mintime, maxtime,length=100) dtimer <- timer[2]-timer[1] margtime <- Cpred(cbind(marg$time,c(marg$P1)),timer)[,2] concP1 <- Cpred(cbind(conc$time,c(conc$P1)),timer)[,2] se.margtime <- Cpred(cbind(marg$time,c(marg$se.P1)),timer) se.concP1 <- Cpred(cbind(conc$time,c(conc$se.P1)),timer) outtest <- NULL casewise.iid <- NULL casewise <- concP1/margtime se.casewise2 <- as.matrix(se.concP1[,2]/margtime,ncol=100) se.margtime <- as.matrix(se.margtime[,2],ncol=100) se.casewise <- NULL; outtest <- NULL; if (is.null(conc$P1.iid) || is.null(marg$P1.iid)) { cat("Warning, need iid decomposition for correct se's for Concordance \n"); } else { conciid <- Cpred(cbind(conc$time,conc$P1.iid),timer)[,-1] nconc <- colnames(conc$P1.iid) P1iid <- Cpred(cbind(marg$time,marg$P1.iid),timer)[,-1] P1iid2 <- 2*P1iid*margtime; se.p2 <- apply(P1iid2^2,1,sum)^.5 conciid <- (P1iid2[,nconc]-conciid) ### iid of conc-p1^2 test c.iid <- casewise.iid <- conciid/margtime - P1iid[,nconc]*casewise se.casewise <- apply(casewise.iid^2,1,sum)^.5 dif.casewise.iid <- conciid/margtime ### iid of casewise test if (test=="case") { diff.iidcase <- apply(dif.casewise.iid,2,sum)*dtimer; sd.pepem <- sum(diff.iidcase^2)^.5 diff.pepem <- sum((casewise-margtime))*dtimer z.pepem <- diff.pepem/sd.pepem pval.pepem <- 2*pnorm(-abs(z.pepem)) outtest <- cbind(diff.pepem,sd.pepem,z.pepem,pval.pepem) ### test for constant casewise concordance diff.const <- (casewise-mean(casewise)) iid.constant <- (c.iid - matrix(apply(c.iid,2,mean),nrow(c.iid),ncol(c.iid),byrow=T)) se.const <- apply(iid.constant^2,1,sum)^.5 test.constant <- max(abs(diff.const/se.const)) sim.maxs <- apply(abs(iid.constant/se.const),1,max) pval.const <- pval(sim.maxs,test.constant) outtest <- cbind(diff.pepem,sd.pepem,z.pepem,pval.pepem,test.constant,pval.const) colnames(outtest) <- c("cum dif.","sd","z","pval","constant-case","pval") rownames(outtest) <- "pepe-mori" } else if (test=="conc") { diff.iid <- apply(conciid,2,sum)*dtimer sd.pepem <- sum(diff.iid^2)^.5 diff.pepem <- sum((concP1-margtime^2))*dtimer z.pepem <- diff.pepem/sd.pepem pval.pepem <- 2*pnorm(-abs(z.pepem)) outtest <- cbind(diff.pepem,sd.pepem,z.pepem,pval.pepem) colnames(outtest) <- c("cum dif.","sd","z","pval") rownames(outtest) <- "pepe-mori" } } concout <- cbind(timer,concP1,se.concP1[,2]) colnames(concout) <- c("time","concordance","se") margout <- cbind(timer,margtime,se.margtime) colnames(margout) <- c("time","cif","se") casewiseout <- cbind(timer,casewise,se.casewise,se.casewise2) colnames(casewiseout) <- c("time","casewise","se","se2") difout <- cbind(timer,concP1-margtime^2,apply(conciid^2,1,sum)^.5) out <- list(casewise=casewiseout,marg=margout,conc=concout,casewise.iid=casewise.iid, test=outtest,mintime=mintime,maxtime=maxtime,same.cluster=TRUE,testtype=test) class(out) <- "casewise" return(out) } ## }}} ##' @export slope.process <- function(time,y,iid=NULL) { ## {{{ ctime <- scale(time) caselm <- lm(y ~ ctime) slope <- coef(caselm)[2] if (!is.null(iid)) { diff.iid <- iid lm.iid <- c() for (i in 1:ncol(iid)) { lmiid <- lm(iid[,i] ~ ctime) lm.iid <- rbind(lm.iid,coef(lmiid)) } se.slope <- apply(lm.iid,2,sd)^.5 } else {se.slop <- NULL} z.slope <- slope/se.slope[2] pval <- 2*(1-pnorm(abs(z.slope))) out <- list(intercept=coef(caselm)[1],slope=slope,se.slope=se.slope,pval.slope=pval) return(out) } ## }}} ##' .. content for description (no empty lines) .. ##' ##' @title Estimates the casewise concordance based on Concordance and marginal estimate using prodlim but no testing ##' @param conc Concordance ##' @param marg Marginal estimate ##' @param cause.marg specififes which cause that should be used for marginal cif based on prodlim ##' @author Thomas Scheike ##' @examples ##' \donttest{ ## Reduce Ex.Timings ##' library(prodlim) ##' data(prt); ##' ##' ### marginal cumulative incidence of prostate cancer##' ##' outm <- prodlim(Hist(time,status)~+1,data=prt) ##' ##' times <- 60:100 ##' cifmz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="MZ")) ## cause is 2 (second cause) ##' cifdz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="DZ")) ##' ##' ### concordance for MZ and DZ twins ##' cc <- bicomprisk(Event(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),prodlim=TRUE) ##' cdz <- cc$model$"DZ" ##' cmz <- cc$model$"MZ" ##' ##' cdz <- casewise(cdz,outm,cause.marg=2) ##' cmz <- casewise(cmz,outm,cause.marg=2) ##' ##' plot(cmz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE,col=c(3,2,1)) ##' par(new=TRUE) ##' plot(cdz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE) ##' summary(cdz) ##' summary(cmz) ##' } ##' @export casewise <- function(conc,marg,cause.marg) { ## {{{ if (missing(cause.marg)) stop("Please specify cause of marginal (as given in Event object)") if ((!class(conc)=="prodlim") || (!class(marg)=="prodlim")) stop("Assumes that both models are based on prodlim function \n"); time1 <- conc$time time2 <- marg$time cause.prodlim <- match(as.character(cause.marg),levels(prodlim::getEvent(marg$model.response))) if (is.na(cause.prodlim)) stop("Cause did not match marginal model") mintime <- max(time1[1],time2[1]) maxtime <- min(max(time1),max(time2)) timer <- seq(mintime, maxtime,length=100) dtimer <- timer[2]-timer[1] out <- conc out$time <- timer if (class(marg)=="comp.risk") margtime <- Cpred(cbind(marg$time,c(marg$P1)),timer)[,2] else if (class(marg)=="prodlim") { cuminc <- data.frame(marg$cuminc)[,cause.prodlim]; se.cuminc <- data.frame(marg$se.cuminc)[,cause.prodlim]; margtime <- Cpred(cbind(marg$time,c(cuminc)),timer)[,2]; se.margtime <- Cpred(cbind(marg$time,c(se.cuminc)),timer)[,2]; } else stop("marginal cumulative incidence comp.risk or prodlim output\n"); if (class(conc)=="comprisk") concP1 <- Cpred(cbind(conc$time,c(conc$P1)),timer)[,2] else if (class(conc)=="prodlim") { conc.cuminc <- data.frame(conc$cuminc)[,1] conc.se.cuminc <- data.frame(conc$se.cuminc)[,1] se.P1 <- Cpred(cbind(conc$time,conc.se.cuminc),timer)[,2] concP1 <- Cpred(cbind(conc$time,conc.cuminc),timer)[,2] } concordance<- cbind(timer,concP1,se.P1) colnames(concordance) <- c("time","cif","se.cif") P1 <- concP1/margtime se.P1 <- se.P1/margtime med <- (margtime>0) & (concP1 > 0) out$P1 <- P1[med] out$se.P1 <- se.P1[med] out$timer <- timer[med] margout <- cbind(timer,margtime,se.margtime) colnames(margout) <- c("time","cif","se.cif") probout <- cbind(out$timer,out$P1,out$se.P1) colnames(probout) <- c("time","casewise conc","se casewise") out <- list(casewise=probout,marg=margout,concordance=concordance,test=NULL) class(out) <- "casewise" return(out) } ## }}} ##' @export casewise.bin <- function(nc,nd) { ## {{{ ud <- glm(cbind(nc,round(0.5*nd+nc))~ +1,family=binomial()) udci <- confint(ud) pud <- predict(ud,se.fit=TRUE,type="response") return(list(p.casewise=pud$fit,ci.casewise=exp(udci))) } ## }}} ##' @export plot.casewise <- function(x,ci=NULL,lty=NULL,ylim=NULL,col=NULL,xlab="time",ylab="concordance",legend=FALSE,...) { ## {{{ if (is.null(col)) col <- 1:3 if (is.null(lty)) lty <- 1:3 if (is.null(ylim)) ylim=range(c(x$casewise[,2],x$marg[,2])) plot(x$casewise[,1],x$casewise[,2],type="s",ylim=ylim,lty=lty[1],col=col[1],xlab=xlab,ylab=ylab,...) if (!is.null(ci)) { ul <- x$casewise[,2]+qnorm(1-(1-ci)/2)* x$casewise[,3] nl <- x$casewise[,2]-qnorm(1-(1-ci)/2)* x$casewise[,3] lines(x$casewise[,1],ul,type="s",ylim=ylim,lty=lty[3],col=col[3]) lines(x$casewise[,1],nl,type="s",ylim=ylim,lty=lty[3],col=col[3]) } lines(x$marg[,1],x$marg[,2],lty=lty[2],col=col[2],type="s") if (legend==TRUE) legend("topleft",lty=lty[1:2],col=col[1:2],c("Casewise concordance","Marginal estimate")) } ## }}} ##' @export summary.casewise <- function(object,marg=FALSE,...) { ## {{{ cat("Casewise concordance and standard errors \n"); print(signif(cbind(object$casewise),3)) cat("\n"); if (marg==TRUE) { cat("Marginal cumulative incidence and standard errors \n"); print(signif(cbind(object$marg),3)) } print(object,...) } ## }}} ##' prints Concordance test ##' ##' @title prints Concordance test ##' @param x output from casewise.test ##' @param digits number of digits ##' @param \dots Additional arguments to lower level functions ##' @author Thomas Scheike ##' @export print.casewise <- function(x,digits=3,...) { ## {{{ cat("\n") if (!is.null(x$test)) { cat("Pepe-Mori type test for H_0: conc_1(t)= conc_2(t)\n") if (x$same.cluster==TRUE) cat("Assuming same clusters for the two functions\n") else cat("Assuming independence for estimators\n"); cat(paste("Time.range =",signif(x$mintime,3),"--",signif(x$maxtime,3),"\n\n")); prmatrix(signif(x$test,digits)) invisible(x) } } ## }}} ##' .. content for description (no empty lines) .. ##' ##' @title Concordance test Compares two concordance estimates ##' @param conc1 Concordance estimate of group 1 ##' @param conc2 Concordance estimate of group 2 ##' @param same.cluster if FALSE then groups are independent, otherwise estimates are based on same data. ##' @author Thomas Scheike ##' @export test.conc <- function(conc1,conc2,same.cluster=FALSE) { ## {{{ time <- time1 <- conc1$time time2 <- conc2$time mintime <- max(time1[1],time2[1]) maxtime <- min(max(time1),max(time2)) timer <- seq(mintime, maxtime,length=100) dtimer <- timer[2]-timer[1] conc2timer <- Cpred(cbind(conc2$time,c(conc2$P1)),timer)[,2] conc1timer <- Cpred(cbind(conc1$time,c(conc1$P1)),timer)[,2] outtest <- NULL if (is.null(conc1$P1.iid) || is.null(conc2$P1.iid)) stop("Must give iid represenation for both estimators\n"); if (!is.null(conc1$P1.iid) && !is.null(conc2$P1.iid)) { if ( ((ncol(conc1$P1.iid[,])-ncol(conc2$P1.iid[,]))!=0) && same.cluster==TRUE) cat("Warning, not same number of iid residuals for concordance and marginal estimate\n"); } if (!is.null(conc1$P1.iid)) if (!is.null(conc2$P1.iid)) { ### iid version af integraler conc2P1.iid <- Cpred(cbind(conc2$time,conc2$P1.iid[,]),timer)[,-1] conc1P1.iid <- Cpred(cbind(conc1$time,conc1$P1.iid[,]),timer)[,-1] if ( (ncol(conc1$P1.iid)==ncol(conc2$P1.iid)) && same.cluster==TRUE) { diff.iid <- conc1P1.iid-conc2P1.iid sdiff.iid <- apply(diff.iid,2,sum)*dtimer sd.pepem <- sum(sdiff.iid^2)^.5 } else { diff2.iid <- conc2P1.iid sdiff2.iid <- apply(diff2.iid,2,sum)*dtimer var2.pepem <- sum(sdiff2.iid^2) diff1.iid <- conc1P1.iid sdiff1.iid <- apply(diff1.iid,2,sum)*dtimer var1.pepem <- sum(sdiff1.iid^2) sd.pepem <- (var1.pepem+var2.pepem)^.5 } diff.pepem <- sum(conc2timer-conc1timer)*dtimer ### print(cbind(conc2timer,conc1timer)) z.pepem <- diff.pepem/sd.pepem pval.pepem <- 2*pnorm(-abs(z.pepem)) outtest <- cbind(diff.pepem,sd.pepem,z.pepem,pval.pepem) colnames(outtest) <- c("cum dif.","sd","z","pval") rownames(outtest) <- "pepe-mori" ### print(outtest,4) ### prmatrix(outtest,3) } outtest <- list(test=outtest,mintime=mintime,maxtime=maxtime,same.cluster=same.cluster) ###attr(out,"class") <- rev(attr(out,"class")) class(outtest) <- "testconc" return(outtest) } ## }}} ##' convert to timereg object ##' ##' @title Convert to timereg object ##' @param obj no use ##' @author Thomas Scheike ##' @export back2timereg <- function(obj) { ## {{{ out <- obj attr(out,"class") <- rev(attr(out,"class")) return(out) } ## }}} mets/R/dreg.R0000644000176200001440000002206213623061405012471 0ustar liggesusers##' Regression for data frames with dutility call ##' ##' Regression for data frames with dutility call ##' @param data data frame ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param x name of variable, or fomula, or names of variables on data frame. ##' @param z name of variable, or fomula, or names of variables on data frame. ##' @param x.oneatatime x's one at a time ##' @param x.base.names base covarirates ##' @param z.arg what is Z, c("clever","base","group","condition"), clever decides based on type of Z, base means that Z is used as fixed baseline covaraites for all X, group means the analyses is done based on groups of Z, and condition means that Z specifies a condition on the data ##' @param fun. function lm is default ##' @param summary. summary to use ##' @param regex regex ##' @param convert convert ##' @param doSummary doSummary or not ##' @param special special's ##' @param equal to do pairwise stuff ##' @param test development argument ##' @param ... Additional arguments for fun ##' @author Klaus K. Holst, Thomas Scheike ##' @examples##' ##' data(iris) ##' data <- iris ##' drename(iris) <- ~. ##' names(iris) ##' set.seed(1) ##' iris$time <- runif(nrow(iris)) ##' iris$time1 <- runif(nrow(iris)) ##' iris$status <- rbinom(nrow(iris),1,0.5) ##' iris$S1 <- with(iris,Surv(time,status)) ##' iris$S2 <- with(iris,Surv(time1,status)) ##' iris$id <- 1:nrow(iris) ##' ##' mm <- dreg(iris,"*.length"~"*.width"|I(species=="setosa" & status==1)) ##' mm <- dreg(iris,"*.length"~"*.width"|species+status) ##' mm <- dreg(iris,"*.length"~"*.width"|species) ##' mm <- dreg(iris,"*.length"~"*.width"|species+status,z.arg="group") ##' ##' \donttest{ ## Reduce Ex.Timings ##' y <- "S*"~"*.width" ##' xs <- dreg(iris,y,fun.=phreg) ##' xs <- dreg(iris,y,fun.=survdiff) ##' ##' y <- "S*"~"*.width" ##' xs <- dreg(iris,y,x.oneatatime=FALSE,fun.=phreg) ##' ##' ## under condition ##' y <- S1~"*.width"|I(species=="setosa" & sepal.width>3) ##' xs <- dreg(iris,y,z.arg="condition",fun.=phreg) ##' xs <- dreg(iris,y,fun.=phreg) ##' ##' ## under condition ##' y <- S1~"*.width"|species=="setosa" ##' xs <- dreg(iris,y,z.arg="condition",fun.=phreg) ##' xs <- dreg(iris,y,fun.=phreg) ##' ##' ## with baseline after | ##' y <- S1~"*.width"|sepal.length ##' xs <- dreg(iris,y,fun.=phreg) ##' ##' ## by group by species, not working ##' y <- S1~"*.width"|species ##' ss <- split(iris,paste(iris$species,iris$status)) ##' ##' xs <- dreg(iris,y,fun.=phreg) ##' ##' ## species as base, species is factor so assumes that this is grouping ##' y <- S1~"*.width"|species ##' xs <- dreg(iris,y,z.arg="base",fun.=phreg) ##' ##' ## background var after | and then one of x's at at time ##' y <- S1~"*.width"|status+"sepal*" ##' xs <- dreg(iris,y,fun.=phreg) ##' ##' ## background var after | and then one of x's at at time ##' ##y <- S1~"*.width"|status+"sepal*" ##' ##xs <- dreg(iris,y,x.oneatatime=FALSE,fun.=phreg) ##' ##xs <- dreg(iris,y,fun.=phreg) ##' ##' ## background var after | and then one of x's at at time ##' ##y <- S1~"*.width"+factor(species) ##' ##xs <- dreg(iris,y,fun.=phreg) ##' ##xs <- dreg(iris,y,fun.=phreg,x.oneatatime=FALSE) ##' ##' y <- S1~"*.width"|factor(species) ##' xs <- dreg(iris,y,z.arg="base",fun.=phreg) ##' ##' y <- S1~"*.width"|cluster(id)+factor(species) ##' xs <- dreg(iris,y,z.arg="base",fun.=phreg) ##' xs <- dreg(iris,y,z.arg="base",fun.=coxph) ##' ##' ## under condition with groups ##' y <- S1~"*.width"|I(sepal.length>4) ##' xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) ##' ##' ## under condition with groups ##' y <- S1~"*.width"+I(log(sepal.length))|I(sepal.length>4) ##' xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) ##' ##' y <- S1~"*.width"+I(dcut(sepal.length))|I(sepal.length>4) ##' xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun.=phreg) ##' ##' ff <- function(formula,data,...) { ##' ss <- survfit(formula,data,...) ##' kmplot(ss,...) ##' return(ss) ##' } ##' ##' if (interactive()) { ##' dcut(iris) <- ~"*.width" ##' y <- S1~"*.4"|I(sepal.length>4) ##' par(mfrow=c(1,2)) ##' xs <- dreg(iris,y,fun.=ff) ##' } ##' } ##' ##' @export dreg <- function(data,y,x=NULL,z=NULL,x.oneatatime=TRUE, x.base.names=NULL,z.arg=c("clever","base","group","condition"), fun.=lm,summary.=summary,regex=FALSE,convert=NULL,doSummary=TRUE, special=NULL,equal=TRUE,test=1,...) {# {{{ ### z.arg=clever, if z is logical then condition ### if z is factor then group variable ### if z is numeric then baseline covariate ### ... further arguments to fun ### fun <- as.character(substitute(fun)) ### if (is.character(fun)) ### fun <- get(fun) ### if (!is.null(convert) && is.logical(convert)) { ### if (convert) ### convert <- as.matrix ### else convert <- NULL ### } ### if (!is.null(convert)) { ### fun_ <- fun ### fun <- function(x, ...) fun_(convert(x, ...)) ### } ### print(fun) ### print(str(fun)) yxzf <- procform(y,x=x,z=z,data=data,do.filter=FALSE,regex=regex) yxz <- procformdata(y,x=x,z=z,data=data,do.filter=FALSE,regex=regex) ### print(yxz) ### print(yxzf) ## remove blank, to able to use also +1 on right hand side if (any(yxzf$predictor=="")) yxzf$predictor <- yxzf$predictor[-which(yxzf$predictor=="")] yy <- yxz$response xx <- yxz$predictor ### group is list, so zz is data.frame if ((length(yxzf$filter))==0) zz <- NULL else if ((length(yxzf$filter[[1]])==1 & yxzf$filter[[1]][1]=="1")) zz <- NULL else zz <- yxz$group[[1]] if (!is.null(zz)) {# {{{ if (z.arg[1]=="clever") { if ((ncol(zz)==1) & is.logical(zz[1,1])) z.arg[1] <- "condition" else if ((ncol(zz)==1) & is.factor(zz[,1])) z.arg[1] <- "group" else z.arg[1] <- "base" } }# }}} ### print(z.arg) basen <- NULL if (z.arg[1]=="base") basen <- yxzf$filter[[1]] if (z.arg[1]=="condition") data <- subset(data,eval(yxzf$filter.expression)) if (z.arg[1]=="group") group <- interaction(zz) else group <- rep(1,nrow(data)) if (z.arg[1]=="group") levell <- levels(group) else levell <-1 res <- sum <- list() if (test==1) { if (is.null(summary)) sum <- NULL for (g in levell) {# {{{ if (equal==TRUE) datal <- subset(data,group==g) else datal <- subset(data,group!=g) for (y in yxzf$response) {# {{{ if (x.oneatatime) { for (x in yxzf$predictor) { if (length(c(x,basen))>1) basel <- paste(c(x,basen),collapse="+") else basel <- c(x,basen) form <- as.formula(paste(y,"~",basel)) if (!is.null(special)) form <- timereg::timereg.formula(form,special=special) ### val <- with(data,do.call(fun,c(list(formula=form),list(...)))) capture.output( val <- do.call(fun.,c(list(formula=form),list(data=datal),list(...)))) ### print(y) ### print(basel) ### val$call <- paste(y,"~",basel) val <- list(val) nn <- paste(y,"~",basel) if (z.arg[1]=="group") { if (equal==TRUE) nn <- paste(nn,"|",g) else nn <- paste(nn,"| not",g); } names(val) <- nn res <- c(res, val) if (doSummary) { sval <- list(do.call(summary.,list(val[[1]]))) names(sval) <- nn ### sval$call <- NULL sum <- c(sum, sval) } } } else { basel <- paste(c(yxzf$predictor,basen),collapse="+") form <- as.formula(paste(y,"~",basel)) if (!is.null(special)) form <- timereg::timereg.formula(form,special=special) capture.output( val <- do.call(fun.,c(list(formula=form),list(data=datal),list(...)))) nn <- paste(y,"~",basel) if (z.arg[1]=="group") { if (equal==TRUE) nn <- paste(nn,"|",g) else nn <- paste(nn,"| not",g); } ### val$call <- nn val <- list(val) names(val) <- paste(y,"~",basel) res <- c(res, val) if (doSummary) { sval <- list(do.call(summary.,list(val[[1]]))) names(sval) <- nn sum <- c(sum, sval) } } }# }}} }# }}} } res <- list(reg=res,summary=sum) ### res <- list(setNames(res,funn),summary=sum,...) class(res) <- "dreg" ### structure(res,ngrouvar=0,class="dreg") return(res) }# }}} ##' @export print.dreg <- function(x,sep="-",...) {# {{{ sep <- paste(rep(sep,50,sep=""),collapse="") sep <- paste(sep,"\n") nn <- names(x$reg) for (i in seq_along(x$reg)) { cat(paste("Model=",nn[i],"\n")) print(x$reg[[i]],...) cat(sep) } }# }}} ##' @export summary.dreg <- function(object,sep="-",...) {# {{{ x <- object sep <- paste(rep(sep,50,sep=""),collapse="") sep <- paste(sep,"\n") ### cat(sep) ### if (inherits(x$lm, c("lm"))) { ### print(x$lm) ### if (!is.null(x$summary)) print(x$summary) ### return(invisible(x)) ### } if (!is.null(x$summary)) { nn <- names(x$summary) for (i in seq_along(x$summary)) { cat(paste("Model=",nn[i],"\n")) if (!is.null(x$summary)) print(x$summary[[i]],...) else print(x$reg[[i]],...) cat(sep) } } }# }}} mets/R/options.R0000644000176200001440000000204113623061405013236 0ustar liggesusers##' Set global options for \code{mets} ##' ##' Extract and set global parameters of \code{mets}. ##' ##' \itemize{ ##' \item \code{regex}: If TRUE character vectors will be interpreted as regular expressions (\code{dby}, \code{dcut}, ...) ##' \item \code{silent}: Set to \code{FALSE} to disable various output messages ##' } ##' @param ... Arguments ##' @return \code{list} of parameters ##' @keywords models ##' @examples ##' \dontrun{ ##' mets.options(regex=TRUE) ##' } ##' @export mets.options <- function(...) { dots <- list(...) newopt <- curopt <- get("options",envir=mets.env) if (length(dots)==0) return(curopt) if (length(dots)==1 && is.list(dots[[1]]) && is.null(names(dots))) { dots <- dots[[1]] } idx <- which(names(dots)!="") newopt[names(dots)[idx]] <- dots[idx] assign("options",newopt,envir=mets.env) invisible(curopt) } mets.env <- new.env() assign("options", list(debug=FALSE, regex=FALSE, regex.perl=FALSE ), envir=mets.env) mets/R/mets-package.R0000644000176200001440000001367113623061405014117 0ustar liggesusers##' Analysis of Multivariate Events ##' ##' Implementation of various statistical models for multivariate ##' event history data. Including multivariate cumulative incidence models, ##' and bivariate random effects probit models (Liability models) ##' ##' @name mets-package ##' @docType package ##' @author Klaus K. Holst and Thomas Scheike ##' @useDynLib mets, .registration=TRUE ##' @import stats splines timereg Rcpp mvtnorm ##' @importFrom lava iid estimate bootstrap compare score information twostage %++% %ni% addvar<- blockdiag cancel Col ##' confband constrain<- constraints covariance covariance<- coxWeibull.lvm devcoords distribution<- ##' endogenous eventTime Expand getoutcome gof intercept<- Inverse kill<- latent latent<- lava.options lvm ##' Model multigroup parameter<- pars regression regression<- revdiag sim trim ##' @importFrom survival Surv is.Surv concordance ##' @importFrom utils head tail getS3method glob2rx capture.output ##' @importFrom graphics matplot lines plot polygon par points abline ##' title matlines legend ##' @importFrom grDevices dev.list devAskNewPage dev.interactive ##' @keywords package ##' @examples ##' ##' ## To appear ##' NULL ##' np data set ##' ##' @name np ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' Migraine data ##' ##' @name migr ##' @docType data ##' @keywords data NULL ##' Dermal ridges data (families) ##' ##' Data on dermal ridge counts in left and right hand in (nuclear) families ##' @name dermalridges ##' @docType data ##' @keywords data ##' @format Data on 50 families with ridge counts in left and right ##' hand for moter, father and each child. Family id in 'family' and ##' gender and child number in 'sex' and 'child'. ##' @source Sarah B. Holt (1952). Genetics of dermal ridges: bilateral ##' asymmetry in finger ridge-counts. Annals of Eugenics 17 (1), ##' pp.211--231. DOI: 10.1111/j.1469-1809.1952.tb02513.x ##' @examples ##' data(dermalridges) ##' fast.reshape(dermalridges,id="family",varying=c("child.left","child.right","sex")) NULL ##' Dermal ridges data (monozygotic twins) ##' ##' Data on dermal ridge counts in left and right hand in (nuclear) families ##' @name dermalridgesMZ ##' @docType data ##' @keywords data ##' @format Data on dermal ridge counts (left and right hand) in 18 ##' monozygotic twin pairs. ##' @source Sarah B. Holt (1952). Genetics of dermal ridges: bilateral ##' asymmetry in finger ridge-counts. Annals of Eugenics 17 (1), ##' pp.211--231. DOI: 10.1111/j.1469-1809.1952.tb02513.x ##' @examples ##' data(dermalridgesMZ) ##' fast.reshape(dermalridgesMZ,id="id",varying=c("left","right")) NULL ##' Menarche data set ##' ##' @name mena ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' Multivariate Cumulative Incidence Function example data set ##' ##' @name multcif ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' Stutter data set ##' ##' Based on nation-wide questionnaire answers from 33,317 Danish twins ##' @format ##' tvparnr: twin-pair id ##' zyg: zygosity, MZ:=mz, DZ(same sex):=dz, DZ(opposite sex):=os ##' stutter: stutter status (yes/no) ##' age: age ##' nr: number within twin-pair ##' @name twinstut ##' @docType data ##' @keywords data NULL ##' BMI data set ##' ##' @format ##' Self-reported BMI-values on 11,411 subjects ##' ##' tvparnr: twin id ##' bmi: BMI (m/kg^2) ##' age: Age ##' gender: (male/female) ##' zyg: zygosity, MZ:=mz, DZ(same sex):=dz, DZ(opposite sex):=os ##' @name twinbmi ##' @docType data ##' @keywords data NULL ##' Prostate data set ##' ##' @name prt ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' For internal use ##' ##' @title For internal use ##' @name npc ##' @rdname internal ##' @author Klaus K. Holst ##' @keywords utilities ##' @export ##' @aliases plotcr npc nonparcuminc simnordic corsim.prostate ##' alpha2kendall alpha2spear coefmat piecewise.twostage surv.boxarea ##' faster.reshape piecewise.data ##' simBinPlack simBinFam simBinFam2 simSurvFam corsim.prostate.random ##' simnordic.random simCox sim ##' grouptable jumptimes folds ##' ace.family.design ascertained.pairs CCbinomial.twostage ##' coarse.clust concordanceTwinACE concordanceTwostage ##' fast.cluster force.same.cens ilap ##' kendall.ClaytonOakes.twin.ace kendall.normal.twin.ace ##' make.pairwise.design make.pairwise.design.competing ##' matplot.mets.twostage object.defined p11.binomial.twostage.RV ##' predictPairPlack simbinClaytonOakes.family.ace ##' simbinClaytonOakes.pairs simbinClaytonOakes.twin.ace ##' simClaytonOakes.family.ace simClaytonOakes.twin.ace simFrailty.simple ##' simCompete.simple simCompete.twin.ace twin.polygen.design ##' twostage.fullse ##' procform procform3 procformdata NULL ##' Rate for leaving HPN program for patients of Copenhagen ##' ##' @name drcumhaz ##' @docType data ##' @keywords data ##' @source Estimated data NULL ##' rate of CRBSI for HPN patients of Copenhagen ##' ##' @name base1cumhaz ##' @docType data ##' @keywords data ##' @source Estimated data NULL ##' rate of Mechanical (hole/defect) complication for catheter of HPN patients of Copenhagen ##' ##' @name base4cumhaz ##' @docType data ##' @keywords data ##' @source Estimated data NULL ##' rate of Occlusion/Thrombosis complication for catheter of HPN patients of Copenhagen ##' ##' @name base44cumhaz ##' @docType data ##' @keywords data ##' @source Estimated data NULL ##' hapfreqs data set ##' ##' @name hapfreqs ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' haploX covariates and response for haplo survival discrete survival ##' ##' @name haploX ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' ghaplos haplo-types for subjects of haploX data ##' ##' @name ghaplos ##' @docType data ##' @keywords data ##' @source Simulated data NULL ##' ttpd discrete survival data on interval form ##' ##' @name ttpd ##' @docType data ##' @keywords data ##' @source Simulated data NULL mets/R/twin.clustertrunc.r0000644000176200001440000001547213623061405015334 0ustar liggesusers##' Estimation of twostage model with cluster truncation in bivariate situation ##' ##' @title Estimation of twostage model with cluster truncation in bivariate situation ##' @param survformula Formula with survival model aalen or cox.aalen, some limitiation on model specification due to call of fast.reshape (so for example interactions and * and : do not work here, expand prior to call) ##' @param data Data frame ##' @param theta.des design for dependence parameters in two-stage model ##' @param clusters clustering variable for twins ##' @param var.link exp link for theta ##' @param Nit number of iteration ##' @param final.fitting TRUE to do final estimation with SE and ... arguments for marginal models ##' @param ... Additional arguments to lower level functions ##' @author Thomas Scheike ##' @export ##' @examples ##' library("timereg") ##' data(diabetes) ##' v <- diabetes$time*runif(nrow(diabetes))*rbinom(nrow(diabetes),1,0.5) ##' diabetes$v <- v ##' ##' aout <- twin.clustertrunc(Surv(v,time,status)~1+treat+adult, ##' data=diabetes,clusters="id") ##' aout$two ## twostage output ##' par(mfrow=c(2,2)) ##' plot(aout$marg) ## marginal model output ##' ##' out <- twin.clustertrunc(Surv(v,time,status)~1+prop(treat)+prop(adult), ##' data=diabetes,clusters="id") ##' out$two ## twostage output ##' plot(out$marg) ## marginal model output twin.clustertrunc <- function(survformula,data=sys.parent(),theta.des=NULL,clusters=NULL,var.link=1, Nit=10,final.fitting=FALSE,...) { ## {{{ ## {{{ adding names of covariates from survival model to data frame if needed ## adds names that are not in data (typically intercept from additive) or ### expansion of factors, ## also reducing only to needed covariates survnames <- all.vars(update(survformula, .~0)) if (length(survnames)!=3) stop("Must give entry, exit and status") entry <- survnames[1] exit <- survnames[2] status <- survnames[3] tss <- terms(survformula) Znames <- attr(tss,"term.labels") ZnamesO <- Znames ### checks if cluster is given in survformula then removes clustervar <- grep("^cluster[(][A-z0-9._:]*",Znames,perl = TRUE) if (length(clustervar)>=1) Znames <- Znames[-clustervar] propvar <- grep("^prop[(][A-z0-9._:]*",Znames,perl = TRUE) if (length(propvar)>=1) model <- "cox.aalen" else model <- "aalen" ### removes prop from names if (model=="cox.aalen") { Zn <- c() nn <- length(Znames) ### droppe prop() for navne for (i in 1:nn) Zn <- c(Zn,substr(Znames[i],6,nchar(Znames[i])-1)) Znames <- Zn } clust.orig <- data[,clusters] d0 <- data[,c(entry,exit,status,clusters,Znames)] data <- d0 data$dataid <- 1:nrow(data) d2 <- fast.reshape(data,id=clusters) d2 <- na.omit(d2) ### only double entry people data <- fast.reshape(d2,labelnum=TRUE) des <- aalen.des(survformula,data=data,model=model) factornamesX <- !(des$covnamesX %in% Znames) colnames(des$X) <- des$covnamesX if (sum(factornamesX)>=1) data <- cbind(data,des$X[,factornamesX,drop=FALSE]) if (model=="cox.aalen") { factornamesZ <- !(des$covnamesZ %in% Znames) colnames(des$Z) <- des$covnamesZ if (sum(factornamesZ)>=1) data <- cbind(data,des$Z[,factornamesZ,drop=FALSE]) } namesX <- des$covnamesX namesZ <- des$covnamesZ pweight <- rep(1,nrow(data)) if (!is.null(clusters)) nclusters <- data[,clusters] else stop("must give clusters\n"); if (is.null(theta.des)) ptheta <- 0 else ptheta <- rep(0,ncol(theta.des)) ###singletons might be dropped so same for theta.des theta.des <- theta.des[data$dataid,] ## }}} assign("pweight",pweight,envir=environment(survformula)) for (i in 1:Nit) { ## {{{ if (model=="cox.aalen") { aout <- cox.aalen(survformula,data=data,weights=1/pweight,robust=0,n.sim=0,beta=0); beta <- c(aout$gamma,aout$cum[,-1]) } else { aout <- aalen(survformula,data=data,weights=1/pweight,robust=0,n.sim=0); beta <- aout$cum[,-1] } if (i==1) { if (model=="cox.aalen") pbeta <- 0*c(aout$gamma,aout$cum[,-1]) else pbeta <- 0*aout$cum[,-1] } if (i>=2) tout <- twostage(aout,data=data,clusters=nclusters,theta.des=theta.des,theta=ptheta,var.link=var.link) else tout <- twostage(aout,data=data,clusters=nclusters,theta.des=theta.des,var.link=var.link) if (!is.null(theta.des)) theta <- c(theta.des %*% tout$theta) else theta <- tout$theta ### if (attr(tout, "var.link") == 1) theta <- exp(tout$theta) data$thetades <- c(theta) data$delay <- tout$marginal.trunc data$surv <- tout$marginal.surv dd <- fast.reshape(data,id=clusters) v1 <- dd[,paste(entry,"1",sep="")]; v2 <- dd[,paste(entry,"2",sep="")] time1 <- dd[,paste(exit,"1",sep="")]; time2 <- dd[,paste(exit,"2",sep="")] status1 <- dd[,paste(status,"1",sep="")]; status2 <- dd[,paste(status,"2",sep="")] nn <- nrow(dd) ppv1t2 <- .Call("claytonoakesR",dd$thetades1,rep(0,nn),status2,dd$delay1,dd$surv2,var.link,PACKAGE="mets")$like ppv1t2[status2==0] <- ppv1t2[dd$status2==0]/dd$surv2[status2==0] ppt1v2 <- .Call("claytonoakesR",dd$thetades1,dd$status1,rep(0,nn),dd$surv1,dd$delay2,var.link,PACKAGE="mets")$like ppt1v2[status1==0] <- ppt1v2[status1==0]/dd$surv1[status1==0] dd$weight1 <- c(ppt1v2) dd$weight2 <- c(ppv1t2) nn <- nrow(dd) dd2 <- fast.reshape(dd,labelnum=TRUE) pweight <- dd2$weight dtheta <- sum(abs(tout$theta-ptheta)) dmarg <- sum(abs(beta-pbeta)) if ((dtheta+dmarg) < 0.001) break; ptheta <- tout$theta if (model=="aalen") pbeta <- aout$cum[,-1] else pbeta <- c(aout$gamma,aout$cum[,-1]) } ## }}} if (final.fitting==TRUE) { ## {{{ if (model=="cox.aalen") aout <- cox.aalen(survformula,data=data,weights=1/pweight,n.sim=0,...) else aout <- aalen(survformula,data=data,weights=1/pweight,n.sim=0,...) tout <- twostage(aout,data=data,clusters=nclusters,theta.des=theta.des,var.link=var.link) } ## }}} res <- list(marg=aout,two=tout,marg.weights=pweight,dtheta=dtheta,dmarg=dmarg,model=model) return(res) } ## }}} ##' @export ###twin.dobdata <- function(survformula,data=data,clusters=NULL, ### entry="v",exit="time",status="status") ###{ ## {{{ ##### {{{ adding names of covariates from survival model to data frame if needed ##### adds names that are not in data (typically intercept from additive) model ##### also reducing only to needed covariates ### ###d0 <- data[,c(entry,exit,status,clusters)] ### ###model <- "aalen" ###des <- aalen.des(survformula,data=data,model=model) ###X <- des$X ######med <- des$covnamesX %in% names(data) ### colnames(X) <- des$covnamesX ### d0 <- cbind(d0,X) ### ###data <- d0 ### ###d2 <- fast.reshape(data,id=clusters) ###d2 <- na.omit(d2) ###data <- fast.reshape(d2,numlabel=TRUE) ### ######theta.des <- data.frame(theta.des) ######theta.des$clusters <- data[,clusters] ###### ######t2 <- fast.reshape(theta.des,id=clusters) ######t2 <- na.omit(t2) ######theta.des <- fast.reshape(t2,numlabel=TRUE) ### ###return(data) ###} ### mets/R/twinsim.R0000644000176200001440000000613113623061405013241 0ustar liggesusers##' Simulate twin data from a linear normal ACE/ADE/AE model. ##' ##' @title Simulate twin data ##' @author Klaus K. Holst ##' @export ##' @seealso \code{\link{twinlm}} ##' @keywords models ##' @keywords regression ##' @param nMZ Number of monozygotic twin pairs ##' @param nDZ Number of dizygotic twin pairs ##' @param b1 Effect of covariates (labelled x1,x2,...) of type 1. One ##' distinct covariate value for each twin/individual. ##' @param b2 Effect of covariates (labelled g1,g2,...) of type 2. One ##' covariate value for each twin pair. ##' @param mu Intercept parameter. ##' @param acde Variance of random effects (in the order A,C,D,E) ##' @param randomslope Logical indicating wether to include random slopes of ##' the variance components w.r.t. x1,x2,... ##' @param threshold Treshold used to define binary outcome y0 ##' @param cens Logical variable indicating whether to censor outcome ##' @param wide Logical indicating if wide data format should be returned ##' @param ... Additional arguments parsed on to lower-level functions twinsim <- function(nMZ=100,nDZ=nMZ,b1=c(),b2=c(),mu=0,acde=c(1,1,0,1),randomslope=NULL,threshold=0,cens=FALSE,wide=FALSE,...) { n <- nMZ+nDZ sA <- acde[1]^0.5; sC <- acde[2]^0.5; sD <- acde[3]^0.5; sE <- acde[4]^0.5; A.MZ <- rnorm(nMZ,sd=sA); A.MZ <- cbind(A.MZ,A.MZ) D.MZ <- rnorm(nMZ,sd=sD); D.MZ <- cbind(D.MZ,D.MZ) S2 <- matrix(c(0,1,1,0),2) A.DZ <- sA*rmvn(nDZ,sigma=diag(2)+S2*0.5) D.DZ <- sD*rmvn(nDZ,sigma=diag(2)+S2*0.25) C.MZ <- rnorm(nMZ,sd=sC) C.DZ <- rnorm(nDZ,sd=sC) yMZ <- mu + A.MZ + cbind(C.MZ,C.MZ) + D.MZ + cbind(rnorm(nMZ,sd=sE),rnorm(nMZ,sd=sE)) yDZ <- mu + A.DZ + cbind(C.DZ,C.DZ) + D.DZ + cbind(rnorm(nDZ,sd=sE),rnorm(nDZ,sd=sE)) y <- rbind(yMZ,yDZ) if (length(b1)>0) { x1 <- rmvn(n,sigma=diag(length(b1))) x2 <- rmvn(n,sigma=diag(length(b1))) y <- y+cbind(x1%*%b1,x2%*%b1) } if (length(b2)>0) { g <- rmvn(n,sigma=diag(length(b2))) ge <- g%*%b2 y <- y+cbind(ge,ge) } Cens <- ifelse(cens,rep(Inf,nMZ+nDZ),rnorm(nMZ+nDZ,threshold+1)) d <- data.frame(id=seq(n),y=y,zyg=c(rep("MZ",nMZ),rep("DZ",nDZ)), cens=Cens) vary <- list(c("y1","y2")) vnames <- c("y") colnames(d)[2:3] <- vary[[1]] if (length(b1)>0) { d <- cbind(d,x1=x1,x2=x2); if (length(b1)==1) { colnames(d)[1:2+ncol(d)-2] <- c("x11","x21") } vary <- c(vary,lapply(seq(length(b1)),FUN=function(x) paste(c("x1","x2"),x,sep=""))) vnames <- c(vnames,paste("x",seq_len(length(b1)),sep="")) } if (length(b2)>0) { d <- cbind(d,g=g) } names(vary) <- vnames colnames(d) <- sub(".","",colnames(d),fixed=TRUE) if (wide) return(d) dd <- fast.reshape(d,idname="id",varying=vary) dd$status <- dd$ythreshold) dd$y1 <- (dd$y>threshold & dd$y1 mcontr2 <- !x$model$eqmarg && x$model$blen>2 mcontr1 <- x$model$eqmarg & x$model$blen>1 if (corcontr || mcontr2 || mcontr1 || x$contrast) cat("\nContrast:\n") if (corcontr || x$contrast) { cat("\tDependence ", x$par[[i]]$corref, "\n") } if (mcontr2 || (x$contrast & !x$model$eqmarg)) { cat("\tMean 1 ", x$par[[i]]$mref1, "\n") cat("\tMean 2 ", x$par[[i]]$mref2, "\n") } if (mcontr1 || (x$contrast & x$model$eqmarg)) cat("\tMean ", x$par[[i]]$mref1, "\n") if (!is.null(x$varcomp)) { cat("\n") ##res <- x$varcomp res <- c() P <- x$prob[seq(x$nstat)+x$nstat*(i-1),,drop=FALSE] if (!is.null(P)) { res <- rbind(res,P) } idx <- unlist(sapply(c("Concordance","Marginal","P\\(Y"),function(x) grep(x,rownames(res)))) idx2 <- setdiff(seq(nrow(res)),idx) res2 <- rbind(res[idx2,],rep(NA,ncol(res)),res[idx,]) nn <- rownames(res2) rownames(res2) <- unlist(lapply(nn,function(x) gsub(paste("c",i,":",sep=""),"",x))) print(RoundMat(res2,digits=digits,na=FALSE),quote=FALSE) } } if (!is.null(x$time)) { cat("\n") cat("Event of interest before time ", x$time, "\n", sep="") } } mets/R/aalenfrailty.R0000644000176200001440000001065013623061405014223 0ustar liggesusers ##' Additive hazards model with (gamma) frailty ##' ##' Aalen frailty model ##' @title Aalen frailty model ##' @param time Time variable ##' @param status Status variable (0,1) ##' @param X Covariate design matrix ##' @param id cluster variable ##' @param theta list of thetas (returns score evaluated here), or ##' starting point for optimization (defaults to magic number 0.1) ##' @param B (optional) Cumulative coefficients (update theta by fixing B) ##' @param ... Additional arguments to lower level functions ##' @return Parameter estimates ##' @author Klaus K. Holst ##' @export ##' @examples ##' library("timereg") ##' dd <- simAalenFrailty(5000) ##' f <- ~1##+x ##' X <- model.matrix(f,dd) ## design matrix for non-parametric terms ##' system.time(out<-aalen(update(f,Surv(time,status)~.),dd,n.sim=0,robust=0)) ##' dix <- which(dd$status==1) ##' t1 <- system.time(bb <- .Call("Bhat",as.integer(dd$status), ##' X,0.2,as.integer(dd$id),NULL,NULL, ##' PACKAGE="mets")) ##' spec <- 1 ##' ##plot(out,spec=spec) ##' ## plot(dd$time[dix],bb$B2[,spec],col="red",type="s", ##' ## ylim=c(0,max(dd$time)*c(beta0,beta)[spec])) ##' ## abline(a=0,b=c(beta0,beta)[spec]) ##' ##' ##' ##' \dontrun{ ##' thetas <- seq(0.1,2,length.out=10) ##' Us <- unlist(aalenfrailty(dd$time,dd$status,X,dd$id,as.list(thetas))) ##' ##plot(thetas,Us,type="l",ylim=c(-.5,1)); abline(h=0,lty=2); abline(v=theta,lty=2) ##' op <- aalenfrailty(dd$time,dd$status,X,dd$id) ##' op ##' } aalenfrailty <- function(time,status,X,id,theta,B=NULL,...) { dix <- which(status==1) cc <- cluster.index(id) ncluster <- length(cc$clusters) U <- function(theta,indiv=FALSE,Bhat=FALSE) { if (is.null(B)) { BB <- .Call("Bhat",as.integer(status),X,theta,as.integer(cc$clusters), cc$idclust,as.integer(cc$cluster.size),PACKAGE="mets")$B2 } else { BB <- B*time[dix] } Hij0 <- apply(X[dix,,drop=FALSE]*BB,1,sum) Hij <- Cpred(cbind(time[dix],Hij0),time)[,2,drop=FALSE] ## if (is.na(Hij[1])) browser() res <- .Call("Uhat",as.integer(status),Hij,theta, cc$idclust,as.integer(cc$cluster.size),PACKAGE="mets") if (!indiv) res <- mean(res,na.rm=TRUE) if (Bhat) attributes(res)$B <- BB return(res) } if (missing(theta)) theta <- 0.1 if (is.list(theta)) { cc <- lapply(theta,function(x) U(x,Bhat=TRUE,...)) BB <- Reduce("cbind",lapply(cc,function(x) attributes(x)$B)) UU <- unlist(lapply(cc,function(x) x[1])) res <- list(U=UU, B=BB, time=time, dix=dix, X=X, id=id, status=status) return(res) } op <- nlminb(theta,function(x) U(x)^2) uu <- U(op$par,TRUE) du <- numDeriv::grad(U,op$par) return(list(theta=op$par, sd=(mean(uu^2)/du^2/ncluster)^0.5)) } ##' Simulate observations from Aalen Frailty model with Gamma ##' distributed frailty and constant intensity. ##' ##' @title Simulate from the Aalen Frailty model ##' @param n Number of observations in each cluster ##' @param theta Dependence paramter (variance of frailty) ##' @param K Number of clusters ##' @param beta0 Baseline (intercept) ##' @param beta Effect (log hazard ratio) of covariate ##' @param cens Censoring rate ##' @param cuts time cuts ##' @param ... Additional arguments ##' @author Klaus K. Holst ##' @export simAalenFrailty <- function(n=5e3,theta=0.3,K=2,beta0=1.5,beta=1,cens=1.5,cuts=0,...) { ## beta0 (constant baseline intensity) ## beta (covariate effect) if (length(beta0)!=length(cuts)) stop("Number of time-intervals (cuts) does not agree with number of rate parameters (beta0)") cuts <- c(cuts,Inf) id <- rep(seq(n/K),each=K) ## Cluster indicator x <- rbinom(n,1,0.5) ## Binary covariate Z <- rep(rgamma(n/K,1/theta,1/theta),each=K) ## Frailty, mean 1, var theta Ai <- function() { vals <- matrix(0,ncol=length(beta0),nrow=n) ival <- numeric(n) for (i in seq(length(beta0))) { u <- -log(runif(n)) ##rexp(n,1) vals[,i] <- cuts[i] + u/(beta0[i]+beta*x)/Z idx <- which(vals[,i]<=cuts[i+1] & ival==0) ival[idx] <- vals[idx,i] } ival } dat <- data.frame(time=Ai(), x=x, status=1, id=id, Z=Z) if (cens==0) cens <- Inf else cens <- -log(runif(n))/cens dat$status <- (dat$time<=cens)*1 dat$time <- apply(cbind(dat$time,cens),1,min) dat <- dat[order(dat$time),] ## order after event/censoring time return(dat) } mets/R/Dbvn.R0000644000176200001440000000237113623061405012442 0ustar liggesusers##' Derivatives of the bivariate normal cumulative distribution function ##' ##' @title Derivatives of the bivariate normal cumulative distribution function ##' @param p Parameter vector ##' @param design Design function with defines mean, derivative of mean, variance, ##' and derivative of variance with respect to the parameter p ##' @param Y column vector where the CDF is evaluated ##' @author Klaus K. Holst ##' @usage ##' Dbvn(p,design=function(p,...) { ##' return(list(mu=cbind(p[1],p[1]), ##' dmu=cbind(1,1), ##' S=matrix(c(p[2],p[3],p[3],p[4]),ncol=2), ##' dS=rbind(c(1,0,0,0),c(0,1,1,0),c(0,0,0,1))) )}, ##' Y=cbind(0,0)) ##' @export Dbvn <- function(p,design=function(p,...) { return(list(mu=cbind(p[1],p[1]), dmu=cbind(1,1), S=matrix(c(p[2],p[3],p[3],p[4]),ncol=2), dS=rbind(c(1,0,0,0),c(0,1,1,0),c(0,0,0,1))) )}, Y=cbind(0,0)) { mS <- design(p) U0 <- with(mS,.Call("biprobit0", mu, S,dS,Y,dmu,NULL,FALSE,FALSE, PACKAGE="mets")); return(c(U0,mS)) } mets/R/prop-odds.R0000644000176200001440000000165613623061405013465 0ustar liggesuserspropOdds <- function(time,status,X, ...) { id <- 1:length(time) theta <- 1 dix <- which(status==1) fB <- fast.approx(time[dix],time) cc <- cluster.index(id) ncluster <- length(cc$clusters) U <- function(beta,indiv=FALSE) { B <- .Call("pBhat",as.integer(status),X,beta,as.integer(cc$clusters), cc$idclust,as.integer(cc$cluster.size),PACKAGE="mets")$B Ba <- B[fB$pos+1,,drop=FALSE] Hij <- as.vector(X*Ba) res <- .Call("Uhat",as.integer(status),Hij,theta, cc$idclust,as.integer(cc$cluster.size),PACKAGE="mets") if (!indiv) res <- mean(res) res } if (missing(theta)) theta <- 0.1 if (is.list(theta)) return(lapply(theta,function(x) U(x,...))) op <- nlminb(theta,function(x) U(x)^2) uu <- U(op$par,TRUE) du <- numDeriv::grad(U,op$par) return(list(theta=op$par, sd=(mean(uu^2)/du^2/ncluster)^0.5)) } mets/R/fastreshape.R0000644000176200001440000004115313623061405014057 0ustar liggesusers##' @export dreshape <- function(data,...) fast.reshape(data,...) ##' Fast reshape ##' ##' Fast reshape/tranpose of data ##' @param data data.frame or matrix ##' @param varying Vector of prefix-names of the time varying variables. Optional for Long->Wide reshaping. ##' @param id id-variable. If omitted then reshape Wide->Long. ##' @param num Optional number/time variable ##' @param sep String seperating prefix-name with number/time ##' @param keep Vector of column names to keep ##' @param idname Name of id-variable (Wide->Long) ##' @param numname Name of number-variable (Wide->Long) ##' @param factor If true all factors are kept (otherwise treated as character) ##' @param idcombine If TRUE and \code{id} is vector of several variables, the unique id is combined from all the variables. ##' Otherwise the first variable is only used as identifier. ##' @param labelnum If TRUE varying variables in wide format (going from long->wide) are labeled 1,2,3,... otherwise use 'num' variable. In long-format (going from wide->long) varying variables matching 'varying' prefix are only selected if their postfix is a number. ##' @param labels Optional labels for the number variable ##' @param regex Use regular expressions ##' @param dropid Drop id in long format (default FALSE) ##' @param ... Optional additional arguments ##' @author Thomas Scheike, Klaus K. Holst ##' @aliases fast.reshape dreshape ##' @export ##' @examples ##' library("lava") ##' m <- lvm(c(y1,y2,y3,y4)~x) ##' d <- sim(m,5) ##' d ##' fast.reshape(d,"y") ##' fast.reshape(fast.reshape(d,"y"),id="id") ##' ##' ##### From wide-format ##' (dd <- fast.reshape(d,"y")) ##' ## Same with explicit setting new id and number variable/column names ##' ## and seperator "" (default) and dropping x ##' fast.reshape(d,"y",idname="a",timevar="b",sep="",keep=c()) ##' ## Same with 'reshape' list-syntax ##' fast.reshape(d,list(c("y1","y2","y3","y4")),labelnum=TRUE) ##' ##' ##### From long-format ##' fast.reshape(dd,id="id") ##' ## Restrict set up within-cluster varying variables ##' fast.reshape(dd,"y",id="id") ##' fast.reshape(dd,"y",id="id",keep="x",sep=".") ##' ##' ##### ##' x <- data.frame(id=c(5,5,6,6,7),y=1:5,x=1:5,tv=c(1,2,2,1,2)) ##' x ##' (xw <- fast.reshape(x,id="id")) ##' (xl <- fast.reshape(xw,c("y","x"),idname="id2",keep=c())) ##' (xl <- fast.reshape(xw,c("y","x","tv"))) ##' (xw2 <- fast.reshape(xl,id="id",num="num")) ##' fast.reshape(xw2,c("y","x"),idname="id") ##' ##' ### more generally: ##' ### varying=list(c("ym","yf","yb1","yb2"), c("zm","zf","zb1","zb2")) ##' ### varying=list(c("ym","yf","yb1","yb2"))) ##' ##' ##### Family cluster example ##' d <- mets:::simBinFam(3) ##' d ##' fast.reshape(d,var="y") ##' fast.reshape(d,varying=list(c("ym","yf","yb1","yb2"))) ##' ##' d <- sim(lvm(~y1+y2+ya),10) ##' d ##' (dd <- fast.reshape(d,"y")) ##' fast.reshape(d,"y",labelnum=TRUE) ##' fast.reshape(dd,id="id",num="num") ##' fast.reshape(dd,id="id",num="num",labelnum=TRUE) ##' fast.reshape(d,c(a="y"),labelnum=TRUE) ## New column name ##' ##' ##' ##### Unbalanced data ##' m <- lvm(c(y1,y2,y3,y4)~ x+z1+z3+z5) ##' d <- sim(m,3) ##' d ##' fast.reshape(d,c("y","z")) ##' ##' ##### not-varying syntax: ##' fast.reshape(d,-c("x")) ##' ##' ##### Automatically define varying variables from trailing digits ##' fast.reshape(d) ##' ##' ##### Prostate cancer example ##' data(prt) ##' head(prtw <- fast.reshape(prt,"cancer",id="id")) ##' ftable(cancer1~cancer2,data=prtw) ##' rm(prtw) fast.reshape <- function(data,varying,id,num,sep="",keep, idname="id",numname="num",factor=FALSE, idcombine=TRUE,labelnum=FALSE,labels, regex=mets.options()$regex, dropid=FALSE, ...) { if (!is.data.frame(data) & is.list(data)) { data <- as.data.frame(data) } else { if (NCOL(data)==1) data <- cbind(data) } nn <- colnames(data) if (!missing(varying)) { varsubst <- substitute(varying) if (as.character(varsubst)[1]=="-") { notvarying <- varsubst[[-1]] vars0 <- setdiff(nn,eval(notvarying,parent.frame())) ##numstr <- gsub("([1-9]\\d+)$","",vars0) ##numstr_sanspre0 <- gsub("(^0+)",num) varying <- unique(gsub("([1-9]|[1-9]\\d+)$","",vars0)) } if (!missing(id)) varying <- setdiff(varying,id) if (!missing(num)) varying <- setdiff(varying,num) } if (missing(id)) { ## reshape from wide to long format. nsep <- nchar(sep) if (missing(varying)) {#stop("Prefix of time-varying variables needed") ## Find all variable names with trailing digits (and leading zeros) vars0 <- grep("([1-9]|[1-9]\\d+)$",nn); varying <- unique(gsub("([1-9]|[1-9]\\d+)$","",nn[vars0])) } if (is.list(varying)) { orig <- varying for (i in seq_along(varying)) { elem <- varying[[i]] if (is.numeric(elem[i])) { varying[[i]] <- colnames(data)[elem] } if (is.character(elem[i])) { ii <- elem%in%colnames(data) if (!all(ii)) { newelem <- c() for (j in seq_along(elem)) { if (ii[j]) newelem <- c(newelem,elem[j]) else { if (!regex) elem[j] <- glob2rx(elem[j]) newelem <- c(newelem, grep(elem[j],colnames(data),value=TRUE)) } } varying[[i]] <- newelem } } } } ## nl <- as.list(seq_along(data)); names(nl) <- nn ## varying <- eval(substitute(varying),nl,parent.frame()) vnames <- NULL ncvar <- sapply(varying,nchar) newlist <- c() numlev <- TRUE all_levels <- c() thelevels <- c() if (!is.list(varying)) { for (i in seq_len(length(varying))) { ii <- which(varying[i]==substr(nn,1,ncvar[i])) thelevel <- substring(nn[ii],ncvar[i]+1+nsep) if (labelnum) { ii0 <- suppressWarnings(which(!is.na(as.numeric(thelevel)))) ii <- ii[ii0] thelevel <- thelevel[ii0] } all_levels <- union(all_levels,thelevel) thelevels <- c(thelevels,list(thelevel)) suppressWarnings(tt <- as.numeric(thelevel)) newlist <- c(newlist,list(nn[ii[order(tt)]])) } len <- unlist(lapply(newlist,length)) for (i in seq_len(length(varying))) { if (len[i]1) || !all(classes%in%c("numeric","logical","integer","matrix","factor","character"))) { ## e.g. Surv columns oldreshape <- TRUE } ## else { ## chars <- which(classes%in%c("character")) ## factors <- which(classes%in%c("factor")) ## for (j in chars) data[,j] <- as.factor(data[,j]) ## if (length(c(chars,factors))>0) { ## for (k in varying) { ## if (any(nn[c(chars,factors)]%in%k)) { ## lev <- lapply(data[1,k],levels) ## allsame <- unlist(lapply(lev,function(x) ## identical(x,lev[[1]]))) ## if (!all(allsame)) ## for (j in k) data[,j] <- factor(data[,j],levels=lev) ## } ## } ## classes[chars] <- "factor" ## D0 <- data[1,,drop=FALSE] ## } ## data <- data.matrix(data) ## } } if (is.null(vnames)) { vnames <- unlist(lapply(varying,function(x) x[1])) if (!is.null(names(vnames))) vnames <- names(vnames) } if (oldreshape) { ## Fall-back to stats::reshape return( structure(reshape(as.data.frame(data),varying=varying,direction="long",v.names=vnames,timevar=numname,idvar=idname,...), class=c("fast.reshape","data.frame"), direction="wide", varying=varying)) } fixed <- setdiff(nn,unlist(c(varying,numname))) if (!missing(keep)) fixed <- intersect(fixed,c(keep,idname,numname)) nfixed <- length(fixed) nvarying <- length(varying) nclusts <- unlist(lapply(varying,length)) ## nclust <- length(varying[[1]]) nclust <- max(nclusts) if (any(nclusts!=nclust)) stop("Different length of varying vectors!") data <- data[,c(fixed,unlist(varying)),drop=FALSE] long <- as.data.frame(.Call("FastLong2", idata=data, inclust=as.integer(nclust), as.integer(nfixed), as.integer(nvarying),PACKAGE="mets" )); if (numname%in%fixed) { while (numname%in%c(fixed)) numname <- paste(numname,"_",sep="") } if (idname%in%fixed) { long <- long[,-(ncol(long)-1)] cnames <- c(fixed,vnames,numname) } else { cnames <- c(fixed,vnames,idname,numname) } ## while (idname%in%c(fixed,vnames,numname)) idname <- paste(idname,"_",sep="") ## while (numname%in%c(fixed,vnames)) numname <- paste(numname,"_",sep="") colnames(long) <- cnames if (!numlev) { long[,numname] <- base::factor(long[,numname],labels=thelevels) } else { if (!identical(order(thelevels),thelevels)) long[,numname] <- thelevels[long[,numname]] } if (is_df && factor) { ## Recreate classes vars.orig <- c(fixed,unlist(lapply(varying,function(x) x[1]))) vars.new <- c(fixed,vnames) factors <- which("factor"==classes[vars.orig]) lev <- lapply(data[1,factors],levels) count <- 0 for (i in factors) { count <- count+1 long[,vars.new[i]] <- base::factor(long[,vars.new[i]],levels=lev[[count]]) } } if (dropid) { ii <- which(colnames(long)%in%c(idname)) ##,numname long <- long[,-ii,drop=FALSE] } return( structure(long, class=c("fast.reshape","data.frame"), type="wide", varying=varying)) } ################################################## ### Long to wide format: ################################################## numvar <- idvar <- NULL if (is.character(id)) { idvar <- id if (length(id)==1) { id <- data[,idvar,drop=TRUE] } else { if (idcombine) id <- interaction(as.data.frame(data[,idvar,drop=FALSE]),drop=TRUE) else id <- data[,idvar[1],drop=TRUE] } } else { if (length(id)!=nrow(data)) stop("Length of ids and data-set does not agree") } unum <- NULL if (!missing(num) && !is.null(num)) { if (is.character(num)) { numvar <- num if (is.character(data[1,num,drop=TRUE])) { data[,num] <- as.factor(data[,num,drop=TRUE]) } num <- as.integer(data[,num,drop=TRUE]) if (!labelnum) unum <- sort(unique(data[,numvar,drop=TRUE])) } else { if (length(num)!=nrow(data)) stop("Length of time and data-set does not agree") if (!labelnum) unum <- unique(num) } } else { num <- NULL } if (any(nn=="")) data <- data.frame(data) clustud <- cluster.index(id,num=num) maxclust <- clustud$maxclust idclust <- clustud$idclust obs1 <- clustud$firstclustid+1 ## as.vector(apply(idclust,1,function(x) na.omit(x)[1]))+1 if (!is.null(numvar)) { ii <- which(colnames(data)==numvar) data <- data[,-ii,drop=FALSE] } if (!missing(keep)) { keepers <- c(keep,idvar) if (!missing(varying)) keepers <- c(keepers,varying) ii <- which(colnames(data)%in%keepers) data <- data[,ii,drop=FALSE] } if (missing(varying)) varying <- setdiff(colnames(data),c(idvar)) vidx <- match(varying,colnames(data)) N <- nrow(idclust) p <- length(varying) P <- NCOL(data) fixidx <- setdiff(seq(P),vidx) if (is.matrix(data) || (all(apply(data[1,,drop=FALSE],2,is.numeric)) & length(unlist(data[1,]))==length(data[1,]) )) { ## Everything numeric - we can work with matrices dataw <- matrix(NA, nrow = N, ncol = p * (maxclust-1) + ncol(data)) dataw[,fixidx] <- as.matrix(data[obs1,fixidx,drop=FALSE]) mnames <- colnames(data) if (!is.null(unum)) { mnames[vidx] <- paste(mnames[vidx],unum[1],sep=sep) } else { mnames[vidx] <- paste(mnames[vidx],1,sep=sep) } if (p>0) { for (i in seq_len(maxclust)) { idx <- idclust[, i] + 1 pos <- vidx if (i>1) { pos <- P+seq(p)+p*(i-2) } dataw[which(!is.na(idx)), pos] <- as.matrix(data[na.omit(idx),vidx,drop=FALSE]) } if (!is.null(unum)) { postn <- unum[-1] } else { postn <- seq_len(maxclust-1)+1 } ##if (is.null(numname)) postn <- idlev[postn] mnames <- c(mnames, as.vector(t(outer(postn,varying,function(x,y) paste(y,x,sep=sep))))) } colnames(dataw) <- mnames return(structure(as.data.frame(dataw),class=c("fast.reshape","data.frame"), varying=varying,direction="long")) } ## Potentially slower with data.frame where we use cbind for (i in seq_len(maxclust)) { if (i==1) { dataw <- data[obs1,,drop=FALSE] mnames <- names(data); dataw[,vidx] <- data[idclust[,i]+1,vidx,drop=FALSE] if (!is.null(unum)) mnames[vidx] <- paste(varying,sep,unum[i],sep="") else mnames[vidx] <- paste(mnames[vidx],sep,i,sep="") } else { dataw <- cbind(dataw,data[idclust[,i]+1,varying,drop=FALSE]) if (!is.null(unum)) mnames <- c(mnames,paste(varying,sep,unum[i],sep="")) else mnames <- c(mnames,paste(varying,sep,i,sep="")) } } names(dataw) <- mnames return(structure(dataw,class=c("fast.reshape","data.frame"), varying=varying,type="long")) } simple.reshape <- function (data, id = "id", num = NULL) { cud <- cluster.index(data[, c(id)], num = num, Rindex = 1) N <- nrow(cud$idclust) p <- ncol(data) dataw <- matrix(NA, nrow = N, ncol = p * cud$maxclust) for (i in seq_len(cud$maxclust)) { dataw[, seq(p) + (i - 1) * p] <- as.matrix(data[cud$idclust[, i] + 1, ]) } colnames(dataw) <- paste(names(data), rep(seq_len(cud$maxclust), each = p), sep = ".") return(dataw) } mets/R/RcppExports.R0000644000176200001440000000111313623061405014033 0ustar liggesusers# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 .ApplyBy2 <- function(idata, icluster, F, Env, Argument = "x", Columnwise = 0L, Reduce = 0L, epsilon = 1.0e-16) { .Call(`_mets_ApplyBy2`, idata, icluster, F, Env, Argument, Columnwise, Reduce, epsilon) } .ApplyBy <- function(idata, icluster, f) { .Call(`_mets_ApplyBy`, idata, icluster, f) } # Register entry points for exported C++ functions methods::setLoadAction(function(ns) { .Call('_mets_RcppExport_registerCCallable', PACKAGE = 'mets') }) mets/R/tetrachor.R0000644000176200001440000000532613623061405013547 0ustar liggesusers##' @export or2prob <- function(OR,marg) { p1 <- marg[1]; p2 <- marg[2] if (length(marg)==1) p2 <- p1 if (OR==1) { PP <- outer(c(p1,1-p1),c(p2,1-p2)) } else { ## OR (p11*p00)/(p10*p01) = p11*(1+p11-p1-p2)/(p1-p11)*(p2-p11) ## (OR-1)p11^2-(OR(p1+p2)+(1-p1-p2))*p11+OR*p1*p2 = 0 ## (1-OR)p11^2+(OR(p1+p2)+(1-p1-p2))*p11-OR*p1*p2 = 0 a <- (1-OR) b <- 1+(p1+p2)*(OR-1) ac <- -OR*p1*p2*a d <- sqrt(b^2-4*ac) ## Only one solution p11 <- (-b+d)/(2*a) PP <- c(p11,p1-p11,p2-p11) PP <- c(PP,1-sum(PP)) } structure(matrix(PP,2),marg=c(p1,p2)) } ##' Estimate parameters from odds-ratio ##' ##' Calculate tetrachoric correlation of probabilities from odds-ratio ##' @param P Joint probabilities or marginals (if OR is given) ##' @param OR Odds-ratio ##' @param approx If TRUE an approximation of the tetrachoric correlation is used ##' @param ... Additional arguments ##' @export ##' @aliases or2prob tetrachoric ##' @examples ##' tetrachoric(0.3,1.25) # Marginal p1=p2=0.3, OR=2 ##' P <- matrix(c(0.1,0.2,0.2,0.5),2) ##' prod(diag(P))/prod(lava::revdiag(P)) ##' ##mets:::assoc(P) ##' tetrachoric(P) ##' or2prob(2,0.1) ##' or2prob(2,c(0.1,0.2)) tetrachoric <- function(P,OR,approx=0,...) { if (!missing(OR)) { ## Assuming P[1],P[2] is the marginals P <- or2prob(OR,P) p1 <- attributes(P)$marg[1] p2 <- attributes(P)$marg[2] } else { ## Assuming P contains the joint probabilities if (is.vector(P)) { if (length(P)==3) P <- c(P,1-sum(P)) P <- matrix(P,2) } if (!all.equal(sum(P),1)) stop("Not a probability matrix") p1 <- colSums(P)[1] p2 <- rowSums(P)[1] } if (approx>0) { ## Bonnet & Price 2005 k <- (1-abs(p1-p2)/5 - (.5-min(p1,p2))^2)/2 if (missing(OR)) OR <- prod(diag(P))/prod(revdiag(P)) return(cos(pi/(1+OR^k))) } q1 <- qnorm(p1) q2 <- qnorm(p2) lo <- rbind(c(0,0),c(0,-Inf),c(-Inf,0),c(-Inf,-Inf)) hi <- rbind(c(Inf,Inf),c(Inf,0),c(0,Inf),c(0,0)) mu <- cbind(q1,q2)%x%cbind(rep(1,4)) obj <- function(r) { Pr <- pmvn(lower=lo,upper=hi,mu=mu,sigma=r,cor=TRUE) return(mean(abs(P-Pr)^2)) ##(P[1,1]-pmvn(lower=c(0,0),mu=c(q1,q2),sigma=r,cor=TRUE))^2 } optimize(obj,interval=c(-1,1))$minimum } assoc <- function(x,id,...) { N <- sum(x) P <- x if (N!=1) P <- P/N p1 <- colSums(P)[1] p2 <- rowSums(P)[1] OR <- prod(diag(P))/prod(revdiag(P)) rho <- tetrachoric(P) list(P=P, OR=OR, rho=rho) } ## library(vcd) ## data(prt) ## mosaic(cancer ~country*zyg,prt) ## (ftable(cancer ~ country, prt)) ## grouptable(...) mets/R/cifreg.R0000644000176200001440000003332313623061405013011 0ustar liggesusers##' CIF regression ##' ##' CIF logistic for propodds=1 default ##' CIF Fine-Gray (cloglog) regression for propodds=NULL ##' ##' For FG model: ##' \deqn{ ##' \int (X - E ) Y_1(t) w(t) dM_1 ##' } ##' is computed and summed over clusters and returned multiplied with inverse ##' of second derivative as iid.naive ##' ##' The iid decomposition of the beta's, however, also have a censoring term that is also ##' is computed and added to UUiid (still scaled with inverse second derivative) ##' \deqn{ ##' \int (X - E ) Y_1(t) w(t) dM_1 + \int q(s)/p(s) dM_c ##' } ##' and returned as iid ##' ##' ##' @param formula formula with 'Event' outcome ##' @param data data frame ##' @param cause of interest ##' @param cens.code code of censoring ##' @param offset offsets for cox model ##' @param weights weights for Cox score equations ##' @param Gc censoring weights for time argument, default is to calculate these with a Kaplan-Meier estimator, should then give G_c(T_i-) ##' @param propodds 1 is logistic model, NULL is fine-gray model ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ## data with no ties ##' data(bmt,package="timereg") ##' bmt$time <- bmt$time+runif(nrow(bmt))*0.01 ##' bmt$id <- 1:nrow(bmt) ##' ##' ## logistic link OR interpretation ##' ll=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1) ##' bplot(ll) ##' nd <- data.frame(tcell=c(1,0),platelet=0,age=0) ##' pll <- predict(ll,nd) ##' plot(pll) ##' ##' ## Fine-Gray model ##' llfg=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1,propodds=NULL) ##' bplot(ll) ##' nd <- data.frame(tcell=c(1,0),platelet=0,age=0) ##' pll <- predict(ll,nd) ##' plot(pll) ##' ##' @export cifreg <- function(formula,data=data,cause=1,cens.code=0, weights=NULL,offset=NULL,Gc=NULL,propodds=1,...) {# {{{ cl <- match.call()# {{{ m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (class(Y)!="Event") stop("Expected a 'Event'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(stratapos <- attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} if (!is.null(offsetpos <- attributes(Terms)$specials$offset)) { ts <- survival::untangle.specials(Terms, "offset") Terms <- Terms[-ts$terms] offset <- m[[ts$vars]] } X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) ### if (!is.null(id)) { ### ids <- sort(unique(id)) ### nid <- length(ids) ### if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { ### id <- as.integer(factor(id,labels=seq(nid)))-1 ### } ### } else id <- as.integer(seq_along(exit))-1; ### ### id from call coded as numeric 1 -> ### id.orig <- id; # }}} res <- c(cifreg01(data,X,exit,status,id,strata,offset,weights,strata.name, cause=cause,cens.code=cens.code,Gc=Gc,propodds=propodds,...), list(call=cl,model.frame=m,formula=formula,strata.pos=pos.strata,cluster.pos=pos.cluster) ) class(res) <- c("phreg","cif.reg") return(res) }# }}} cifreg01 <- function(data,X,exit,status,id=NULL,strata=NULL,offset=NULL,weights=NULL, strata.name=NULL,beta,stderr=TRUE,method="NR",no.opt=FALSE,propodds=1,profile=0, case.weights=NULL,cause=1,cens.code=0,Gc=NULL,...) {# {{{ ## setting up weights, strata, beta and so forth before the action starts# {{{ p <- ncol(X) if (missing(beta)) beta <- rep(0,p) if (p==0) X <- cbind(rep(0,length(exit))) cause.jumps <- which(status==cause) max.jump <- max(exit[cause.jumps]) other <- which((!(status %in% c(cens.code,cause)) ) & (exit< max.jump)) entry <- NULL n <- length(exit) trunc <- (!is.null(entry)) if (is.null(strata)) { strata <- rep(0,length(exit)); nstrata <- 1; strata.level <- NULL; } else { strata.level <- levels(strata) ustrata <- sort(unique(strata)) nstrata <- length(ustrata) strata.values <- ustrata if (is.numeric(strata)) strata <- fast.approx(ustrata,strata)-1 else { strata <- as.integer(factor(strata,labels=seq(nstrata)))-1 } } if (!trunc) entry <- rep(0,length(exit)) if (is.null(offset)) offset <- rep(0,length(exit)) if (is.null(weights)) weights <- rep(1,length(exit)) if (is.null(case.weights)) case.weights <- rep(1,length(exit)) strata.call <- strata Zcall <- matrix(1,1,1) ## to not use for ZX products when Z is not given if (!is.null(id)) { ids <- unique(id) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(entry))-1; ## orginal id coding into integers 1:... id.orig <- id+1; # }}} ### censoring weights constructed whereC <- which(status==cens.code) time <- exit if (is.null(Gc)) { cens.model <- km(Surv(exit,status==cens.code)~+1,data=data) wpredS <- fast.approx(c(0,cens.model$time),exit,type="left") ### wpredS <- timereg:::sindex.prodlim(c(0,cens.model$time),exit) Stime <- c(1,cens.model$surv)[wpredS] } else { if (length(whereC)>0) Ctimes <- sort(unique(exit[whereC])) else Ctimes <- 0 Stime <- Gc } ## setting up all jumps of type "cause", need S0, S1, S2 at jumps of "cause" stat1 <- 1*(status==cause) xx2 <- .Call("FastCoxPrepStrata",entry,exit,stat1,X,id, trunc,strata,weights,offset,Zcall,case.weights,PACKAGE="mets") xx2$nstrata <- nstrata jumps <- xx2$jumps+1 jumptimes <- xx2$time[jumps] Xj <- xx2$X[jumps,,drop=FALSE] ## G(T_j-) at jumps of type "cause" if (length(whereC)>0) { whereJ <- fast.approx(c(0,cens.model$time),jumptimes,type="left") Gjumps <- c(1,cens.model$surv)[whereJ] } else { Gjumps <- rep(1,length(jumptimes)) } ## computing terms for those experiencing another cause, need S0, S1, S2 if ( length(other)>=1) {# {{{ trunc <- TRUE weightso <- 1/Stime[other] timeoo <- rep(max(exit)+1,length(other)) statuso <- rep(0,length(other)) Xo <- X[other,,drop=FALSE] offseto <- offset[other] entryo <- exit[other] ido <- id[other] stratao <- strata[other] ### xx <- .Call("FastCoxPrepStrata",entryo,timeoo,statuso,Xo, ido,trunc,stratao,weightso,offseto,Zcall,case.weights[other],PACKAGE="mets") xx$nstrata <- nstrata timeo <- xx$time ## use right here because T_jump is larger than the T_(other) som står i listen ## timeo where <- fast.approx(c(0,timeo),jumptimes,type="right") }# }}} obj <- function(pp,all=FALSE) {# {{{ if (length(other)>=1) { rr <- c(xx$sign*exp(xx$X %*% pp + xx$offset)*xx$weights) S0no <- revcumsumstrata(rr,xx$strata,xx$nstrata) S1no <- apply(xx$X*rr,2,revcumsumstrata,xx$strata,xx$nstrata); S2no <- apply(xx$XX*rr,2,revcumsumstrata,xx$strata,xx$nstrata); ## look at jumptimes S0no <- c(0,S0no)[where] S1no <- rbind(0,S1no)[where,,drop=FALSE] S2no <- rbind(0,S2no)[where,,drop=FALSE] } else { Gjumps <- S0no <- S1no <- S2no <- 0} rr2 <- c(xx2$sign*exp(xx2$X %*% pp + xx2$offset)*xx2$weights) rr2now <- c(xx2$sign*exp(xx2$X %*% pp + xx2$offset)) S0oo <- revcumsumstrata(rr2,xx2$strata,xx2$nstrata) S1oo <- apply(xx2$X*rr2,2,revcumsumstrata,xx2$strata,xx2$nstrata); S2oo <- apply(xx2$XX*rr2,2,revcumsumstrata,xx2$strata,xx2$nstrata); S0oo <- S0oo[jumps,] S1oo <- S1oo[jumps,,drop=FALSE] S2oo <- S2oo[jumps,,drop=FALSE] S0 <- c(S0oo+S0no*Gjumps) E <- (S1oo+S1no*Gjumps)/S0 weightsJ <- xx2$weights[jumps] caseweightsJ <- xx2$caseweights[jumps] strataJ <- xx2$strata[jumps] rr2now <- rr2now[jumps] U <- (Xj-E) ploglik <- (log(rr2now)-log(S0))*weightsJ*caseweightsJ; if (!is.null(propodds)) { pow <- c(.Call("cumsumstrataPOR",weightsJ,S0,strataJ,nstrata,propodds,rr2now,PACKAGE="mets")$pow); DLam <-.Call("DLambetaR",weightsJ,S0,E,Xj,strataJ,nstrata,propodds,rr2now,PACKAGE="mets")$res; Dwbeta <- DLam*rr2now+(pow-1)*Xj DUadj <- .Call("vecMatMat",Dwbeta,U,PACKAGE="mets")$vXZ } Ut <- caseweightsJ*weightsJ*U ## E^2, as n x (pxp) Et2 <- .Call("vecMatMat",E,E,PACKAGE="mets")$vXZ S2S0 <- (S2oo+S2no*Gjumps)/S0 DUt <- -(S2S0-Et2) if (!is.null(propodds)) { Ut <- pow*Ut S0 <- S0/pow DUt <- pow*DUt DUt <- DUt+DUadj if (profile==1) { Ut <- Ut+c(ploglik)*Dwbeta ## not implemented DUt <- DUt } ploglik <- pow*ploglik } U <- apply(Ut,2,sum) DUt <- caseweightsJ*weightsJ*DUt DU <- -matrix(apply(DUt,2,sum),p,p) ploglik <- sum(ploglik) out <- list(ploglik=ploglik,gradient=U,hessian=-DU,cox.prep=xx2, hessiantime=DUt,weightsJ=weightsJ,caseweightsJ=caseweightsJ, jumptimes=jumptimes,strata=strataJ,nstrata=nstrata, time=jumptimes,S0=S0/(caseweightsJ*weightsJ),S2S0=S2S0,E=E,U=Ut,X=Xj,Gjumps=Gjumps) if (all) return(out) else with(out,structure(-ploglik, gradient=-gradient, hessian=-hessian)) }# }}} if (length(jumps)==0) no.opt <- TRUE opt <- NULL if (p>0) {# {{{ if (no.opt==FALSE) { if (tolower(method)=="nr") { opt <- lava::NR(beta,obj,...) opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; names(cc) <- colnames(X) if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(0,all=TRUE) }# }}} ### opt <- lava::NR(beta,obj); beta.s <- opt$par beta.s <- val$coef ## getting final S's opt <- obj(beta.s,all=TRUE) ### iid version # {{{ ### iid.phreg ##iid robust phreg Gt <- S0i <- rep(0,length(xx2$strata)) S0i[jumps] <- 1/opt$S0 Z <- xx2$X U <- E <- matrix(0,nrow(Z),p) E[jumps,] <- opt$E U[jumps,] <- opt$U Gt[jumps] <- Gjumps ### cumhazA <- cumsumstratasum(S0i,xx2$strata,xx2$nstrata,type="all") cumhaz <- c(cumhazA$sum) rr <- c(xx2$sign*exp(Z %*% beta.s + xx2$offset)) if (!is.null(propodds)) { cumhazm <- c(cumhazA$lagsum) S0star <- cumsumstrata(rr/(1+rr*cumhazm),xx2$strata,xx2$nstrata) } EdLam0 <- apply(E*S0i,2,cumsumstrata,xx2$strata,xx2$nstrata) ### Martingale as a function of time and for all subjects to handle strata MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0)*rr*c(xx2$weights) mid <- max(xx2$id) UU <- apply(MGt,2,sumstrata,xx2$id,mid+1) if (length(other)>=1) { ### T_j for jumps of other type where <- fast.approx(c(0,xx2$time),entryo,type="right") ### rcumhazGt <- c(revcumsumstrata(S0i*Gt,xx2$strata,xx2$nstrata)) rEdLam0Gt <- apply(E*S0i*Gt,2,revcumsumstrata,xx2$strata,xx2$nstrata) ### rcumhazGtx <- c(rcumhazGt[1],rcumhazGt)[where] rEdLam0Gtx <- rbind(rEdLam0Gt[1],rEdLam0Gt)[where,] ### rrx <- c(exp(Xo %*% beta.s + offseto)*weightso) if (!is.null(propodds)) { } ### MGtGtx <- -(Xo*rcumhazGtx-rEdLam0Gtx)*rrx UU2 <- apply(MGtGtx,2,sumstrata,ido,mid+1) UU <- UU+UU2 } # }}} if ((length(other)>=1) & (length(whereC)>0)) { ### Censoring adjustment for jumps of other type {{{ where <- fast.approx(xx2$time,entryo,type="right") rrrx <- rep(0,length(xx2$strata)) rrrx[where] <- rrx Xos <- matrix(0,length(xx2$time),ncol(Xo)); Xos[where,] <- Xo ### Xos <- apply(Xos,2,cumsum) rro <- cumsum(rrrx) ### q <- -(Xos*rcumhazGt-rEdLam0Gt*rro) idloc__ <- id cens.mgs = phreg(Surv(exit,status==0)~+cluster(idloc__),data=data,no.opt=TRUE) cxx <- cens.mgs$cox.prep ### Gt <- S0i <- S0i2 <- rep(0,length(cxx$strata)) S0i[cxx$jumps+1] <- 1/cens.mgs$S0 S0i2[cxx$jumps+1] <- 1/cens.mgs$S0^2 qc <- matrix(0,nrow(q),ncol(q)) ## sort q after censoring times qc[cxx$jumps+1,] <- q[cxx$jumps+1] ### EdLam0q <- apply(qc*S0i2,2,cumsumstrata,cxx$strata,cxx$nstrata) ### Martingale as a function of time and for all subjects to handle strata MGc <- qc[,drop=FALSE]*S0i-EdLam0q MGc <- apply(MGc,2,sumstrata,cxx$id,mid+1) ### print(crossprod(MGc)) ### print(crossprod(UU)) ### print(t(UU) %*% MGc ) # }}} } else MGc <- 0 iH <- - tryCatch(solve(opt$hessian),error= function(e) matrix(0,nrow(opt$hessian),ncol(opt$hessian)) ) Uiid <- (UU+MGc) %*% iH UUiid <- UU %*% iH var1 <- crossprod(UUiid) varm <- crossprod(Uiid) strata <- xx2$strata[jumps] cumhaz <- cbind(opt$time,cumsumstrata(1/opt$S0,strata,nstrata)) colnames(cumhaz) <- c("time","cumhaz") ## SE of estimator ignoring some censoring terms if (no.opt==FALSE & p!=0) { DLambeta.t <- apply(opt$E/c(opt$S0),2,cumsumstrata,strata,nstrata) varbetat <- rowSums((DLambeta.t %*% iH)*DLambeta.t) ### covariance is 0 for cox model ### covv <- apply(covv*DLambeta.t,1,sum) Covariance is "0" by construction } else varbetat <- 0 var.cumhaz <- cumsumstrata(1/opt$S0^2,strata,nstrata)+varbetat se.cumhaz <- cbind(jumptimes,(var.cumhaz)^.5) colnames(se.cumhaz) <- c("time","se.cumhaz") out <- list(coef=beta.s,var=varm,se.coef=diag(varm)^.5,iid.naive=UUiid, iid=Uiid, ihessian=iH,hessian=opt$hessian,var1=var1,se1.coef=diag(var1)^.5, ploglik=opt$ploglik,gradient=opt$gradient, cumhaz=cumhaz, se.cumhaz=se.cumhaz, strata=xx2$strata,nstrata=nstrata,strata.name=strata.name, strata.level=strata.level,propodds=propodds, S0=opt$S0,E=opt$E,S2S0=opt$S2S0,time=opt$time,Ut=opt$U, jumps=jumps,II=iH,exit=exit,p=p,opt=opt,n=nrow(X),nevent=length(jumps) ) return(out) }# }}} mets/R/gof-phreg.R0000644000176200001440000004362213623061405013433 0ustar liggesusers##' GOF for Cox PH regression ##' ##' Cumulative score process residuals for Cox PH regression ##' p-values based on Lin, Wei, Ying resampling. ##' @param object is phreg object ##' @param n.sim number of simulations for score processes ##' @param silent to show timing estimate will be produced for longer jobs ##' @param robust to control wether robust dM_i(t) or dN_i are used for simulations ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike and Klaus K. Holst ##' @export ##' @aliases gof.phreg ##' @examples ##' data(TRACE) ##' ##' m1 <- phreg(Surv(time,status==9)~vf+chf+diabetes,data=TRACE) ##' gg <- gof(m1) ##' par(mfrow=c(1,3)) ##' plot(gg) ##' ##' m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+diabetes,data=TRACE) ##' ## to get Martingale ~ dN based simulations ##' gg <- gof(m1) ##' ##' ## to get Martingale robust simulations, specify cluster in call ##' m1 <- phreg(Surv(time,status==9)~chf+diabetes+cluster(id),data=TRACE) ##' gg <- gof(m1) ##' ##' @export gof.phreg <- function(object,n.sim=1000,silent=1,robust=NULL,...) {# {{{ ### test for proportionality p <- length(object$coef) nnames <- names(object$coef) ii <- solve(object$hessian) jumptimes <- object$jumptimes Pt <- object$hessianttime U <- object$U Pt <- apply(Pt,2,cumsum) Ut <- apply(U,2,cumsum) nd <- nrow(object$U) Pt <- .Call("CubeMat",Pt,ii,PACKAGE="mets")$XXX sup <- matrix(0,n.sim,nrow(ii)) hatti <- matrix(0,nd,nrow(ii)) obs <- apply(abs(Ut),2,max) if (is.null(robust)) if (!is.null(object$id)) robust <- TRUE else robust <- FALSE ### cluster call or robust \hat M_i(t) based if (robust) { xx <- object$cox.prep S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+ 1] <- 1/object$S0 Z <- xx$X ZdN <- U <- E <- matrix(0, nrow(xx$X), object$p) E[xx$jumps + 1, ] <- object$E U[xx$jumps + 1, ] <- object$U cumhaz <- c(cumsumstrata(S0i, xx$strata, xx$nstrata)) EdLam0 <- apply(E * S0i, 2, cumsumstrata, xx$strata, xx$nstrata) rr <- c(xx$sign * exp(Z %*% coef(object) + xx$offset)) MGt <- U[, drop = FALSE] - (Z * cumhaz - EdLam0) * rr * c(xx$weights) ### also weights w <- c(xx$weights) nn <- nrow(Z) tt <- system.time(simcox1<- .Call("PropTestCoxClust",MGt,Pt,w*rr,Z,cumhaz,EdLam0,10,obs,nn,xx$id,xx$strata,xx$nstrata,xx$jumps)) prt <- n.sim*tt[3]/(10*60) if (prt>1 & silent==0) cat(paste("Predicted time minutes",signif(prt,2),"\n")) simcox <- .Call("PropTestCoxClust",MGt,Pt,w*rr,Z,cumhaz,EdLam0,n.sim,obs,nn,xx$id,rep(0,nn),1,xx$jumps) } else { ### no or dN_i based tt <- system.time(simcox1<-.Call("PropTestCox",U,Pt,10,obs,PACKAGE="mets")) prt <- n.sim*tt[3]/(10*60) if (prt>1 & silent==0) cat(paste("Predicted time minutes",signif(prt,2),"\n")) simcox <- .Call("PropTestCox",U,Pt,n.sim,obs,PACKAGE="mets") } sup <- simcox$supUsim res <- cbind(obs,simcox$pval) colnames(res) <- c("Sup|U(t)|","pval") rownames(res) <- nnames if (silent==0) { cat("Cumulative score process test for Proportionality:\n") prmatrix(round(res,digits=2)) } out <- list(jumptimes=object$jumptimes,supUsim=sup,res=res,supU=obs, pvals=simcox$pval,score=Ut,simUt=simcox$simUt,type="prop",robust=robust) class(out) <- "gof.phreg" return(out) }# }}} ##' GOF for Cox covariates in PH regression ##' ##' Cumulative residuals after model matrix for Cox PH regression ##' p-values based on Lin, Wei, Ying resampling. ##' ##' That is, computes ##' \deqn{ ##' U(t) = \int_0^t M^t d \hat M ##' } ##' and resamples its asymptotic distribution. ##' ##' This will show if the residuals are consistent with the model. Typically, ##' M will be a design matrix for the continous covariates that gives for example ##' the quartiles, and then the plot will show if for the different quartiles of the covariate the risk ##' prediction is consistent over time (time x covariate interaction). ##' ##' @param formula formula for cox regression ##' @param data data for model ##' @param offset offset ##' @param weights weights ##' @param modelmatrix matrix for cumulating residuals ##' @param n.sim number of simulations for score processes ##' @param silent to keep it absolutely silent, otherwise timing estimate will be prduced for longer jobs. ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike and Klaus K. Holst ##' @export ##' @examples ##' library(mets) ##' data(TRACE) ##' set.seed(1) ##' TRACEsam <- blocksample(TRACE,idvar="id",replace=FALSE,100) ##' ##' dcut(TRACEsam) <- ~. ##' mm <- model.matrix(~-1+factor(wmicat.4),data=TRACEsam) ##' m1 <- gofM.phreg(Surv(time,status==9)~vf+chf+wmi,data=TRACEsam,modelmatrix=mm) ##' summary(m1) ##' if (interactive()) { ##' par(mfrow=c(2,2)) ##' plot(m1) ##' } ##' ##' m1 <- gofM.phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACEsam,modelmatrix=mm) ##' summary(m1) ##' ##' ## cumulative sums in covariates, via design matrix mm ##' mm <- cumContr(TRACEsam$wmi,breaks=10,equi=TRUE) ##' m1 <- gofM.phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACEsam, ##' modelmatrix=mm,silent=0) ##' summary(m1) ##' ##' @export gofM.phreg <- function(formula,data,offset=NULL,weights=NULL,modelmatrix=NULL, n.sim=1000,silent=1,...) {# {{{ if (is.null(modelmatrix)) stop(" must give matrix for cumulating residuals\n"); cox1 <- phreg(formula,data,offset=NULL,weights=NULL,Z=modelmatrix,cumhaz=FALSE,...) offsets <- cox1$X %*% cox1$coef if (!is.null(offset)) offsets <- offsets*offset if (!is.null(cox1$strata)) coxM <- phreg(cox1$model.frame[,1]~modelmatrix+strata(cox1$strata),data,offset=offsets,weights=weights,no.opt=TRUE,cumhaz=FALSE,...) else coxM <- phreg(cox1$model.frame[,1]~modelmatrix,data,offset=offsets,weights=weights,no.opt=TRUE,cumhaz=FALSE,...) nnames <- colnames(modelmatrix) Ut <- apply(coxM$U,2,cumsum) jumptimes <- coxM$jumptimes U <- coxM$U Ubeta <- cox1$U ii <- -solve(cox1$hessian) EE <- .Call("vecMatMat",coxM$E,cox1$E,PACKAGE="mets")$vXZ; ###print(dim(EE)) ###print(cox1$ZX) Pt <- cox1$ZX - EE Pt <- apply(Pt,2,cumsum) betaiid <- t(ii %*% t(Ubeta)) obs <- apply(abs(Ut),2,max) simcox <- .Call("ModelMatrixTestCox",U,Pt,betaiid,n.sim,obs,PACKAGE="mets") sup <- simcox$supUsim res <- cbind(obs,simcox$pval) colnames(res) <- c("Sup_t |U(t)|","pval") rownames(res) <- nnames if (silent==0) { cat("Cumulative score process test for modelmatrix:\n") prmatrix(round(res,digits=2)) } ## pvals efter z i model.matrix sup_z | M(z,tau) | Utlast <- max(abs(tail(Ut,1))) maxlast <- apply(abs(simcox$last),1,max) pval.last <- mean(maxlast>=Utlast) res.last <- matrix(c(Utlast,pval.last),1,2) colnames(res.last) <- c("Sup_z |U(tau,z)|","pval") rownames(res.last) <- "matrixZ" out <- list(jumptimes=jumptimes,supUsim=simcox$supUsim,res=res,supU=obs, pvals=simcox$pval,score=Ut,simUt=simcox$simUt, simUtlast=simcox$last,Utlast=Utlast,pval.last=pval.last, res.last=res.last, type="modelmatrix") class(out) <- "gof.phreg" return(out) }# }}} ##' GOF for Cox covariates in PH regression ##' ##' That is, computes ##' \deqn{ ##' U(z,\tau) = \int_0^\tau M(z)^t d \hat M ##' } ##' and resamples its asymptotic distribution. ##' ##' This will show if the residuals are consistent with the model evaulated in the z covariate. ##' M is here chosen based on a grid (z_1, ..., z_m) and the different columns are \eqn{I(Z_i \leq z_l)}. ##' for \eqn{l=1,...,m}. ##' The process in z is resampled to find extreme values. The time-points of evuluation is by default ##' 50 points, chosen as 2%,4%,..., percentiles of the covariates. ##' ##' The p-value is valid but depends on the chosen grid. When the number of break points are high ##' this will give the orginal test of Lin, Wei and Ying for linearity, that is also computed in ##' the timereg package. ##' ##' @param formula formula for cox regression ##' @param data data for model ##' @param vars which variables to test for linearity ##' @param offset offset ##' @param weights weights ##' @param breaks number of breaks for cumulatives in covarirate direction ##' @param equi equidistant breaks or not ##' @param n.sim number of simulations for score processes ##' @param silent to keep it absolutely silent, otherwise timing estimate will be prduced for longer jobs. ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike and Klaus K. Holst ##' @export ##' @examples ##' library(mets) ##' data(TRACE) ##' set.seed(1) ##' TRACEsam <- blocksample(TRACE,idvar="id",replace=FALSE,100) ##' ##' ## cumulative sums in covariates, via design matrix mm ##' \donttest{ ## Reduce Ex.Timings ##' m1 <- gofZ.phreg(Surv(time,status==9)~strata(vf)+chf+wmi+age,data=TRACEsam) ##' summary(m1) ##' plot(m1,type="z") ##' } ##' @aliases cumContr ##' @export gofZ.phreg <- function(formula,data,vars=NULL,offset=NULL,weights=NULL,breaks=50,equi=FALSE, n.sim=1000,silent=1,...) {# {{{ if (is.null(vars)) { vars <- NULL ## find strata var's yxzf <- procform(formula,x=NULL,z=NULL,data=data,do.filter=FALSE) avars <- all.vars(formula[-2]) svar <- grep("strata",yxzf$predictor) if (length(svar)>=1) { avars <- avars[-svar] } ## check that it is not a factor and that there are more than 2 levels for (vv in avars) { if (length(unique(data[,vv]))>2 & !is.factor(data[,vv])) vars <- c(vars,vv) } } gres <- list() res <- matrix(0,length(vars),2) colnames(res) <- c("Sup_z |U(tau,z)|","pval") rownames(res) <- vars i <- 1 for (vv in vars) { modelmatrix <- cumContr(data[,vv],breaks=breaks,equi=equi) lres <- gofM.phreg(formula,data,modelmatrix=modelmatrix) lres$xaxs <- attr(modelmatrix,"breaks") res[i,] <- c(lres$Utlast,lres$pval.last) i <- i+1 lres <- list(lres) names(lres) <- vv gres <- c(gres,lres) } out <- list(res=res,Zres=gres,type="Zmodelmatrix") class(out) <- c("gof.phreg") return(out) }# }}} ###gofZ.phregGam <- function(formula,data,vars,offset=NULL,weights=NULL,breaks=40,equi=TRUE, ### n.sim=1000,silent=1,...) ###{# {{{ ### ### res <- matrix(0,length(vars),2) ### colnames(res) <- c("Sup_z |U(tau,z)|","pval") ### rownames(res) <- vars ### ### i <- 1 ###for (vv in vars) { ### modelmatrix <- cumContr(data[,vv],breaks=breaks,equi=equi) ### ###cox1 <- phreg(formula,data,offset=NULL,weights=NULL,Z=modelmatrix,cumhaz=FALSE,...) ###offsets <- cox1$X %*% cox1$coe ###if (!is.null(offset)) offsets <- offsets*offset ### ###if (!is.null(cox1$strata)) ### coxM <- phreg(cox1$model.frame[,1]~modelmatrix+strata(cox1$strata),data,offset=offsets,weights=weights,no.opt=TRUE,cumhaz=FALSE,...) ###else coxM <- phreg(cox1$model.frame[,1]~modelmatrix,data,offset=offsets,weights=weights,no.opt=TRUE,cumhaz=FALSE,...) ###nnames <- colnames(modelmatrix) ### ###Ut <- apply(coxM$U,2,cumsum) ###jumptimes <- coxM$jumptimes ###U <- coxM$U ###Ubeta <- cox1$U ###ii <- -solve(cox1$hessian) ###EE <- .Call("vecMatMat",coxM$E,cox1$E,PACKAGE="mets")$vXZ; ###Pt <- cox1$ZX - EE ###Pt <- apply(Pt,2,cumsum) ###betaiid <- t(ii %*% t(Ubeta)) ###obs <- apply(abs(Ut),2,max) ###simcox <- .Call("ModelMatrixTestCox",U,Pt,betaiid,n.sim,obs,PACKAGE="mets") ### ### ## pvals efter z i model.matrix sup_z | M(z,tau) | ### Utlast <- max(abs(tail(Ut,1))) ### maxlast <- apply(abs(simcox$last),1,max) ### pval.last <- mean(maxlast>=Utlast) ### res[i,] <- c(Utlast,pval.last) ### i <- i+1 ###} ### ###out <- list(res=res, type="modelmatrix") ###class(out) <- "gof.phreg" ### ###return(out) ###}# }}} ### ##' @export cumContr <- function(data,breaks=4,probs=NULL,equi=TRUE,na.rm=TRUE,unique.breaks=TRUE,...) {# {{{ if (is.vector(data)) { if (is.list(breaks)) breaks <- unlist(breaks) if (length(breaks) == 1) { if (!is.null(probs)) { breaks <- quantile(data, probs, na.rm = na.rm,...) breaks <- breaks[-1] } else { if (!equi) { probs <- seq(0, 1, length.out = breaks + 1) breaks <- quantile(data, probs, na.rm = na.rm, ...) if (unique.breaks) breaks <- unique(breaks) breaks <- breaks[-1] } if (equi) { rr <- range(data, na.rm = na.rm) breaks <- seq(rr[1], rr[2], length.out = breaks + 1) breaks <- breaks[-1] } } } if (sum(duplicated(breaks)) == 0) { i <- 0; gm <- matrix(0,length(data),length(breaks)) for (bb in breaks) { i <- i+1 gm[,i] <- (data <= bb)*1 } } else { wd <- which(duplicated(breaks)) mb <- min(diff(breaks[-wd])) breaks[wd] <- breaks[wd] + (mb/2) * seq(length(wd))/length(wd) i <- 0; gm <- matrix(0,length(data),length(breaks)) for (bb in breaks) { i <- i+1 gm[,i] <- (data <= bb)*1 } warning(paste("breaks duplicated")) } colnames(gm) <- paste("<=",breaks,sep="") attr(gm,"breaks") <- breaks return(gm) } }# }}} ##' Stratified baseline graphical GOF test for Cox covariates in PH regression ##' ##' Looks at stratified baseline in Cox model and plots all baselines versus each ##' other to see if lines are straight, with 50 resample versions under the ##' assumptiosn that the stratified Cox is correct ##' ##' @param x phreg object ##' @param sim to simulate som variation from cox model to put on graph ##' @param silent to keep it absolutely silent ##' @param lm addd line to plot, regressing the cumulatives on each other ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike and Klaus K. Holst ##' @export ##' @examples ##' data(TRACE) ##' ##' m1 <- phreg(Surv(time,status==9)~strata(vf)+chf+wmi,data=TRACE) ##' m2 <- phreg(Surv(time,status==9)~vf+strata(chf)+wmi,data=TRACE) ##' par(mfrow=c(2,2)) ##' ##' gofG.phreg(m1) ##' gofG.phreg(m2) ##' ##' bplot(m1,log="y") ##' bplot(m2,log="y") ##' @export gofG.phreg <- function(x,sim=0,silent=1,lm=TRUE,...) {# {{{ p <- length(x$coef) nnames <- names(x$coef) strata <- x$strata[x$jumps] nstrata <- x$nstrata jumptimes <- x$jumptimes cumhaz <- x$cumhaz ms <- match(x$strata.name,names(x$model.frame)) lstrata <- levels(x$model.frame[,ms]) stratn <- substring(x$strata.name,8,nchar(x$strata.name)-1) stratnames <- paste(stratn,lstrata,sep=":") if (is.null(cumhaz)) stop("Must run phreg with cumhaz=TRUE (default)"); if (nstrata==1) stop("Stratified Cox to look at baselines"); ### if (is.null(x$opt) | is.null(x$coef)) fixbeta<- 1 else fixbeta <- 0 for (i in 0:(nstrata-2)) for (j in (i+1):(nstrata-1)) { iij <- which(strata %in% c(i,j)) ii <- which(strata %in% i) ij <- which(strata %in% j) dijjumps <- jumptimes[iij] cumhazi <- Cpred(cumhaz[ii,],dijjumps,strict=FALSE) cumhazj <- Cpred(cumhaz[ij,],dijjumps,strict=FALSE) plot(cumhazj[,2],cumhazi[,2],type="s",lwd=2,xlab=stratnames[j+1],ylab=stratnames[i+1]) graphics::title(paste("Stratified baselines for",stratn)) if ((fixbeta==0 | sim==0) & lm ) graphics::legend("topleft",c("Nonparametric","lm"),lty=1,col=1:2) ### graphics::legend("topleft",c("Nonparametric","Stratified-Cox-Sim"),lty=1,col=1:3) ab <- lm(cumhazi[,2]~-1+cumhazj[,2]) if (sim==1 & fixbeta==0) { Pt <- DLambeta.t <- apply(x$E/c(x$S0),2,cumsumstrata,strata,nstrata) II <- -solve(x$hessian) betaiid <- t(II %*% t(x$U)) simband <- .Call("simBandCumHazCox",1/x$S0,Pt,betaiid,50,rep(1,nrow(Pt)),PACKAGE="mets") simU <-simband$simUt for (k in 1:50) { di <- Cpred(cbind(jumptimes[ii],simU[ii,k]),dijjumps,strict=FALSE)[,2] dj <- Cpred(cbind(jumptimes[ij],simU[ij,k]),dijjumps,strict=FALSE)[,2] lines(cumhazj[,2]+dj,cumhazi[,2]+di,type="s",lwd=0.1,col=3) } } lines(cumhazj[,2],cumhazi[,2],type="s",lwd=2,col=1) if (lm==TRUE) abline(c(0,coef(ab)),col=2,lwd=2) } }# }}} ##' @export plot.gof.phreg <- function(x,col=3,type=NULL,...) {# {{{ if (is.null(type)) { if (x$type=="prop") type <- "time" if (x$type=="modelmatrix" ) type <- "modelmatrix" if (x$type=="Zmodelmatrix") type <- "z" } if (type=="time" || type=="modelmatrix") { p <- ncol(x$score) for (i in 1:p) { simU <- x$simUt[,(0:49)*p+i] rsU <- max(abs(simU)) rsU <- max(rsU,abs(x$score[,i])) plot(x$jumptimes,x$score[,i],type="s",ylim=c(-rsU,rsU),xlab="",ylab="") title(main=rownames(x$res)[i]) matlines(x$jumptimes,simU,type="s",lwd=0.3,col=col) lines(x$jumptimes,x$score[,i],type="s",lwd=1.5) } } else { if (type=="modelmatrix") { obsz <- c(tail(x$score,1)) times <- 1:length(obsz) rsU <- max(max(abs(obsz)),max(abs(x$simUtlast[1:50,]))) plot(times,obsz,type="l",ylim=c(-rsU,rsU),xlab="",ylab="") matlines(times,t(x$simUtlast[1:50,]),type="l",lwd=0.3,col=col) ## redraw with thick to make observed clear lines(times,obsz,lwd=2,col=1) } else { for (i in 1:length(x$Zres)) { xr <- x$Zres[[i]] obsz <- c(tail(xr$score,1)) ### times <- 1:length(obsz) times <- xr$xaxs rsU <- max(max(abs(obsz)),max(abs(xr$simUtlast[1:50,]))) plot(times,obsz,type="l",ylim=c(-rsU,rsU),xlab="",ylab="") title(main=rownames(x$res)[i]) matlines(times,t(xr$simUtlast[1:50,]),type="l",lwd=0.3,col=col) ## redraw with thick to make observed clear lines(times,obsz,lwd=2,col=1) } } } }# }}} ##' @export summary.gof.phreg <- function(object,...) {# {{{ if (object$type=="prop") cat("Cumulative score process test for Proportionality:\n") else cat("Cumulative residuals versus modelmatrix :\n") print(object$res) if (!is.null(object$res.last)) { cat("\n") cat("Cumulative score process versus covariates (discrete z via model.matrix):\n") print(object$res.last) } } # }}} ##' @export print.gof.phreg <- function(x,...) {# {{{ if (x$type=="prop") cat("Cumulative score process test for Proportionality:\n") else cat("Cumulative residuals versus modelmatrix :\n") print(x$res) if (!is.null(x$res.last)) { cat("\n") cat("Cumulative score process versus covariates (discrete z via model.matrix):\n") print(x$res.last) } } # }}} mets/R/dprint.R0000644000176200001440000000451613623061405013054 0ustar liggesusersPrint <- function(x,n=NULL,nfirst=5,nlast=nfirst,digits=max(3,getOption("digits")-3),...) { mat <- !is.null(dim(x)) if (!mat) { x <- cbind(x) colnames(x) <- "" } if (is.null(n)) { if (NROW(x)<=(nfirst+nlast)) n <- list(seq(NROW(x))) else { n <- c() if (nfirst>0) n <- c(n,list(seq(nfirst))) if (nlast>0) n <- c(n,list(-rev(seq(nlast)))) } } if (is.null(n) || !is.list(n) && length(n)==1 && n==0) return(x) if (!is.list(n)) n <- list(n) d <- lapply(n,function(idx) { N <- NROW(x) idx <- idx[idx!=0 & abs(idx)<=N] idx[idx<0] <- N+idx[idx<0]+1 base::format(x[idx,,drop=FALSE],digits=digits,...) }) val <- c() sep <- rbind("---"=rep('',ncol(x))) for (i in seq_along(d)) { if (i>1) val <- rbind(val,sep) val <- rbind(val,base::as.matrix(d[[i]])) } return(structure(val,class=c("Print",class(val)))) } ##' @export print.Print <- function(x,quote=FALSE,...) { class(x) <- class(x)[-1] print(x,quote=quote,...) } ##' list, head, print, tail ##' ##' listing for data frames ##' @param data if x is formula or names for data frame then data frame is needed. ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param n Index of observations to print (default c(1:nfirst, n-nlast:nlast) ##' @param ... Optional additional arguments (nfirst,nlast, and print options) ##' @param x possible group variable ##' @author Klaus K. Holst and Thomas Scheike ##' @examples ##' n <- 20 ##' m <- lava::lvm(letters) ##' d <- lava::sim(m,n) ##' ##' dlist(d,~a+b+c) ##' dlist(d,~a+b+c|a<0 & b>0) ##' ## listing all : ##' dlist(d,~a+b+c|a<0 & b>0,n=0) ##' dlist(d,a+b+c~I(d>0)|a<0 & b>0) ##' dlist(d,.~I(d>0)|a<0 & b>0) ##' dlist(d,~a+b+c|a<0 & b>0, nlast=0) ##' dlist(d,~a+b+c|a<0 & b>0, nfirst=3, nlast=3) ##' dlist(d,~a+b+c|a<0 & b>0, 1:5) ##' dlist(d,~a+b+c|a<0 & b>0, -(5:1)) ##' dlist(d,~a+b+c|a<0 & b>0, list(1:5,50:55,-(5:1))) ##' dprint(d,a+b+c ~ I(d>0) |a<0 & b>0, list(1:5,50:55,-(5:1))) ##' @aliases dprint dlist dhead dtail ##' @export dprint <- function(data,y=NULL,n=0,...,x=NULL) daggregate(data,y,x,...,fun=function(z,...) Print(z,n=n,...),silent=FALSE) ##' @export dlist <- function(data,y=NULL,n=NULL,...) dprint(data,y=y,n=n,...) mets/R/bicomprisksim.R0000644000176200001440000002736613623061405014437 0ustar liggesusers ## n <- 1e4; ACE <- c(1,1,1)/3 ## logscale <- -4.5; logshape <- .7 ## p2 <- .065 ## a2 <- -10; b2 <- 0.15 ## a1 <- 85; b1 <- 0.1 ## pmvn(upper=c(q2,q2),sigma=diag(2)*(1-2/3)+2/3) ## pmvn(c(q2,q2),sigma=diag(2)*(1-2/3)+2/3) ## pnorm(q2,sd=1) ## Marginal / Perfect dependence ## pmvn(upper=c(q2,q2),sigma=diag(2)*(1-2/3)+2/3) ## Concordance ## pnorm(q2,sd=1)^2 ## Independence ## (lambdaR <- pmvn(upper=c(q2,q2),sigma=diag(2)*(1-2/3)+2/3)/pnorm(q2,sd=1)^2) bicomprisksim <- function(n=1e4, ACE=c(1/3,1/3,1/3), logscale=-4.5,logshape=.7, a1=85,b1=0.1, a2=-10,b2=0.15, p2=.065, tt, ...) { ACE <- ACE/sum(ACE) ialpha <- function(v,a,b) -(log(-v)+a)/b q2 <- qnorm(p2) ## p2: Prostata cancer prevalence p1 <- 1-p2; q1 <- qnorm(p1) ## Death without cancer alpha <- function(t,a,b) -exp(-(b*t+a)) F2s <- function(t) pnorm(alpha(t,b=b2,a=a2)+q2) ## Marginal Cumulative Incidence (cancer) ### Random effects R <- diag(2)*.5+.5 J <- matrix(1,ncol=2,nrow=2) I <- diag(2) zyg <- rep(c(0,1),each=n) A <- rbind(rmvn(n,sigma=R*ACE[1]),rmvn(n,sigma=J*ACE[1])) C <- rmvn(2*n,sigma=J*ACE[2]) ### Random effects 'death' eta1 <- C ### Random effects 'cancer' eta2 <- A+C; ### Subject-specific probability of lifetime cancer probcanc <- pnorm(q2+eta2,sd=ACE[3]^.5) ### Cancer/Death without cancer realizations cancertrue <- (runif(length(probcanc))cens] <- 0 t <- pmin(t0,cens) (censtab <- table(cause)/length(cause)) ### Data.frame d <- data.frame(t,cause,zyg,cancertrue-1,cens[,1],t0[,1],t0[,2]); names(d) <- c("time1","time2","cause1","cause2","zyg","cancertrue1","cancertrue2","cens.time","T01","T02") ### Long format dd <- fast.reshape(d) dd$cancer <- (dd$cause==2)*1 if (missing(tt)) tt <- seq(0,max(dd$time)) Smz <- J*ACE[1]+J*ACE[2]+I*ACE[3] Sdz <- R*ACE[1]+J*ACE[2]+I*ACE[3] rr <- alpha(tt,b=b2,a=a2)+q2 Cmz <- pmvn(upper=cbind(rr,rr),mu=matrix(0,ncol=2,nrow=length(rr)),sigma=Smz) Cdz <- pmvn(upper=cbind(rr,rr),mu=matrix(0,ncol=2,nrow=length(rr)),sigma=Sdz) true <- list(p2=p2, p22mz=pmvn(lower=c(-Inf,-Inf),upper=c(q2,q2),sigma=Smz), p12mz=pmvn(lower=c(q2,-Inf),upper=c(Inf,q2),sigma=Smz), p12mz=pmvn(lower=c(q2,-Inf),upper=c(Inf,q2),sigma=Smz), p11mz=pmvn(lower=c(q2,q2),upper=c(Inf,Inf),sigma=Smz), p22dz=pmvn(lower=c(-Inf,-Inf),upper=c(q2,q2),sigma=Sdz), p12dz=pmvn(lower=c(q2,-Inf),upper=c(Inf,q2),sigma=Sdz), p12dz=pmvn(lower=c(q2,-Inf),upper=c(Inf,q2),sigma=Sdz), p11dz=pmvn(lower=c(q2,q2),upper=c(Inf,Inf),sigma=Sdz), time=tt, F2=F2s(tt), Cmz=Cmz, Cdz=Cdz ) attributes(dd) <- c(attributes(dd),true) return(dd) } ################################################## ################################################## ################################################## ################################################## ################################################## ### simulation for gamma distributed cif model ################################################## ### ##### {{{ ###lap<-function(theta,t) { ### return( (1+t/theta)^(-theta)) ###} ###ilap<-function(theta,t) { ### itheta<-1/theta; return((t^(-itheta)-1)/(itheta)) ###} ### ###F1clust<-function(t,rtheta=1,theta=1,lam0=0.5,beta=0.3,x=0) { ### return(1-exp(-rtheta*ilap(theta,exp(-t*lam0-t*x*beta)))) ###} ### ###################################################################### ###F1<-function(t,lam0=0.5,beta=0.3,x=0) { # additive version ### return( 1 - exp(-t*lam0-t*x*beta)) ###} ### ######F1<-function(t,lam0=0.5,beta=0.3,x=0) # proportional version ######{ return( 1 - exp(-(t*lam0)*exp(x*beta))) } ### ###sim.F1<-function(n,theta=1,lam0=0.5,beta=0.3,crate=2) { ### x<-runif(n); tt<-seq(0,1,length=100) ### F11x<-F1(1,x=x,beta=beta,lam0=lam0) ### cause1<-rbinom(n,1,F11x) ### ### stime<-rep(100,n); ### for (i in 1:n) ### { ### if (cause1[i]==1) { ### myhazx<-F1(tt,x=x[i],beta=beta,lam0=lam0)/F11x[i] ### stime[i]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) ### } ### } ### ctime<-runif(n)*crate ### time<-apply(cbind(ctime,stime),1,min) ### status<-(stime1) message(tau) data0 <- data[var==tau,,drop=FALSE] suppressWarnings(b <- twinlm(formula,data=data0,...)) res <- c(res,list(summary(b))) } if (length(lev)==1) return(b) if (!missing(breaks)) lev <- breaks coef <- c(lapply(res,function(x) x$all),list(res[[length(res)]]$all)) res <- list(varname=varname,var=lev,coef=coef,summary=res,type="strata") class(res) <- "timemets" return(res) } ## data(prt) ## bb <- twinlm.time(cancer~country,data=prt,id="id",zyg="zyg",DZ="DZ",cens.formula=Surv(time,status==0)~zyg,breaks=seq(70,90,by=4)) ## plot(bb,which=c(7,11),ylim=c(0,28),legendpos="topright",col=c("darkred","darkblue"),lty=c(1,2),legend=c("MZ","DZ"),ylab="Relative recurrence risk ratio") ## plot(bb,which=c(7,11),ylim=c(0,28),legendpos="topright",col=c("darkred","darkblue"),lty=c(1,2),legend=c("MZ","DZ"),ylab="Relative recurrence risk ratio",type="l") ##' @export twinlm.time <- function(formula,...) { biprobit.time(formula,estimator="bptwin",...) } ##' @export bptwin.time <- function(formula,...) { biprobit.time(formula,estimator="bptwin",...) } ##' @export summary.timemets <- function(object,which=seq(nrow(object$coef[[1]])),...) { res <- list() for (i in which) { rr <- matrix(unlist(lapply(object$coef,function(z) z[i,])),ncol=3,byrow=TRUE) colnames(rr) <- colnames(object$coef[[1]]) rr <- cbind(object$var,as.data.frame(rr[seq_along(object$var),,drop=FALSE])) colnames(rr)[1] <- object$varname res <- c(res,list(rr)) } names(res) <- rownames(object$coef[[1]])[which] return(res) } ##' @export print.timemets <- function(x,tail,row.names=FALSE,digits=4,width=10,...) { res <- summary(x,...) if (length(res)==0) { return(invisible(print(x$coef))) } if (!is.null(x$summary[[1]]$ncontrast) && x$summary[[1]]$ncontrast>1) { cat("Contrasts:\n") for (i in seq(x$summary[[1]]$ncontrasts)) { cat(" c",i,":\n",sep="") cat("\tDependence ", x$summary[[1]]$par[[i]]$corref, "\n") if (x$summary[[1]]$model$eqmarg) { cat("\tMean ", x$summary[[1]]$par[[i]]$mref1, "\n") } else { cat("\tMean 1 ", x$summary[[1]]$par[[i]]$mref1, "\n") cat("\tMean 2 ", x$summary[[1]]$par[[i]]$mref2, "\n") } } } ## } ## if (mcontr2 || (x$contrast & !x$model$eqmarg)) { ## cat("\tMean 1 ", x$par[[i]]$mref1, "\n") ## cat("\tMean 2 ", x$par[[i]]$mref2, "\n") ## } ## if (mcontr1 || (x$contrast & x$model$eqmarg)) ## cat("\tMean ", x$par[[i]]$mref1, "\n") M <- res[[1]][,1] nn <- c() for (i in seq_along(res)) { nn <- c(nn,names(res)[i]) M <- cbind(M,res[[i]][,2]) } nn0 <- cbind(paste(seq(ncol(M)-1),":",nn,sep="")) colnames(nn0) <- ""; rownames(nn0) <- rep("",nrow(nn0)) print(nn0,quote=FALSE) cat("\n") nn <- unlist(lapply(nn, function(x) { res <- toString(x,width) if (nchar(res)==nchar(x)) return(x) substr(res,1,nchar(res)-1) })) nn <- paste(seq(ncol(M)-1),":",nn,sep="") colnames(M) <- c("Time",nn) if (!missing(tail)) { print(utils::tail(round(M,digits=digits),tail),row.names=row.names) } else { print(round(M,digits=digits),row.names=row.names) } invisible(M) } ##' @export plot.timemets <- function(x,...,which=1, type="s", lwd=2,lty=1,col,fillcol,alpha=0.2, xlab=x$varname, ylab="",idx=seq_along(x$var), lasttick=TRUE,add=FALSE, legend=TRUE,legendpos="topleft") { ss <- summary(x,which) if (missing(col)) col <- seq_along(which) if (length(col)==1) col <- rep(col,length(which)) if (length(lwd)==1) lwd <- rep(lwd,length(which)) if (length(lty)==1) lty <- rep(lty,length(which)) if (alpha>0 & missing(fillcol)) fillcol <- Col(col,alpha) count <- 0 if (add) dev <- devcoords() for (tt in seq_along(which)) { count <- count+1 zz <- ss[[tt]][idx,,drop=FALSE] if (!add) { plot(zz[,1:2,drop=FALSE],lty=0, ylab=ylab,xlab=xlab,type="n",...) dev <- devcoords() } if (lasttick && type=="s" && !is.factor(zz[,1])) { zz2 <- rbind(zz,tail(zz,1)) zz2[nrow(zz2),1] <- dev$fig.x2 confband(zz2[,1],zz2[,3],zz2[,4],polygon=TRUE,step=(type=="s"),col=fillcol[count],border=0) } else { if (is.factor(zz[,1])) { confband(x=seq(nrow(zz)),lower=zz[,3],upper=zz[,4],center=zz[,2],col=col[count],lwd=lwd[count],lty=lty[count],...) } else { confband(zz[,1],zz[,3],zz[,4],polygon=TRUE,step=(type=="s"),col=fillcol[count],border=0) } } add <- TRUE ## if (lasttick && type=="s") { ## axis(4,at=zz[nrow(zz),3],labels=FALSE, ## lwd=lwd[count],col=fillcol[count],tcl=.5,...) ## axis(4,at=zz[nrow(zz),4],labels=FALSE, ## lwd=lwd[count],col=fillcol[count],tcl=.5,...) ## } if (!is.factor(zz[,1])) lines(zz[,1:2,drop=FALSE],lwd=lwd[count],lty=lty[count],col=col[count],type=type,...) } if (!is.null(legend) || (is.logical(legend) && !legend[1])) { if (is.logical(legend) || length(legend)==1) legend <- rownames(x$coef[[1]])[which] graphics::legend(legendpos,legend=legend,col=col,lwd=lwd,lty=lty) } invisible(x) } ##' @export bootstrap.timemets <- function(x,R=1000,...) { } mets/R/twostage.R0000644000176200001440000055540613623061405013422 0ustar liggesusers##' @title Twostage survival model for multivariate survival data ##' ##' @description ##' Fits Clayton-Oakes or bivariate Plackett models for bivariate survival data ##' using marginals that are on Cox form. The dependence can be ##' modelled via ##' \enumerate{ ##' \item Regression design on dependence parameter. ##' \item Random effects, additive gamma model. ##' } ##' ##' If clusters contain more than two subjects, we use a composite likelihood ##' based on the pairwise bivariate models, for MLE see twostageMLE. ##' ##' The two-stage model is constructed such that ##' given the gamma distributed random effects it is assumed that the survival functions ##' are indpendent, and that the marginal survival functions are on Cox form (or additive form) ##' \deqn{ ##' P(T > t| x) = S(t|x)= exp( -exp(x^T \beta) A_0(t) ) ##' } ##' ##' One possibility is to model the variance within clusters via a regression design, and ##' then one can specify a regression structure for the indenpendent gamma distributed ##' random effect for each cluster, such that the variance is given by ##' \deqn{ ##' \theta = z_j^T \alpha ##' } ##' where \eqn{z} is specified by theta.des ##' The reported standard errors are based on the estimated information from the ##' likelihood assuming that the marginals are known. ##' ##' Can also fit a structured additive gamma random effects model, such ##' as the ACE, ADE model for survival data. In this case the ##' random.design specificies the random effects for each subject within a cluster. This is ##' a matrix of 1's and 0's with dimension n x d. With d random effects. ##' For a cluster with two subjects, we let the random.design rows be ##' \eqn{v_1} and \eqn{v_2}. ##' Such that the random effects for subject ##' 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect ##' has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. ##' By construction subjects 1's random effect are Gamma distributed with ##' mean \eqn{\lambda_j/v_1^T \lambda} ##' and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect ##' \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. ##' It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed within clusters ##' as it would be for the ACE model below. ##' ##' Based on these parameters the relative contribution (the heritability, h) is ##' equivalent to the expected values of the random effects: \eqn{\lambda_j/v_1^T \lambda} ##' ##' The DEFAULT parametrization (var.par=1) uses the variances of the random effecs ##' \deqn{ ##' \theta_j = \lambda_j/(v_1^T \lambda)^2 ##' } ##' For alternative parametrizations one can specify how the parameters relate to \eqn{\lambda_j} ##' with the argument var.par=0. ##' ##' For both types of models the basic model assumptions are that ##' given the random effects of the clusters the survival distributions within a cluster ##' are independent and ' on the form ##' \deqn{ ##' P(T > t| x,z) = exp( -Z \cdot Laplace^{-1}(lamtot,lamtot,S(t|x)) ) ##' } ##' with the inverse laplace of the gamma distribution with mean 1 and variance 1/lamtot. ##' ##' The parameters \eqn{(\lambda_1,...,\lambda_d)} are related to the parameters of the model ##' by a regression construction \eqn{pard} (d x k), that links the \eqn{d} ##' \eqn{\lambda} parameters ##' with the (k) underlying \eqn{\theta} parameters ##' \deqn{ ##' \lambda = theta.des \theta ##' } ##' here using theta.des to specify these low-dimension association. Default is a diagonal matrix. ##' This can be used to make structural assumptions about the variances of the random-effects ##' as is needed for the ACE model for example. ##' ##' The case.control option that can be used with the pair specification of the pairwise parts ##' of the estimating equations. Here it is assumed that the second subject of each pair is the proband. ##' ##' @references ##' ##' Twostage estimation of additive gamma frailty models for survival data. ##' Scheike (2019), work in progress ##' ##' Shih and Louis (1995) Inference on the association parameter in copula models for bivariate ##' survival data, Biometrics, (1995). ##' ##' Glidden (2000), A Two-Stage estimator of the dependence ##' parameter for the Clayton Oakes model, LIDA, (2000). ##' ##' Measuring early or late dependence for bivariate twin data ##' Scheike, Holst, Hjelmborg (2015), LIDA ##' ##' Estimating heritability for cause specific mortality based on twins studies ##' Scheike, Holst, Hjelmborg (2014), LIDA ##' ##' Additive Gamma frailty models for competing risks data, Biometrics (2015) ##' Eriksson and Scheike (2015), ##' ##' @examples ##' data(diabetes) ##' ##' # Marginal Cox model with treat as covariate ##' margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) ##' ### Clayton-Oakes, MLE ##' fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) ##' summary(fitco1) ##' ##' ### Plackett model ##' mph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) ##' fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, ##' clusters=diabetes$id,var.link=1,model="plackett") ##' summary(fitp) ##' ##' ### Clayton-Oakes ##' fitco2 <- survival.twostage(mph,data=diabetes,theta=0.0,detail=0, ##' clusters=diabetes$id,var.link=1,model="clayton.oakes") ##' summary(fitco2) ##' fitco3 <- survival.twostage(margph,data=diabetes,theta=1.0,detail=0, ##' clusters=diabetes$id,var.link=0,model="clayton.oakes") ##' summary(fitco3) ##' ##' ### without covariates but with stratafied ##' marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) ##' fitpa <- survival.twostage(marg,data=diabetes,theta=1.0, ##' clusters=diabetes$id,score.method="optimize") ##' summary(fitpa) ##' ##' fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, ##' model="clayton.oakes") ##' summary(fitcoa) ##' ##' ### Piecewise constant cross hazards ratio modelling ##' ######################################################## ##' ##' d <- subset(simClaytonOakes(2000,2,0.5,0,stoptime=2,left=0),!truncated) ##' udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", ##' id="cluster",timevar="time", ##' status="status",model="clayton.oakes",silent=0) ##' summary(udp) ##' ##' \donttest{ ## Reduce Ex.Timings ##' ### Same model using the strata option, a bit slower ##' ######################################################## ##' ## makes the survival pieces for different areas in the plane ##' ##ud1=surv.boxarea(c(0,0),c(0.5,0.5),data=d,id="cluster",timevar="time",status="status") ##' ##ud2=surv.boxarea(c(0,0.5),c(0.5,2),data=d,id="cluster",timevar="time",status="status") ##' ##ud3=surv.boxarea(c(0.5,0),c(2,0.5),data=d,id="cluster",timevar="time",status="status") ##' ##ud4=surv.boxarea(c(0.5,0.5),c(2,2),data=d,id="cluster",timevar="time",status="status") ##' ##' ## everything done in one call ##' ud <- piecewise.data(c(0,0.5,2),data=d,timevar="time",status="status",id="cluster") ##' ud$strata <- factor(ud$strata); ##' ud$intstrata <- factor(ud$intstrata) ##' ##' ## makes strata specific id variable to identify pairs within strata ##' ## se's computed based on the id variable across strata "cluster" ##' ud$idstrata <- ud$id+(as.numeric(ud$strata)-1)*2000 ##' ##' marg2 <- aalen(Surv(boxtime,status)~-1+factor(num):factor(intstrata), ##' data=ud,n.sim=0,robust=0) ##' tdes <- model.matrix(~-1+factor(strata),data=ud) ##' fitp2 <- survival.twostage(marg2,data=ud,se.clusters=ud$cluster,clusters=ud$idstrata, ##' score.method="fisher.scoring",model="clayton.oakes", ##' theta.des=tdes,step=0.5) ##' summary(fitp2) ##' ##' ### now fitting the model with symmetry, i.e. strata 2 and 3 same effect ##' ud$stratas <- ud$strata; ##' ud$stratas[ud$strata=="0.5-2,0-0.5"] <- "0-0.5,0.5-2" ##' tdes2 <- model.matrix(~-1+factor(stratas),data=ud) ##' fitp3 <- survival.twostage(marg2,data=ud,clusters=ud$idstrata,se.cluster=ud$cluster, ##' score.method="fisher.scoring",model="clayton.oakes", ##' theta.des=tdes2,step=0.5) ##' summary(fitp3) ##' ##' ### same model using strata option, a bit slower ##' fitp4 <- survival.twostage(marg2,data=ud,clusters=ud$cluster,se.cluster=ud$cluster, ##' score.method="fisher.scoring",model="clayton.oakes", ##' theta.des=tdes2,step=0.5,strata=ud$strata) ##' summary(fitp4) ##' } ##' ##' \donttest{ ## Reduce Ex.Timings ##' ### structured random effects model additive gamma ACE ##' ### simulate structured two-stage additive gamma ACE model ##' data <- simClaytonOakes.twin.ace(4000,2,1,0,3) ##' out <- twin.polygen.design(data,id="cluster") ##' pardes <- out$pardes ##' pardes ##' des.rv <- out$des.rv ##' head(des.rv) ##' aa <- phreg(Surv(time,status)~x+cluster(cluster),data=data,robust=0) ##' ts <- survival.twostage(aa,data=data,clusters=data$cluster,detail=0, ##' theta=c(2,1),var.link=0,step=0.5, ##' random.design=des.rv,theta.des=pardes) ##' summary(ts) ##' } ##' ##' @keywords survival ##' @author Thomas Scheike ##' @param margsurv Marginal model ##' @param data data frame ##' @param score.method Scoring method "fisher.scoring", "nlminb", "optimize", "nlm" ##' @param Nit Number of iterations ##' @param detail Detail ##' @param clusters Cluster variable ##' @param silent Debug information ##' @param weights Weights ##' @param control Optimization arguments ##' @param theta Starting values for variance components ##' @param theta.des design for dependence parameters, when pairs are given this is could be a ##' (pairs) x (numer of parameters) x (max number random effects) matrix ##' @param var.link Link function for variance ##' @param iid Calculate i.i.d. decomposition ##' @param step Step size ##' @param model model ##' @param marginal.trunc marginal left truncation probabilities ##' @param marginal.survival optional vector of marginal survival probabilities ##' @param marginal.status related to marginal survival probabilities ##' @param strata strata for fitting, see example ##' @param se.clusters for clusters for se calculation with iid ##' @param numDeriv to get numDeriv version of second derivative, otherwise uses sum of squared score ##' @param random.design random effect design for additive gamma model, when pairs are given this is ##' a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below ##' @param pairs matrix with rows of indeces (two-columns) for the pairs considered in the pairwise ##' composite score, useful for case-control sampling when marginal is known. ##' @param pairs.rvs for additive gamma model and random.design and theta.des are given as arrays, ##' this specifice number of random effects for each pair. ##' @param numDeriv.method uses simple to speed up things and second derivative not so important. ##' @param additive.gamma.sum for two.stage=0, this is specification of the lamtot in the models via ##' a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number ##' of theta parameters), when null then sums all parameters. ##' @param var.par is 1 for the default parametrization with the variances of the random effects, ##' var.par=0 specifies that the \eqn{\lambda_j}'s are used as parameters. ##' @param cr.models competing risks models for two.stage=0, should be given as a list with models for each cause ##' @param case.control assumes case control structure for "pairs" with second column being the probands, ##' when this options is used the twostage model is profiled out via the paired estimating equations for the ##' survival model. ##' @param ascertained if the pair are sampled only when there is an event. This is in contrast to ##' case.control sampling where a proband is given. This can be combined with control probands. Pair-call ##' of twostage is needed and second column of pairs are the first jump time with an event for ascertained pairs, ##' or time of control proband. ##' @param shut.up to make the program more silent in the context of iterative procedures for case-control ##' and ascertained sampling ##' @aliases survival.twostage survival.twostage.fullse twostage.aalen twostage.cox.aalen twostage.coxph twostage.phreg randomDes ##' @export survival.twostage survival.twostage <- function(margsurv,data=sys.parent(), score.method="fisher.scoring",Nit=60,detail=0,clusters=NULL, silent=1,weights=NULL, control=list(),theta=NULL,theta.des=NULL, var.link=1,iid=1,step=0.5,model="clayton.oakes", marginal.trunc=NULL,marginal.survival=NULL,marginal.status=NULL,strata=NULL, se.clusters=NULL,numDeriv=0,random.design=NULL,pairs=NULL,pairs.rvs=NULL, numDeriv.method="simple",additive.gamma.sum=NULL,var.par=1,cr.models=NULL, case.control=0,ascertained=0,shut.up=0) {## {{{ ## {{{ seting up design and variables two.stage <- 1; rate.sim <- 1; sym=1; var.func <- NULL if (model=="clayton.oakes" || model=="gamma") dep.model <- 1 else if (model=="plackett" || model=="or") dep.model <- 2 else stop("Model must by either clayton.oakes or plackett \n"); start.time <- NULL; ptrunc <- NULL; psurvmarg <- NULL; status <- NULL; score.iid <- NULL fix.baseline <- 0; convergence.bp <- 1; ### to control if baseline profiler converges if ((!is.null(margsurv)) | (!is.null(marginal.survival))) fix.baseline <- 1 antpers <- nrow(data); RR <- rep(1,antpers); if (!is.null(margsurv)) { rrr <- readmargsurv(margsurv,data,clusters) psurvmarg <- rrr$psurvmarg; ptrunc <- rrr$ptrunc; start.time <- rrr$entry; time2 <- rrr$exit; status <- rrr$status; clusters <- rrr$clusters } if (is.null(psurvmarg)) psurvmarg <- rep(1,antpers); if (!is.null(marginal.survival)) psurvmarg <- marginal.survival if (!is.null(marginal.trunc)) ptrunc <- marginal.trunc if (is.null(ptrunc)) ptrunc <- rep(1,length(psurvmarg)) if (!is.null(marginal.status)) status <- marginal.status if (is.null(status) & is.null(cr.models)) stop("must give status variable for survival via either margninal model (margsurv), marginal.status or as cr.models \n"); if (is.null(weights)==TRUE) weights <- rep(1,antpers); if (is.null(strata)==TRUE) strata<- rep(1,antpers); if (length(strata)!=antpers) stop("Strata must have length equal to number of data points \n"); ## {{{ cluster set up cluster.call <- clusters out.clust <- cluster.index(clusters); clusters <- out.clust$clusters maxclust <- out.clust$maxclust antclust <- out.clust$cluster.size clusterindex <- out.clust$idclust clustsize <- out.clust$cluster.size call.secluster <- se.clusters if (is.null(se.clusters)) { se.clusters <- clusters; antiid <- nrow(clusterindex);} else { iids <- unique(se.clusters); antiid <- length(iids); if (is.numeric(se.clusters)) se.clusters <- fast.approx(iids,se.clusters)-1 else se.clusters <- as.integer(factor(se.clusters, labels = seq(antiid)))-1 } if (length(se.clusters)!=length(clusters)) stop("Length of seclusters and clusters must be same\n"); ### if ((!is.null(max.clust))) if (max.clust< antiid) { ### coarse.clust <- TRUE ### qq <- unique(quantile(se.clusters, probs = seq(0, 1, by = 1/max.clust))) ### qqc <- cut(se.clusters, breaks = qq, include.lowest = TRUE) ### se.clusters <- as.integer(qqc)-1 ### max.clusters <- length(unique(se.clusters)) ### maxclust <- max.clust ### antiid <- max.clusters ### } ### if (maxclust==1) stop("No clusters, maxclust size=1\n"); ## }}} ### setting design for random variables, in particular with pairs are given ddd <- randomDes(dep.model,random.design,theta.des,theta,antpers,additive.gamma.sum,pairs,pairs.rvs,var.link,clusterindex) random.design=ddd$random.design;clusterindex=ddd$clusterindex; antpairs=ddd$antpairs; pairs.rvs=ddd$pairs.rvs; theta=ddd$theta;ptheta=ddd$ptheta;theta.des=ddd$theta.des pair.structure=ddd$pair.structure; dep.model=ddd$dep.model dim.rv <- ddd$dim.rv; additive.gamma.sum=ddd$additive.gamma.sum theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); ## }}} ### setting up arguments for Aalen baseline profile estimates if (fix.baseline==0) { ## {{{ when baseline is estimated if (is.null(cr.models)) stop("give hazard models for different causes, ex cr.models=list(Surv(time,status==1)~+1,Surv(time,status==2)~+1) \n") if (case.control==0 & ascertained==0) { ## {{{ #### organize subject specific random variables and design ### for additive gamma model ## {{{ dimt <- dim(theta.des[,,1,drop=FALSE])[-3] dimr <- dim(random.design[,,,drop=FALSE]) mtheta.des <- array(0,c(dimt,nrow(data))) mrv.des <- array(0,c(dimr[1]/2,dimr[2],nrow(data))) nrv.des <- rep(0,nrow(data)) nrv.des[pairs[,1]] <- pairs.rvs nrv.des[pairs[,2]] <- pairs.rvs mtheta.des[,,pairs[,1]] <- theta.des mtheta.des[,,pairs[,2]] <- theta.des mrv.des[,,pairs[,1]] <- random.design[1:(dimr[1]/2),,,drop=FALSE] mrv.des[,,pairs[,2]] <- random.design[(dimr[1]/2+1):dimr[1],,,drop=FALSE] ### array thetades to jump times (subjects) mtheta.des <- mtheta.des[,,ids,drop=FALSE] ### array randomdes to jump times (subjects) mrv.des <- mrv.des[,,ids,drop=FALSE] nrv.des <- pairs.rvs[ids] ## }}} } ## }}} if (case.control==1 || ascertained==1) { ## {{{ ### print(dim(data)); print(summary(pairs)) data1 <- data[pairs[,1],] data.proband <- data[pairs[,2],] weights1 <- weights[pairs[,1]] ### print(summary(data.proband)); print(summary(data1)) ## {{{ setting up designs for jump times timestatus <- all.vars(cr.models[[1]]) if (is.null(status)) status <- data[,timestatus[2]] alltimes <- data[,timestatus[1]] times <- data1[,timestatus[1]] lstatus <- data1[,timestatus[2]] timescase <- data.proband[,timestatus[1]] lstatuscase <- data.proband[,timestatus[2]] ### organize increments according to overall jump-times jumps <- lstatus!=0 dtimes <- times[jumps] dtimescase <- timescase[jumps] st <- order(dtimes) dtimesst <- dtimes[st] dtimesstcase <- dtimescase[st] dcauses <- lstatus[jumps][st] dcausescase <- lstatuscase[jumps][st] ids <- (1:nrow(data1))[jumps][st] ### ### delayed entry for case because of ascertained sampling ### controls are however control probands, and have entry=0 entry <- timescase*lstatuscase data1$entry <- entry cr.models2 <- list() if (ascertained==1) { for (i in 1:length(cr.models)) { cr.models2[[i]] <- update(cr.models[[i]],as.formula(paste("Surv(entry,",timestatus[1],",",timestatus[2],")~.",sep=""))) } } else cr.models2 <- cr.models nc <- 0 for (i in 1:length(cr.models)) { X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X nc <- nc+ncol(X) } dBaalen <- matrix(0,length(dtimes),nc) xjump <- array(0,c(length(cr.models),nc,length(ids))) xjumpcase <- array(0,c(length(cr.models),nc,length(ids))) ## first compute marginal aalen models for all causes a <- list(); da <- list(); ### starting values for iteration Bit <- Bitcase <- c() for (i in 1:length(cr.models)) { ## {{{ a[[i]] <- aalen(as.formula(cr.models2[[i]]),data=data1,robust=0,weights=weights1) da[[i]] <- apply(a[[i]]$cum[,-1,drop=FALSE],2,diff) jumpsi <- (1:length(dtimes))[dcauses==i] X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X Xcase <- aalen.des(as.formula(cr.models[[i]]),data=data.proband)$X if (i==1) fp <- 1 indexc <- fp:(fp+ncol(X)-1) dBaalen[jumpsi,indexc] <- da[[i]] xjump[i,indexc,] <- t(X[ids,]) xjumpcase[i,indexc,] <- t(Xcase[ids,]) fp <- fp+ncol(X) ### starting values Bit <- cbind(Bit,Cpred(a[[i]]$cum,dtimesst)[,-1,drop=FALSE]) } ## }}} Bit.ini <- Bit ## }}} #### organize subject specific random variables and design #### already done in basic pairwise setup mtheta.des <- theta.des[,,ids,drop=FALSE] ### array randomdes to jump times (subjects) mrv.des <- random.design[,,ids,drop=FALSE] nrv.des <- pairs.rvs[ids] } ## }}} } else { mrv.des <- array(0,c(1,1,1)); mtheta.des <- array(0,c(1,1,1)); margthetades <- array(0,c(1,1,1)); xjump <- array(0,c(1,1,1)); dBaalen <- matrix(0,1,1); nrv.des <- 3 } ## }}} loglike <- function(par) { ## {{{ if (pair.structure==0 | dep.model!=3) Xtheta <- as.matrix(theta.des) %*% matrix(c(par),nrow=ptheta,ncol=1); if (pair.structure==1 & dep.model==3) Xtheta <- matrix(0,antpers,1); ## not needed DXtheta <- array(0,c(1,1,1)); if (var.link==1 & dep.model==3) epar <- c(exp(par)) else epar <- c(par) partheta <- epar if (var.par==1 & dep.model==3) { ## from variances to if (is.null(var.func)) { sp <- sum(epar) partheta <- epar/sp^2 } else partheta <- epar ## par.func(epar) } if (pair.structure==0) {# {{{ outl<-.Call("twostageloglikeRV", ## {{{ only two stage model for this option icause=status,ipmargsurv=psurvmarg, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, irvdes=random.design,iags=additive.gamma.sum,iascertained=ascertained, PACKAGE="mets") ## }}} }# }}} else { ## {{{ pair-structure ## twostage model, case.control option, profile out baseline ## conditional model, case.control option, profile out baseline if (fix.baseline==0) ## if baseline is not given { cum1 <- cbind(dtimesst,Bit) if ( (case.control==1 || ascertained==1) & (convergence.bp==1)) { ## {{{ profiles out baseline under case-control/ascertainment sampling ### ## initial values , only one cr.model for survival ### Bit <- cbind(Cpred(a[[1]]$cum,dtimesst)[,-1]) if (detail>1) plot(dtimesst,Bit,type="l",main="Bit") if (ncol(Bit)==0) Bit <- Bit.ini Bitcase <- Cpred(cbind(dtimesst,Bit),dtimesstcase)[,-1,drop=FALSE] Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X for (j in 1:5) { ## {{{ profile via iteration cncc <- .Call("BhatAddGamCC",1,dBaalen,dcauses,dim(xjump),xjump, c(partheta),dim(mtheta.des),mtheta.des,additive.gamma.sum,var.link, dim(mrv.des),mrv.des,nrv.des,1,Bit,Bitcase,dcausescase,PACKAGE="mets") d <- max(abs(Bit-cncc$B)) if (detail>1) print(d) Bit <- cncc$B ### if (detail>1) print(c(par,epar,partheta)); ### if (detail>1) print(summary(Bit)); if (detail>1) print(summary(cncc$caseweights)) cum1 <- cbind(dtimesst,cncc$B) Bitcase <-cbind(Cpred(cum1,dtimesstcase)[,-1]) ### if (detail>1) print(summary(Bitcase)) if (detail>1) lines(dtimesst,Bit,col=j+1); if (is.na(d)) { if (shut.up==0) cat("Baseline profiler gives missing values\n"); Bit <- Bit.ini; cum1 <- cbind(dtimesst,Bit); convergence.bp <<- 0; break; } Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X if (d<0.00001) break; } ## }}} nulrow <- rep(0,ncol(Bit)+1) pbases <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),alltimes)[,-1,drop=FALSE] X <- aalen.des(as.formula(cr.models[[1]]),data=data)$X psurvmarg <- exp(-apply(X*pbases,1,sum)) ## psurv given baseline if (ascertained==1) { Xcase <- aalen.des(as.formula(cr.models[[1]]),data=data.proband)$X X <- aalen.des(as.formula(cr.models[[1]]),data=data1)$X pba.case <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),entry)[,-1,drop=FALSE] ptrunc <- rep(0,nrow(data)) ### for control probands ptrunc=1, thus no adjustment ptrunc[pairs[,1]] <- exp(-apply(X* pba.case,1,sum)*lstatuscase) ## delayed entry at time of ascertainment proband ptrunc[pairs[,2]] <- exp(-apply(Xcase*pba.case,1,sum)*lstatuscase) } } ## }}} } outl<-.Call("twostageloglikeRVpairs", ## {{{ icause=status,ipmargsurv=psurvmarg, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta), ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, irvdes=random.design, idimthetades=dim(theta.des),idimrvdes=dim(random.design),irvs=pairs.rvs, iags=additive.gamma.sum, iascertained=ascertained,PACKAGE="mets") ## }}} if (fix.baseline==0) { outl$baseline <- cum1; outl$marginal.surv <- psurvmarg; outl$marginal.trunc <- ptrunc } } ## }}} if (detail==3) print(c(partheta,outl$loglike)) ## variance parametrization, and inverse.link if (dep.model==3) {# {{{ if (var.par==1) { ## from variances to and with sum for all random effects if (is.null(var.func)) { if (var.link==0) { ### print(c(sp,epar)) mm <- matrix(-epar*2*sp,length(epar),length(epar)) diag(mm) <- sp^2-epar*2*sp ### print(mm) } else { mm <- -c(epar) %o% c(epar)*2*sp diag(mm) <- epar*sp^2-epar^2*2*sp ### print(mm) } mm <- mm/sp^4 } else mm <- numDeriv::hessian(var.func,par) } else { if (var.link==0) mm <- diag(length(epar)) else mm <- diag(length(c(epar)))*c(epar) } }# }}} if (dep.model==3) {# {{{ outl$score <- t(mm) %*% outl$score outl$Dscore <- t(mm) %*% outl$Dscore %*% mm if (iid==1) { outl$score.iid <- t(t(mm) %*% t(outl$score.iid)) if (class(margsurv)=="phreg") { outl$D1thetal <- t(t(mm) %*% t(outl$D1thetal)) outl$D2thetal <- t(t(mm) %*% t(outl$D2thetal)) } } }# }}} attr(outl,"gradient") <-outl$score if (oout==0) ret <- c(-1*outl$loglike) else if (oout==1) ret <- sum(outl$score^2) else if (oout==2) ret <- outl else ret <- outl$score return(ret) } ## }}} if (score.method=="optimize" && ptheta!=1) { cat("optimize only works for d==1, score.mehod set to nlminb \n"); score.method <- "nlminb"; } score1 <- NULL theta.iid <- NULL logl <- NULL p <- theta if (score.method=="fisher.scoring") { ## {{{ oout <- 2; ### output control for obj if (Nit>0) for (i in 1:Nit) { out <- loglike(p) ## updating starting values for cumulative baselines if (fix.baseline==0) Bit <- out$baseline[,-1,drop=FALSE] if (fix.baseline==1) hess <- out$Dscore ### uses simple second derivative for computing derivative of score if (numDeriv==2 || (((fix.baseline==0)) & (i==1))) { oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") oout <- 2 } if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- hess if (detail==1) {## {{{ cat(paste("Fisher-Scoring ===================: it=",i,"\n")); cat("theta:");print(c(theta)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(hess,"\n"); }## }}} delta <- step*( hessi %*% out$score ) ### update p, but note that score and derivative in fact related to previous p ### unless Nit=0, if (Nit>0) { p <- p - delta theta <- p; } if (is.nan(sum(out$score))) break; if (sum(abs(out$score))<0.00001) break; if (max(theta)>20 & var.link==1) { cat("theta too large lacking convergence \n"); break; } } if (!is.nan(sum(p))) { if (detail==1 && iid==1) cat("iid decomposition\n"); out <- loglike(p) logl <- out$loglike score1 <- score <- out$score oout <- 0; hess1 <- hess <- -1*out$Dscore if (iid==1) { ## {{{ score.iid <- out$score.iid out$theta.iid <- score.iid theta.iid <- score.iid ucc <- unique(cluster.call) if (length(ucc)== nrow(theta.iid)) rownames(theta.iid) <- unique(cluster.call) ### lets iid for theta be just score to start, correction for marginal for phreg call if (class(margsurv)=="phreg") { ## {{{ if (is.null(margsurv$opt) | is.null(margsurv$coef)) fixbeta<- 1 else fixbeta <- 0 xx <- margsurv$cox.prep id <- xx$id+1 cumhazt <- c(rrr$cum) rr <- c(rrr$RR) ### print(clusters) ### print(clusterindex) ## these refers to id given in cluster.call xx <- margsurv$cox.prep D1thetal<- out$D1thetal D2thetal<- out$D2thetal Dlamthetal <- -(D1thetal+D2thetal) ## ordered as original data Fbeta <- t(Dlamthetal) %*% (margsurv$X *cumhazt*psurvmarg*rr) ### timeordered ### Gbasem <- apply(-Dlamthetal[xx$ord+1,,drop=FALSE]*psurvmarg[xx$ord+1]*rr[xx$ord+1],2,cumsumstratasum,xx$strata,xx$nstrata,type="lagsum") ## t- not needed because using S(T-) for survival already Gbasedt <- Dlamthetal[xx$ord+1,,drop=FALSE]*psurvmarg[xx$ord+1]*rr[xx$ord+1] ### Gbase <- apply(Gbasedt,2,cumsumstrata,xx$strata,xx$nstrata) ## new Gbase <- apply(Gbasedt,2,revcumsumstrata,xx$strata,xx$nstrata) ### print(c(Gbase)); print(Fbeta) if (fixbeta==0) { # {{{ iid after beta of marginal model Z <- xx$X U <- E <- matrix(0,nrow(xx$X),margsurv$p) E[xx$jumps+1,] <- margsurv$E U[xx$jumps+1,] <- margsurv$U invhess <- -solve(margsurv$hessian) S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/margsurv$S0 cumhaz <- c(cumsumstrata(S0i,xx$strata,xx$nstrata)) EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) ### Martingale for all subjects MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0)*rr*c(xx$weights) UUbeta <- apply(MGt,2,sumstrata,id-1,max(id)) UUbeta <- UUbeta %*% invhess GbaseEdLam0 <- t(Gbasedt) %*% (E*S0i) Fbeta <- Fbeta + GbaseEdLam0 Fbetaiid <- UUbeta %*% t(Fbeta) }# }}} ### \int_0^\tau (GBase(s) / S_0(s)) dN_i(s) - dLamba_i(s) xx <- margsurv$cox.prep S0i <- S0i2 <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/margsurv$S0 S0i2[xx$jumps+1] <- 1/margsurv$S0^2 ### dN <- S0i; dLam0 <- cumsumstrata(S0i2,xx$strata,xx$nstrata) GbasedN <- Gbase*S0i GbasedLam0 <- apply(Gbase*S0i2,2,cumsumstrata,xx$strata,xx$nstrata) if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) else rr <- c(xx$sign*exp( xx$offset)) MGt <- (GbasedN[,drop=FALSE]-GbasedLam0*rr)*c(xx$weights) MGti <- apply(MGt,2,sumstrata,id-1,max(id)) ### if (fixbeta==1) uxid <- unique(margsurv$id) ### rownames(MGti) <- uxid theta.iid <- -theta.iid + MGti if (fixbeta==0) theta.iid <- theta.iid + Fbetaiid ## add id's after rownames that may not be exactly the same in marginal model and in pairs for fitting ### if (all.equal(uxid,ucc)==TRUE) { ### theta.iid <- theta.iid + MGti ### if (fixbeta==0) theta.iid <- theta.iid - Fbetaiid ### } else { ### allid <- unique(c(uxid,ucc)) ### theta.iid <- matrix(0,length(allid),ncol(theta.iid)) ### rownames(theta.iid) <- allid ### theta.iid[rownames(score.iid),] <- score.iid ### theta.iid[rownames(MGti),] <- theta.iid[rownames(MGti),] + MGti ### if (fixbeta==0) theta.iid[rownames(MGti),] <- theta.iid[rownames(MGti),]+Fbetaiid ### } out$theta.iid <- -theta.iid } ## }}} } ## }}} if (detail==1 && iid==1) cat("finished iid decomposition\n"); ### for profile solutions update second derivative at final if (numDeriv==2 || ((fix.baseline==0))) { oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") oout <- 2 } } if (numDeriv>=1) { if (detail==1 ) cat("starting numDeriv for second derivative \n"); oout <- 0; score2 <- numDeriv::jacobian(loglike,p) score1 <- matrix(score2,ncol=1) oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") if (detail==1 ) cat("finished numDeriv for second derivative \n"); } if (detail==1 & Nit==0) {## {{{ cat(paste("Fisher-Scoring ===================: final","\n")); cat("theta:");print(c(p)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(hess,"\n"); }## }}} if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- diag(nrow(hess)) ## }}} } else if (score.method=="nlminb") { ## {{{ nlminb optimizer oout <- 0; tryCatch(opt <- nlminb(theta,loglike,control=control),error=function(x) NA) if (detail==1) print(opt); if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 theta <- opt$par out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- -1* out$Dscore if (iid==1) { theta.iid <- out$score.iid; score.iid <- out$score.iid } if (numDeriv==1) { if (detail==1 ) cat("numDeriv hessian start\n"); oout <- 3; ## returns score hess <- numDeriv::jacobian(loglike,opt$par) if (detail==1 ) cat("numDeriv hessian done\n"); } hessi <- lava::Inverse(hess); ## }}} } else if (score.method=="optimize" && ptheta==1) { ## {{{ optimizer oout <- 0; if (var.link==1) {mino <- -20; maxo <- 10;} else {mino <- 0.001; maxo <- 100;} tryCatch(opt <- optimize(loglike,c(mino,maxo))); if (detail==1) print(opt); opt$par <- opt$minimum theta <- opt$par if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- -1* out$Dscore if (numDeriv==1) { if (detail==1 ) cat("numDeriv hessian start\n"); oout <- 3; ## to get jacobian hess <- numDeriv::jacobian(loglike,theta) if (detail==1 ) cat("numDeriv hessian done\n"); } hessi <- lava::Inverse(hess); if (iid==1) { theta.iid <- out$score.iid; score.iid <- out$score.iid } ## }}} } else if (score.method=="nlm") { ## {{{ nlm optimizer iid <- 0; oout <- 0; tryCatch(opt <- nlm(loglike,theta,hessian=TRUE,print.level=detail),error=function(x) NA) iid <- 1; hess <- opt$hessian score <- opt$gradient if (detail==1) print(opt); hessi <- lava::Inverse(hess); theta <- opt$estimate if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$estimate) logl <- out$loglike score1 <- out$score hess1 <- out$Dscore if (iid==1) { theta.iid <- out$score.iid; score.iid <- out$score.iid } ## }}} } else stop("score.methods = optimize(dim=1) nlm nlminb fisher.scoring\n"); ## {{{ handling output loglikeiid <- NULL robvar.theta <- NULL likepairs <- NULL if (fix.baseline==1) { marginal.surv <- psurvmarg; marginal.trunc <- ptrunc; } else { marginal.surv <- out$marginal.surv; marginal.trunc <- out$marginal.trunc;} if (iid==1) { if (dep.model==3 & pair.structure==1) likepairs <- out$likepairs if (dep.model==3 & two.stage==0) {# {{{ hessi <- -1*hessi all.likepairs <- out$all.likepairs colnames(all.likepairs) <- c("surv","dt","ds","dtds","cause1","cause2") }# }}} theta.iid <- -out$theta.iid %*% hessi ### rownames not set to make more robust ### if (is.null(call.secluster)) rownames(theta.iid) <- unique(cluster.call) else rownames(theta.iid) <- unique(se.clusters) robvar.theta <- crossprod(theta.iid) loglikeiid <- out$loglikeiid } else { all.likepairs <- NULL} var.theta <- robvar.theta if (is.null(robvar.theta)) var.theta <- hessi if (!is.null(colnames(theta.des))) thetanames <- colnames(theta.des) else thetanames <- paste("dependence",1:length(theta),sep="") theta <- matrix(theta,length(c(theta)),1) if (length(thetanames)==nrow(theta)) { rownames(theta) <- thetanames; rownames(var.theta) <- colnames(var.theta) <- thetanames; } if (!is.null(logl)) logl <- -1*logl if (convergence.bp==0) theta <- rep(NA,length(theta)) ud <- list(theta=theta,score=score,hess=hess,hessi=hessi,var.theta=var.theta, model=model,robvar.theta=robvar.theta, theta.iid=theta.iid,loglikeiid=loglikeiid,likepairs=likepairs, thetanames=thetanames,loglike=logl,score1=score1,Dscore=out$Dscore, marginal.surv=marginal.surv,marginal.trunc=marginal.trunc, baseline=out$baseline,se=diag(robvar.theta)^.5, score.iid=-score.iid,theta.des=theta.des,random.design=random.design) class(ud) <- "mets.twostage" attr(ud,"response") <- "survival" attr(ud,"Formula") <- formula attr(ud,"clusters") <- clusters attr(ud,"cluster.call") <- cluster.call attr(ud,"secluster") <- c(se.clusters) attr(ud,"sym")<-sym; attr(ud,"var.link")<-var.link; attr(ud,"var.par")<-var.par; attr(ud,"var.func")<-var.func; attr(ud,"ptheta")<-ptheta attr(ud,"antpers")<-antpers; attr(ud,"antclust")<-antclust; attr(ud,"Type") <- model attr(ud,"twostage") <- two.stage attr(ud,"additive-gamma") <- (dep.model==3)*1 if (!is.null(marginal.trunc)) attr(ud,"trunclikeiid")<- out$trunclikeiid if (dep.model==3 & two.stage==0) attr(ud,"all.likepairs")<- all.likepairs if (dep.model==3 ) attr(ud,"additive.gamma.sum") <- additive.gamma.sum #likepairs=likepairs,## if (dep.model==3 & pair.structure==1) attr(ud, "likepairs") <- c(out$likepairs) if (dep.model==3 & pair.structure==0) attr(ud, "pardes") <- theta.des if (dep.model==3 & pair.structure==0) attr(ud, "theta.des") <- theta.des if (dep.model==3 & pair.structure==1) attr(ud, "pardes") <- theta.des[,,1] if (dep.model==3 & pair.structure==1) attr(ud, "theta.des") <- theta.des[,,1] if (dep.model==3 & pair.structure==0) attr(ud, "rv1") <- random.design[1,,drop=FALSE] if (dep.model==3 & pair.structure==1) attr(ud, "rv1") <- random.design[,,1] return(ud); ## }}} } ## }}} ##' @export randomDes <- function(dep.model,random.design,theta.des,theta,antpers,ags,pairs,pairs.rvs,var.link,clusterindex) {# {{{ additive.gamma.sum <- ags if (!is.null(random.design)) { ### different parameters for Additive random effects # {{{ dep.model <- 3 dim.rv <- ncol(random.design); if (is.null(theta.des)) theta.des<-diag(dim.rv); } else { random.design <- matrix(0,1,1); dim.rv <- 1; additive.gamma.sum <- matrix(1,1,1); } if (is.null(theta.des)) ptheta<-1; if (is.null(theta.des)) theta.des<-matrix(1,antpers,ptheta); ### else theta.des<-as.matrix(theta.des); if (length(dim(theta.des))==3) ptheta<-dim(theta.des)[2] else if (length(dim(theta.des))==2) ptheta<-ncol(theta.des) ### if (nrow(theta.des)!=antpers & dep.model!=3 ) stop("Theta design does not have correct dim"); if (length(dim(theta.des))!=3) theta.des <- as.matrix(theta.des) if (is.null(theta)==TRUE) { if (var.link==1) theta<- rep(-0.7,ptheta); if (var.link==0) theta<- rep(exp(-0.7),ptheta); } if (length(theta)!=ptheta) { ### warning("dimensions of theta.des and theta do not match\n"); theta<-rep(theta[1],ptheta); } theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); antpairs <- 1; ### to define if (is.null(additive.gamma.sum)) additive.gamma.sum <- matrix(1,dim.rv,ptheta) if (!is.null(pairs)) { pair.structure <- 1;} else pair.structure <- 0; if (pair.structure==1 & dep.model==3) { ## {{{ ### something with dimensions of rv.des antpairs <- nrow(pairs); if ( (length(dim(theta.des))!=3) & (length(dim(random.design))==3) ) { Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) for (i in 1:antpairs) Ptheta.des[,,i] <- theta.des theta.des <- Ptheta.des } if ( (length(dim(theta.des))==3) & (length(dim(random.design))!=3) ) { rv.des <- array(0,c(2,ncol(random.design),antpairs)) for (i in 1:antpairs) { rv.des[1,,i] <- random.design[pairs[i,1],] rv.des[2,,i] <- random.design[pairs[i,2],] } random.design <- rv.des } if ( (length(dim(theta.des))!=3) & (length(dim(random.design))!=3) ) { Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) rv.des <- array(0,c(2,ncol(random.design),antpairs)) for (i in 1:antpairs) { rv.des[1,,i] <- random.design[pairs[i,1],] rv.des[2,,i] <- random.design[pairs[i,2],] Ptheta.des[,,i] <- theta.des } theta.des <- Ptheta.des random.design <- rv.des } if (max(pairs)>antpers) stop("Indices of pairs should refer to given data \n"); if (is.null(pairs.rvs)) pairs.rvs <- rep(dim(random.design)[2],antpairs) clusterindex <- pairs-1; } ## }}} if (pair.structure==1 & dep.model!=3) { clusterindex <- pairs-1; antpairs <- nrow(pairs); pairs.rvs <- 1 }# }}} if (is.null(pairs.rvs)) pairs.rvs <- 1 return(list(random.design=random.design,clusterindex=clusterindex, antpairs=antpairs,pair.structure=pair.structure, dep.model=dep.model,dim.rv=dim.rv, additive.gamma.sum=additive.gamma.sum, pairs.rvs=pairs.rvs,theta=theta,ptheta=ptheta,theta.des=theta.des)) }# }}} readmargsurv <- function(margsurv,data,clusters) {# {{{ start.time <- 0 if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") {# {{{ formula<-attr(margsurv,"Formula"); beta.fixed <- attr(margsurv,"beta.fixed") if (is.null(beta.fixed)) beta.fixed <- 1; ldata<-aalen.des(formula,data=data,model="cox.aalen"); id <- attr(margsurv,"id"); mclusters <- attr(margsurv,"cluster.call") X<-ldata$X; time<-ldata$time2; Z<-ldata$Z; status<-ldata$status; time2 <- attr(margsurv,"stop"); start.time <- attr(margsurv,"start") antpers<-nrow(X); if (is.null(Z)==TRUE) {npar<-TRUE; semi<-0;} else { Z<-as.matrix(Z); npar<-FALSE; semi<-1;} if (npar==TRUE) {Z<-matrix(0,antpers,1); pz<-1; fixed<-0;} else {fixed<-1;pz<-ncol(Z);} px<-ncol(X); if (is.null(clusters) && is.null(mclusters)) stop("No cluster variabel specified in marginal or twostage call\n"); if (is.null(clusters)) clusters <- mclusters if (nrow(X)!=length(clusters)) stop("Length of Marginal survival data not consistent with cluster length\n"); # }}} } else if (class(margsurv)=="phreg") { # {{{ ### setting up newdata with factors and strata antpers <- nrow(data) rr <- readPhreg(margsurv,data,nr=FALSE) time2 <- rr$exit if (!is.null(rr$entry)) start.time <- rr$entry else start.time <- rep(0,antpers); status <- rr$status if (is.null(clusters)) clusters <- rr$clusters ### clusters <- rr$clusters ### print(lapply(rr,summary)) # }}} } else { ### coxph {{{ antpers <- margsurv$n id <- 0:(antpers-1) mt <- model.frame(margsurv) Y <- model.extract(mt, "response") if (!inherits(Y, "Surv")) stop("Response must be a survival object") if (attr(Y, "type") == "right") { time2 <- Y[, "time"]; status <- Y[, "status"] start.time <- rep(0,antpers); } else { start.time <- Y[, 1]; time2 <- Y[, 2]; status <- Y[, 3]; } ### Z <- na.omit(model.matrix(margsurv)[,-1]) ## Discard intercept Z <- matrix(1,antpers,length(coef(margsurv))); if (is.null(clusters)) stop("must give clusters for coxph\n"); cluster.call <- clusters; X <- matrix(1,antpers,1); ### Z <- matrix(0,antpers,1); ### no use for these px <- 1; pz <- ncol(Z); start <- rep(0,antpers); beta.fixed <- 0 semi <- 1 }# }}} if (!is.null(start.time)) { if (any(abs(start.time)>0)) lefttrunk <- 1 else lefttrunk <- 0; } else lefttrunk <- 0 if (!is.null(margsurv)) { if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") { # {{{ resi <- residualsTimereg(margsurv,data=data) RR <- resi$RR cum <- resi$cumhaz/RR psurvmarg <- exp(-resi$cumhaz); ptrunc <- rep(1,length(psurvmarg)); if (lefttrunk==1) ptrunc <- exp(-resi$cumhazleft); # }}} } else if (class(margsurv)=="coxph") { # {{{ ### some problems here when data is different from data used in margsurv residuals <- residuals(margsurv) cum <- cumhaz <- status-residuals psurvmarg <- exp(-cumhaz); cumhazleft <- rep(0,antpers) ptrunc <- rep(1,length(psurvmarg)); RR<- exp(margsurv$linear.predictors+sum(margsurv$means*coef(margsurv))) cum <- cum/RR if ((lefttrunk==1)) { stop("Use cox.aalen function for truncation case \n"); baseout <- survival::basehaz(margsurv,centered=FALSE); cumt <- cbind(baseout$time,baseout$hazard) cumt <- Cpred(cumt,start.time)[,2] ptrunc <- exp(-cumt * RR) }# }}} } else if (class(margsurv)=="phreg") { ppsurvmarg <- predict(margsurv,data,tminus=TRUE,times=time2,individual.time=TRUE,se=FALSE) psurvmarg <- ppsurvmarg$surv cum <- ppsurvmarg$cumhaz RR <- ppsurvmarg$RR ptrunc <- rep(1,length(psurvmarg)); if ((lefttrunk==1)) { ptrunc <- predict(margsurv,data,tminus=TRUE,times=start.time,individual.time=TRUE,se=FALSE)$surv } } } if (is.null(clusters) & class(margsurv)!="phreg") stop("must give clusters") return(list(psurvmarg=psurvmarg,ptrunc=ptrunc,entry=start.time,exit=time2, status=status,clusters=clusters,cum=cum,RR=RR)) } ## }}} ###survival.twostageG <- function(margsurv,data=sys.parent(),score.method="fisher.scoring",Nit=60,detail=0,clusters=NULL, ### silent=1,weights=NULL, control=list(),theta=NULL,theta.des=NULL, ### var.link=1,iid=1,step=0.5,notaylor=0,model="clayton.oakes", ### marginal.trunc=NULL,marginal.survival=NULL,marginal.status=NULL,strata=NULL, ### se.clusters=NULL,numDeriv=0,random.design=NULL,pairs=NULL,pairs.rvs=NULL,numDeriv.method="simple", ### additive.gamma.sum=NULL,var.par=1,cr.models=NULL,case.control=0,ascertained=0,shut.up=0) ###{## {{{ ##### {{{ seting up design and variables ###score.iid <- NULL; two.stage <- 1; rate.sim <- 1; sym=1; var.func <- NULL ###if (model=="clayton.oakes" || model=="gamma") dep.model <- 1 ###else if (model=="plackett" || model=="or") dep.model <- 2 ###else stop("Model must by either clayton.oakes or plackett \n"); ###start.time <- NULL; ptrunc <- NULL; psurvmarg <- NULL; status <- NULL ###fix.baseline <- 0; ###convergence.bp <- 1; ### to control if baseline profiler converges ###if ((!is.null(margsurv)) | (!is.null(marginal.survival))) fix.baseline <- 1 ### ### ###if (!is.null(margsurv)) { ###if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") { ## {{{ ### formula<-attr(margsurv,"Formula"); ### beta.fixed <- attr(margsurv,"beta.fixed") ### if (is.null(beta.fixed)) beta.fixed <- 1; ### ldata<-aalen.des(formula,data=data,model="cox.aalen"); ### id <- attr(margsurv,"id"); ### mclusters <- attr(margsurv,"cluster.call") ### X<-ldata$X; ### time<-ldata$time2; ### Z<-ldata$Z; ### status<-ldata$status; ### time2 <- attr(margsurv,"stop"); ### start.time <- attr(margsurv,"start") ### antpers<-nrow(X); ### if (is.null(Z)==TRUE) {npar<-TRUE; semi<-0;} else { Z<-as.matrix(Z); npar<-FALSE; semi<-1;} ### if (npar==TRUE) {Z<-matrix(0,antpers,1); pz<-1; fixed<-0;} else {fixed<-1;pz<-ncol(Z);} ### px<-ncol(X); ### ### if (is.null(clusters) && is.null(mclusters)) stop("No cluster variabel specified in marginal or twostage call\n"); ### if (is.null(clusters)) clusters <- mclusters ### if (nrow(X)!=length(clusters)) stop("Length of Marginal survival data not consistent with cluster length\n"); ##### }}} ### } else if (class(margsurv)=="phreg") { ## {{{ ### antpers <- length(margsurv$id) ### start.time <- margsurv$entry ###} else { ### coxph ## {{{ ### notaylor <- 1 ### antpers <- margsurv$n ### id <- 0:(antpers-1) ### mt <- model.frame(margsurv) ### Y <- model.extract(mt, "response") ### if (!inherits(Y, "Surv")) stop("Response must be a survival object") ### if (attr(Y, "type") == "right") { ### time2 <- Y[, "time"]; ### status <- Y[, "status"] ### start.time <- rep(0,antpers); ### } else { ### start.time <- Y[, 1]; ### time2 <- Y[, 2]; ### status <- Y[, 3]; ### } ###### Z <- na.omit(model.matrix(margsurv)[,-1]) ## Discard intercept ### Z <- matrix(1,antpers,length(coef(margsurv))); ### ### if (is.null(clusters)) stop("must give clusters for coxph\n"); ### cluster.call <- clusters; ### X <- matrix(1,antpers,1); ### Z <- matrix(0,antpers,1); ### no use for these ### px <- 1; pz <- ncol(Z); ### start <- rep(0,antpers); ### beta.fixed <- 0 ### semi <- 1 ###### start.time <- 0 ###} ## }}} ###} else { start.time<- 0} ### ######print("00"); print(summary(psurvmarg)); print(summary(ptrunc)) ### ### if (any(abs(start.time)>0)) lefttrunk <- 1 else lefttrunk <- 0 ### if (!is.null(start.time)) { ### if (any(abs(start.time)>0)) lefttrunk <- 1 else lefttrunk <- 0; ### } else lefttrunk <- 0 ### ###if (!is.null(margsurv)) { ### if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") { ## {{{ ### resi <- residualsTimereg(margsurv,data=data) ### RR <- resi$RR ### psurvmarg <- exp(-resi$cumhaz); ### ptrunc <- rep(1,length(psurvmarg)); ### if (lefttrunk==1) ptrunc <- exp(-resi$cumhazleft); ### } ## }}} ### else if (class(margsurv)=="coxph") { ## {{{ ### ### some problems here when data is different from data used in margsurv ### notaylor <- 1 ### residuals <- residuals(margsurv) ### cumhaz <- status-residuals ### psurvmarg <- exp(-cumhaz); ### cumhazleft <- rep(0,antpers) ### ptrunc <- rep(1,length(psurvmarg)); ### RR<- exp(margsurv$linear.predictors-sum(margsurv$means*coef(margsurv))) ### if ((lefttrunk==1)) { ### stop("Use cox.aalen function for truncation case \n"); ### baseout <- survival::basehaz(margsurv,centered=FALSE); ### cum <- cbind(baseout$time,baseout$hazard) ### cum <- Cpred(cum,start.time)[,2] ### ptrunc <- exp(-cum * RR) ### } ### } ### else if (class(margsurv)=="phreg") { ## {{{ ### xx <- margsurv$cox.prep ### S0i2 <- S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/margsurv$S0 ### if (!is.null(margsurv$coef)) ### rr <- c(exp(margsurv$X %*% margsurv$coef)) ### else rr <- rep(1,antpers) ###### ### back to original order ### cumhazt <- cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum ### orig.o <- (1:nrow(xx$X))[xx$ord+1] ### bto <- order(orig.o) ### cumhazt <- cumhazt[bto] ### psurvmarg <- c(exp(-cumhazt*rr)) ### ptrunc <- rep(1,length(psurvmarg)); ### start.time <- c(margsurv$entry) ### status <- c(margsurv$status) ### } ## }}} ###} ## }}} ### ###### print(head(cbind(psurvmarg,status))) ### ### antpers <- nrow(data); ## mydim(marginal.survival)[1] ### RR <- rep(1,antpers); ### ### if (is.null(psurvmarg)) psurvmarg <- rep(1,antpers); ### if (!is.null(marginal.survival)) psurvmarg <- marginal.survival ### if (!is.null(marginal.trunc)) ptrunc <- marginal.trunc ### if (is.null(ptrunc)) ptrunc <- rep(1,length(psurvmarg)) ### ###### print(summary(psurvmarg)); print(summary(ptrunc)) ### ### if (!is.null(marginal.status)) status <- marginal.status ### if (is.null(status) & is.null(cr.models)) stop("must give status variable for survival via either margninal model (margsurv), marginal.status or as cr.models \n"); ### ### if (is.null(weights)==TRUE) weights <- rep(1,antpers); ### if (is.null(strata)==TRUE) strata<- rep(1,antpers); ### if (length(strata)!=antpers) stop("Strata must have length equal to number of data points \n"); ### ### ## {{{ cluster set up ### cluster.call <- clusters ### out.clust <- cluster.index(clusters); ### clusters <- out.clust$clusters ### maxclust <- out.clust$maxclust ### antclust <- out.clust$cluster.size ### clusterindex <- out.clust$idclust ### clustsize <- out.clust$cluster.size ### call.secluster <- se.clusters ### ### if (is.null(se.clusters)) { se.clusters <- clusters; antiid <- nrow(clusterindex);} else { ### iids <- unique(se.clusters); ### antiid <- length(iids); ### if (is.numeric(se.clusters)) se.clusters <- fast.approx(iids,se.clusters)-1 ### else se.clusters <- as.integer(factor(se.clusters, labels = seq(antiid)))-1 ### } ### if (length(se.clusters)!=length(clusters)) stop("Length of seclusters and clusters must be same\n"); ### ###### if ((!is.null(max.clust))) if (max.clust< antiid) { ###### coarse.clust <- TRUE ###### qq <- unique(quantile(se.clusters, probs = seq(0, 1, by = 1/max.clust))) ###### qqc <- cut(se.clusters, breaks = qq, include.lowest = TRUE) ###### se.clusters <- as.integer(qqc)-1 ###### max.clusters <- length(unique(se.clusters)) ###### maxclust <- max.clust ###### antiid <- max.clusters ###### } ### ## }}} ### ###### pxz <- px + pz; ### ### if (!is.null(random.design)) { ### different parameters for Additive random effects # {{{ ### dep.model <- 3 ### ###### if (is.null(random.design)) random.design <- matrix(1,antpers,1); ### dim.rv <- ncol(random.design); ### if (is.null(theta.des)) theta.des<-diag(dim.rv); ### ### ###### ptheta <- dimpar <- ncol(theta.des); ###### if (dim(theta.des)[2]!=ncol(random.design)) ###### stop("nrow(theta.des)!= ncol(random.design),\nspecifies restrictions on paramters, if theta.des not given =diag (free)\n"); ### } else { random.design <- matrix(0,1,1); dim.rv <- 1; ### additive.gamma.sum <- matrix(1,1,1); ### } ### ### if (is.null(theta.des)) ptheta<-1; ### if (is.null(theta.des)) theta.des<-matrix(1,antpers,ptheta); ### else theta.des<-as.matrix(theta.des); ###### ptheta<-ncol(theta.des); ###### if (nrow(theta.des)!=antpers) stop("Theta design does not have correct dim"); ### ### if (length(dim(theta.des))==3) ptheta<-dim(theta.des)[2] else if (length(dim(theta.des))==2) ptheta<-ncol(theta.des) ### if (nrow(theta.des)!=antpers & dep.model!=3 ) stop("Theta design does not have correct dim"); ### ### if (length(dim(theta.des))!=3) theta.des <- as.matrix(theta.des) ### ### if (is.null(theta)==TRUE) { ### if (var.link==1) theta<- rep(-0.7,ptheta); ### if (var.link==0) theta<- rep(exp(-0.7),ptheta); ### } ### ### if (length(theta)!=ptheta) { ###### warning("dimensions of theta.des and theta do not match\n"); ###### print(theta); ### theta<-rep(theta[1],ptheta); ### } ### theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); ### ### if (maxclust==1) stop("No clusters, maxclust size=1\n"); ### ### antpairs <- 1; ### to define ### if (is.null(additive.gamma.sum)) additive.gamma.sum <- matrix(1,dim.rv,ptheta) ### ### if (!is.null(pairs)) { pair.structure <- 1;} else pair.structure <- 0; ### ##### ppprint ###### print(c(pair.structure,dep.model,fix.baseline)) ###### print(head(theta.des)) ###### print(c(case.control,ascertained)) ### ### if (pair.structure==1 & dep.model==3) { ## {{{ ###### something with dimensions of rv.des ###### theta.des ### antpairs <- nrow(pairs); ### if ( (length(dim(theta.des))!=3) & (length(dim(random.design))==3) ) ### { ### Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) ### for (i in 1:antpairs) Ptheta.des[,,i] <- theta.des ### theta.des <- Ptheta.des ### } ### if ( (length(dim(theta.des))==3) & (length(dim(random.design))!=3) ) ### { ### rv.des <- array(0,c(2,ncol(random.design),antpairs)) ### for (i in 1:antpairs) { ### rv.des[1,,i] <- random.design[pairs[i,1],] ### rv.des[2,,i] <- random.design[pairs[i,2],] ### } ### random.design <- rv.des ### } ### if ( (length(dim(theta.des))!=3) & (length(dim(random.design))!=3) ) ### { ###### print("laver 3-dim design "); ### Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) ### rv.des <- array(0,c(2,ncol(random.design),antpairs)) ### for (i in 1:antpairs) { ### rv.des[1,,i] <- random.design[pairs[i,1],] ### rv.des[2,,i] <- random.design[pairs[i,2],] ### Ptheta.des[,,i] <- theta.des ### } ### theta.des <- Ptheta.des ### random.design <- rv.des ### } ### if (max(pairs)>antpers) stop("Indices of pairs should refer to given data \n"); ### if (is.null(pairs.rvs)) pairs.rvs <- rep(dim(random.design)[2],antpairs) ###### if (max(pairs.rvs)> dim(random.design)[3] | max(pairs.rvs)>ncol(theta.des[1,,])) ###### stop("random variables for each cluster higher than possible, pair.rvs not consistent with random.design or theta.des\n"); ### clusterindex <- pairs-1; ### } ## }}} ### ### if (pair.structure==1 & dep.model!=3) { ### clusterindex <- pairs-1; ### antpairs <- nrow(pairs); ### pairs.rvs <- 1 ### }# }}} ### ### ## }}} ### ###### setting up arguments for Aalen baseline profile estimates ### if (fix.baseline==0) { ## {{{ when baseline is estimated when baseline is estimated ### if (is.null(cr.models)) stop("give hazard models for different causes, ex cr.models=list(Surv(time,status==1)~+1,Surv(time,status==2)~+1) \n") ### ### if (case.control==0 & ascertained==0) { ## {{{ ##### {{{ setting up random effects and covariates for marginal modelling ### timestatus <- all.vars(cr.models[[1]]) ### times <- data[,timestatus[1]] ### if (is.null(status)) status <- data[,timestatus[2]] ### lstatus <- data[,timestatus[2]] ### ### organize increments according to overall jump-times ### jumps <- lstatus!=0 ### dtimes <- times[jumps] ### st <- order(dtimes) ### dtimesst <- dtimes[st] ### dcauses <- lstatus[jumps][st] ### ids <- (1:nrow(data))[jumps][st] ### ### nc <- 0 ### for (i in 1:length(cr.models)) { ### a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) ### X <- a2$X ### nc <- nc+ncol(X) ### } ### dBaalen <- matrix(0,length(dtimes),nc) ### xjump <- array(0,c(length(cr.models),nc,length(ids))) ### ### ## first compute marginal aalen models for all causes ### a <- list(); da <- list(); ### for (i in 1:length(cr.models)) { ### a[[i]] <- aalen(as.formula(cr.models[[i]]),data=data,robust=0,weights=weights) ### a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) ### X <- a2$X ### da[[i]] <- apply(a[[i]]$cum[,-1,drop=FALSE],2,diff) ### jumpsi <- (1:length(dtimes))[dcauses==i] ### if (i==1) fp <- 1 ### indexc <- fp:(fp+ncol(X)-1) ### dBaalen[jumpsi,indexc] <- da[[i]] ### xjump[i,indexc,] <- t(X[ids,]) ### fp <- ncol(X)+1 ### } ### ### ## }}} ### ### #### organize subject specific random variables and design ### ### for additive gamma model ### ## {{{ ### dimt <- dim(theta.des[,,1,drop=FALSE])[-3] ### dimr <- dim(random.design[,,,drop=FALSE]) ### mtheta.des <- array(0,c(dimt,nrow(data))) ### mrv.des <- array(0,c(dimr[1]/2,dimr[2],nrow(data))) ### nrv.des <- rep(0,nrow(data)) ### nrv.des[pairs[,1]] <- pairs.rvs ### nrv.des[pairs[,2]] <- pairs.rvs ### mtheta.des[,,pairs[,1]] <- theta.des ### mtheta.des[,,pairs[,2]] <- theta.des ### mrv.des[,,pairs[,1]] <- random.design[1:(dimr[1]/2),,,drop=FALSE] ### mrv.des[,,pairs[,2]] <- random.design[(dimr[1]/2+1):dimr[1],,,drop=FALSE] ### ### array thetades to jump times (subjects) ### mtheta.des <- mtheta.des[,,ids,drop=FALSE] ### ### array randomdes to jump times (subjects) ### mrv.des <- mrv.des[,,ids,drop=FALSE] ### nrv.des <- pairs.rvs[ids] ### ## }}} ### ###### #### organize subject specific random variables and design ###### ### for additive gamma model ###### ## {{{ ###### dimt <- dim(theta.des[,,1]) ###### dimr <- dim(random.design[,,]) ###### mtheta.des <- array(0,c(dimt,nrow(data))) ###### mrv.des <- array(0,c(dimr[1]/2,dimr[2],nrow(data))) ###### mtheta.des[,,pairs[,1]] <- theta.des ###### mtheta.des[,,pairs[,2]] <- theta.des ###### mrv.des[,,pairs[,1]] <- random.design[1:(dimr[1]/2),,,drop=FALSE] ###### mrv.des[,,pairs[,2]] <- random.design[(dimr[1]/2+1):dimr[1],,,drop=FALSE] ###### nrv.des <- rep(0,nrow(data)) ###### nrv.des[pairs[,1]] <- pairs.rvs ###### nrv.des[pairs[,2]] <- pairs.rvs ###### ### array thetades to jump times (subjects) ###### mtheta.des <- mtheta.des[,,ids,drop=FALSE] ###### ### array randomdes to jump times (subjects) ###### mrv.des <- mrv.des[,,ids,drop=FALSE] ###### nrv.des <- pairs.rvs[ids] ###### ## }}} ### ### } ## }}} ### ### if (case.control==1 || ascertained==1) { ## {{{ ### ###### print(dim(data)); print(summary(pairs)) ### data1 <- data[pairs[,1],] ### data.proband <- data[pairs[,2],] ### weights1 <- weights[pairs[,1]] ###### print(summary(data.proband)); print(summary(data1)) ### ##### {{{ setting up designs for jump times ### timestatus <- all.vars(cr.models[[1]]) ### if (is.null(status)) status <- data[,timestatus[2]] ### alltimes <- data[,timestatus[1]] ### times <- data1[,timestatus[1]] ### lstatus <- data1[,timestatus[2]] ### timescase <- data.proband[,timestatus[1]] ### lstatuscase <- data.proband[,timestatus[2]] ### ### organize increments according to overall jump-times ### jumps <- lstatus!=0 ### dtimes <- times[jumps] ### dtimescase <- timescase[jumps] ### st <- order(dtimes) ### dtimesst <- dtimes[st] ### dtimesstcase <- dtimescase[st] ### dcauses <- lstatus[jumps][st] ### dcausescase <- lstatuscase[jumps][st] ### ids <- (1:nrow(data1))[jumps][st] ### ### ### ### delayed entry for case because of ascertained sampling ### ### controls are however control probands, and have entry=0 ### entry <- timescase*lstatuscase ### data1$entry <- entry ### cr.models2 <- list() ### if (ascertained==1) { ### for (i in 1:length(cr.models)) { ### cr.models2[[i]] <- update(cr.models[[i]],as.formula(paste("Surv(entry,",timestatus[1],",",timestatus[2],")~.",sep=""))) ### } ### } else cr.models2 <- cr.models ### ### nc <- 0 ### for (i in 1:length(cr.models)) { ### X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X ### nc <- nc+ncol(X) ### } ### dBaalen <- matrix(0,length(dtimes),nc) ### xjump <- array(0,c(length(cr.models),nc,length(ids))) ### xjumpcase <- array(0,c(length(cr.models),nc,length(ids))) ### ### ## first compute marginal aalen models for all causes ### a <- list(); da <- list(); ### ### starting values for iteration ### Bit <- Bitcase <- c() ### for (i in 1:length(cr.models)) { ## {{{ ### a[[i]] <- aalen(as.formula(cr.models2[[i]]),data=data1,robust=0,weights=weights1) ### da[[i]] <- apply(a[[i]]$cum[,-1,drop=FALSE],2,diff) ### jumpsi <- (1:length(dtimes))[dcauses==i] ### X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X ### Xcase <- aalen.des(as.formula(cr.models[[i]]),data=data.proband)$X ### if (i==1) fp <- 1 ### indexc <- fp:(fp+ncol(X)-1) ### dBaalen[jumpsi,indexc] <- da[[i]] ### xjump[i,indexc,] <- t(X[ids,]) ### xjumpcase[i,indexc,] <- t(Xcase[ids,]) ### fp <- fp+ncol(X) ### ### starting values ### Bit <- cbind(Bit,Cpred(a[[i]]$cum,dtimesst)[,-1,drop=FALSE]) ### } ## }}} ### Bit.ini <- Bit ### ## }}} ### ####### organize subject specific random variables and design ####### already done in basic pairwise setup ### mtheta.des <- theta.des[,,ids,drop=FALSE] ### ### array randomdes to jump times (subjects) ### mrv.des <- random.design[,,ids,drop=FALSE] ### nrv.des <- pairs.rvs[ids] ### } ## }}} ### ### } else { ### mrv.des <- array(0,c(1,1,1)); mtheta.des <- array(0,c(1,1,1)); margthetades <- array(0,c(1,1,1)); ### xjump <- array(0,c(1,1,1)); dBaalen <- matrix(0,1,1); nrv.des <- 3 ### } ## }}} ### ### loglike <- function(par) ### { ## {{{ ### ### if (pair.structure==0 | dep.model!=3) Xtheta <- as.matrix(theta.des) %*% matrix(c(par),nrow=ptheta,ncol=1); ### if (pair.structure==1 & dep.model==3) Xtheta <- matrix(0,antpers,1); ## not needed ### DXtheta <- array(0,c(1,1,1)); ### ### if (var.link==1 & dep.model==3) epar <- c(exp(par)) else epar <- c(par) ### partheta <- epar ### ### if (var.par==1 & dep.model==3) { ### ## from variances to ### if (is.null(var.func)) { ### sp <- sum(epar) ### partheta <- epar/sp^2 ### } else partheta <- epar ## par.func(epar) ### } ### ### ### if (pair.structure==0) { ### outl<-.Call("twostageloglikeRV", ## {{{ only two stage model for this option ### icause=status,ipmargsurv=psurvmarg, ### itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, ### icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ### ivarlink=var.link,iid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, ### itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, ### irvdes=random.design,iags=additive.gamma.sum,iascertained=ascertained, ### PACKAGE="mets") ## }}} ### } ### else { ## pair-structure ### ## twostage model, case.control option, profile out baseline ### ## conditional model, case.control option, profile out baseline ### if (fix.baseline==0) ## if baseline is not given ### { ### cum1 <- cbind(dtimesst,Bit) ### if ( (case.control==1 || ascertained==1) & (convergence.bp==1)) { ## {{{ profiles out baseline under case-control/ascertainment sampling ### ###### ## initial values , only one cr.model for survival ###### Bit <- cbind(Cpred(a[[1]]$cum,dtimesst)[,-1]) ### if (detail>1) plot(dtimesst,Bit,type="l",main="Bit") ### ### if (ncol(Bit)==0) Bit <- Bit.ini ### Bitcase <- Cpred(cbind(dtimesst,Bit),dtimesstcase)[,-1,drop=FALSE] ### Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X ### ### for (j in 1:5) { ## {{{ profile via iteration ### cncc <- .Call("BhatAddGamCC",1,dBaalen,dcauses,dim(xjump),xjump, ### c(partheta),dim(mtheta.des),mtheta.des,additive.gamma.sum,var.link, ### dim(mrv.des),mrv.des,nrv.des,1,Bit,Bitcase,dcausescase,PACKAGE="mets") ### d <- max(abs(Bit-cncc$B)) ### if (detail>1) print(d) ### Bit <- cncc$B ###### if (detail>1) print(c(par,epar,partheta)); ###### if (detail>1) print(summary(Bit)); ### if (detail>1) print(summary(cncc$caseweights)) ### cum1 <- cbind(dtimesst,cncc$B) ### Bitcase <-cbind(Cpred(cum1,dtimesstcase)[,-1]) ###### if (detail>1) print(summary(Bitcase)) ### if (detail>1) lines(dtimesst,Bit,col=j+1); ### if (is.na(d)) { ### if (shut.up==0) cat("Baseline profiler gives missing values\n"); ### Bit <- Bit.ini; cum1 <- cbind(dtimesst,Bit); convergence.bp <<- 0; break; ### } ### Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X ### if (d<0.00001) break; ### } ## }}} ### ### ### nulrow <- rep(0,ncol(Bit)+1) ### pbases <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),alltimes)[,-1,drop=FALSE] ### X <- aalen.des(as.formula(cr.models[[1]]),data=data)$X ### psurvmarg <- exp(-apply(X*pbases,1,sum)) ## psurv given baseline ### if (ascertained==1) { ### Xcase <- aalen.des(as.formula(cr.models[[1]]),data=data.proband)$X ### X <- aalen.des(as.formula(cr.models[[1]]),data=data1)$X ### pba.case <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),entry)[,-1,drop=FALSE] ### ptrunc <- rep(0,nrow(data)) ### ### for control probands ptrunc=1, thus no adjustment ### ptrunc[pairs[,1]] <- exp(-apply(X* pba.case,1,sum)*lstatuscase) ## delayed entry at time of ascertainment proband ### ptrunc[pairs[,2]] <- exp(-apply(Xcase*pba.case,1,sum)*lstatuscase) ### } ###### print(head(cbind(psurvmarg,ptrunc))) ###### print(summary(psurvmarg)) ###### print(summary(ptrunc)) ###### print(dim(pbases)); ### ### } ## }}} ### } ### ###### browser() ###### print(dim(random.design)) ###### print(summary(status)); print(summary(psurvmarg)); print(summary(clusters)); print(summary(random.design)); ###### print(random.design) ###### print(theta.des) ### ### outl<-.Call("twostageloglikeRVpairs", ## {{{ ### icause=status,ipmargsurv=psurvmarg, ### itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta), ### ithetades=theta.des, ### icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ### ivarlink=var.link,iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, ### itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, ### irvdes=random.design, ### idimthetades=dim(theta.des),idimrvdes=dim(random.design),irvs=pairs.rvs,iags=additive.gamma.sum, ### iascertained=ascertained,PACKAGE="mets") ### ## }}} ### ### ### if (fix.baseline==0) { ### outl$baseline <- cum1; ### outl$marginal.surv <- psurvmarg; ### outl$marginal.trunc <- ptrunc ### } ### ### } ## }}} ### ### if (detail==3) print(c(partheta,outl$loglike)) ### ### ## variance parametrization, and inverse.link ### if (dep.model==3) {# {{{ ### if (var.par==1) { ### ## from variances to and with sum for all random effects ### if (is.null(var.func)) { ### if (var.link==0) { ###### print(c(sp,epar)) ### mm <- matrix(-epar*2*sp,length(epar),length(epar)) ### diag(mm) <- sp^2-epar*2*sp ###### print(mm) ### } else { ### mm <- -c(epar) %o% c(epar)*2*sp ### diag(mm) <- epar*sp^2-epar^2*2*sp ###### print(mm) ### } ### mm <- mm/sp^4 ### } else mm <- numDeriv::hessian(var.func,par) ### } else { ### if (var.link==0) mm <- diag(length(epar)) else ### mm <- diag(length(c(epar)))*c(epar) ### } ### }# }}} ### ###### print(c(var.link,dep.model,var.par)) ###### print("hh"); print(mm); print(outl$score) ### ### if (dep.model==3) {# {{{ ### outl$score <- t(mm) %*% outl$score ### outl$Dscore <- t(mm) %*% outl$Dscore %*% mm ### if (iid==1) { outl$theta.iid <- t(t(mm) %*% t(outl$theta.iid)) ### if (class(margsurv)=="phreg") { ###### print(dim(mm)) ### outl$D1thetal <- t(t(mm) %*% t(outl$D1thetal)) ### outl$D2thetal <- t(t(mm) %*% t(outl$D2thetal)) ### } ### } ### ###### print(crossprod(outl$theta.iid)); print(outl$Dscore) ###### print(c(outl$score)) ###### print(apply(outl$theta.iid,2,sum)) ### }# }}} ### ### attr(outl,"gradient") <-outl$score ### if (oout==0) ret <- c(-1*outl$loglike) else if (oout==1) ret <- sum(outl$score^2) else if (oout==2) ret <- outl else ret <- outl$score ### return(ret) ### } ## }}} ### ### if (score.method=="optimize" && ptheta!=1) { ### cat("optimize only works for d==1, score.mehod set to nlminb \n"); ### score.method <- "nlminb"; ### } ### ### score1 <- NULL ### theta.iid <- NULL ### logl <- NULL ### p <- theta ### ### if (score.method=="fisher.scoring") { ## {{{ ### oout <- 2; ### output control for obj ### if (Nit>0) ### for (i in 1:Nit) ### { ### out <- loglike(p) ### ## updating starting values for cumulative baselines ### if (fix.baseline==0) Bit <- out$baseline[,-1,drop=FALSE] ### if (fix.baseline==1) hess <- out$Dscore ### ### uses simple second derivative for computing derivative of score ### if (numDeriv==2 || (((fix.baseline==0)) & (i==1))) { ### oout <- 3 ### hess <- numDeriv::jacobian(loglike,p,method="simple") ### oout <- 2 ### } ### if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- hess ### if (detail==1) {## {{{ ### cat(paste("Fisher-Scoring ===================: it=",i,"\n")); ### cat("theta:");print(c(theta)) ### cat("loglike:");cat(c(out$loglike),"\n"); ### cat("score:");cat(c(out$score),"\n"); ### cat("hess:\n"); cat(hess,"\n"); ### }## }}} ### delta <- step*( hessi %*% out$score ) ### ### update p, but note that score and derivative in fact related to previous p ### ### unless Nit=0, ### if (Nit>0) { ### p <- p - delta ### theta <- p; ### } ### if (is.nan(sum(out$score))) break; ### if (sum(abs(out$score))<0.00001) break; ### if (max(theta)>20 & var.link==1) { cat("theta too large lacking convergence \n"); break; } ### } ### if (!is.nan(sum(p))) { ### if (detail==1 && iid==1) cat("iid decomposition\n"); ### out <- loglike(p) ### logl <- out$loglike ### score1 <- score <- out$score ### oout <- 0; ### hess1 <- hess <- -1*out$Dscore ### ### if (iid==1) { ## {{{ ### theta.iid <- out$theta.iid ### score.iid <- theta.iid ### ### if (class(margsurv)=="phreg") { ## {{{ ### ### if (is.null(margsurv$opt) | is.null(margsurv$coef)) fixbeta<- 1 else fixbeta <- 0 ### id <- xx$id+1 ### ### xx <- margsurv$cox.prep ### D1thetal<- out$D1thetal ### D2thetal<- out$D2thetal ### Dlamthetal <- (D1thetal+D2thetal) ###### print(mydim(Dlamthetal)) ### ### Fbeta <- - t(Dlamtheta1) %*% (margsurv$X *cumhazt*psurvmarg*rr) ### ### ### time-ordered ### ### Gbasem <- apply(-Dlamthetal[xx$ord+1,,drop=FALSE]*psurvmarg[xx$ord+1]*rr[xx$ord+1],2,revcumsumstratasum,xx$strata,xx$nstrata,type="lagsum") ### Gbase <- apply(-Dlamthetal[xx$ord+1,,drop=FALSE]*psurvmarg[xx$ord+1]*rr[xx$ord+1],2,revcumsumstrata,xx$strata,xx$nstrata) ### ###### print(c(Gbase)) print(Fbeta) ### ### if (fixbeta==0) {# {{{ ### Z <- xx$X ### U <- E <- matrix(0,nrow(xx$X),margsurv$p) ### E[xx$jumps+1,] <- margsurv$E ### U[xx$jumps+1,] <- margsurv$U ### invhess <- -solve(margsurv$hessian) ### S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/margsurv$S0 ### cumhaz <- c(cumsumstrata(S0i,xx$strata,xx$nstrata)) ### EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) ### rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) ### ### Martingale as a function of time and for all subjects to handle strata ### MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0)*rr*c(xx$weights) ### UUbeta <- apply(MGt,2,sumstrata,id-1,max(id)) ### UUbeta <- UUbeta %*% invhess ### GbaseEdLam0 <- t(Gbase) %*% (E*S0i) ### Fbeta <- Fbeta - GbaseEdLam0 ### Fbetaiid <- UUbeta %*% t(Fbeta) ### }# }}} ### ### ### \int_0^\tau (GBasem(s) / S_0(s)) dN_i(s) - dLamba_i(s) ### xx <- margsurv$cox.prep ### S0i <- rep(0,length(xx$strata)) ### S0i[xx$jumps+1] <- 1/margsurv$S0 ### S0i2[xx$jumps+1] <- 1/margsurv$S0^2 ### ### dN <- S0i ### dLam0 <- apply(S0i2,2,cumsumstrata,xx$strata,xx$nstrata) ### ### GbasedN <- Gbasem*S0i ### GbasedLam0 <- apply(Gbasem*S0i2,2,cumsumstrata,xx$strata,xx$nstrata) ### ### if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) else rr <- c(xx$sign*exp( xx$offset)) ### MGt <- (GbasedN[,drop=FALSE]-GbasedLam0*rr)*c(xx$weights) ### Mt <- (dN[,drop=FALSE]-dLam0*rr)*c(xx$weights) ### Mt <- c(tail(Gbase,1)) %*% c(Mt) ### MGti <- apply(Mt-MGt,2,sumstrata,id-1,max(id)) ### ### ### print(cbind(theta.iid,MGti,Fbetaiid)) ### ### theta.iid <- theta.iid + MGti ### if (fixbeta==0) theta.iid <- theta.iid + Fbetaiid ### out$theta.iid <- theta.iid ### } ## }}} ### } ## }}} ### ### ### if (detail==1 && iid==1) cat("finished iid decomposition\n"); ### ### for profile solutions update second derivative at final ### if (numDeriv==2 || ((fix.baseline==0))) { ### oout <- 3 ### hess <- numDeriv::jacobian(loglike,p,method="simple") ### oout <- 2 ### } ### } ### if (numDeriv>=1) { ### if (detail==1 ) cat("starting numDeriv for second derivative \n"); ### oout <- 0; ### score2 <- numDeriv::jacobian(loglike,p) ### score1 <- matrix(score2,ncol=1) ### oout <- 3 ### hess <- numDeriv::jacobian(loglike,p,method="simple") ### if (detail==1 ) cat("finished numDeriv for second derivative \n"); ### } ### if (detail==1 & Nit==0) {## {{{ ### cat(paste("Fisher-Scoring ===================: final","\n")); ### cat("theta:");print(c(p)) ### cat("loglike:");cat(c(out$loglike),"\n"); ### cat("score:");cat(c(out$score),"\n"); ### cat("hess:\n"); cat(hess,"\n"); ### }## }}} ### if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- diag(nrow(hess)) ### ## }}} ### } else if (score.method=="nlminb") { ## {{{ nlminb optimizer ### oout <- 0; ### tryCatch(opt <- nlminb(theta,loglike,control=control),error=function(x) NA) ### if (detail==1) print(opt); ### if (detail==1 && iid==1) cat("iid decomposition\n"); ### oout <- 2 ### theta <- opt$par ### out <- loglike(opt$par) ### logl <- out$loglike ### score1 <- score <- out$score ### hess1 <- hess <- -1* out$Dscore ### if (iid==1) { theta.iid <- out$theta.iid; score.iid <- out$theta.iid } ### if (numDeriv==1) { ### if (detail==1 ) cat("numDeriv hessian start\n"); ### oout <- 3; ## returns score ### hess <- numDeriv::jacobian(loglike,opt$par) ### if (detail==1 ) cat("numDeriv hessian done\n"); ### } ### hessi <- lava::Inverse(hess); ### ## }}} ### } else if (score.method=="optimize" && ptheta==1) { ## {{{ optimizer ### oout <- 0; ### if (var.link==1) {mino <- -20; maxo <- 10;} else {mino <- 0.001; maxo <- 100;} ### tryCatch(opt <- optimize(loglike,c(mino,maxo))); ### if (detail==1) print(opt); ### opt$par <- opt$minimum ### theta <- opt$par ### if (detail==1 && iid==1) cat("iid decomposition\n"); ### oout <- 2 ### out <- loglike(opt$par) ### logl <- out$loglike ### score1 <- score <- out$score ### hess1 <- hess <- -1* out$Dscore ### if (numDeriv==1) { ### if (detail==1 ) cat("numDeriv hessian start\n"); ### oout <- 3; ## to get jacobian ### hess <- numDeriv::jacobian(loglike,theta) ### if (detail==1 ) cat("numDeriv hessian done\n"); ### } ### hessi <- lava::Inverse(hess); ### if (iid==1) { theta.iid <- out$theta.iid; score.iid <- out$theta.iid } ### ## }}} ### } else if (score.method=="nlm") { ## {{{ nlm optimizer ### iid <- 0; oout <- 0; ### tryCatch(opt <- nlm(loglike,theta,hessian=TRUE,print.level=detail),error=function(x) NA) ### iid <- 1; ### hess <- opt$hessian ### score <- opt$gradient ### if (detail==1) print(opt); ### hessi <- lava::Inverse(hess); ### theta <- opt$estimate ### if (detail==1 && iid==1) cat("iid decomposition\n"); ### oout <- 2 ### out <- loglike(opt$estimate) ### logl <- out$loglike ### score1 <- out$score ### hess1 <- out$Dscore ### if (iid==1) { theta.iid <- out$theta.iid; score.iid <- out$theta.iid } ### ## }}} ### } else stop("score.methods = optimize(dim=1) nlm nlminb fisher.scoring\n"); ### ##### {{{ handling output ### loglikeiid <- NULL ### robvar.theta <- NULL ### likepairs <- NULL ### if (fix.baseline==1) { marginal.surv <- psurvmarg; marginal.trunc <- ptrunc; } else { marginal.surv <- out$marginal.surv; marginal.trunc <- out$marginal.trunc;} ### ### if (iid==1) { ### if (dep.model==3 & pair.structure==1) likepairs <- out$likepairs ### if (dep.model==3 & two.stage==0) {# {{{ ### hessi <- -1*hessi ### all.likepairs <- out$all.likepairs ### colnames(all.likepairs) <- c("surv","dt","ds","dtds","cause1","cause2") ### }# }}} ###### print(crossprod(out$theta.iid) %*% hessi) ### theta.iid <- out$theta.iid %*% hessi ### if (is.null(call.secluster)) rownames(theta.iid) <- unique(cluster.call) else rownames(theta.iid) <- unique(se.clusters) ### robvar.theta <- crossprod(theta.iid) ### loglikeiid <- out$loglikeiid ### } else { all.likepairs <- NULL} ### var.theta <- robvar.theta ### if (is.null(robvar.theta)) var.theta <- hessi ### ### if (!is.null(colnames(theta.des))) thetanames <- colnames(theta.des) else thetanames <- paste("dependence",1:length(theta),sep="") ### theta <- matrix(theta,length(c(theta)),1) ### if (length(thetanames)==nrow(theta)) { rownames(theta) <- thetanames; rownames(var.theta) <- colnames(var.theta) <- thetanames; } ### if (!is.null(logl)) logl <- -1*logl ### ### if (convergence.bp==0) theta <- rep(NA,length(theta)) ### ud <- list(theta=theta,score=score,hess=hess,hessi=hessi,var.theta=var.theta, ### model=model,robvar.theta=robvar.theta, ### theta.iid=theta.iid,loglikeiid=loglikeiid,likepairs=likepairs, ### thetanames=thetanames,loglike=logl,score1=score1,Dscore=out$Dscore, ### marginal.surv=marginal.surv,marginal.trunc=marginal.trunc, ### baseline=out$baseline,se=diag(robvar.theta)^.5, ### score.iid=score.iid) ### class(ud) <- "mets.twostage" ### attr(ud,"response") <- "survival" ### attr(ud,"Formula") <- formula ### attr(ud,"clusters") <- clusters ### attr(ud,"cluster.call") <- cluster.call ### attr(ud,"secluster") <- c(se.clusters) ### attr(ud,"sym")<-sym; ### attr(ud,"var.link")<-var.link; ### attr(ud,"var.par")<-var.par; ### attr(ud,"var.func")<-var.func; ### attr(ud,"ptheta")<-ptheta ### attr(ud,"antpers")<-antpers; ### attr(ud,"antclust")<-antclust; ### attr(ud,"Type") <- model ### attr(ud,"twostage") <- two.stage ### attr(ud,"additive-gamma") <- (dep.model==3)*1 ### if (!is.null(marginal.trunc)) attr(ud,"trunclikeiid")<- out$trunclikeiid ### if (dep.model==3 & two.stage==0) attr(ud,"all.likepairs")<- all.likepairs ### if (dep.model==3 ) attr(ud,"additive.gamma.sum") <- additive.gamma.sum ### #likepairs=likepairs,## if (dep.model==3 & pair.structure==1) attr(ud, "likepairs") <- c(out$likepairs) ### if (dep.model==3 & pair.structure==0) attr(ud, "pardes") <- theta.des ### if (dep.model==3 & pair.structure==0) attr(ud, "theta.des") <- theta.des ### if (dep.model==3 & pair.structure==1) attr(ud, "pardes") <- theta.des[,,1] ### if (dep.model==3 & pair.structure==1) attr(ud, "theta.des") <- theta.des[,,1] ### if (dep.model==3 & pair.structure==0) attr(ud, "rv1") <- random.design[1,] ### if (dep.model==3 & pair.structure==1) attr(ud, "rv1") <- random.design[,,1] ### return(ud); ### ## }}} ### ###} ## }}} ##' @title Twostage survival model fitted by pseudo MLE ##' ##' @description ##' Fits Clayton-Oakes clustered survival data ##' using marginals that are on Cox form in the likelihood for the dependence parameter ##' as in Glidden (2000). The dependence can be modelled via a ##' \enumerate{ ##' \item Regression design on dependence parameter. ##' } ##' ##' We allow a regression structure for the indenpendent gamma distributed ##' random effects and their variances that may depend on cluster covariates. So ##' \deqn{ ##' \theta = h( z_j^T \alpha) ##' } ##' where \eqn{z} is specified by theta.des . The link function can be the exp when var.link=1 ##' @references ##' ##' Measuring early or late dependence for bivariate twin data ##' Scheike, Holst, Hjelmborg (2015), LIDA ##' ##' Twostage modelling of additive gamma frailty models for survival data. ##' Scheike and Holst, working paper ##' ##' Shih and Louis (1995) Inference on the association parameter in copula models for bivariate ##' survival data, Biometrics, (1995). ##' ##' Glidden (2000), A Two-Stage estimator of the dependence ##' parameter for the Clayton Oakes model, LIDA, (2000). ##' ##' @examples ##' data(diabetes) ##' dd <- phreg(Surv(time,status==1)~treat+cluster(id),diabetes) ##' oo <- twostageMLE(dd,data=diabetes) ##' summary(oo) ##' ##' theta.des <- model.matrix(~-1+factor(adult),diabetes) ##' ##' oo <-twostageMLE(dd,data=diabetes,theta.des=theta.des) ##' summary(oo) ##' @keywords survival ##' @author Thomas Scheike ##' @param margsurv Marginal model from phreg ##' @param data data frame ##' @param theta Starting values for variance components ##' @param theta.des design for dependence parameters, when pairs are given this is could be a ##' (pairs) x (numer of parameters) x (max number random effects) matrix ##' @param var.link Link function for variance if 1 then uses exp link ##' @param method type of opitmizer, default is Newton-Raphson "NR" ##' @param no.opt to not optimize, for example to get score and iid for specific theta ##' @param weights cluster specific weights, but given with length equivalent to data-set, weights for score equations ##' @param ... arguments to be passed to optimizer ##' @export twostageMLE <-function(margsurv,data=sys.parent(), theta=NULL,theta.des=NULL,var.link=0,method="NR",no.opt=FALSE,weights=NULL,...) {# {{{ if (class(margsurv)!="phreg") stop("Must use phreg for this \n"); clusters <- margsurv$cox.prep$id n <- nrow(margsurv$cox.prep$X) secluster <- NULL if (is.null(theta.des)==TRUE) ptheta<-1; if (is.null(theta.des)==TRUE) theta.des<-matrix(1,n,ptheta) else theta.des<-as.matrix(theta.des); ptheta<-ncol(theta.des); if (nrow(theta.des)!=n) stop("Theta design does not have correct dim"); if (is.null(theta)==TRUE) { if (var.link==1) theta<- rep(0.0,ptheta); if (var.link==0) theta<- rep(1.0,ptheta); } if (length(theta)!=ptheta) theta<-rep(theta[1],ptheta); theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); max.clust <- length(unique(clusters)) theta.iid <- matrix(0,max.clust,ptheta) xx <- margsurv$cox.prep nn <- length(xx$strata) if (is.null(weights)) weights <- rep(1,nn) if (length(weights)!=nn) stop("Weights do not have right length") statusxx <- rep(0,length(xx$strata)) statusxx[xx$jumps+1] <- 1 xx$status <- statusxx mid <- max(xx$id)+1 ## Ni.(t-), Ni.(t) Nsum <- cumsumstratasum(statusxx,xx$id,mid,type="all") ## Ni.(tau) Ni.tau <- sumstrata(statusxx,xx$id,mid) ## cumahz(T_i-) S0i2 <- S0i <- rep(0, length(xx$strata)) S0i[xx$jumps + 1] <- 1/margsurv$S0 cumhazD <- cumsumstratasum(S0i, xx$strata, xx$nstrata)$lagsum if (!is.null(margsurv$coef)) RR <- exp(xx$X %*% margsurv$coef) else RR <- rep(1,nn) H <- c(cumhazD * RR) cc <- cluster.index(xx$id) firstid <- cc$firstclustid+1 if (max(cc$cluster.size)==1) stop("No clusters !, maxclust size=1\n"); ### order after time-sorted data theta.des <- theta.des[xx$ord+1,,drop=FALSE] weightsid <- weights <- weights[xx$ord+1] ### clusterspecific weights weights <- weights[firstid] ### par <- c(2,2,0.1) ### par <- 2 obj <- function(par,all=FALSE) {# {{{ if (var.link==1) epar <- c(exp(par)) else epar <- c(par) thetaX<- as.matrix(theta.des[firstid,,drop=FALSE]) thetav <- c(as.matrix(theta.des) %*% c(epar)) thetai <-thetav[firstid] Hs <- sumstrata(H*exp(thetav*H),xx$id,mid) R <- sumstrata((exp(thetav*H)-1),xx$id,mid) + 1 H2 <- sumstrata(H^2*exp(thetav*H),xx$id,mid) l1 <- sumstrata(log(1+thetav*Nsum$lagsum)*statusxx,xx$id,mid) l2 <- sumstrata(statusxx*H,xx$id,mid) l3 <- -((thetai)^{-1}+Ni.tau) * log(R) logliid <- (l1 + thetai* l2 + l3)*c(weights) ###cbind(logliid,fit2$loglikeiid,Ni.tau) logl <- sum(logliid) ploglik <- logl ## first derivative l1s <- sumstrata(Nsum$lagsum/(1+thetav*Nsum$lagsum)*statusxx,xx$id,mid) l2s <- (thetai^{-2}) * log(R) l3s <- -(thetai^{-1}+Ni.tau) * Hs / R Dltheta <- (l1s+l2s+l3s+l2)*c(weights) scoreiid <- thetaX* c(Dltheta) ## second derivative D2N <- -sumstrata(Nsum$lagsum^2/(1+thetav*Nsum$lagsum)^2*statusxx,xx$id,mid) Dhes <- c(D2N+(2/thetai^2)*Hs/R-(2/thetai^3)*log(R)-(1/thetai+Ni.tau)*(H2*R-Hs*Hs)/R^2) Dhes <- Dhes * c(weights) if (var.link==1) { scoreiid <- scoreiid * c(exp(par)); Dhes<- Dhes* thetai^2 + thetai * Dltheta } gradient <- apply(scoreiid,2,sum) hessian <- crossprod(thetaX,thetaX*c(Dhes)) hess2 <- crossprod(scoreiid) val <- list(id=xx$id,score.iid=scoreiid,logl.iid=logliid,ploglik=ploglik, gradient=-gradient,hessian=hessian,hess2=hess2) if (all) return(val); with(val, structure(-ploglik,gradient=-gradient,hessian=hessian)) }# }}} opt <- NULL if (no.opt==FALSE) { if (tolower(method)=="nr") { opt <- lava::NR(theta,obj,...) ### opt <- lava::NR(theta,obj) opt$estimate <- opt$par } else { opt <- nlm(obj,theta,...) opt$method <- "nlm" } cc <- opt$estimate; ### names(cc) <- colnames(theta.des) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=theta),obj(theta,all=TRUE)) val$score <- val$gradient theta <- matrix(c(val$coef),length(c(val$coef)),1) if (!is.null(colnames(theta.des))) thetanames <- colnames(theta.des) else thetanames <- paste("dependence",1:length(c(theta)),sep="") if (length(thetanames)==length(c(theta))) { rownames(theta) <- thetanames; rownames(var.theta) <- colnames(var.theta) <- thetanames; } hessianI <- solve(val$hessian) val$theta.iid.naive <- val$score.iid %*% hessianI ### iid due to Marginal model biid <- 1 if (biid==1) { # {{{ if (is.null(margsurv$opt) | is.null(margsurv$coef)) fixbeta<- 1 else fixbeta <- 0 id <- xx$id+1 if (var.link==1) epar <- c(exp(theta)) else epar <- c(theta) thetaX<- as.matrix(theta.des[firstid,,drop=FALSE]) thetav <- c(as.matrix(theta.des) %*% c(epar)) Hs <- c(sumstrata(H*exp(thetav*H),xx$id,mid)) R <- c(sumstrata((exp(thetav*H)-1),xx$id,mid)) + 1 H2 <- c(sumstrata(H^2*exp(thetav*H),xx$id,mid) ) Ft <- ((1/(thetav*R[id]))*exp(thetav*H)-(1/thetav+Ni.tau[id])*(1+thetav*H)*exp(thetav*H)/R[id]+statusxx+(1+thetav*Ni.tau[id])*exp(thetav*H)*Hs[id]/R[id]^2) if (var.link==1) { Ft <- Ft * c(exp(par)); } Gt <- c(RR *Ft * xx$sign * weightsid) Ft <- c( Ft * H * weightsid ) ### oi <- order(id) ###print(round(cbind(id,Ft,thetav,H,R[id],Hs[id],statusxx,Ni.tau[id],xx$X)[oi,],4)) ###print(round(cbind(id,Ft,xx$X,Ft*xx$X)[oi,],4)) ### pit <- revcumsumstrata(Ft* RR* theta.des,xx$strata,xx$nstrata) Gbase <- apply(Gt* theta.des,2,revcumsumstrata,xx$strata,xx$nstrata) Fbeta <- t(theta.des) %*% ( xx$X * Ft ) ### print(c(Gbase)); print(Fbeta) ### beta part if (fixbeta==0) { Z <- xx$X U <- E <- matrix(0,nrow(xx$X),margsurv$p) E[xx$jumps+1,] <- margsurv$E U[xx$jumps+1,] <- margsurv$U invhess <- -solve(margsurv$hessian) S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/margsurv$S0 cumhaz <- c(cumsumstrata(S0i,xx$strata,xx$nstrata)) EdLam0 <- apply(E*S0i,2,cumsumstrata,xx$strata,xx$nstrata) rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) ### Martingale as a function of time and for all subjects to handle strata MGt <- U[,drop=FALSE]-(Z*cumhaz-EdLam0)*rr*c(xx$weights) UUbeta <- apply(MGt,2,sumstrata,id-1,max(id)) UUbeta <- UUbeta %*% invhess GbaseEdLam0 <- t(Gbase) %*% (E*S0i) Fbeta <- Fbeta - GbaseEdLam0 Fbetaiid <- UUbeta %*% t(Fbeta) } ### \int_0^\tau (GBase(s) / S_0(s)) dN_i(s) - dLamba_i(s) xx <- margsurv$cox.prep S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/margsurv$S0 S0i2[xx$jumps+1] <- 1/margsurv$S0^2 GbasedN <- Gbase*S0i GbasedLam0 <- apply(Gbase*S0i2,2,cumsumstrata,xx$strata,xx$nstrata) if (fixbeta==0) rr <- c(xx$sign*exp(Z %*% coef(margsurv) + xx$offset)) else rr <- c(xx$sign*exp( xx$offset)) MGt <- (GbasedN[,drop=FALSE]-GbasedLam0*rr)*c(xx$weights) MGti <- apply(MGt,2,sumstrata,id-1,max(id)) ### if (fixbeta==0) print(cbind(val$score.iid,MGti,Fbetaiid)) else print(cbind(val$score.iid,MGti)) theta.iid <- val$score.iid + MGti if (fixbeta==0) theta.iid <- theta.iid + Fbetaiid theta.iid <- theta.iid %*% hessianI ## take names from phreg call if (!is.null(margsurv$id)) rownames(theta.iid) <- unique(margsurv$id) val$theta.iid <- theta.iid # }}} } var <- robvar.theta <- var.theta <- crossprod(val$theta.iid) naive.var <- crossprod(val$theta.iid.naive) val <- c(val,list(theta=theta,var.theta=var.theta,robvar.theta=robvar.theta, var=var,thetanames=thetanames,model="clayton.oakes", se=diag(robvar.theta)^.5), var.naive=naive.var) class(val) <- "mets.twostage" attr(val,"clusters") <- clusters ### attr(val,"secluster") <- c(se.clusters) attr(val,"var.link")<-var.link; attr(val,"ptheta")<-ptheta attr(val,"n")<-n ; attr(val,"response")<- "survival" attr(val,"additive-gamma")<-0 attr(val,"twostage") <- "two.stage" return(val) }# }}} ##' @title Survival model for multivariate survival data ##' ##' @description ##' Fits additive gamma frailty model ##' with additive hazard condtional on the random effects ##' \deqn{ ##' \lambda_{ij} = (V_{ij}^T Z) (X_{ij}^T \alpha(t)) ##' } ##' The baseline \eqn{\alpha(t)} is profiled out using ##' marginal modelling adjusted for the random effects structure as in Eriksson and Scheike (2015). ##' One advantage of the standard frailty model is that one can deal with competing risks ##' for this model. ##' ##' For all models the ##' standard errors do not reflect this uncertainty of the baseline estimates, and might therefore be a bit to small. ##' To remedy this one can do bootstrapping or use survival.twostage.fullse function when possible. ##' ##' If clusters contain more than two times, we use a composite likelihood ##' based on the pairwise bivariate models. Can also fit a additive gamma random ##' effects model described in detail below. ##' ##' We allow a regression structure for the indenpendent gamma distributed ##' random effects and their variances that may depend on cluster covariates. So ##' \deqn{ ##' \theta = z_j^T \alpha ##' } ##' where \eqn{z} is specified by theta.des ##' The reported standard errors are based on the estimated information from the ##' likelihood assuming that the marginals are known. ##' ##' Can also fit a structured additive gamma random effects model, such ##' as the ACE, ADE model for survival data. ##' ##' Now random.design specificies the random effects for each subject within a cluster. This is ##' a matrix of 1's and 0's with dimension n x d. With d random effects. ##' For a cluster with two subjects, we let the random.design rows be ##' \eqn{v_1} and \eqn{v_2}. ##' Such that the random effects for subject ##' 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect ##' has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. ##' By construction subjects 1's random effect are Gamma distributed with ##' mean \eqn{\lambda_j/v_1^T \lambda} ##' and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect ##' \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. ##' It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed over all clusters ##' as it would be for the ACE model below. ##' The lamtot parameter may be specified separately for some sets of the parameter ##' is the additive.gamma.sum (ags) matrix is specified and then lamtot for the ##' j'th random effect is \eqn{ags_j^T \lambda}. ##' ##' Based on these parameters the relative contribution (the heritability, h) is ##' equivalent to the expected values of the random effects \eqn{\lambda_j/v_1^T \lambda} ##' ##' The DEFAULT parametrization uses the variances of the random effecs ##' \deqn{ ##' \theta_j = \lambda_j/(v_1^T \lambda)^2 ##' } ##' For alternative parametrizations one can specify how the parameters relate to \eqn{\lambda_j} ##' with the function ##' ##' Given the random effects the survival distributions with a cluster are independent and ##' on the form ##' \deqn{ ##' P(T > t| x,z) = exp( -Z A(t) \exp( Z^t beta)) ##' } ##' ##' The parameters \eqn{(\lambda_1,...,\lambda_d)} ##' are related to the parameters of the model ##' by a regression construction \eqn{pard} (d x k), that links the \eqn{d} ##' \eqn{\lambda} parameters ##' with the (k) underlying \eqn{\theta} parameters ##' \deqn{ ##' \lambda = theta.des \theta ##' } ##' here using theta.des to specify these low-dimension association. Default is a diagonal matrix. ##' ##' The case.control option that can be used with the pair specification of the pairwise parts ##' of the estimating equations. Here it is assumed that the second subject of each pair is the ##' proband. ##' @keywords survival ##' @author Thomas Scheike ##' @param margsurv Marginal model ##' @param data data frame ##' @param score.method Scoring method "fisher.scoring", "nlminb", "optimize", "nlm" ##' @param Nit Number of iterations ##' @param detail Detail ##' @param clusters Cluster variable ##' @param silent Debug information ##' @param weights Weights ##' @param control Optimization arguments ##' @param theta Starting values for variance components ##' @param theta.des design for dependence parameters, when pairs are given this is could be a ##' (pairs) x (numer of parameters) x (max number random effects) matrix ##' @param var.link Link function for variance ##' @param iid Calculate i.i.d. decomposition ##' @param step Step size ##' @param model model ##' @param marginal.trunc marginal left truncation probabilities ##' @param marginal.survival optional vector of marginal survival probabilities ##' @param marginal.status related to marginal survival probabilities ##' @param strata strata for fitting, see example ##' @param se.clusters for clusters for se calculation with iid ##' @param max.clust max se.clusters for se calculation with iid ##' @param numDeriv to get numDeriv version of second derivative, otherwise uses sum of squared score ##' @param random.design random effect design for additive gamma model, when pairs are given this is ##' a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below ##' @param pairs matrix with rows of indeces (two-columns) for the pairs considered in the pairwise ##' composite score, useful for case-control sampling when marginal is known. ##' @param pairs.rvs for additive gamma model and random.design and theta.des are given as arrays, ##' this specifice number of random effects for each pair. ##' @param numDeriv.method uses simple to speed up things and second derivative not so important. ##' @param additive.gamma.sum for two.stage=0, this is specification of the lamtot in the models via ##' a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number ##' of theta parameters), when null then sums all parameters. ##' @param var.par is 1 for the default parametrization with the variances of the random effects, ##' var.par=0 specifies that the \eqn{\lambda_j}'s are used as parameters. ##' @param cr.models competing risks models for two.stage=0, should be given as a list with models for each cause ##' @param case.control assumes case control structure for "pairs" with second column being the probands, ##' when this options is used the twostage model is profiled out via the paired estimating equations for the ##' survival model. ##' @param ascertained if the pair are sampled only when there is an event. This is in contrast to ##' case.control sampling where a proband is given. This can be combined with control probands. Pair-call ##' of twostage is needed and second column of pairs are the first jump time with an event for ascertained pairs, ##' or time of control proband. ##' @param shut.up to make the program more silent in the context of iterative procedures for case-control ##' and ascertained sampling ##' @export survival.iterative <- function(margsurv,data=sys.parent(),score.method="fisher.scoring",Nit=60,detail=0,clusters=NULL, silent=1,weights=NULL, control=list(),theta=NULL,theta.des=NULL, var.link=1,iid=1,step=0.5,model="clayton.oakes", marginal.trunc=NULL,marginal.survival=NULL,marginal.status=NULL,strata=NULL, se.clusters=NULL,max.clust=NULL,numDeriv=0,random.design=NULL,pairs=NULL,pairs.rvs=NULL,numDeriv.method="simple", additive.gamma.sum=NULL,var.par=1,cr.models=NULL,case.control=0,ascertained=0,shut.up=0) { ## {{{ ## {{{ seting up design and variables two.stage <- 0; rate.sim <- 1; sym=1; var.func <- NULL if (model=="clayton.oakes" || model=="gamma") dep.model <- 1 else if (model=="plackett" || model=="or") dep.model <- 2 else stop("Model must by either clayton.oakes or plackett \n"); start.time <- NULL; ptrunc <- NULL; psurvmarg <- NULL; status <- NULL fix.baseline <- 0; convergence.bp <- 1; ### to control if baseline profiler converges if ((!is.null(margsurv)) | (!is.null(marginal.survival))) fix.baseline <- 1 if (!is.null(margsurv)) { if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") { ## {{{ formula<-attr(margsurv,"Formula"); beta.fixed <- attr(margsurv,"beta.fixed") if (is.null(beta.fixed)) beta.fixed <- 1; ldata<-aalen.des(formula,data=data,model="cox.aalen"); id <- attr(margsurv,"id"); mclusters <- attr(margsurv,"cluster.call") X<-ldata$X; time<-ldata$time2; Z<-ldata$Z; status<-ldata$status; time2 <- attr(margsurv,"stop"); start.time <- attr(margsurv,"start") antpers<-nrow(X); if (is.null(Z)==TRUE) {npar<-TRUE; semi<-0;} else { Z<-as.matrix(Z); npar<-FALSE; semi<-1;} if (npar==TRUE) {Z<-matrix(0,antpers,1); pz<-1; fixed<-0;} else {fixed<-1;pz<-ncol(Z);} px<-ncol(X); if (is.null(clusters) && is.null(mclusters)) stop("No cluster variabel specified in marginal or twostage call\n"); if (is.null(clusters)) clusters <- mclusters ### else if (sum(abs(clusters-mclusters))>0) ### cat("Warning: Clusters for marginal model different than those specified for two.stage\n"); ### if (!is.null(attr(margsurv,"max.clust"))) ### if ((attr(margsurv,"max.clust")< attr(margsurv,"orig.max.clust")) && (!is.null(mclusters))) ### cat("Warning: Probably want to estimate marginal model with max.clust=NULL\n"); if (nrow(X)!=length(clusters)) stop("Length of Marginal survival data not consistent with cluster length\n"); ## }}} } else { ### coxph ## {{{ notaylor <- 1 antpers <- margsurv$n id <- 0:(antpers-1) mt <- model.frame(margsurv) Y <- model.extract(mt, "response") if (!inherits(Y, "Surv")) stop("Response must be a survival object") if (attr(Y, "type") == "right") { time2 <- Y[, "time"]; status <- Y[, "status"] start.time <- rep(0,antpers); } else { start.time <- Y[, 1]; time2 <- Y[, 2]; status <- Y[, 3]; } ### Z <- na.omit(model.matrix(margsurv)[,-1]) ## Discard intercept Z <- matrix(1,antpers,length(coef(margsurv))); if (is.null(clusters)) stop("must give clusters for coxph\n"); cluster.call <- clusters; X <- matrix(1,antpers,1); ### Z <- matrix(0,antpers,1); ### no use for these px <- 1; pz <- ncol(Z); start <- rep(0,antpers); beta.fixed <- 0 semi <- 1 ### start.time <- 0 } ## }}} } else { start.time<- 0} ###print("00"); print(summary(psurvmarg)); print(summary(ptrunc)) if (any(abs(start.time)>0)) lefttrunk <- 1 else lefttrunk <- 0 if (!is.null(start.time)) { if (any(abs(start.time)>0)) lefttrunk <- 1 else lefttrunk <- 0; } else lefttrunk <- 0 if (!is.null(margsurv)) { if (class(margsurv)=="aalen" || class(margsurv)=="cox.aalen") { ## {{{ resi <- residualsTimereg(margsurv,data=data) RR <- resi$RR psurvmarg <- exp(-resi$cumhaz); ptrunc <- rep(1,length(psurvmarg)); if (lefttrunk==1) ptrunc <- exp(-resi$cumhazleft); } ## }}} else if (class(margsurv)=="coxph") { ## {{{ ### some problems here when data is different from data used in margsurv notaylor <- 1 residuals <- residuals(margsurv) cumhaz <- status-residuals psurvmarg <- exp(-cumhaz); cumhazleft <- rep(0,antpers) ptrunc <- rep(1,length(psurvmarg)); RR<- exp(margsurv$linear.predictors-sum(margsurv$means*coef(margsurv))) if ((lefttrunk==1)) { stop("Use cox.aalen function for truncation case \n"); baseout <- survival::basehaz(margsurv,centered=FALSE); cum <- cbind(baseout$time,baseout$hazard) cum <- Cpred(cum,start.time)[,2] ptrunc <- exp(-cum * RR) } } ## }}} } antpers <- nrow(data); ## mydim(marginal.survival)[1] RR <- rep(1,antpers); if (is.null(psurvmarg)) psurvmarg <- rep(1,antpers); if (!is.null(marginal.survival)) psurvmarg <- marginal.survival if (!is.null(marginal.trunc)) ptrunc <- marginal.trunc if (is.null(ptrunc)) ptrunc <- rep(1,length(psurvmarg)) ### print(summary(psurvmarg)); print(summary(ptrunc)) if (!is.null(marginal.status)) status <- marginal.status if (is.null(status) & is.null(cr.models)) stop("must give status variable for survival via either margninal model (margsurv), marginal.status or as cr.models \n"); if (is.null(weights)==TRUE) weights <- rep(1,antpers); if (is.null(strata)==TRUE) strata<- rep(1,antpers); if (length(strata)!=antpers) stop("Strata must have length equal to number of data points \n"); ## {{{ cluster set up cluster.call <- clusters out.clust <- cluster.index(clusters); clusters <- out.clust$clusters maxclust <- out.clust$maxclust antclust <- out.clust$cluster.size clusterindex <- out.clust$idclust clustsize <- out.clust$cluster.size call.secluster <- se.clusters if (is.null(se.clusters)) { se.clusters <- clusters; antiid <- nrow(clusterindex);} else { iids <- unique(se.clusters); antiid <- length(iids); if (is.numeric(se.clusters)) se.clusters <- fast.approx(iids,se.clusters)-1 else se.clusters <- as.integer(factor(se.clusters, labels = seq(antiid)))-1 } if (length(se.clusters)!=length(clusters)) stop("Length of seclusters and clusters must be same\n"); if ((!is.null(max.clust))) if (max.clust< antiid) { coarse.clust <- TRUE qq <- unique(quantile(se.clusters, probs = seq(0, 1, by = 1/max.clust))) qqc <- cut(se.clusters, breaks = qq, include.lowest = TRUE) se.clusters <- as.integer(qqc)-1 max.clusters <- length(unique(se.clusters)) maxclust <- max.clust antiid <- max.clusters } ## }}} ### pxz <- px + pz; if (!is.null(random.design)) { ### different parameters for Additive random effects # {{{ dep.model <- 3 ### if (is.null(random.design)) random.design <- matrix(1,antpers,1); dim.rv <- ncol(random.design); if (is.null(theta.des)) theta.des<-diag(dim.rv); ### ptheta <- dimpar <- ncol(theta.des); ### if (dim(theta.des)[2]!=ncol(random.design)) ### stop("nrow(theta.des)!= ncol(random.design),\nspecifies restrictions on paramters, if theta.des not given =diag (free)\n"); } else { random.design <- matrix(0,1,1); dim.rv <- 1; additive.gamma.sum <- matrix(1,1,1); } if (is.null(theta.des)) ptheta<-1; if (is.null(theta.des)) theta.des<-matrix(1,antpers,ptheta); ### else theta.des<-as.matrix(theta.des); ### ptheta<-ncol(theta.des); ### if (nrow(theta.des)!=antpers) stop("Theta design does not have correct dim"); if (length(dim(theta.des))==3) ptheta<-dim(theta.des)[2] else if (length(dim(theta.des))==2) ptheta<-ncol(theta.des) if (nrow(theta.des)!=antpers & dep.model!=3 ) stop("Theta design does not have correct dim"); if (length(dim(theta.des))!=3) theta.des <- as.matrix(theta.des) if (is.null(theta)==TRUE) { if (var.link==1) theta<- rep(-0.7,ptheta); if (var.link==0) theta<- rep(exp(-0.7),ptheta); } if (length(theta)!=ptheta) { ### warning("dimensions of theta.des and theta do not match\n"); ### print(theta); theta<-rep(theta[1],ptheta); } theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); if (maxclust==1) stop("No clusters, maxclust size=1\n"); antpairs <- 1; ### to define if (is.null(additive.gamma.sum)) additive.gamma.sum <- matrix(1,dim.rv,ptheta) if (!is.null(pairs)) { pair.structure <- 1;} else pair.structure <- 0; ## ppprint ### print(c(pair.structure,dep.model,fix.baseline)) ### print(head(theta.des)) ### print(c(case.control,ascertained)) if (pair.structure==1 & dep.model==3) { ## {{{ ### something with dimensions of rv.des ### theta.des antpairs <- nrow(pairs); if ( (length(dim(theta.des))!=3) & (length(dim(random.design))==3) ) { Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) for (i in 1:antpairs) Ptheta.des[,,i] <- theta.des theta.des <- Ptheta.des } if ( (length(dim(theta.des))==3) & (length(dim(random.design))!=3) ) { rv.des <- array(0,c(2,ncol(random.design),antpairs)) for (i in 1:antpairs) { rv.des[1,,i] <- random.design[pairs[i,1],] rv.des[2,,i] <- random.design[pairs[i,2],] } random.design <- rv.des } if ( (length(dim(theta.des))!=3) & (length(dim(random.design))!=3) ) { ### print("laver 3-dim design "); Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) rv.des <- array(0,c(2,ncol(random.design),antpairs)) for (i in 1:antpairs) { rv.des[1,,i] <- random.design[pairs[i,1],] rv.des[2,,i] <- random.design[pairs[i,2],] Ptheta.des[,,i] <- theta.des } theta.des <- Ptheta.des random.design <- rv.des } if (max(pairs)>antpers) stop("Indices of pairs should refer to given data \n"); if (is.null(pairs.rvs)) pairs.rvs <- rep(dim(random.design)[2],antpairs) ### if (max(pairs.rvs)> dim(random.design)[3] | max(pairs.rvs)>ncol(theta.des[1,,])) ### stop("random variables for each cluster higher than possible, pair.rvs not consistent with random.design or theta.des\n"); clusterindex <- pairs-1; } ## }}} if (pair.structure==1 & dep.model!=3) { clusterindex <- pairs-1; antpairs <- nrow(pairs); pairs.rvs <- 1 }# }}} ## }}} ### setting up arguments for Aalen baseline profile estimates if (fix.baseline==0) { ## {{{ when baseline is estimated when baseline is estimated if (is.null(cr.models)) stop("give hazard models for different causes, ex cr.models=list(Surv(time,status==1)~+1,Surv(time,status==2)~+1) \n") if (case.control==0 & ascertained==0) { ## {{{ ## {{{ setting up random effects and covariates for marginal modelling timestatus <- all.vars(cr.models[[1]]) times <- data[,timestatus[1]] if (is.null(status)) status <- data[,timestatus[2]] lstatus <- data[,timestatus[2]] ### organize increments according to overall jump-times jumps <- lstatus!=0 dtimes <- times[jumps] st <- order(dtimes) dtimesst <- dtimes[st] dcauses <- lstatus[jumps][st] ids <- (1:nrow(data))[jumps][st] nc <- 0 for (i in 1:length(cr.models)) { a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) X <- a2$X nc <- nc+ncol(X) } dBaalen <- matrix(0,length(dtimes),nc) xjump <- array(0,c(length(cr.models),nc,length(ids))) ## first compute marginal aalen models for all causes a <- list(); da <- list(); for (i in 1:length(cr.models)) { a[[i]] <- aalen(as.formula(cr.models[[i]]),data=data,robust=0,weights=weights) a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) X <- a2$X da[[i]] <- apply(a[[i]]$cum[,-1,drop=FALSE],2,diff) jumpsi <- (1:length(dtimes))[dcauses==i] if (i==1) fp <- 1 indexc <- fp:(fp+ncol(X)-1) dBaalen[jumpsi,indexc] <- da[[i]] xjump[i,indexc,] <- t(X[ids,]) fp <- ncol(X)+1 } ## }}} #### organize subject specific random variables and design ### for additive gamma model ## {{{ dimt <- dim(theta.des[,,1,drop=FALSE])[-3] dimr <- dim(random.design[,,,drop=FALSE]) mtheta.des <- array(0,c(dimt,nrow(data))) mrv.des <- array(0,c(dimr[1]/2,dimr[2],nrow(data))) nrv.des <- rep(0,nrow(data)) nrv.des[pairs[,1]] <- pairs.rvs nrv.des[pairs[,2]] <- pairs.rvs mtheta.des[,,pairs[,1]] <- theta.des mtheta.des[,,pairs[,2]] <- theta.des mrv.des[,,pairs[,1]] <- random.design[1:(dimr[1]/2),,,drop=FALSE] mrv.des[,,pairs[,2]] <- random.design[(dimr[1]/2+1):dimr[1],,,drop=FALSE] ### array thetades to jump times (subjects) mtheta.des <- mtheta.des[,,ids,drop=FALSE] ### array randomdes to jump times (subjects) mrv.des <- mrv.des[,,ids,drop=FALSE] nrv.des <- pairs.rvs[ids] ## }}} ### #### organize subject specific random variables and design ### ### for additive gamma model ### ## {{{ ### dimt <- dim(theta.des[,,1]) ### dimr <- dim(random.design[,,]) ### mtheta.des <- array(0,c(dimt,nrow(data))) ### mrv.des <- array(0,c(dimr[1]/2,dimr[2],nrow(data))) ### mtheta.des[,,pairs[,1]] <- theta.des ### mtheta.des[,,pairs[,2]] <- theta.des ### mrv.des[,,pairs[,1]] <- random.design[1:(dimr[1]/2),,,drop=FALSE] ### mrv.des[,,pairs[,2]] <- random.design[(dimr[1]/2+1):dimr[1],,,drop=FALSE] ### nrv.des <- rep(0,nrow(data)) ### nrv.des[pairs[,1]] <- pairs.rvs ### nrv.des[pairs[,2]] <- pairs.rvs ### ### array thetades to jump times (subjects) ### mtheta.des <- mtheta.des[,,ids,drop=FALSE] ### ### array randomdes to jump times (subjects) ### mrv.des <- mrv.des[,,ids,drop=FALSE] ### nrv.des <- pairs.rvs[ids] ### ## }}} } ## }}} if (case.control==1 || ascertained==1) { ## {{{ ### print(dim(data)); print(summary(pairs)) data1 <- data[pairs[,1],] data.proband <- data[pairs[,2],] weights1 <- weights[pairs[,1]] ### print(summary(data.proband)); print(summary(data1)) ## {{{ setting up designs for jump times timestatus <- all.vars(cr.models[[1]]) if (is.null(status)) status <- data[,timestatus[2]] alltimes <- data[,timestatus[1]] times <- data1[,timestatus[1]] lstatus <- data1[,timestatus[2]] timescase <- data.proband[,timestatus[1]] lstatuscase <- data.proband[,timestatus[2]] ### organize increments according to overall jump-times jumps <- lstatus!=0 dtimes <- times[jumps] dtimescase <- timescase[jumps] st <- order(dtimes) dtimesst <- dtimes[st] dtimesstcase <- dtimescase[st] dcauses <- lstatus[jumps][st] dcausescase <- lstatuscase[jumps][st] ids <- (1:nrow(data1))[jumps][st] ### ### delayed entry for case because of ascertained sampling ### controls are however control probands, and have entry=0 entry <- timescase*lstatuscase data1$entry <- entry cr.models2 <- list() if (ascertained==1) { for (i in 1:length(cr.models)) { cr.models2[[i]] <- update(cr.models[[i]],as.formula(paste("Surv(entry,",timestatus[1],",",timestatus[2],")~.",sep=""))) } } else cr.models2 <- cr.models nc <- 0 for (i in 1:length(cr.models)) { X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X nc <- nc+ncol(X) } dBaalen <- matrix(0,length(dtimes),nc) xjump <- array(0,c(length(cr.models),nc,length(ids))) xjumpcase <- array(0,c(length(cr.models),nc,length(ids))) ## first compute marginal aalen models for all causes a <- list(); da <- list(); ### starting values for iteration Bit <- Bitcase <- c() for (i in 1:length(cr.models)) { ## {{{ a[[i]] <- aalen(as.formula(cr.models2[[i]]),data=data1,robust=0,weights=weights1) da[[i]] <- apply(a[[i]]$cum[,-1,drop=FALSE],2,diff) jumpsi <- (1:length(dtimes))[dcauses==i] X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X Xcase <- aalen.des(as.formula(cr.models[[i]]),data=data.proband)$X if (i==1) fp <- 1 indexc <- fp:(fp+ncol(X)-1) dBaalen[jumpsi,indexc] <- da[[i]] xjump[i,indexc,] <- t(X[ids,]) xjumpcase[i,indexc,] <- t(Xcase[ids,]) fp <- fp+ncol(X) ### starting values Bit <- cbind(Bit,Cpred(a[[i]]$cum,dtimesst)[,-1,drop=FALSE]) } ## }}} Bit.ini <- Bit ## }}} #### organize subject specific random variables and design #### already done in basic pairwise setup mtheta.des <- theta.des[,,ids,drop=FALSE] ### array randomdes to jump times (subjects) mrv.des <- random.design[,,ids,drop=FALSE] nrv.des <- pairs.rvs[ids] } ## }}} } else { mrv.des <- array(0,c(1,1,1)); mtheta.des <- array(0,c(1,1,1)); margthetades <- array(0,c(1,1,1)); xjump <- array(0,c(1,1,1)); dBaalen <- matrix(0,1,1); nrv.des <- 3 } ## }}} loglike <- function(par) { ## {{{ if (pair.structure==0 | dep.model!=3) Xtheta <- as.matrix(theta.des) %*% matrix(c(par),nrow=ptheta,ncol=1); if (pair.structure==1 & dep.model==3) Xtheta <- matrix(0,antpers,1); ## not needed DXtheta <- array(0,c(1,1,1)); if (var.link==1 & dep.model==3) epar <- c(exp(par)) else epar <- c(par) partheta <- epar if (var.par==1 & dep.model==3) { ## from variances to if (is.null(var.func)) { sp <- sum(epar) partheta <- epar/sp^2 } else partheta <- epar ## par.func(epar) } if (pair.structure==0) { outl<-.Call("twostageloglikeRV", ## {{{ only two stage model for this option icause=status,ipmargsurv=psurvmarg, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, irvdes=random.design,iags=additive.gamma.sum,iascertained=ascertained, PACKAGE="mets") ## }}} } else { ## pair-structure ## twostage model, case.control option, profile out baseline ## conditional model, case.control option, profile out baseline if (two.stage==1) { ## {{{ two-stage model if (fix.baseline==0) ## if baseline is not given { cum1 <- cbind(dtimesst,Bit) if ( (case.control==1 || ascertained==1) & (convergence.bp==1)) { ## {{{ profiles out baseline under case-control/ascertainment sampling ### ## initial values , only one cr.model for survival ### Bit <- cbind(Cpred(a[[1]]$cum,dtimesst)[,-1]) if (detail>1) plot(dtimesst,Bit,type="l",main="Bit") if (ncol(Bit)==0) Bit <- Bit.ini Bitcase <- Cpred(cbind(dtimesst,Bit),dtimesstcase)[,-1,drop=FALSE] Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X for (j in 1:5) { ## {{{ profile via iteration cncc <- .Call("BhatAddGamCC",1,dBaalen,dcauses,dim(xjump),xjump, c(partheta),dim(mtheta.des),mtheta.des,additive.gamma.sum,var.link, dim(mrv.des),mrv.des,nrv.des,1,Bit,Bitcase,dcausescase,PACKAGE="mets") d <- max(abs(Bit-cncc$B)) if (detail>1) print(d) Bit <- cncc$B ### if (detail>1) print(c(par,epar,partheta)); ### if (detail>1) print(summary(Bit)); if (detail>1) print(summary(cncc$caseweights)) cum1 <- cbind(dtimesst,cncc$B) Bitcase <-cbind(Cpred(cum1,dtimesstcase)[,-1]) ### if (detail>1) print(summary(Bitcase)) if (detail>1) lines(dtimesst,Bit,col=j+1); if (is.na(d)) { if (shut.up==0) cat("Baseline profiler gives missing values\n"); Bit <- Bit.ini; cum1 <- cbind(dtimesst,Bit); convergence.bp <<- 0; break; } Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X if (d<0.00001) break; } ## }}} nulrow <- rep(0,ncol(Bit)+1) pbases <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),alltimes)[,-1,drop=FALSE] X <- aalen.des(as.formula(cr.models[[1]]),data=data)$X psurvmarg <- exp(-apply(X*pbases,1,sum)) ## psurv given baseline if (ascertained==1) { Xcase <- aalen.des(as.formula(cr.models[[1]]),data=data.proband)$X X <- aalen.des(as.formula(cr.models[[1]]),data=data1)$X pba.case <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),entry)[,-1,drop=FALSE] ptrunc <- rep(0,nrow(data)) ### for control probands ptrunc=1, thus no adjustment ptrunc[pairs[,1]] <- exp(-apply(X* pba.case,1,sum)*lstatuscase) ## delayed entry at time of ascertainment proband ptrunc[pairs[,2]] <- exp(-apply(Xcase*pba.case,1,sum)*lstatuscase) } ### print(head(cbind(psurvmarg,ptrunc))) ### print(summary(psurvmarg)) ### print(summary(ptrunc)) ### print(dim(pbases)); } ## }}} } ### browser() ### print(dim(random.design)) outl<-.Call("twostageloglikeRVpairs", ## {{{ icause=status,ipmargsurv=psurvmarg, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, irvdes=random.design, idimthetades=dim(theta.des),idimrvdes=dim(random.design),irvs=pairs.rvs,iags=additive.gamma.sum, iascertained=ascertained,PACKAGE="mets") ## }}} if (fix.baseline==0) { outl$baseline <- cum1; outl$marginal.surv <- psurvmarg; outl$marginal.trunc <- ptrunc } } ## }}} else { ## {{{ survival model two.stage==0 ### cum1 <- cbind(dtimesst,Bit) entry.cause <- rep(0,nrow(data)) ### proband.time <- rep(0,nrow(data)) ### update aalen type baseline if (fix.baseline==0) { ## {{{ if ((case.control==1 || ascertained==1) & (convergence.bp==1)) { ## {{{ profiles out baseline under case-control/ascertainment sampling if (detail>1) print(summary(Bit)) if (detail>1) matplot(dtimesst,Bit,type="l",main="Bit",ylim=c(0,2)) if (ncol(Bit)==0) Bit <- Bit.ini Bitcase <- Cpred(cbind(dtimesst,Bit),dtimesstcase)[,-1,drop=FALSE] Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X for (j in 1:10) { ## {{{ profile via iteration profile.baseline <- .Call("BhatAddGamCC",0,dBaalen,dcauses,dim(xjump),xjump, c(partheta), dim(mtheta.des),mtheta.des, additive.gamma.sum,var.link, dim(mrv.des),mrv.des,nrv.des,1,Bit,Bitcase,dcausescase,PACKAGE="mets") d <- max(abs(Bit-profile.baseline$B)) Bit <- profile.baseline$B cum1 <- cbind(dtimesst,Bit) Bitcase <-cbind(Cpred(cum1,dtimesstcase)[,-1]) ### matlines(dtimesst,Bit,type="l",col=j+1) if (detail>1) matlines(dtimesst,Bit,col=j+1); if (is.na(d)) { if (shut.up==0) cat("Baseline profiler gives missing values\n"); Bit <- Bit.ini; cum1 <- cbind(dtimesst,Bit); convergence.bp <<- 0; break; } Bitcase <- .Call("MatxCube",Bitcase,dim(xjumpcase),xjumpcase,PACKAGE="mets")$X if (d<0.00001) break; } ## }}} ### print("profile slut"); ### plot(cum1); abline(c(0,1)) ### makes cumulative hazard for all subjects nulrow <- rep(0,ncol(Bit)+1) pbases <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),alltimes)[,-1,drop=FALSE] psurvmarg <- c() ### update psurvmarg if (ascertained==1 || case.control==1) { ### sets up truncation probabilities to match situation pbase.case <- Cpred(rbind(nulrow,cbind(dtimesst,Bit)),timescase)[,-1,drop=FALSE] ptrunc <- c() ### update ptrunc } for (i in 1:length(cr.models)) { if (i==1) fp <- 1 a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) X <- a2$X indexc <- fp:(fp+ncol(X)-1) psurvmarg <- cbind(psurvmarg,apply(X*pbases[,indexc],1,sum)) if (ascertained==1 || case.control==1) { Xcase <- aalen.des(as.formula(cr.models[[i]]),data=data.proband)$X X <- aalen.des(as.formula(cr.models[[i]]),data=data1)$X ### print(dim(Xcase)); print(dim(pbase.case[,indexc,drop=FALSE])) ptrunc.new <- rep(0,length(alltimes)) ## delayed entry at time of ascertainment proband, for case control no adjustment for first if (ascertained==1) ptrunc.new[pairs[,1]] <- apply(X*pbase.case[,indexc,drop=FALSE],1,sum)*lstatuscase else ptrunc.new[pairs[,1]] <- 0 ## for second component adjustment for marginal or ascertainment ptrunc.new[pairs[,2]] <- apply(Xcase*pbase.case[,indexc,drop=FALSE],1,sum) ptrunc <- cbind(ptrunc,ptrunc.new) } fp <- fp+ncol(X) } } ## }}} else { ## {{{ profile out baseline, recursive estimator profile.baseline <- .Call("BhatAddGam",recursive=1, dBaalen,dcauses,dim(xjump),xjump,c(partheta), dim(mtheta.des),mtheta.des, additive.gamma.sum,0,dim(mrv.des),mrv.des,0,matrix(0,1,1),PACKAGE="mets") ### print(summary(cbind(dtimesst,profile.baseline$B))) ### matplot(dtimesst,profile.baseline$B,type="l") ### print(head(profile.baseline$B)) ### abline(c(0,0.2),col=3) ### abline(c(0,0.4),col=3) marg.model <- "no-cox" if (marg.model=="cox") {# {{{ Bit <- profile.baseline$B Bit <- .Call("MatxCube",Bit,dim(xjump),xjump,PACKAGE="mets")$X caseweights <- profile.baseline$caseweights pp <- timereg.formula(as.formula(cr.models[[i]])) profile.cox <- cox.aalen(pp,data=data,robust=0,caseweight=caseweights) print(summary(profile.cox)) plot(profile.cox) }# }}} nulrow <- rep(0,ncol(dBaalen)+1) pbases <- Cpred(rbind(nulrow,cbind(dtimesst,profile.baseline$B)),times)[,-1,drop=FALSE] psurvmarg <- c() for (i in 1:length(cr.models)) { if (i==1) fp <- 1 a2 <- aalen.des(as.formula(cr.models[[i]]),data=data) X <- a2$X indexc <- fp:(fp+ncol(X)-1) psurvmarg <- cbind(psurvmarg,apply(X*pbases[,indexc],1,sum)) fp <- fp+ncol(X) } ### no truncation in this case ? ptrunc <- 0*psurvmarg } ## }}} } ## }}} ### if (fix.baseline==1) if (is.null(psurvmarg)) stop("must provide baselines or set fix.baseline=0\n"); ### print("er vi her surv "); ### print(fix.baseline) ### print(dim(as.matrix(psurvmarg))); print(dim(as.matrix(ptrunc))) ### print(dim(pairs)) ### print(head(pairs)) ### print(summary(psurvmarg[pairs,])); print(summary(ptrunc[pairs,])) ### cumulative hazard for this model when fix.baseline==1 if (fix.baseline==1 ) { psurvmarg <- -log(psurvmarg); ptrunc <- -log(ptrunc); } outl<-.Call("survivalloglikeRVpairs",icause=status,ipmargsurv=as.matrix(psurvmarg), itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=as.matrix(ptrunc),istrata=as.numeric(strata),iseclusters=se.clusters,iantiid=antiid, irvdes=random.design, idimthetades=dim(theta.des),idimrvdes=dim(random.design), irvs=pairs.rvs,iags=additive.gamma.sum,ientry.cause=entry.cause,iascertained=(ascertained+case.control>0)*1, PACKAGE="mets") if (fix.baseline==0) { outl$baseline <- cbind(dtimesst,profile.baseline$B); outl$marginal.surv <- psurvmarg; outl$marginal.trunc <- ptrunc } } ## }}} } if (detail==3) print(c(partheta,outl$loglike)) ## variance parametrization, and inverse.link if (dep.model==3) {# {{{ if (var.par==1) { ## from variances to and with sum for all random effects if (is.null(var.func)) { if (var.link==0) { ### print(c(sp,epar)) mm <- matrix(-epar*2*sp,length(epar),length(epar)) diag(mm) <- sp^2-epar*2*sp ### print(mm) } else { mm <- -c(epar) %o% c(epar)*2*sp diag(mm) <- epar*sp^2-epar^2*2*sp ### print(mm) } mm <- mm/sp^4 } else mm <- numDeriv::hessian(var.func,par) } else { if (var.link==0) mm <- diag(length(epar)) else mm <- diag(length(c(epar)))*c(epar) } }# }}} ### print(c(var.link,dep.model,var.par)) ### print("hh"); print(mm); print(outl$score) if (dep.model==3) {# {{{ ### print(dim(mm)) outl$score <- t(mm) %*% outl$score outl$Dscore <- t(mm) %*% outl$Dscore %*% mm if (iid==1) outl$theta.iid <- t(t(mm) %*% t(outl$theta.iid)) ### print(crossprod(outl$theta.iid)); print(outl$Dscore) ### print(c(outl$score)) ### print(apply(outl$theta.iid,2,sum)) }# }}} attr(outl,"gradient") <-outl$score if (oout==0) ret <- c(-1*outl$loglike) else if (oout==1) ret <- sum(outl$score^2) else if (oout==2) ret <- outl else ret <- outl$score return(ret) } ## }}} if (score.method=="optimize" && ptheta!=1) { cat("optimize only works for d==1, score.mehod set to nlminb \n"); score.method <- "nlminb"; } score1 <- NULL theta.iid <- NULL logl <- NULL p <- theta if (score.method=="fisher.scoring") { ## {{{ oout <- 2; ### output control for obj if (Nit>0) for (i in 1:Nit) { out <- loglike(p) ## updating starting values for cumulative baselines if (fix.baseline==0) Bit <- out$baseline[,-1,drop=FALSE] if (fix.baseline==1) hess <- out$Dscore ### uses simple second derivative for computing derivative of score if (numDeriv==2 || (((fix.baseline==0)) & (i==1))) { oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") oout <- 2 } if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- hess if (detail==1) {## {{{ cat(paste("Fisher-Scoring ===================: it=",i,"\n")); cat("theta:");print(c(theta)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(hess,"\n"); }## }}} delta <- step*( hessi %*% out$score ) ### update p, but note that score and derivative in fact related to previous p ### unless Nit=0, if (Nit>0) { p <- p - delta theta <- p; } if (is.nan(sum(out$score))) break; if (sum(abs(out$score))<0.00001) break; if (max(theta)>20 & var.link==1) { cat("theta too large lacking convergence \n"); break; } } if (!is.nan(sum(p))) { if (detail==1 && iid==1) cat("iid decomposition\n"); out <- loglike(p) logl <- out$loglike score1 <- score <- out$score oout <- 0; hess1 <- hess <- -1*out$Dscore if (iid==1) { theta.iid <- out$theta.iid if (class(margsurv)=="phreg") { ## {{{ ## order after time D1dltheta1 <- out$D1dltheta1[xx$order+1,] D2dltheta1 <- out$D1dltheta1[xx$order+1,] ### baseline iid xx <- margsurv$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/margsurv$S0 rr <- exp(margsurv$cox.prep$X %*% margsurv$coef) cumhazt <- cumsumstratasum(S0i,xx$strata,xx$nstrata)$lagsum psurvmarg <- exp(-cumhazt*rr) } ## }}} } if (detail==1 && iid==1) cat("finished iid decomposition\n"); ### for profile solutions update second derivative at final if (numDeriv==2 || ((fix.baseline==0))) { oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") oout <- 2 } } if (numDeriv>=1) { if (detail==1 ) cat("starting numDeriv for second derivative \n"); oout <- 0; score2 <- numDeriv::jacobian(loglike,p) score1 <- matrix(score2,ncol=1) oout <- 3 hess <- numDeriv::jacobian(loglike,p,method="simple") if (detail==1 ) cat("finished numDeriv for second derivative \n"); } if (detail==1 & Nit==0) {## {{{ cat(paste("Fisher-Scoring ===================: final","\n")); cat("theta:");print(c(p)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(hess,"\n"); }## }}} if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- diag(nrow(hess)) ## }}} } else if (score.method=="nlminb") { ## {{{ nlminb optimizer oout <- 0; if (two.stage==0) oout <- 1 ## score tryCatch(opt <- nlminb(theta,loglike,control=control),error=function(x) NA) if (detail==1) print(opt); if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 theta <- opt$par out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- -1* out$Dscore if (iid==1) theta.iid <- out$theta.iid if (numDeriv==1) { if (detail==1 ) cat("numDeriv hessian start\n"); oout <- 3; ## returns score hess <- numDeriv::jacobian(loglike,opt$par) if (detail==1 ) cat("numDeriv hessian done\n"); } hessi <- lava::Inverse(hess); ## }}} } else if (score.method=="optimize" && ptheta==1) { ## {{{ optimizer oout <- 0; if (var.link==1) {mino <- -20; maxo <- 10;} else {mino <- 0.001; maxo <- 100;} tryCatch(opt <- optimize(loglike,c(mino,maxo))); if (detail==1) print(opt); opt$par <- opt$minimum theta <- opt$par if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- -1* out$Dscore if (numDeriv==1) { if (detail==1 ) cat("numDeriv hessian start\n"); oout <- 3; ## to get jacobian hess <- numDeriv::jacobian(loglike,theta) if (detail==1 ) cat("numDeriv hessian done\n"); } hessi <- lava::Inverse(hess); if (iid==1) theta.iid <- out$theta.iid ## }}} } else if (score.method=="nlm") { ## {{{ nlm optimizer iid <- 0; oout <- 0; tryCatch(opt <- nlm(loglike,theta,hessian=TRUE,print.level=detail),error=function(x) NA) iid <- 1; hess <- opt$hessian score <- opt$gradient if (detail==1) print(opt); hessi <- lava::Inverse(hess); theta <- opt$estimate if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$estimate) logl <- out$loglike score1 <- out$score hess1 <- out$Dscore if (iid==1) theta.iid <- out$theta.iid ## }}} } else stop("score.methods = optimize(dim=1) nlm nlminb fisher.scoring\n"); ## {{{ handling output loglikeiid <- NULL robvar.theta <- NULL likepairs <- NULL if (fix.baseline==1) { marginal.surv <- psurvmarg; marginal.trunc <- ptrunc; } else { marginal.surv <- out$marginal.surv; marginal.trunc <- out$marginal.trunc;} if (iid==1) { if (dep.model==3 & pair.structure==1) likepairs <- out$likepairs if (dep.model==3 & two.stage==0) { hessi <- -1*hessi all.likepairs <- out$all.likepairs colnames(all.likepairs) <- c("surv","dt","ds","dtds","cause1","cause2") } ### print(crossprod(out$theta.iid) %*% hessi) theta.iid <- out$theta.iid %*% hessi if (is.null(call.secluster) & is.null(max.clust)) rownames(theta.iid) <- unique(cluster.call) else rownames(theta.iid) <- unique(se.clusters) robvar.theta <- crossprod(theta.iid) loglikeiid <- out$loglikeiid } else { all.likepairs <- NULL} var.theta <- robvar.theta if (is.null(robvar.theta)) var.theta <- hessi if (!is.null(colnames(theta.des))) thetanames <- colnames(theta.des) else thetanames <- paste("dependence",1:length(theta),sep="") theta <- matrix(theta,length(c(theta)),1) if (length(thetanames)==nrow(theta)) { rownames(theta) <- thetanames; rownames(var.theta) <- colnames(var.theta) <- thetanames; } if (!is.null(logl)) logl <- -1*logl if (convergence.bp==0) theta <- rep(NA,length(theta)) ud <- list(theta=theta,score=score,hess=hess,hessi=hessi,var.theta=var.theta,model=model,robvar.theta=robvar.theta, theta.iid=theta.iid,loglikeiid=loglikeiid,likepairs=likepairs, thetanames=thetanames,loglike=logl,score1=score1,Dscore=out$Dscore, marginal.surv=marginal.surv,marginal.trunc=marginal.trunc,baseline=out$baseline, se=diag(robvar.theta)^.5) class(ud) <- "mets.twostage" attr(ud,"response") <- "survival" attr(ud,"Formula") <- formula attr(ud,"clusters") <- clusters attr(ud,"cluster.call") <- cluster.call attr(ud,"secluster") <- c(se.clusters) attr(ud,"sym")<-sym; attr(ud,"var.link")<-var.link; attr(ud,"var.par")<-var.par; attr(ud,"var.func")<-var.func; attr(ud,"ptheta")<-ptheta attr(ud,"antpers")<-antpers; attr(ud,"antclust")<-antclust; attr(ud,"Type") <- model attr(ud,"twostage") <- two.stage attr(ud,"additive-gamma") <- (dep.model==3)*1 if (!is.null(marginal.trunc)) attr(ud,"trunclikeiid")<- out$trunclikeiid if (dep.model==3 & two.stage==0) attr(ud,"all.likepairs")<- all.likepairs if (dep.model==3 ) attr(ud,"additive.gamma.sum") <- additive.gamma.sum #likepairs=likepairs,## if (dep.model==3 & pair.structure==1) attr(ud, "likepairs") <- c(out$likepairs) if (dep.model==3 & pair.structure==0) attr(ud, "pardes") <- theta.des if (dep.model==3 & pair.structure==0) attr(ud, "theta.des") <- theta.des if (dep.model==3 & pair.structure==1) attr(ud, "pardes") <- theta.des[,,1] if (dep.model==3 & pair.structure==1) attr(ud, "theta.des") <- theta.des[,,1] if (dep.model==3 & pair.structure==0) attr(ud, "rv1") <- random.design[1,] if (dep.model==3 & pair.structure==1) attr(ud, "rv1") <- random.design[,,1] return(ud); ## }}} } ## }}} ##' @export summary.mets.twostage <- function(object,digits = 3,silent=0,...) { ## {{{ if (!(inherits(object,"mets.twostage"))) stop("Must be a Two-Stage object") var.link<-attr(object,"var.link"); var.par <- attr(object,"var.par"); model <- object$model if ((model=="plackett" || model=="or") ) model <- "or" if ((model=="clayton.oakes" || model=="gamma") ) model <- "gamma" if ((attr(object,"additive-gamma")==1) & (silent==0)) addgam <- TRUE else addgam <- FALSE if ((model=="or") && (silent==0)) cat("Dependence parameter for Odds-Ratio (Plackett) model \n"); if (attr(object,"response")=="binomial") response <- "binomial" else response <- "survival" if ((model=="gamma") && (silent==0)) { cat("Dependence parameter for Clayton-Oakes model\n") if (var.par==1 || !addgam) cat("Variance of Gamma distributed random effects \n"); if (var.par==0 && addgam) cat("Inverse of variance of Gamma distributed random effects \n"); } if (var.link==1 && silent==0) cat("With log-link \n") if ((sum(abs(object$score))>0.0001) & (silent==0)) { cat(" Variance parameters did not converge, allow more iterations.\n"); cat(paste(" Score:",object$score," \n")); } theta <- object$theta if (is.null(rownames(theta))) rownames(theta) <- paste("dependence",1:nrow(theta),sep="") ### print(theta) coefs <- coef.mets.twostage(object,response=response,...); if (attr(object,"additive-gamma")==1 & (!is.null(object$robvar.theta)) ) { var.link <- attr(object,"var.link"); var.par <- attr(object,"var.par"); rv1 <- attr(object,"rv1"); if (is.matrix(rv1)) rv1 <- rv1[1,] theta.des <- attr(object,"pardes"); ags <- attr(object,"additive.gamma.sum"); ptheta <- attr(object,"ptheta") npar <- nrow(object$theta) theta <- object$theta[seq(1,ptheta),1,drop=FALSE] ### print(theta.des); print(theta); print(theta.des %*% theta); print(rv1); robvar.theta <- object$robvar.theta[seq(1,ptheta),seq(1,ptheta)] if (var.link==1) par <- theta.des %*% exp(theta) else par <- theta.des %*% theta if (model=="or" || model=="plackett") var.par<-1 ## same as var.par=0 for this model if (attr(object,"twostage")==0) { ### cat("MLE estimates of marginal parameters\n"); ### var.gamma <- object$robvar.theta[seq(ptheta+1,npar),seq(ptheta+1,npar)] ### obj.marginal <- list(gamma=object$theta[seq(ptheta+1,npar),1],var.gamma=var.gamma,robvar.gamma=var.gamma) ### marginal <- coefBase(obj.marginal) } if (var.par==0) { ## {{{ if (var.link==1) { fp <- function(p,d,t){ res <- exp(p*t)/(sum(rv1* c(theta.des %*% matrix(exp(p),ncol=1))))^d; if (t==0) res <- res[1]; return(res); } pare <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) exp(p),labels=rownames(theta)) } else { fp <- function(p,d,t) { res <- (p^t)/(sum(rv1* c(theta.des %*% matrix(p,ncol=1))))^d; if (t==0) res <- res[1]; return(res); } pare <- NULL } e <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,1,1),labels=rownames(theta)) vare <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,2,1),labels=rownames(theta)) vartot <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,1,0)) } ## }}} if (var.par==1) { ## {{{ if (var.link==1) { ## {{{ fp <- function(p,d,t){ res <- exp(p*t)/(sum(rv1* c(theta.des %*% matrix(exp(p),ncol=1))))^d; if (t==0) res <- res[1]; return(res); } e <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,1,1),labels=rownames(theta)) vare <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) exp(p),labels=rownames(theta)) vartot <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) sum(exp(p))) ### names(e) <- names(vare) <- colnames(coefs) } else { fp <- function(p,d,t) { res <- (p^t)/(sum(rv1* c(theta.des %*% matrix(p,ncol=1))))^d; if (t==0) res <- res[1]; return(res); } e <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,1,1),labels=rownames(theta)) pare <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) fp(p,2,1),labels=rownames(theta)) vartot <- lava::estimate(coef=theta,vcov=robvar.theta,f=function(p) sum(p)) vare <- NULL ### names(e) <- names(pare) <- colnames(coefs) } ## }}} } ## }}} res <- list(estimates=coefs, type=attr(object,"Type"),h=e,vare=vare,vartot=vartot) } else { if (var.link==1) { ## {{{ if (model=="or") { or <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) exp(p),labels=rownames(theta)) res <- list(estimates=coefs,or=or,type=attr(object,"Type")) } else { vargam <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) exp(p),labels=rownames(theta)) ### names(vargam) <- colnames(coefs) res <- list(estimates=coefs,vargam=vargam, type=attr(object,"Type")) } } else { if (model=="or") { lor <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) log(p),labels=rownames(theta)) ### names(lor) <- colnames(coefs) res <- list(estimates=coefs,log.or=lor,type=attr(object,"Type")) } else { res <- list(estimates=coefs,type=attr(object,"Type")) } } ## }}} } ### if (attr(object,"twostage")==0) res <- c(res,list(marginal=marginal)) class(res) <- "summary.mets.twostage" res } ## }}} ##' @export coef.mets.twostage <- function(object,var.link=NULL,response="survival",...) { ## {{{ pt <- attr(object,"ptheta") theta <- object$theta[seq(pt),1] if (is.null(object$robvar.theta)) var.theta <- object$var.theta[seq(1,pt),seq(1,pt),drop=FALSE] else var.theta <- object$robvar.theta[seq(1,pt),seq(1,pt),drop=FALSE] se <- diag(var.theta)^.5 if (is.null(var.link)) if (attr(object,"var.link")==1) vlink <- 1 else vlink <- 0 else vlink <- var.link res <- cbind(theta, se ) wald <- theta/se waldp <- (1 - pnorm(abs(wald))) * 2 if (response=="survival") { if (object$model=="plackett") { spearman <- alpha2spear(theta,link=vlink) Dspear <- numDeriv::jacobian(alpha2spear,theta,link=vlink) var.spearman <- Dspear %*% var.theta %*% Dspear se.spearman <- diag(var.spearman)^.5 res <- as.matrix(cbind(res, wald, waldp,spearman,se.spearman)) if (vlink==1) colnames(res) <- c("log-Coef.", "SE","z", "P-val","Spearman Corr.","SE") else colnames(res) <- c("Coef.", "SE","z", "P-val","Spearman Corr.","SE") if ((!is.null(object$thetanames)) & (nrow(res)==length(object$thetanames))) rownames(res)<-object$thetanames } if (object$model=="clayton.oakes") { kendall <- alpha2kendall(theta,link=vlink) Dken <- numDeriv::jacobian(alpha2kendall,theta,link=vlink) var.kendall<- Dken %*% var.theta %*% Dken se.kendall <- diag(var.kendall)^.5 res <- as.matrix(cbind(res, wald, waldp,kendall,se.kendall)) if (vlink==1) colnames(res) <- c("log-Coef.", "SE","z", "P-val","Kendall tau","SE") else colnames(res) <- c("Coef.", "SE","z", "P-val","Kendall tau","SE") if ((!is.null(object$thetanames)) & (nrow(res)==length(object$thetanames))) rownames(res)<-object$thetanames } } return(res) } ## }}} ##' @export print.mets.twostage<-function(x,digits=3,...) { ## {{{ ### print(x$call); cat("\n") print(summary(x,silent=0)); } ## }}} ##' @export plot.mets.twostage<-function(x,pointwise.ci=1,robust=0,specific.comps=FALSE, level=0.05, start.time=0,stop.time=0,add.to.plot=FALSE,mains=TRUE, xlab="Time",ylab ="Cumulative regression function",...) { ## {{{ if (!(inherits(x, 'two.stage'))) stop("Must be a Two-Stage object") object <- x; rm(x); B<-object$cum; V<-object$var.cum; p<-dim(B)[[2]]; if (robust>=1) V<-object$robvar.cum; if (sum(specific.comps)==FALSE) comp<-2:p else comp<-specific.comps+1 if (stop.time==0) stop.time<-max(B[,1]); med<-B[,1]<=stop.time & B[,1]>=start.time B<-B[med,]; Bs<-B[1,]; B<-t(t(B)-Bs); B[,1]<-B[,1]+Bs[1]; V<-V[med,]; Vs<-V[1,]; V<-t( t(V)-Vs); Vrob<-object$robvar.cum; Vrob<-Vrob[med,]; Vrobs<-Vrob[1,]; Vrob<-t( t(Vrob)-Vrobs); c.alpha<- qnorm(1-level/2) for (v in comp) { c.alpha<- qnorm(1-level/2) est<-B[,v];ul<-B[,v]+c.alpha*V[,v]^.5;nl<-B[,v]-c.alpha*V[,v]^.5; if (add.to.plot==FALSE) { plot(B[,1],est,ylim=1.05*range(ul,nl),type="s",xlab=xlab,ylab=ylab) if (mains==TRUE) title(main=colnames(B)[v]); } else lines(B[,1],est,type="s"); if (pointwise.ci>=1) { lines(B[,1],ul,lty=pointwise.ci,type="s"); lines(B[,1],nl,lty=pointwise.ci,type="s"); } if (robust>=1) { lines(B[,1],ul,lty=robust,type="s"); lines(B[,1],nl,lty=robust,type="s"); } abline(h=0); } } ## }}} ##' @export matplot.mets.twostage <- function(object,...) { ## {{{ B <- object$baseline matplot(B[,1],B[,-1],type="s",...) } ## }}} ##' @export predict.mets.twostage <- function(object,X=NULL,Z=NULL,times=NULL,times2=NULL,theta.des=NULL,diag=TRUE,...) { ## {{{ time.coef <- data.frame(object$cum) if (!is.null(times)) { cum <- Cpred(object$cum,times); cum2 <- Cpred(object$cum,times); } else { cum <- object$cum; cum2 <- object$cum } if (!is.null(times2)) cum2 <- Cpred(object$cum,times2); if (is.null(X)) X <- 1; if (is.null(X) & (!is.null(Z))) { Z <- as.matrix(Z); X <- matrix(1,nrow(Z),1)} if (is.null(Z) & (!is.null(X))) {X <- as.matrix(X); Z <- matrix(0,nrow(X),1); gamma <- 0} if (diag==FALSE) { time.part <- X %*% t(cum[,-1]) time.part2 <- X %*% t(cum2[,-1]) if (!is.null(object$gamma)) { RR <- exp( Z %*% gamma ); cumhaz <- t( t(time.part) * RR ); cumhaz2 <- t( t(time.part2) * RR )} else { cumhaz <- time.part; cumhaz2 <- time.part2; } } else { time.part <- apply(as.matrix(X*cum[,-1]),1,sum) time.part2 <- apply(as.matrix(X*cum2[,-1]),1,sum) } if (!is.null(object$gamma)) { RR<- exp(Z%*%gamma); cumhaz <- t( t(time.part) * RR ); cumhaz2 <- t( t(time.part2) * RR )} else { cumhaz <- time.part; cumhaz2 <- time.part2; } S1 <- exp(-cumhaz); S2 <- exp(-cumhaz2) if (attr(object,"var.link")==1) theta <- exp(object$theta) else theta <- object$theta if (!is.null(theta.des)) theta <- c(theta.des %*% object$theta) if (diag==FALSE) St1t2<- (outer(c(S1)^{-(theta)},c(S2)^{-(theta)},FUN="+") - 1)^(-(1/theta)) else St1t2<- ((S1^{-(theta)}+S2^{-(theta)})-1)^(-(1/theta)) out=list(St1t2=St1t2,S1=S1,S2=S2,times=times,times2=times2,theta=theta) return(out) } ## }}} ##' @export ascertained.pairs ascertained.pairs <-function (pairs,data,cr.models,bin=FALSE) {# {{{ timestatus <- all.vars(cr.models) ### let first event by second column and only ### use pairs where first is event apairs <- pairs if (bin==TRUE) fj <- ifelse(data[pairs[,1],timestatus[1]] > data[pairs[,2],timestatus[1]],1,2) else fj <- ifelse(data[pairs[,1],timestatus[1]] < data[pairs[,2],timestatus[1]],1,2) ### change order when 1st comes first apairs[fj==1,1] <- pairs[fj==1,2] apairs[fj==1,2] <- pairs[fj==1,1] ### only take pairs where first is a jump if (bin==FALSE) { jmpf <- (data[apairs[,2],timestatus[2]]==1) apairs <- apairs[data[apairs[,2],timestatus[2]]==1,] attr(pairs,"jump-first") <- jmpf } pairs <- apairs return(pairs) } # }}} ##' @export alpha2spear <- function(theta,link=1) { ## {{{ if (link==1) theta <- exp(theta) if (length(theta)>1) { out <- c() for (thet in theta) { if (thet!=1) out <- c(out,( (thet+1)/(thet-1) -2* thet* log(thet)/ (thet-1)^2)) else out <- c(out,0) } } else { if (theta!=1) out <- ( (theta+1)/(theta-1) -2* theta* log(theta)/ (theta-1)^2) } return(out) } ## }}} ##' @export alpha2kendall <- function(theta,link=0) { ## {{{ if (link==1) theta <- exp(theta) return(1/(1+2/theta)) } ## }}} ##' @export piecewise.twostage piecewise.twostage <- function(cut1,cut2,data=sys.parent(),timevar="time",status="status",id="id",covars=NULL,covars.pairs=NULL,num=NULL, score.method="optimize",Nit=100,detail=0,silent=1,weights=NULL, control=list(),theta=NULL,theta.des=NULL,var.link=1,iid=1,step=0.5,model="plackett",data.return=0) { ## {{{ ud <- list() if (missing(cut2)) cut2 <- cut1; nc1 <- length(cut1); nc2 <- length(cut2) names1 <- names2 <- c() theta.mat <- se.theta.mat <- cor.mat <- score.mat <- se.cor.mat <- matrix(0,nc1-1,nc2-1); clusters <- data[,id] cluster.call <- clusters idi <- unique(data[,id]); ###print(head(idi)) ## {{{ ### se.clusters=NULL,max.clust=1000, ### evt saette cluster se max.clust paa ### if (is.null(se.clusters)) { se.clusters <- clusters; antiid <- nrow(clusterindex);} else { ### iids <- unique(seclusters); ### antiid <- length(iids); ### if (is.numeric(seclusters)) se.clusters <- fast.approx(iids,se.clusters)-1 ### else se.clusters <- as.integer(factor(se.clusters, labels = seq(antiid)))-1 ### } ### if (length(se.clusters)!=length(clusters)) stop("Length of seclusters and clusters must be same\n"); ### ### if ((!is.null(max.clust))) if (max.clust< antiid) { ### coarse.clust <- TRUE ### qq <- unique(quantile(se.clusters, probs = seq(0, 1, by = 1/max.clust))) ### qqc <- cut(se.clusters, breaks = qq, include.lowest = TRUE) ### se.clusters <- as.integer(qqc)-1 ### max.clusters <- length(unique(se.clusters)) ### maxclust <- max.clust ### antiid <- max.clusters ### } ## }}} if (iid==1) { theta.iid <- matrix(0,length(idi),(nc1-1)*(nc2-1)); rownames(theta.iid) <- idi } else theta.iid <- NULL thetal <- c() k <- 0; for (i1 in 2:nc1) for (i2 in 2:nc2) { k <-(i1-2)*(nc2-1)+(i2-1) if (silent<=0) cat(paste("Data-set ",k,"out of ",(nc1-1)*(nc2-1)),"\n"); datalr <- surv.boxarea(c(cut1[i1-1],cut2[i2-1]),c(cut1[i1],cut2[i2]),data,timevar=timevar, status=status,id=id,covars=covars,covars.pairs=covars.pairs,num=num,silent=silent) if (silent<=-1) print("back in piecewise.twostage"); if (silent<=-1) print(summary(datalr)); if (silent<=-1) print(head(datalr)); if (silent<=-1) print(summary(datalr[,id])); boxlr <- list(left=c(cut1[i1-1],cut2[i2-1]),right=c(cut1[i1],cut2[i2])) datalr$tstime <- datalr[,timevar] datalr$tsstatus <- datalr[,status] datalr$tsid <- datalr[,id] ### if (is.null(covars)) f <- as.formula(with(attributes(datalr),paste("Surv(",time,",",status,")~-1+factor(",num,")"))) else f <- as.formula(with(attributes(datalr),paste("Surv(",time,",",status,")~-1+factor(",num,"):",covars))) marg1 <- aalen(f,data=datalr,n.sim=0,robust=0) fitlr<- survival.twostage(marg1,data=datalr,clusters=datalr$tsid,model=model,score.method=score.method, Nit=Nit,detail=detail,silent=silent,weights=weights, control=control,theta=theta,theta.des=theta.des,var.link=var.link,iid=iid,step=step) #### coef <- coef(fitlr) theta.mat[i1-1,i2-1] <- fitlr$theta se.theta.mat[i1-1,i2-1] <- fitlr$var.theta^.5 cor.mat[i1-1,i2-1] <- coef[1,5] se.cor.mat[i1-1,i2-1] <- coef[1,6] score.mat[i1-1,i2-1] <- fitlr$score if (data.return==0) ud[[k]] <- list(index=c(i1,i2),left=c(cut1[i1-1],cut2[i2-1]),right=c(cut1[i1],cut2[i2]),fitlr=fitlr) if (data.return==1) ud[[k]] <- list(index=c(i1,i2),left=c(cut1[i1-1],cut2[i2-1]),right=c(cut1[i1],cut2[i2]),fitlr=fitlr,data=datalr) if (i2==2) names1 <- c(names1, paste(cut1[i1-1],"-",cut1[i1])) if (i1==2) names2 <- c(names2, paste(cut2[i2-1],"-",cut2[i2])) thetal <- c(thetal,fitlr$theta) if ((silent<=-1) & (iid==1)) print(head(fitlr$theta.iid)); if ((silent<=-1) & (iid==1)) { print(idi) ; print(datalr$tsid) print(dim(fitlr$theta.iid)) print(head(fitlr$theta.iid)) print(dim(theta.iid)) print(length( idi %in% unique(datalr$tsid))) } if (iid==1) theta.iid[idi %in% unique(datalr$tsid),k] <-c(fitlr$theta.iid) ###if (iid==1) theta.iid[rownames(fitlr$theta.iid),k] <- fitlr$theta.iid } var.thetal <- NULL if (iid==1) var.thetal <- t(theta.iid) %*% theta.iid colnames(score.mat) <- colnames(cor.mat) <- colnames(se.cor.mat) <- colnames(se.theta.mat) <- colnames(theta.mat) <- names1; rownames(score.mat) <- rownames(cor.mat) <- rownames(se.cor.mat) <- rownames(se.theta.mat) <- rownames(theta.mat) <- names2; ud <- list(model.fits=ud,theta=theta.mat,var.theta=se.theta.mat^2, se.theta=se.theta.mat,thetal=thetal,thetal.iid=theta.iid,var.thetal=var.thetal,model=model, cor=cor.mat,se.cor=se.cor.mat,score=score.mat); class(ud)<-"pc.twostage" attr(ud,"var.link")<-var.link; attr(ud, "Type") <- model return(ud); } ## }}} ##' @export piecewise.data piecewise.data <- function(cut1,cut2,data=sys.parent(),timevar="time",status="status",id="id",covars=NULL,covars.pairs=NULL,num=NULL,silent=1) { ## {{{ ud <- list() if (missing(cut2)) cut2 <- cut1; nc1 <- length(cut1); nc2 <- length(cut2) dataud <- c() k <- 0; for (i1 in 2:nc1) for (i2 in 2:nc2) { k <-(i1-2)*(nc2-1)+(i2-1) if (silent<=0) cat(paste("Data-set ",k,"out of ",(nc1-1)*(nc2-1)),"\n"); datalr <- surv.boxarea(c(cut1[i1-1],cut2[i2-1]),c(cut1[i1],cut2[i2]),data,timevar=timevar, status=status,id=id,covars=covars,covars.pairs=covars.pairs,num=num,silent=silent) if (silent<=-1) print(summary(datalr)); if (silent<=-1) print(head(datalr)); datalr$tstime <- datalr[,timevar] datalr$tsstatus <- datalr[,status] datalr$tsid <- datalr[,id] ### datalr$strata <- paste( c(cut1[i1-1],cut2[i2-1]),c(cut1[i1],cut2[i2]),collapse=",",sep="-") datalr$intstrata <- c(paste(c(cut1[i1-1],cut1[i1]),collapse=",",sep="-"),paste( c(cut2[i2-1],cut2[i2]),collapse=",",sep="-")) if (silent<=-1) print(head(datalr)); dataud <- rbind(dataud,datalr) } return(data.frame(dataud)) } ## }}} ##' @export summary.pc.twostage <- function(object,var.link=NULL,...) { ## {{{ if (!(inherits(object,"pc.twostage"))) stop("Must be a Piecewise constant two-Stage object") res <- list(estimates=object$theta,se=object$se.theta,cor=object$cor,se.cor=object$se.cor, model=object$model,score=object$score) class(res) <- "summary.pc.twostage" attr(res,"var.link")<-attr(object,"var.link"); attr(res, "Type") <- object$model res } ## }}} ##' @export print.pc.twostage <- function(x,var.link=NULL,...) { ## {{{ if (!(inherits(x,"pc.twostage"))) stop("Must be a Piecewise constant two-Stage object") print( summary(x,var.link=var.link,...)) } ## }}} ##' @export print.summary.pc.twostage <- function(x,var.link=NULL, digits=3,...) { ## {{{ if (is.null(var.link)) { if (attr(x,"var.link")==1) vlink <- 1 else vlink <- 0; } else vlink <- var.link print(vlink) if (x$model=="plackett") cat("Dependence parameter for Plackett model \n"); if (x$model=="clayton.oakes") cat("Dependence parameter for Clayton-Oakes model \n"); if (max(x$score)>0.001) { cat("Score of log-likelihood for parameter estimates (too large?)\n"); print(x$score);cat("\n\n");} if (vlink==1) cat("log-coefficient for dependence parameter (SE) \n") else cat("Dependence parameter (SE) \n"); print(coefmat(x$estimate,x$se,digits=digits,...)) cat("\n") if (x$model=="plackett") {cat("Spearman Correlation (SE) \n");cor.type <- "Spearman Correlation"; } if (x$model=="clayton.oakes") {cat("Kendall's tau (SE) \n"); cor.type <- "Kendall's tau";} print(coefmat(x$cor,x$se.cor,digits,...)) cat("\n") } ## }}} ##' @export coefmat <- function(est,stderr,digits=3,...) { ## {{{ myest <- round(10^digits*(est))/10^digits; myest <- paste(ifelse(myest<0,""," "),myest,sep="") mysd <- round(10^digits*(stderr))/10^digits; res <- matrix(paste(format(myest)," (",format(mysd),")",sep=""),ncol=ncol(est)) dimnames(res) <- dimnames(est) colnames(res) <- paste("",colnames(res)) noquote(res) } ## }}} ##' Wrapper for easy fitting of Clayton-Oakes or bivariate Plackett models for bivariate survival data ##' ##' Fits two-stage model for describing depdendence in survival data ##' using marginals that are on cox or aalen form using the twostage funcion, but ##' call is different and easier and the data manipulation build into the function. ##' Useful in particular for family design data. ##' ##' If clusters contain more than two times, the algoritm uses a composite likelihood ##' based on the pairwise bivariate models. ##' ##' The reported standard errors are based on the estimated information from the ##' likelihood assuming that the marginals are known. ##' ##' @examples ##' library(mets) ##' data("prt",package="mets") ##' prtsam <- blocksample(prt,idvar="id",1e3,replace=FALSE) ##' margp <- coxph(Surv(time,status==1)~factor(country),data=prtsam) ##' fitco <- survival.twostage(margp,data=prtsam,clusters=prtsam$id) ##' summary(fitco) ##' ##' des <- model.matrix(~-1+factor(zyg),data=prtsam); ##' fitco <- survival.twostage(margp,data=prtsam,theta.des=des,clusters=prtsam$id) ##' summary(fitco) ##' rm(prtsam) ##' ##' dfam <- simSurvFam(1000) ##' dfam <- fast.reshape(dfam,var=c("x","time","status")) ##' ##' desfs <- function(x,num1="num1",num2="num2") ##' { ##' pp <- (x[num1]=="m")*(x[num2]=="f")*1 ## mother-father ##' pc <- (x[num1]=="m" | x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 ## mother-child ##' cc <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 ## child-child ##' c(pp,pc,cc) ##' } ##' ##' marg <- coxph(Surv(time,status)~factor(num),data=dfam) ##' out3 <- easy.survival.twostage(marg,data=dfam,time="time",status="status",id="id", ##' deshelp=0, ##' score.method="fisher.scoring",theta.formula=desfs, ##' model="plackett", ##' desnames=c("parent-parent","parent-child","child-cild"),iid=1) ##' summary(out3) ##' ##' @keywords survival twostage ##' @export easy.survival.twostage ##' @param margsurv model ##' @param data data frame ##' @param score.method Scoring method ##' @param status Status at exit time ##' @param time Exit time ##' @param entry Entry time ##' @param id name of cluster variable in data frame ##' @param Nit Number of iterations ##' @param detail Detail for more output for iterations ##' @param silent Debug information ##' @param weights Weights for log-likelihood, can be used for each type of outcome in 2x2 tables. ##' @param control Optimization arguments ##' @param theta Starting values for variance components ##' @param theta.formula design for depedence, either formula or design function ##' @param desnames names for dependence parameters ##' @param deshelp if 1 then prints out some data sets that are used, on on which the design function operates ##' @param var.link Link function for variance (exp link) ##' @param iid Calculate i.i.d. decomposition ##' @param step Step size for newton-raphson ##' @param model plackett or clayton-oakes model ##' @param marginal.surv vector of marginal survival probabilities ##' @param strata strata for fitting ##' @param se.clusters clusters for iid decomposition for roubst standard errors easy.survival.twostage <- function(margsurv=NULL,data=sys.parent(),score.method="nlminb", status="status",time="time",entry=NULL,id="id", Nit=60,detail=0, silent=1,weights=NULL, control=list(), theta=NULL,theta.formula=NULL,desnames=NULL,deshelp=0,var.link=1,iid=1, step=0.5,model="plackett",marginal.surv=NULL,strata=NULL,se.clusters=NULL) { ## {{{ ### marginal trunction probabilty, to be computed from model pentry <- NULL if (is.null(marginal.surv)) if (class(margsurv)[1]=="coxph") { ## {{{ ### ps <- survfit(margsurv)$surv coxformula <- margsurv$formula X <- model.matrix(coxformula,data=data)[,-1]; baseout <- survival::basehaz(margsurv,centered=FALSE); baseout <- cbind(baseout$time,baseout$hazard) cumh <- Cpred(baseout,data[,time])[,2] RR<-exp(X %*% coef(margsurv)) ps<-exp(-cumh*RR) ## }}} } else if (class(margsurv)[1]=="phreg") { ## {{{ if (!is.null(margsurv$coef)) rr <- c(exp(margsurv$X %*% margsurv$coef)) else rr <- rep(1,nrow(margsurv$X)) ps <- exp(-rr * Cpred(margsurv$cumhaz,margsurv$exit)[,2]) } ## }}} else stop("marginal survival probabilities must be given as marginal.sur or margsurv \n"); data <- cbind(data,ps) if (!is.null(pentry)) data <- cbind(data,pentry) ### make all pairs in the families, fam <- familycluster.index(data[,id]) data.fam <- data[fam$familypairindex,] data.fam$subfam <- fam$subfamilyindex ### make dependency design using wide format for all pairs data.fam.clust <- fast.reshape(data.fam,id="subfam") if (is.function(theta.formula)) { desfunction <- compiler::cmpfun(theta.formula) if (deshelp==1){ cat("These names appear in wide version of pairs for dependence \n") cat("design function must be defined in terms of these: \n") cat(names(data.fam.clust)); cat("\n") cat("Here is head of wide version with pairs\n") print(head(data.fam.clust)); cat("\n") } des.theta <- t( apply(data.fam.clust,1,desfunction)) colnames(des.theta) <- desnames desnames <- desnames } else { if (is.null(theta.formula)) theta.formula <- ~+1 des.theta <- model.matrix(theta.formula,data=data.fam.clust) desnames <- colnames(des.theta); } data.fam.clust <- cbind(data.fam.clust,des.theta) if (deshelp==1) { cat("These names appear in wide version of pairs for dependence \n") print(head(data.fam.clust)) } ### back to long format keeping only needed variables if (is.null(pentry)) data.fam <- fast.reshape(data.fam.clust,varying=c(id,"ps",status)) else data.fam <- fast.reshape(data.fam.clust,varying=c(id,"ps",status,"pentry")) if (deshelp==1) { cat("Back to long format for twostage (head)\n"); print(head(data.fam)); cat("\n") ### cat(paste("twostage, called with reponse",response,"\n")); cat(paste("cluster=",id,", subcluster (pairs)=subfam \n")); cat(paste("design variables =")); cat(desnames) cat("\n") } if (is.null(pentry)) ptrunc <- NULL else ptrunc <- data.fam[,pentry] out <- survival.twostage(NULL,data=data.fam, clusters=data.fam$subfam, theta.des=as.matrix(data.fam[,desnames]), detail=detail, score.method=score.method, Nit=Nit,step=step, iid=iid,theta=theta, var.link=var.link,model=model, marginal.survival=data.fam[,"ps"], marginal.status=data.fam[,status], marginal.trunc=ptrunc, se.clusters=data.fam[,id]) return(out) } ## }}} ##' @export simSurvFam <- function(n,beta=0.0,theta=1,lam0=0.5,lam1=1,lam2=1,ctime=10,...) { ## {{{ ### n=10; beta=0; theta=1; lam1=1;lam2=1; ctime=10; lam0=0.5 xm <- rbinom(n,1,0.5); xf <- rbinom(n,1,0.5); xb1 <- rbinom(n,1,0.5); xb2 <- rbinom(n,1,0.5); ### zf <- rgamma(n,shape=lam1); zb <- rgamma(n,shape=lam2); tm <- rexp(n)/(zf*exp(xm*beta)*lam0) tf <- rexp(n)/(zf*exp(xf*beta)*lam0) tb1 <- rexp(n)/((zf+zb)*exp(xb1*beta)*2*lam0) tb2 <- rexp(n)/((zf+zb)*exp(xb2*beta)*2*lam0) cm <- ifelse(tm0) { Y0_marg <- cbind(c(Y0[ii1,1],Y0[ii2,2])) idmarg0 <- c(id[ii1],id[ii2]) X0_marg1 <- XX0[ii1,midx1,drop=FALSE] X0_marg2 <- XX0[ii2,midx2,drop=FALSE] dS0_marg <- dS0[,1,drop=FALSE] if (eqmarg) { XX0_marg <- rbind(X0_marg1,X0_marg2) } else { XX0_marg <- XX0[c(ii1,ii2),,drop=FALSE] } if (!is.null(W0)) { W0_marg <- cbind(c(W0[ii1,1],W0[ii2,2])) W0 <- W0[-c(margidx,ii0),,drop=FALSE] } id0 <- id[-c(margidx,ii0)] Y0 <- Y0[-c(margidx,ii0),,drop=FALSE] if (!is.null(Z0)) Z0 <- Z0[-c(margidx,ii0),,drop=FALSE] XX0 <- XX0[-c(margidx,ii0),,drop=FALSE] } res <- list(Y0=Y0,XX0=XX0,W0=W0, Y0_marg=Y0_marg, XX0_marg=XX0_marg, X0_marg1=X0_marg1, X0_marg2=X0_marg2, dS0_marg=dS0_marg, W0_marg=W0_marg, id=idB, idmarg=c(id1,id2), ii1=ii1, id0=id0,idmarg0=idmarg0, ## Original id's margidx=margidx, Z0=Z0) } mets/R/dby.R0000644000176200001440000002327013623061405012330 0ustar liggesusers##' Calculate summary statistics grouped by variable ##' ##' Calculate summary statistics grouped by ##' @title Calculate summary statistics grouped by ##' @param data Data.frame ##' @param INPUT Input variables (character or formula) ##' @param ... functions ##' @param ID id variable ##' @param ORDER (optional) order variable ##' @param SUBSET (optional) subset expression ##' @param SORT sort order (id+order variable) ##' @param COMBINE If TRUE result is appended to data ##' @param NOCHECK No sorting or check for missing data ##' @param ARGS Optional list of arguments to functions (...) ##' @param NAMES Optional vector of column names ##' @param COLUMN If TRUE do the calculations for each column ##' @param REDUCE Reduce number of redundant rows ##' @param REGEX Allow regular expressions ##' @param ALL if FALSE only the subset will be returned ##' @export ##' @author Klaus K. Holst and Thomas Scheike ##' @details ##' dby2 for column-wise calculations ##' @aliases dby dby<- dby2 dby2<- dbyr ##' @examples ##' n <- 4 ##' k <- c(3,rbinom(n-1,3,0.5)+1) ##' N <- sum(k) ##' d <- data.frame(y=rnorm(N),x=rnorm(N),id=rep(seq(n),k),num=unlist(sapply(k,seq))) ##' d2 <- d[sample(nrow(d)),] ##' ##' dby(d2, y~id, mean) ##' dby(d2, y~id + order(num), cumsum) ##' ##' dby(d,y ~ id + order(num), dlag) ##' dby(d,y ~ id + order(num), dlag, ARGS=list(k=1:2)) ##' dby(d,y ~ id + order(num), dlag, ARGS=list(k=1:2), NAMES=c("l1","l2")) ##' ##' dby(d, y~id + order(num), mean=mean, csum=cumsum, n=length) ##' dby(d2, y~id + order(num), a=cumsum, b=mean, N=length, l1=function(x) c(NA,x)[-length(x)]) ##' ##' dby(d, y~id + order(num), nn=seq_along, n=length) ##' dby(d, y~id + order(num), nn=seq_along, n=length) ##' ##' d <- d[,1:4] ##' dby(d, x<0) <- list(z=mean) ##' d <- dby(d, is.na(z), z=1) ##' ##' f <- function(x) apply(x,1,min) ##' dby(d, y+x~id, min=f) ##' ##' dby(d,y+x~id+order(num), function(x) x) ##' ##' f <- function(x) { cbind(cumsum(x[,1]),cumsum(x[,2]))/sum(x)} ##' dby(d, y+x~id, f) ##' ##' ## column-wise ##' a <- d ##' dby2(a, mean, median, REGEX=TRUE) <- '^[y|x]'~id ##' a ##' ## wildcards ##' dby2(a,'y*'+'x*'~id,mean) ##' ##' ##' ## subset ##' dby(d, x<0) <- list(z=NA) ##' d ##' dby(d, y~id|x>-1, v=mean,z=1) ##' dby(d, y+x~id|x>-1, mean, median, COLUMN=TRUE) ##' ##' dby2(d, y+x~id|x>0, mean, REDUCE=TRUE) ##' ##' dby(d,y~id|x<0,mean,ALL=FALSE) ##' ##' a <- iris ##' a <- dby(a,y=1) ##' dby(a,Species=="versicolor") <- list(y=2) dby <- function(data,INPUT,...,ID=NULL,ORDER=NULL,SUBSET=NULL,SORT=0,COMBINE=!REDUCE,NOCHECK=FALSE,ARGS=NULL,NAMES,COLUMN=FALSE,REDUCE=FALSE,REGEX=mets.options()$regex,ALL=TRUE) { if (missing(INPUT)) INPUT <- .~1 val <- substitute(INPUT) INPUT <- try(eval(val),silent=TRUE) funs <- substitute(list(...))[-1] if (inherits(INPUT,"try-error")) { INPUT <- as.formula(paste0(".~1|",deparse(val))) } if (inherits(INPUT,c("formula","character"))) { INPUT <- procformdata(INPUT,sep="\\|",data=data,na.action=na.pass,do.filter=FALSE,regex=REGEX,specials="order") if (is.null(ID)) ID <- INPUT$predictor if (is.null(SUBSET)) { if (length(INPUT$group)!=0) SUBSET <- INPUT$group[[1]] } if (is.null(ORDER)) { if (length(INPUT$specials$order)!=0) ORDER <- INPUT$specials$order[[1]] } INPUT <- INPUT$response } if (inherits(ID,"formula")) ID <- model.frame(ID,data=data,na.action=na.pass) if (inherits(ORDER,"formula")) ORDER <- model.frame(ORDER,data=data,na.action=na.pass) if (inherits(SUBSET,"formula")) SUBSET <- model.frame(SUBSET,data=data,na.action=na.pass) if (is.null(INPUT)) { INPUT <- ID ID <- NULL } noID <- FALSE if (length(ID)==0) { noID <- TRUE ID = rep(1,NROW(INPUT)) } group <- NULL if (!COMBINE || length(funs)==0) group <- ID if (NCOL(ID)>1) ID <- interaction(ID) if (is.data.frame(ID)) { ID <- as.numeric(ID[,1,drop=TRUE]) } else { ID <- as.numeric(ID) } if (is.data.frame(ORDER)) { ORDER <- ORDER[,1,drop=TRUE] } if (!NOCHECK) { if (length(ORDER)>0) { ord <- order(ID,ORDER,decreasing=SORT,method="radix") } else { ord <- order(ID,decreasing=SORT,method="radix") } numerics <- unlist(lapply(INPUT[1,],is.numeric)) INPUT <- as.matrix(INPUT[ord,which(numerics),drop=FALSE]) ID <- ID[ord] if (is.null(group)) data <- data[ord,,drop=FALSE] else { if (is.vector(group)) group <- group[ord] else group <- group[ord,,drop=FALSE] } na.idx <- which(is.na(ID)) } else { INPUT <- as.matrix(INPUT) } if (length(SUBSET)>0) { SUBSET <- which(as.matrix(SUBSET)) INPUT <- INPUT[SUBSET,,drop=FALSE] ID <- ID[SUBSET] } if (length(funs)==0) { if (noID) return(INPUT) return(cbind(INPUT,group)) } if (NROW(INPUT)>0) { resl <- lapply(funs, function(fun_) { env <- new.env() isfun <- tryCatch(is.function(eval(fun_)),error=function(...) FALSE) if (isfun) { env$fun_ <- eval(fun_) if (length(ARGS)>0) { fun_ <- eval(fun_) ff <- function(...) do.call(fun_,c(list(...),ARGS)) expr <- quote(ff(x)) } else { expr <- quote(fun_(x)) } } else { expr <- fun_ } .ApplyBy2(INPUT,ID,F=expr,Env=env,Argument="x",Columnwise=COLUMN) }) res <- Reduce(cbind,resl) } else { resl <- NULL res <- NULL } dn <- NULL ## Setting column names if (missing(NAMES)) { a <- match.call(expand.dots=FALSE) ff <- lapply(a[["..."]],deparse) fn <- lapply(ff,deparse) dn <- names(ff) if (is.null(dn)) dn <- rep("",length(ff)) idx <- which(dn=="") if (length(idx)>0) { newn <- unlist(ff[idx]) dn[idx] <- newn[seq_along(idx)] fcall <- grepl("^function",dn) if (any(fcall)) dn[which(fcall)] <- which(fcall) } numcolf <- unlist(lapply(resl, NCOL)) nn <- c() if (COLUMN) { colnames(INPUT) dn <- unlist(lapply(dn, function(x) paste(x,colnames(INPUT),sep="."))) } for (i in seq_along(resl)) { nc <- numcolf[i] curnam <- dn[i] if (COLUMN) { nc <- nc/NCOL(INPUT) pos <- NCOL(INPUT)*(i-1)+1 pos <- seq(pos,pos+NCOL(INPUT)-1) curnam <- dn[pos] } if (nc>1) { nn <- c(nn, unlist(lapply(curnam, function(x) paste0(x,seq(nc))))) } else nn <- c(nn,curnam) } NAMES <- nn } try(colnames(res) <- NAMES,silent=TRUE) numidx <- grep("^[0-9]",colnames(res)) ## column names starting with digit if (length(numidx)>0) colnames(res)[numidx] <- paste0("_",colnames(res)[numidx]) if (!NOCHECK && length(na.idx)>0) { res[na.idx,] <- NA } cl <- attr(resl[[1L]],"clustersize") if (COMBINE) { if (is.null(NAMES) & is.null(res) & length(dn)>0) { res <- matrix(NA,nrow(data),length(dn)) colnames(res) <- dn } nn <- colnames(res) nc <- ifelse(is.null(res), 0, ncol(res)) res0 <- matrix(NA,nrow(data),nc) colnames(res0) <- nn didx <- which(colnames(data)%in%nn) if (length(didx)>0) { ridx <- match(colnames(data)[didx],nn) res0[,ridx] <- as.matrix(data[,didx]) data <- data[,-didx,drop=FALSE] } if (length(SUBSET)>0) { res0[SUBSET,] <- res res <- cbind(data,res0) } else { if (!is.null(res)) res <- cbind(data,res) else res <- data } } else { if (!noID) { if (length(SUBSET)>0) group <- group[SUBSET,,drop=FALSE] res <- cbind(group,res) } } if (REDUCE!=0) { if (REDUCE<0) { # Grab the last observation idx <- cumsum(cl) } else { # Grab the first idx <- cumsum(c(1,cl[-length(cl)])) } res <- res[unique(idx),,drop=FALSE] if (NROW(res)==1) { rownames(res) <- "" } else { rownames(res) <- NULL } } if (!ALL) { return(res[SUBSET,,drop=FALSE]) } return(res) } ##' @export "dby<-" <- function(data,INPUT,...,value) { cl <- match.call() cl[[1L]] <- substitute(dby) a <- substitute(value) if (inherits(value,"formula")) { cl["value"] <- NULL names(cl)[names(cl)=="INPUT"] <- "" cl[["INPUT"]] <- value } else { if (is.list(value)) { cl[which(names(cl)=="value")] <- NULL start <- length(cl) for (i in seq_along(value)) { cl[start+i] <- value[i] } if (length(names(value))>0) names(cl)[start+seq_along(value)] <- names(value) } else { names(cl)[which(names(cl)=="value")] <- "" } } eval.parent(cl) } ##' @export dby2 <- function(data,INPUT,...) { cl <- match.call() cl[[1L]] <- substitute(dby) cl[["COLUMN"]] <- TRUE eval.parent(cl) } ##' @export "dby2<-" <- function(data,INPUT,...,value) { cl <- match.call() cl[[1L]] <- substitute(`dby<-`) cl[["COLUMN"]] <- TRUE eval.parent(cl) } ##' @export dbyr <- function(data,INPUT,...,COLUMN=FALSE) { cl <- match.call() cl[[1L]] <- substitute(`dby`) cl[["REDUCE"]] <- TRUE cl[["COLUMN"]] <- COLUMN eval.parent(cl) } mets/R/binomial.regression.R0000644000176200001440000002360513623061405015525 0ustar liggesusers##' Binomial Regression for censored competing risks data ##' ##' Simple version of comp.risk function of timereg for just one time-point thus fitting the model ##' \deqn{P(T \leq t, \epsilon=1 | X ) = expit( X^T beta) } ##' ##' Based on binomial regresion IPCW response estimating equation: ##' \deqn{ X ( \Delta I(T \leq t, \epsilon=1 )/G_c(T_i-) - expit( X^T beta)) = 0 } ##' for IPCW adjusted responses. ##' ##' @param formula formula with outcome (see \code{coxph}) ##' @param data data frame ##' @param cause cause of interest ##' @param time time of interest ##' @param beta starting values ##' @param offset offsets for partial likelihood ##' @param weights for score equations ##' @param cens.weights censoring weights ##' @param cens.model stratified cox model ##' @param se to compute se's based on IPCW ##' @param kaplan.meier uses Kaplan-Meier for baseline than standard Cox ##' @param cens.code gives censoring code ##' @param no.opt to not optimize ##' @param method for optimization ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ##' data(bmt) ##' # logistic regresion with IPCW binomial regression ##' out <- binreg(Event(time,cause)~tcell+platelet,bmt,time=50) ##' summary(out) ##' predict(out,data.frame(tcell=c(0,1),platelet=c(1,1)),se=TRUE) ##' ##' outs <- binreg(Event(time,cause)~tcell+platelet,bmt,time=50,cens.model=~strata(tcell,platelet)) ##' summary(outs) ##' ##' @export binreg <- function(formula,data,cause=1,time=NULL,beta=NULL, offset=NULL,weights=NULL,cens.weights=NULL,cens.model=~+1,se=TRUE, kaplan.meier=TRUE,cens.code=0,no.opt=FALSE,method="nr",...) {# {{{ cl <- match.call()# {{{ m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (class(Y)!="Event") stop("Expected a 'Event'-object") if (ncol(Y)==2) { exit <- Y[,1] entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { stop("only right censored data, will not work for delayed entry\n"); entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(stratapos <- attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} if (!is.null(offsetpos <- attributes(Terms)$specials$offset)) { ts <- survival::untangle.specials(Terms, "offset") Terms <- Terms[-ts$terms] offset <- m[[ts$vars]] } X <- model.matrix(Terms, m) if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) ### possible handling of id to code from 0:(antid-1) if (!is.null(id)) { ids <- sort(unique(id)) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(exit))-1; ### id from call coded as numeric 1 -> id.orig <- id; if (is.null(offset)) offset <- rep(0,length(exit)) if (is.null(weights)) weights <- rep(1,length(exit)) # }}} if (is.null(time)) stop("Must give time for logistic modelling \n"); statusC <- (status==cens.code) statusE <- (status==cause) & (exit<= time) if (sum(statusE)==0) stop("No events of type 1 before time \n"); kmt <- kaplan.meier statusC <- (status==cens.code) data$id <- id data$exit <- exit data$statusC <- statusC cens.strata <- cens.nstrata <- NULL if (is.null(cens.weights)) { formC <- update.formula(cens.model,Surv(exit,statusC)~ . +cluster(id)) resC <- phreg(formC,data) if (resC$p>0) kmt <- FALSE cens.weights <- predict(resC,data,times=exit,tminus=TRUE,individual.time=TRUE,se=FALSE,km=kmt)$surv ## strata from original data cens.strata <- resC$strata[resC$ord] cens.nstrata <- resC$nstrata } else formC <- NULL expit <- function(z) 1/(1+exp(-z)) ## expit if (is.null(beta)) beta <- rep(0,ncol(X)) p <- ncol(X) X <- as.matrix(X) X2 <- .Call("vecMatMat",X,X)$vXZ ###mm <- .Call("CubeVec",D2logl,Dlogl) obj <- function(pp,all=FALSE) { # {{{ lp <- c(X %*% pp) p <- expit(lp) ### Y <- c((status==cause)*(exit<=time)/cens.weights) ploglik <- sum(weights*(Y-p)^2) Dlogl <- weights*X*c(Y-p) D2logl <- c(weights*p/(1+exp(lp)))*X2 D2log <- apply(D2logl,2,sum) ### gradient <- apply(Dlogl,2,sum) hessian <- matrix(D2log,length(pp),length(pp)) if (all) { ihess <- solve(hessian) beta.iid <- Dlogl %*% ihess ## %*% t(Dlogl) beta.iid <- apply(beta.iid,2,sumstrata,id,max(id)+1) robvar <- crossprod(beta.iid) val <- list(par=pp,ploglik=ploglik,gradient=gradient,hessian=hessian,ihessian=ihess, id=id,Dlogl=Dlogl, iid=beta.iid,robvar=robvar,var=robvar, se=diag(robvar)^.5,se.robust=diag(robvar)^.5) return(val) } structure(-ploglik,gradient=-gradient,hessian=hessian) }# }}} p <- ncol(X) opt <- NULL if (p>0) { if (no.opt==FALSE) { if (tolower(method)=="nr") { tim <- system.time(opt <- lava::NR(beta,obj,...)) opt$timing <- tim opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; if (!se) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(0,all=TRUE) } if (length(val$coef)==length(colnames(X))) names(val$coef) <- colnames(X) val <- c(val,list(time=time,formula=formula,formC=formC, exit=exit, cens.weights=cens.weights, cens.strata=cens.strata, cens.nstrata=cens.nstrata, model.frame=m)) if (se) {## {{{ censoring adjustment of variance ord <- resC$cox.prep$ord+1 X <- X[ord,,drop=FALSE] status <- status[ord] exit <- exit[ord] cens.weights <- cens.weights[ord] lp <- c(X %*% val$coef) p <- expit(lp) Y <- c((status==cause)*(exit<=time)/cens.weights) Dlogl <- weights*X*c(Y-p) hessian <- val$hessian xx <- resC$cox.prep S0i2 <- S0i <- rep(0,length(xx$strata)) S0i[xx$jumps+1] <- 1/resC$S0 S0i2[xx$jumps+1] <- 1/resC$S0^2 U <- matrix(0,nrow(xx$X),ncol(X)) ### Ys <- revcumsumstrata(xx$sign,xx$strata,xx$nstrata) ## compute function h(s) = \sum_i X_i Y_i(t) I(s \leq T_i \leq t) ## to make \int h(s)/Ys dM_i^C(s) h <- apply(X*Y,2,revcumsumstrata,xx$strata,xx$nstrata) h2 <- .Call("vecMatMat",h,h)$vXZ U[xx$jumps+1,] <- h[xx$jumps+1]/resC$S0 ### Cens-Martingale as a function of time and for all subjects to handle strata ## to make \int h(s)/Ys dM_i^C(s) = \int h(s)/Ys dN_i^C(s) - dLambda_i^C(s) IhdLam0 <- apply(h*S0i2,2,cumsumstrata,xx$strata,xx$nstrata) MGt <- (U[,drop=FALSE]-IhdLam0)*c(xx$weights) ### Censoring Variance Adjustment \int h^2(s) / y.(s) d Lam_c(s) estimated by \int h^2(s) / y.(s)^2 d N.^C(s) Ih2dLam0 <- apply(h2*S0i2,2,sum) varadjC <- matrix(Ih2dLam0,length(val$coef),length(val$coef)) id <- xx$id MGCiid <- apply(MGt,2,sumstrata,id,max(id)+1) val$varadjC <- val$ihessian %*% varadjC %*% val$ihessian val$MGtid <- id val$nc.iid <- val$iid beta.iid <- val$iid+(MGCiid %*% val$ihessian) val$iid <- beta.iid val$naive.var <- val$var val$var <- val$var - val$varadjC robvar <- crossprod(beta.iid) val$robvar <- robvar val$se.robust <- diag(robvar)^.5 val$se <- diag(val$var)^.5 } ## }}} class(val) <- "binreg" return(val) }# }}} ##' @export iid.binreg <- function(x,...) {# {{{ x$iid }# }}} ##' @export print.binreg <- function(x,...) {# {{{ print(summary(x),...) }# }}} ##' @export summary.binreg <- function(object,or=TRUE,...) {# {{{ if (or) { cat("OR estimates \n"); estimate(coef=object$coef,vcov=object$var,f=function(p) exp(p)) } else { cat("log-OR estimates \n"); estimate(coef=object$coef,vcov=object$var) } }# }}} ##' @export vcov.binreg <- function(object,...) {# {{{ return(object$var) }# }}} ##' @export predict.binreg <- function(object,newdata,se=TRUE,...) {# {{{ xlev <- lapply(object$model.frame,levels) ff <- unlist(lapply(object$model.frame,is.factor)) upf <- update(object$formula,~.) tt <- terms(upf) tt <- delete.response(tt) Z <- model.matrix(tt,data=newdata,xlev=xlev) Z <- as.matrix(Z) expit <- function(z) 1/(1+exp(-z)) ## expit lp <- c(Z %*% object$coef) p <- expit(lp) preds <- p if (se) { preds <- c() for (i in 1:length(lp)) { if (is.null(object$var)) covv <- vcov(object) else covv <- object$var Dp <- Z[i,]*exp(-lp[i])*p[i]^2 se <- (Dp %*% covv %*% Dp)^.5 cmat <- data.frame(pred=p[i],se=se,lower=p[i]-1.96*se,upper=p[i]+1.96*se) names(cmat)[1:4] <- c("pred","se","lower","upper") preds <- rbind(preds,cmat) } } return(preds) } # }}} ###predict.binreg <- function(x,newdata,se=TRUE,...) ###{# {{{ ### Z <- as.matrix(model.matrix(x$formula,newdata)) ### expit <- function(z) 1/(1+exp(-z)) ## expit ### lp <- c(Z %*% x$coef) ### p <- expit(lp) ### preds <- p ### ### if (se) { ### Ft <- function(p,lpi=1) ### {# {{{ ### p <- expit(lpi) ### return(p) ### }# }}} ### ### preds <- c() ### for (i in 1:length(lp)) { ### if (is.null(x$var)) covv <- vcov(x) else covv <- x$var ### eud <- estimate(coef=x$coef,vcov=covv,f=function(p) Ft(p,lpi=lp[i])) ### cmat <- data.frame(eud$coefmat) ### names(cmat)[1:4] <- c("pred","se","lower","upper") ### preds <- rbind(preds,cmat) ### } ### } ### ###return(preds) ###} # }}} ### mets/R/vcov.biprobit.R0000644000176200001440000000007613623061405014337 0ustar liggesusers##' @export vcov.biprobit <- function(object,...) object$vcov mets/R/phreg.par.R0000644000176200001440000002753013623061405013443 0ustar liggesusers## library(lava) ## m <- lvm(y~x) ## distribution(m,~y) <- coxWeibull.lvm(shape=3,scale=5) ## transform(m,~status) <- function(...) TRUE ## d <- sim(m,2e4,p=c("y~x"=2)) ## library(eha) ## with(d,phreg.par(y,status,cbind(x))) ## weibreg(Surv(y,status)~x,data=d) ## ## Note in simulation A(t) = lambda*t^scale ## ## but here A(t) (scale*t)^shape, hence ## ## lambda := scale^(1/shape) ## tt <- seq(0,100,length.out=100) ## plot(tt,exp(-(exp(-4)*tt)^exp(.5)) ## y <- runif(2e4,0,100) ## (op <- phreg.par(y,TRUE)) ## tt <- seq(0,100,length.out=100) ## cc <- coxph(Surv(y,rep(TRUE,length(y)))~1) ## plot(survfit(cc),mark.time=FALSE) ## lines(tt,exp(-(exp(-4)*tt)^exp(.484)),col="red") ##(op <- phreg.weibull(d$y,TRUE,cbind(d$x))) ## (a <- survival::survreg(Surv(y,status)~1+x,dist="weibull",data=d)) ## (e <- eha::weibreg(Surv(y,status)~x,data=d)) ###{{{ Weibull info.weibull <- function(...) { list(npar=2, start=c(-1,-1), name="weibull", partrans=function(theta) { exp(theta) }, cumhaz=function(t,theta) { (theta[1]*t)^theta[2] } ) } logl.weibull <- function(theta,time,status,X=NULL,theta.idx=NULL,indiv=FALSE) { if (!is.null(theta.idx)) { offsets <- which(is.na(theta.idx)) theta <- theta[theta.idx] theta[offsets] <- 1 } lambda <- exp(theta[1]) p <- exp(theta[2]) if (is.null(X)) { eta <- 0 } else { beta <- theta[-c(1:2)] eta <- X%*%beta } val <- status*log(lambda*p) + status*(p-1)*log(lambda*time) + status*eta - (lambda*time)^p*exp(eta) if (indiv) return(val) sum(val) } obj.weibull <- function(...) -logl.weibull(...) score.weibull <- function(theta,time,status,X=NULL,theta.idx=NULL,indiv=FALSE) { if (!is.null(theta.idx)) { offsets <- which(is.na(theta.idx)) theta <- theta[theta.idx] theta[offsets] <- 1 } lambda <- exp(theta[1]) p <- exp(theta[2]) lambdaT <- lambda*time loglambdaT <- log(lambdaT) lambdaTp <- exp(loglambdaT*p) if (is.null(X)) { eta <- 0; expeta <- 1 dbeta <- NULL } else { beta <- theta[-c(1:2)] eta <- X%*%beta expeta <- exp(eta) dbeta <- ((status-expeta*lambdaTp)%x%rbind(rep(1,NCOL(X))))*X } dp <- status*(1/p + loglambdaT) - loglambdaT*lambdaTp*expeta dlogp <- p*dp dlambda <- status*(p/lambda) - p*lambdaTp/lambda*expeta dloglambda <- lambda*dlambda S <- cbind(dloglambda,dlogp,dbeta) if (!is.null(theta.idx)) { u.idx <- na.omit(unique(theta.idx)) newS <- matrix(0,ncol=length(u.idx),nrow=nrow(S)) for (i in u.idx) { newS[,i] <- cbind(rowSums(S[,which(theta.idx==i),drop=FALSE])) } S <- newS } if (indiv) return(S) colSums(S) } hessian.weibull <- function(theta,time,status,X=NULL,theta.idx=NULL,all=FALSE) { if (!is.null(theta.idx)) { offsets <- which(is.na(theta.idx)) theta <- theta[theta.idx] theta[offsets] <- 1 } lambda <- exp(theta[1]) p <- exp(theta[2]) lambdaT <- lambda*time loglambdaT <- log(lambdaT) Tp <- time^p lambdaTp <- lambda^p*Tp if (is.null(X)) { eta <- 0; expeta <- 1 d2dlogpdbeta <- d2dlogpdbeta <- d2beta <- NULL } else { beta <- theta[-c(1:2)] eta <- X%*%beta expeta <- exp(eta) ## D(beta,beta) U <- ((expeta*Tp)%x%rbind(rep(1,NCOL(X))))*X d2beta <- -t(lambda^p*U)%*%X ## D(p,beta) d2dpdbeta <- colSums(-((loglambdaT*lambdaTp*expeta)%x%rbind(rep(1,NCOL(X))))*X) d2dlogpdbeta <- d2dpdbeta*p ## D(lambda,beta) d2dlambdadbeta <- -U*p*lambda^(p-1) d2dloglambdadbeta <- colSums(d2dlambdadbeta)*lambda } ## D(p,p) dp <- status*(1/p + loglambdaT) - loglambdaT*lambdaTp*expeta d2p <- -sum(status/(p^2) + loglambdaT^2*expeta*lambdaTp) dlogp <- p*dp d2logp <- sum(dlogp)+p^2*d2p ## D(lambda,lambda) dlambda <- status*(p/lambda) - p*lambdaTp/lambda*expeta d2lambda <- -sum(status*(p/lambda^2) + p*(p-1)*lambdaTp/(lambda^2)*expeta) dloglambda <- lambda*dlambda d2loglambda <- sum(dloglambda)+lambda^2*d2lambda ## D(p,lambda) d2dpdlambda <- -status/(p^2) - loglambdaT^2*expeta*lambdaTp d2dpdlambda <- status/lambda - lambdaTp/lambda*expeta - p*loglambdaT*lambdaTp/lambda*expeta d2dlogpdloglambda <- sum(d2dpdlambda)*p*lambda ## Hessian: H <- matrix(0,length(theta),length(theta)) H[1,1] <- d2loglambda H[2,2] <- d2logp H[1,2] <- H[2,1] <- d2dlogpdloglambda if (!is.null(X)) { H[3:length(theta),3:length(theta)] <- d2beta H[2,3:length(theta)] <- H[3:length(theta),2] <- d2dlogpdbeta H[1,3:length(theta)] <- H[3:length(theta),1] <- d2dloglambdadbeta } if (!is.null(theta.idx)) { u.idx <- na.omit(unique(theta.idx)) newH <- matrix(0,length(u.idx),length(u.idx)) for (i in u.idx) { for (j in u.idx) { newH[i,j] <- sum(H[which(theta.idx==i),which(theta.idx==j)]) } } H <- newH } if (all) { ## Score: if (is.null(X)) dbeta <- NULL else dbeta <- status*X-lambda^p*U S <- cbind(dloglambda,dlogp,dbeta) if (!is.null(theta.idx)) { u.idx <- na.omit(unique(theta.idx)) newS <- matrix(0,ncol=length(u.idx),nrow=nrow(S)) for (i in u.idx) { newS[,i] <- cbind(rowSums(S[,which(theta.idx==i),drop=FALSE])) } S <- newS } attributes(H)$grad <- colSums(S) attributes(H)$score <- S ## LogLik attributes(H)$logL <- sum(status*log(lambda*p) + status*(p-1)*loglambdaT + status*eta - lambdaTp*expeta) } return(H) } ###}}} Weibull ###{{{ Generalized-Gamma ## http://www.stanford.edu/~lutian/coursepdf/unit1.pdf gengamma.f <- function(t,p,lambda,alpha,...) { p*lambda*(lambda*t)^(alpha-1)*exp(-(lambda*t)^p)/gamma(alpha/p) } ## incomplete gamma gamma(s,x) = pgamma(x,s) gengamma.F <- function(t,p,lambda,alpha,...) { pgamma((lambda*t)^p,alpha/p)/gamma(alpha/p) } ## incomplete gamma gamma(s,x) = pgamma(x,s) gengamma.h <- function(t,p,lambda,alpha,...) { p*lambda*(lambda*t)^(alpha-1)*exp(-(lambda*t)^p)/pgamma((lambda*t)^p,alpha/p) } logl.gengamma <- function(theta,time,status,X=NULL,indiv=FALSE,...) { ## suppressMessages(browser()) p <- exp(theta[1]) lambda <- exp(theta[2]) alpha <- exp(theta[3]) eta <- 0 if (!is.null(X)) { beta <- theta[seq(length(theta)-3)+3] eta <-X%*%beta } res <- log(gengamma.f(time,p,lambda,alpha))*status + status*eta + log(1-gengamma.F(time,p,lambda,alpha)*exp(eta)) if (indiv) return(res) return(sum(res)) } score.gengamma <- function(theta,...) { numDeriv::jacobian(logl.gengamma,theta,...) } hessian.gengamma <- function(theta,...) { numDeriv::hessian(logl.gengamma,theta,...) } info.gengamma <- function(...) { list(npar=3,start=c(-1,-1,-1),name="gengamma") } ###}}} Generalized-Gamma ##' @export predict.phreg.par <- function(object,p=coef(object),X=object$X,time=object$time,...) { info <- do.call(paste("info",object$model,sep="."),list()) cc <- coef(object) eta <- 0 if (length(cc)>info$npar) { eta <- X%*%p[-seq(info$npar)] } exp(-(info$cumhaz(time,info$partrans(p))*exp(eta))) } ###{{{ phreg.par + methods ##' @export phreg.par <- function(formula,data=parent.frame(), time,status,X=NULL,model="weibull", theta.idx=NULL,theta0,niter=100,tol1=1e-9,tol2=1e-9,lambda1=0.5,lambda2=1,trace=0,...) { if (!missing(formula)) { cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (!is.Surv(Y)) stop("Expected a 'Surv'-object") if (ncol(Y)==2) { exit <- eval(Y[,1],data) entry <- NULL ## rep(0,nrow(Y)) status <- Y[,2] } else { entry <- Y[,1] exit <- Y[,2] status <- Y[,3] } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } if (!is.null(stratapos <- attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] } X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- NULL time <- exit } myinfo <- do.call(paste("info",model,sep="."),list()) if (is.null(X)) { theta0 <- myinfo$start } else { if (missing(theta0)) theta0 <- rep(0,ifelse(is.null(theta.idx), myinfo$npar+NCOL(X),length(unique(na.omit(theta.idx))))) } hess <- paste("hessian",model,sep=".") scor <- paste("score",model,sep=".") logl <- paste("logl",model,sep=".") thetas <- theta0; logL <- c() for (i in 1:niter) { H <- do.call(hess, list(theta=theta0,all=TRUE,time=time,status=status,X=X,theta.idx=theta.idx)) if (!is.null(attributes(H)$score)) { S <- colSums(attributes(H)$score) } else { S <- do.call(scor, list(theta=theta0,time=time,status=status,X=X)) } gamma <- 0 if (lambda2>0) gamma <- lambda2*sqrt((t(S)%*%S)[1])*diag(NROW(H)) theta0 <- theta0 - lambda1*solve(H-gamma)%*%S thetas <- rbind(thetas,as.vector(theta0)) if (!is.null(attributes(H)$logL)) { logL <- c(logL, attributes(H)$logL) } else { logL <- c(logL,do.call(logl, list(theta=theta0,time=time,status=status,X=X))) } if(trace>0) if (i%%trace==0) { cat("Iter=",i, ", logLik=",tail(logL,1),"\n",sep="") cat("theta=(",paste(formatC(theta0),collapse=";"),")\n",sep="") } if (i>1) if (sum(abs(S^2))info$npar) { eta <- X%*%p[-seq(info$npar)] } exp(-(info$cumhaz(time,info$partrans(p))*exp(eta))) } mets/R/wild-phreg.R0000644000176200001440000002406213623061405013614 0ustar liggesusers##' Wild bootstrap for Cox PH regression ##' ##' wild bootstrap for uniform bands for Cox models ##' @param formula formula with 'Surv' outcome (see \code{coxph}) ##' @param data data frame ##' @param offset offsets for cox model ##' @param weights weights for Cox score equations ##' @param B bootstraps ##' @param type distribution for multiplier ##' @param ... Additional arguments to lower level funtions ##' @author Klaus K. Holst, Thomas Scheike ##' @examples ##' ##' n <- 100 ##' x <- 4*rnorm(n) ##' time1 <- 2*rexp(n)/exp(x*0.3) ##' time2 <- 2*rexp(n)/exp(x*(-0.3)) ##' status <- ifelse(time10) { if (no.opt==FALSE) { if (tolower(method)=="nr") { opt <- lava::NR(beta,obj,...) opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; names(cc) <- colnames(X) if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(beta,all=TRUE) ### val[c("ploglik","gradient","hessian","U")] <- NULL } se.cumhaz <- lcumhaz <- lse.cumhaz <- NULL II <- NULL ### computes Breslow estimator ### if (no.opt==FALSE & p!=0) II <- -solve(val$hessian) else II <- matrix(0,p,p) strata <- val$strata[val$jumps] nstrata <- val$nstrata jumptimes <- val$jumptimes ## Brewslow estimator cumhaz <- cbind(jumptimes,cumsumstrata(1/val$S0,strata,nstrata)) ### varbetat <- 0 ### if (no.opt==FALSE & p!=0) { ### DLambeta.t <- apply(val$E/c(val$S0),2,cumsumstrata,strata,nstrata) ### varbetat <- rowSums((DLambeta.t %*% II)*DLambeta.t) ### } ### covv <- apply(covv*DLambeta.t,1,sum) Covariance is "0" by construction ### var.cumhaz <- cumsumstrata(1/val$S0^2,strata,nstrata)+varbetat ### se.cumhaz <- cbind(jumptimes,(var.cumhaz)^.5) colnames(cumhaz) <- c("time","cumhaz") ### colnames(se.cumhaz) <- c("time","se.cumhaz") res[[i]] <- list(coef=cc,cumhaz=cumhaz[,2]) } names(res) <- 1:B return(res) } ###}}} phreg0 ##' @export pred.cif.boot <- function(b1,b2,c1,c2,gplot=1) {# {{{ B <- length(b1) times1 <- c1$cumhaz[,1] times2 <- c2$cumhaz[,1] coef1 <- do.call("rbind",lapply(b1,function(x) x$coef)) coef2 <- do.call("rbind",lapply(b2,function(x) x$coef)) ### ###cums1 <- do.call("cbind",lapply(b1,function(x) Cpred(rbind(c(0,0),x$cumhaz),xx)[,2])) ###cums2 <- do.call("cbind",lapply(b2,function(x) Cpred(rbind(c(0,0),x$cumhaz),xx)[,2])) bcums1 <- do.call("cbind",lapply(b1,function(x) x$cumhaz)) bcums2 <- do.call("cbind",lapply(b2,function(x) x$cumhaz)) where2 <- sindex.prodlim(c(0,times2),times1,strict=TRUE) cums2 <- c(0,c2$cumhaz[,2]) cums2 <- cums2[where2] cums1 <- c1$cumhaz[,2] bcums2 <- rbind(0,bcums2)[where2,] n <- length(times1) cif1 <- cumsum( exp(-c(0,cums1[-n])-cums2)*diff(c(0,cums1))) ccoef1 <- c1$coef ccoef2 <- c2$coef ### bcifs <- apply(exp(-rbind(0,bcums1[-n,])-bcums2)*apply(rbind(0,bcums1),2,diff),2,cumsum) if (gplot==1) { matplot(times1,bcifs,type="s",lwd=0.2) lines(times1,cif1,type="s",lwd=2) } cumx <- cif1 ccums <- bcifs-cif1 sdcumb <- apply(ccums,1,sd) zcums <- ccums/sdcumb ### log-scale lcum <- log(cif1) lccums <- log(bcifs)-lcum sdlogcumb <- apply(lccums,1,sd) zlogcums <- lccums/sdlogcumb cumx.inv <- 1/cumx # in order to not divide by 0 cumx.inv[cumx.inv == 0] <- 1 # In fact: here we use the same quantiles independent of log or not log. # Therefore: A division by cumx is required in the definition of the log bands. pcumsdb.EE <- percen(c(apply(abs(zcums),2,max, na.rm=TRUE)),0.95) pcumsdb.EE.log <- percen(apply(abs(zcums),2,max, na.rm=TRUE),0.95) pcumsdb.EE.log.o <- percen(apply(abs(zlogcums),2,max, na.rm=TRUE),0.95) band.EE <- cbind( cumx - sdcumb * pcumsdb.EE , cumx + sdcumb * pcumsdb.EE) band.EE.log <- cbind( cumx*exp(- pcumsdb.EE.log * sdcumb * cumx.inv) ,cumx*exp( pcumsdb.EE.log * sdcumb * cumx.inv )) band.EE.log.o <- cbind(exp(lcum - sdlogcumb* pcumsdb.EE.log.o), exp(lcum + sdlogcumb* pcumsdb.EE.log.o)) return(list(time=times1,cif=cif1, sdcif=sdcumb,sdlogcif=sdlogcumb,bcifs=bcifs, band.EE=band.EE,band.EE.log=band.EE.log, band.EE.log.o=band.EE.log.o)) }# }}} mets/R/force.same.cens.R0000644000176200001440000000324713623061405014525 0ustar liggesusers ##' @export force.same.cens <- function(data,id="id", time="time",cause="cause",entrytime=NULL,cens.code=0) { ## {{{ ### no missing values ### handle time-variables separately data <- dsort(data,id) w <- which(names(data) %in% c(time,cause,entrytime,id) ) datao <- data[,-w] data <- data[,c(time,cause,entrytime,id)] if (is.null(entrytime)) entry <- rep(0,nrow(data)) else entry <- data[,entrytime] censo <- (data[,cause]==cens.code) Wide <- fast.reshape(data,id=id) time1 <- paste(time,1,sep="") time2 <- paste(time,2,sep="") stat1 <- paste(cause,1,sep="") stat2 <- paste(cause,2,sep="") ### enforce same censoring ## {{{ mintime <- pmin(Wide[,time1],Wide[,time2]) statmin <- ifelse(Wide[,time1]0) nn <- nn[-nulls,,drop=FALSE] res <- Reduce("rbind",x) if (is.null(colnames(res)) && !missing(nam)) { colnames(res) <- nam[seq(length(ncol(res)))] } suppressWarnings(res <- cbind(nn,res)) ## no warnings on row-names for (i in seq(ncol(res)-1)+1) { if (is.list(res[,i])) { if (!is.null(nn <- names(res[,i][[1]]))) colnames(res)[i] <- paste0(colnames(res)[i],"(",paste0(nn,collapse=","),")") } } a <- rownames(x[[1]]) res$"_var" <- a rownames(res) <- seq(nrow(res)) return(res) } ##' aggregating for for data frames ##' ##' aggregating for for data frames ##' @examples ##' data("sTRACE",package="timereg") ##' daggregate(iris, "^.e.al", x="Species", fun=cor, regex=TRUE) ##' daggregate(iris, Sepal.Length+Petal.Length ~Species, fun=summary) ##' daggregate(iris, log(Sepal.Length)+I(Petal.Length>1.5) ~ Species, ##' fun=summary) ##' daggregate(iris, "*Length*", x="Species", fun=head) ##' daggregate(iris, "^.e.al", x="Species", fun=tail, regex=TRUE) ##' daggregate(sTRACE, status~ diabetes, fun=table) ##' daggregate(sTRACE, status~ diabetes+sex, fun=table) ##' daggregate(sTRACE, status + diabetes+sex ~ vf+I(wmi>1.4), fun=table) ##' daggregate(iris, "^.e.al", x="Species",regex=TRUE) ##' dlist(iris,Petal.Length+Sepal.Length ~ Species |Petal.Length>1.3 & Sepal.Length>5, ##' n=list(1:3,-(3:1))) ##' daggregate(iris, I(Sepal.Length>7)~Species | I(Petal.Length>1.5)) ##' daggregate(iris, I(Sepal.Length>7)~Species | I(Petal.Length>1.5), ##' fun=table) ##' ##' dsum(iris, .~Species, matrix=TRUE, missing=TRUE) ##' ##' par(mfrow=c(1,2)) ##' data(iris) ##' drename(iris) <- ~. ##' daggregate(iris,'sepal*'~species|species!="virginica",fun=plot) ##' daggregate(iris,'sepal*'~I(as.numeric(species))|I(as.numeric(species))!=1,fun=summary) ##' ##' dnumeric(iris) <- ~species ##' daggregate(iris,'sepal*'~species.n|species.n!=1,fun=summary) ##' ##' @export ##' @param data data.frame ##' @param y name of variable, or formula, or names of variables on data frame. ##' @param x name of variable, or formula, or names of variables on data frame. ##' @param subset subset expression ##' @param ... additional arguments to lower level functions ##' @param fun function defining aggregation ##' @param regex interpret x,y as regular expressions ##' @param missing Missing used in groups (x) ##' @param remove.empty remove empty groups from output ##' @param matrix if TRUE a matrix is returned instead of an array ##' @param silent suppress messages ##' @param na.action How model.frame deals with 'NA's ##' @param convert if TRUE try to coerce result into matrix. Can also be a user-defined function ##' @aliases daggr daggregate <- function(data,y=NULL,x=NULL,subset,...,fun="summary",regex=mets.options()$regex, missing=FALSE, remove.empty=FALSE, matrix=FALSE, silent=FALSE, na.action=na.pass, convert=NULL) {# {{{ if (is.vector(data)) data <- data.frame(data) subs <- substitute(subset) if (!base::missing(subs)) { expr <- suppressWarnings(inherits(try(subset,silent=TRUE),"try-error")) if (expr) data <- data[which(eval(subs,envir=data)),,drop=FALSE] else data[subset,,drop=FALSE] } if (is.null(y)) y <- colnames(data) if (inherits(y,"formula")) { yx <- procformdata(y,sep="\\|",data=data,na.action=na.action,regex=regex,...) y <- yx$response x0 <- yx$predictor if (is.null(x) && length(y)>0) x <- x0 if (NCOL(x)==0) x <- NULL if (length(y)==0) { y <- x0 } } else { yy <- c() for (y0 in y) { if (!regex) y0 <- glob2rx(y0) n <- grep(y0,names(data),perl=mets.options()$regex.perl) yy <- union(yy,names(data)[n]) } y <- data[,yy,drop=FALSE] } if (is.character(x) && length(x)0) y <- y[,-xidx,drop=FALSE] } if (is.character(fun)) fun <- get(fun) if (!is.null(convert) && is.logical(convert)) { if (convert) convert <- as.matrix else convert <- NULL } if (!is.null(convert)) { fun_ <- fun fun <- function(x,...) fun_(convert(x,...)) } if (!is.null(x)) { if (missing) { x[is.na(x)] <- 'NA' } if (silent) { capture.output(res <- by(y,x,fun,...)) } else { res <- by(y,x,fun,...) } if (remove.empty) { # ... need to abandon 'by'? } if (matrix) { res <- by2mat(res,colnames(y)) } return(structure(res,ngroupvar=NCOL(x),class=c("daggregate",class(res)))) } if (silent) capture.output(res <- do.call(fun, c(list(y),list(...)))) else res <- do.call(fun, c(list(y),list(...))) res structure(res, ngroupvar=0, class=c("daggregate",class(res))) }# }}} ##' @export daggr <- function(data,...,convert=as.matrix) daggregate(data,...,convert=convert) ##' @export print.daggregate <- function(x,quote=FALSE,...) { attr(x,c("ngroupvar")) <- NULL class(x) <- class(x)[-1] print(x,quote=quote,...) } ##' @export dhead <- function(data,y=NULL,x=NULL,...) daggregate(data,y,x,fun=function(z) utils::head(z,...)) ##' @export dtail <- function(data,y=NULL,x=NULL,...) daggregate(data,y,x,fun=function(z) utils::tail(z,...)) ##' @export dsummary <- function(data=NULL,y=NULL,x=NULL,...) daggregate(data,y,x,fun=function(z) base::summary(z,...)) ##' @export dstr <- function(data,y=NULL,x=NULL,...) invisible(daggregate(data,y,x,fun=function(z) utils::str(z,...))) ##' @export dunique <- function(data,y=NULL,x=NULL,...) invisible(daggregate(data,y,x,fun=function(z) base::unique(z,...))) ##' summary, tables, and correlations for data frames ##' ##' summary, tables, and correlations for data frames ##' @param data if x is formula or names for data frame then data frame is needed. ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param x possible group variable ##' @param use how to handle missing values ##' @param ... Optional additional arguments ##' @author Klaus K. Holst and Thomas Scheike ##' @examples ##' data("sTRACE",package="timereg") ##' dt<- sTRACE ##' dt$time2 <- dt$time^2 ##' dt$wmi2 <- dt$wmi^2 ##' head(dt) ##' ##' dcor(dt) ##' ##' dcor(dt,~time+wmi) ##' dcor(dt,~time+wmi,~vf+chf) ##' dcor(dt,time+wmi~vf+chf) ##' ##' dcor(dt,c("time*","wmi*"),~vf+chf) ##' @aliases dsummary dstr dcor dsubset dquantile dcount dmean dmeansd dscalar deval deval2 dsum dsd ##' @export dcor <- function(data,y=NULL,x=NULL,use="pairwise.complete.obs",...) daggregate(data,y,x,...,fun=function(z,...) stats::cor(z,use=use,...)) ##' @export dscalar <- function(data,y=NULL,x=NULL,...,na.rm=TRUE,matrix=TRUE,fun=base::mean) { daggregate(data,y,x,matrix=matrix,..., fun=function(z,...) { if (is.matrix(z)) { apply(z,2,function(x) suppressWarnings(tryCatch(fun(x,na.rm=na.rm,...),error=function(e) return(NA)))) } else { unlist(lapply(z,function(x) { suppressWarnings(tryCatch(fun(x,na.rm=na.rm,...),error=function(e) return(NA))) })) } }) } Summary <- function(object,na.rm=TRUE,...) { if (is.numeric(object)) { x <- c(summary(object,...),sd=sd(object,na.rm=TRUE)) } else { x <- summary(object,...) } ## Formatting xx <- x if (is.numeric(x) || is.complex(x)) { finite <- is.finite(x) xx[finite] <- zapsmall(x[finite]) } m <- match("NA's", names(xx), 0) if (inherits(x, "Date") || inherits(x, "POSIXct")) { xx <- if (length(a <- attr(x, "NAs"))) c(format(xx), `NA's` = as.character(a)) else format(xx) } else if (m && !is.character(x)) xx <- c(format(xx[-m]), `NA's` = as.character(xx[m])) xx } ##' @export deval2 <- function(data,...,matrix=simplify,simplify=TRUE) deval(data,matrix=TRUE,simplify=TRUE,...) ##' @export deval <- function(data,y=NULL,x=NULL,...,matrix=FALSE,fun=Summary,simplify=FALSE) { if (is.list(fun)) { newf <- function(x,...) { unlist(lapply(fun,function(f) f(x,...), ...)) } } else newf <- fun res <- daggregate(data,y,x,matrix=matrix,..., fun=function(z) lapply(z,function(x) { suppressWarnings(tryCatch(newf(x,...),error=function(e) return(NA))) })) if (simplify) { for (i in seq_len(ncol(res))) { if (is.list(res[,i])) res[,i] <- unlist(res[,i]) } ## Dim <- function(x) { ## val <- dim(x) ## if (is.null(val)) val <- c(1,length(x)) ## val ## } ## dm <- Dim(res[[1]]) ## dims <- unlist(lapply(res,function(x) identical(Dim(x),dm))) ## if (all(dims)) { ## Res <- res ## n <- length(res) ## res <- array(NA,dim=c(n,dm)) ## for (i in seq(n)) { ## browser() ## } ## } ## } } res } ##' @export dmeansd <- function(data,...) { mm <- dscalar(data,fun=base::mean,...) vv <- dscalar(data,fun=stats::sd,...) colnames(vv) <- paste("sd.",colnames(vv),sep="") cbind(mm,vv) } ##' @export dmean <- function(data,...) dscalar(data,fun=base::mean,...) ##' @export dsum <- function(data,...) dscalar(data,fun=base::sum,...) ##' @export dsd <- function(data,...) dscalar(data,fun=stats::sd,...) ##' @export dcount <- function(data,x=NULL,...,na.rm=TRUE) { res <- rbind(daggregate(data,x=x,matrix=TRUE,...,fun=function(z,...) NROW(z))) res[is.na(res)] <- 0 rownames(res) <- seq(nrow(res)) colnames(res)[ncol(res)] <- "count" res } ##' @export dsubset <- function(data,...) { daggregate(data,...,fun=function(z) z) } ##' @export dquantile <- function(data,y=NULL,x=NULL,probs=seq(0,1,by=1/breaks),breaks=4,matrix=TRUE,reshape=FALSE,...,na.rm=TRUE) { a <- daggregate(data,y,x,matrix=FALSE,...,fun=function(z,...) apply(z,2,function(x,...) quantile(x,probs=probs,na.rm=na.rm,...))) if (matrix) { res <- by2mat(a) xidx <- seq_len(attr(a, "ngroupvar")) if (!reshape || is.null(res[,"_var"]) || length(xidx)==0) return(res) res <- dreshape(res, id=colnames(res)[xidx], num="_var",sep="_") return(res) } return(a) } mets/R/dtransform.R0000644000176200001440000000541213623061405013727 0ustar liggesusers##' Transform that allows condition ##' ##' Defines new variables under condition for data frame ##' @param data is data frame ##' @param ... new variable definitions including possible if condition ##' @examples ##' data(mena) ##' ##' xx <- dtransform(mena,ll=log(agemena)+twinnum) ##' ##' xx <- dtransform(mena,ll=log(agemena)+twinnum,agemena<15) ##' xx <- dtransform(xx ,ll=100+agemena,ll2=1000,agemena>15) ##' dsummary(xx,ll+ll2~I(agemena>15)) ##' @aliases dtransform dtransform<- dtrans dtrans<- ##' @export dtransform <- function(data,...) {# {{{ if (is.vector(data)) data <- data.frame(data) ### if (is.list(...)) e <- eval(substitute(...), data, parent.frame()) else ### if (!missing(EXPRLIST)) { ### e <- eval(substitute(c(list(...),EXPRLIST)), data, parent.frame()) ### } else e <- eval(substitute(list(...)), data, parent.frame()) tags <- names(e) condn <- match("",tags) if (!is.na(condn)) { condition <- TRUE cond <- e[[condn[1]]]; whereT <- which(cond) e[[condn]] <- NULL tags <- tags[-condn] } else condition <- FALSE inx <- match(tags, names(data)) matched <- !is.na(inx) matchedtags <- seq(length(e))[matched] if (any(matched)) { ### new values replaces old values k <- 1 if (condition==TRUE) { for (i in inx[matched]) { mk <- matchedtags[k] if (length(e[[mk]])==1) data[whereT,i] <- e[[mk]] else data[whereT,i] <- e[[mk]][whereT] k <- k+1 } } else data[inx[matched]] <- e[matched] data <- data.frame(data) } ### no matched, all new variables if (!all(matched)) { if (condition) for (i in seq(length(e))[!matched]) { if (length(e[[i]])==1) e[[i]] <- rep(e[[i]],nrow(data)) e[[i]][!cond] <- NA } data <- cbind(data,data.frame(e[!matched])) } return(data) }# }}} ##' @export dtrans <- function(data,...) dtransform(data,...) ##' @export `dtrans<-` <- function(data,...,value) { dtransform(data,...) <- value return(data) } ##' @export `dtransform<-` <- function(data,...,value) { cl <- match.call() cl[[1L]] <- substitute(dtransform) a <- substitute(value) if (inherits(value,"function")) { cl["value"] <- NULL names(cl)[names(cl)=="INPUT"] <- "" cl[["INPUT"]] <- value } else { if (is.list(value)) { cl[which(names(cl)=="value")] <- NULL start <- length(cl) for (i in seq_along(value)) { cl[start+i] <- value[i] } if (length(names(value))>0) names(cl)[start+seq_along(value)] <- names(value) } else { names(cl)[which(names(cl)=="value")] <- "" } } eval.parent(cl) } mets/R/mutinomialreg.R0000644000176200001440000001127013623061405014423 0ustar liggesusers##' Multinomial regression based on phreg regression ##' ##' Fits multinomial regression model ##' \deqn{ P_i = \frac{ \exp( X^\beta_i ) }{ \sum_{j=1}^K \exp( X^\beta_j ) }} ##' for \deqn{i=1,..,K} ##' where \deqn{\beta_1 = 0}, such that \deqn{\sum_j P_j = 1} using phreg function. ##' Thefore the ratio \deqn{\frac{P_i}{P_1} = \exp( X^\beta_i )} ##' ##' Coefficients give log-Relative-Risk relative to baseline group (first level of factor, so that it can reset by relevel command). ##' Standard errors computed based on sandwhich form \deqn{ DU^-1 \sum U_i^2 DU^-1}. ##' ##' Can also get influence functions (possibly robust) via iid() function, response should be a factor. ##' ##' @param formula formula with outcome (see \code{coxph}) ##' @param data data frame ##' @param weights for score equations ##' @param offset offsets for partial likelihood ##' @param ... Additional arguments to lower level funtions ##' @author Thomas Scheike ##' @examples ##' ##' data(bmt) ##' dfactor(bmt) <- cause1f~cause ##' drelevel(bmt,ref=3) <- cause3f~cause ##' dlevels(bmt) ##' ##' mreg <- mlogit(cause1f~tcell+platelet,bmt) ##' summary(mreg) ##' ##' mreg3 <- mlogit(cause3f~tcell+platelet,bmt) ##' summary(mreg3) ##' ##' ## inverse information standard errors ##' estimate(coef=mreg3$coef,vcov=mreg3$II) ##' ##' @export mlogit <- function(formula,data,offset=NULL,weights=NULL,...) {# {{{ cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} X <- model.matrix(Terms, m) ### if (!is.null(intpos <- attributes(Terms)$intercept)) ### X <- X[,-intpos,drop=FALSE] if (ncol(X)==0) X <- matrix(nrow=0,ncol=0) ### print(list(...)) res <- mlogit01(X,Y,id=id,strata=strata,offset=offset,weights=weights,strata.name=strata.name,...) ###, ### list(call=cl,model.frame=m,formula=formula,strata.pos=pos.strata,cluster.pos=pos.cluster)) return(res) }# }}} mlogit01 <- function(X,Y,id=NULL,strata=NULL,offset=NULL,weights=NULL, strata.name=NULL,cumhaz=FALSE, beta,stderr=TRUE,method="NR",no.opt=FALSE,Z=NULL,propodds=NULL,AddGam=NULL, case.weights=NULL,...) {# {{{ ### print(list(...)) p <- ncol(X) if (missing(beta)) beta <- rep(0,p) if (p==0) X <- cbind(rep(0,length(Y))) ### if (is.null(strata)) { strata <- rep(0,length(Y)); nstrata <- 1; strata.level <- NULL; } else { ### strata.level <- levels(strata) ### ustrata <- sort(unique(strata)) ### nstrata <- length(ustrata) ### strata.values <- ustrata ### if (is.numeric(strata)) strata <- fast.approx(ustrata,strata)-1 else { ### strata <- as.integer(factor(strata,labels=seq(nstrata)))-1 ### } ### } if (is.null(offset)) offset <- rep(0,length(Y)) if (is.null(weights)) weights <- rep(1,length(Y)) strata.call <- strata Zcall <- matrix(1,1,1) ## to not use for ZX products when Z is not given if (!is.null(Z)) Zcall <- Z ## possible casewights to use for bootstrapping and other things if (is.null(case.weights)) case.weights <- rep(1,length(Y)) if (!is.null(id)) { ids <- unique(id) nid <- length(ids) if (is.numeric(id)) id <- fast.approx(ids,id)-1 else { id <- as.integer(factor(id,labels=seq(nid)))-1 } } else id <- as.integer(seq_along(Y))-1; ## orginal id coding into integers id.orig <- id+1; types <- unique(as.numeric(Y)) nlev <- length(types) nX <- nrow(X) idrow <- rep(1:nX,each=nlev) X <- X[idrow,,drop=FALSE] Y <- Y[idrow] id <- id[idrow] status <- rep(0,nrow(X)) nY <- as.numeric(Y) refg <- 1 ### else refg <- match(ref,types) nrefs <- (1:nlev)[-refg] for (i in 1:nlev) status[nY==i] <- rep(((1:nlev)==i),sum(nY==i)/nlev) time <- id strat <- rep(1:nlev,nX) XX <- c() for (i in nrefs) XX <- cbind(XX,X*(strat==i)) rownames(XX) <- NULL datph=data.frame(time=time,status=status,XX=XX,id=id,idrow=idrow) loffset <- offset[idrow] lweights<- weights[idrow] ### print(list(...)) res <- phreg(Surv(time,status)~XX+strata(idrow)+cluster(id),datph,weights=lweights,offset=loffset,...) return(res) }# }}} mets/R/clusterindex-reshape.R0000644000176200001440000002422213623061405015706 0ustar liggesusers##' Finds subjects related to same cluster ##' ##' @references ##' Cluster indeces ##' @examples ##' i<-c(1,1,2,2,1,3) ##' d<- cluster.index(i) ##' print(d) ##' ##' type<-c("m","f","m","c","c","c") ##' d<- cluster.index(i,num=type,Rindex=1) ##' print(d) ##' @seealso familycluster.index familyclusterWithProbands.index ##' @author Klaus Holst, Thomas Scheike ##' @param clusters list of indeces ##' @param index.type if TRUE then already list of integers of index.type ##' @param num to get numbering according to num-type in separate columns ##' @param Rindex index starts with 1, in C is it is 0 ##' @param mat to return matrix of indeces ##' @param return.all return all arguments ##' @param code.na how to code missing values ##' @aliases countID pairRisk mystrata ##' @export cluster.index <- function(clusters,index.type=FALSE,num=NULL,Rindex=0,mat=NULL,return.all=FALSE,code.na=NA) { ## {{{ n <- length(clusters) if (index.type==FALSE) { if (is.numeric(clusters)) clusters <- fast.approx(unique(clusters),clusters)-1 else { max.clust <- length(unique(clusters)) clusters <- as.integer(factor(clusters, labels = seq(max.clust)))-1 } } if ((!is.null(num))) { ### different types in different columns mednum <- 1 if (is.numeric(num)) numnum <- fast.approx(unique(num),num)-1 else { numnum <- as.integer(factor(num, labels = seq(length(unique(clusters))))) -1 } } else { numnum <- 0; mednum <- 0; } clustud <- .Call("clusterindexM",as.integer(clusters),as.integer(mednum), as.integer(numnum),mat,return.all,PACKAGE="mets") if (!is.null(mat) && !return.all) return(clustud) if (Rindex==1) clustud$idclust <- clustud$idclustmat+1 if (Rindex==1) clustud$firstclustid <- clustud$firstclustid +1 ### avoid NA's for C call if (Rindex==0 & !is.na(code.na)) clustud$idclust[is.na(clustud$idclust)] <- code.na clustud } ## }}} ##' @export countID <- function(data,id="id",names.count="Count",total.count="Total",index.name="index",reverse=TRUE,sep="",addid=TRUE) {# {{{ clusters <- data[,id] if (is.numeric(clusters)) { ## integeres from 0 to max.clust uc <- unique(clusters) max.clust <- length(uc) clusters <- fast.approx(uc, clusters) - 1 } else { max.clust <- length(unique(clusters)) clusters <- as.integer(factor(clusters, labels = seq(max.clust))) - 1 } ###tabid <- table(clusters) nclust <- table(clusters) if (addid) { name1 <- paste(names.count,id,sep=sep) name2 <- paste("index",id,sep=sep) name3 <- paste(total.count,id,sep=sep) } else { name1 <- names.count name2 <- index.name name3 <- total.count } out <- data[,id,drop=FALSE] out[,name1]=cumsumstrata(rep(1,nrow(data)),clusters,max.clust) out[,name2]=clusters out[,name3]=nclust[clusters+1] attr(out,"max.clust") <- max.clust return(out) }# }}} ##' @export pairRisk <- function(start,stop,status,expo,clust) {# {{{ n <- length(start) id <- 1:n nclust <- length(unique(clust)) sig <- c(rep(-1, each = n), rep(1, each = n)) clust.seq <- c(as.numeric(as.factor(clust)), as.numeric(as.factor(clust))) clust <- c(clust, clust) expo <- c(expo, expo) id <- c(id, id) sstatus <- c(rep(0, length(start)), status) tts <- c(start, stop) ot <- order(clust.seq, tts, -rank(sstatus)) tts <- tts[ot] sstatus <- sstatus[ot] sig <- sig[ot] expo <- expo[ot] clust <- clust[ot] clust.seq <- clust.seq[ot] id <- id[ot] cbind(id,sig,start,stop,expo,sstatus) cc <- c(mets::revcumsumstrata(sig * expo * 10 + sig * (expo == 0), clust.seq - 1, nclust)) ### both under risk when cc>10 pair.risk <- which(cc > 10) clustpl <- clust[pair.risk] weightpl <- cc[pair.risk] - 10 caseweightpl <- rep(-1, length(weightpl)) casepl <- expo[pair.risk] caseweightpl[casepl == 1] <- weightpl[casepl == 1] ttexit <- tts[pair.risk] ttentry <- tts[pair.risk - 1] ttid <- id[pair.risk] tstatus <- sstatus[pair.risk] timesout <- cbind(rep(ttentry, times = weightpl), rep(ttexit, times = weightpl)) whichnotsame <- which(timesout[, 1] != timesout[, 2]) caseweightrep <- rep(caseweightpl, times = weightpl) * (!duplicated(cbind(rep(ttexit, times = weightpl), rep(clustpl, time = weightpl)))) * 1 weightstatusrep <- rep(tstatus, times = weightpl) * (caseweightrep != 0) idout <- rep(ttid, times = weightpl) * (caseweightrep != 0) clustplrep <- rep(clustpl, times = weightpl) out <- data.frame(timesout, weightstatusrep, caseweightrep, clustplrep, idout, stringsAsFactors = FALSE)[whichnotsame, ] out <- out[order(out[, 5]), ] return(out) }# }}} ##' @export mystrata <- function(ll,sort=TRUE) {# {{{ for (j in seq(1,length(ll))) if (!is.factor(ll[[j]])) ll[[j]] <- factor(ll[[j]]) nll <- length(ll[[1]]) ss <- rep(0,nll) nl <- unlist(lapply(ll,nlevels)) poss <- exp(revcumsum(log(nl))) for (j in seq(1,length(ll))) { ss <- ss+as.numeric(ll[[j]])*poss[j] } uss <- unique(ss) nindex <- length(uss) sindex <- fast.approx(uss,ss) attr(sindex,"nlevel") <- nindex attr(sindex,"levels") <- nl return(sindex) } # }}} ###mystrata <- function(ll,sort=TRUE) {# {{{ ### if (!is.factor(ll[[1]])) ll[[1]] <- factor(ll[[1]]) ### id <- as.numeric(ll[[1]]) ### ss <- id ### for (j in seq(2,length(ll))) { ### if (!is.factor(ll[[j]])) ll[[j]] <- factor(ll[[j]]) ### mm <- 1/nlevels(ll[[j]]) ### ## two decimals for each level ### dec <- as.numeric(ll[[j]])/(nlevels(ll[[j]]))-mm/2 ### ss <- ss+dec/100^{j-2} ### } ### uss <- unique(ss) ### nindex <- length(uss) ### sindex <- fast.approx(uss,ss) ### dd <- data.frame(id=id,sindex=sindex) ### attr(dd,"nlevel") <- nindex ### return(dd) ###} # }}} ### ##' Finds all pairs within a cluster (family) ##' ##' @references ##' Cluster indeces ##' @examples ##' i<-c(1,1,2,2,1,3) ##' d<- familycluster.index(i) ##' print(d) ##' @seealso cluster.index familyclusterWithProbands.index ##' @author Klaus Holst, Thomas Scheike ##' @param clusters list of indeces ##' @param index.type argument of cluster index ##' @param num num ##' @param Rindex index starts with 1 in R, and 0 in C ##' @export familycluster.index <- function(clusters,index.type=FALSE,num=NULL,Rindex=1) { ## {{{ clusters <- cluster.index(clusters,Rindex=Rindex) totpairs <- sum(clusters$cluster.size*(clusters$cluster.size-1)/2) clustud <- .Call("familypairindex",clusters$idclust,clusters$cluster.size,as.integer(2*totpairs),PACKAGE="mets") clustud$pairs <- matrix(clustud$familypairindex,ncol=2,byrow=TRUE) clustud$clusters <- clusters$clusters[clustud$pairs[,2]]+1 invisible(clustud) } ## }}} ##' Finds all pairs within a cluster (famly) with the proband (case/control) ##' ##' second column of pairs are the probands and the first column the related subjects ##' ##' @references ##' Cluster indeces ##' @examples ##' i<-c(1,1,2,2,1,3) ##' p<-c(1,0,0,1,0,1) ##' d<- familyclusterWithProbands.index(i,p) ##' print(d) ##' @author Klaus Holst, Thomas Scheike ##' @seealso familycluster.index cluster.index ##' @param clusters list of indeces giving the clusters (families) ##' @param probands list of 0,1 where 1 specifices which of the subjects that are probands ##' @param index.type argument passed to other functions ##' @param num argument passed to other functions ##' @param Rindex index starts with 1, in C is it is 0 ##' @export familyclusterWithProbands.index <- function(clusters,probands,index.type=FALSE,num=NULL,Rindex=1) { ## {{{ famc <-familycluster.index(clusters,index.type=index.type,num=num,Rindex=Rindex) if (length(probands)!=length(clusters)) stop("clusters and probands not same length\n"); index.probs <- (1:length(clusters))[probands==1] subfamsWprobands <-famc$subfamilyindex[ famc$familypairindex %in% index.probs ] indexWproband <- famc$subfamilyindex %in% subfamsWprobands famc$subfamilyindex <- famc$subfamilyindex[indexWproband] famc$familypairindex <- famc$familypairindex[indexWproband] pairs <- matrix(famc$familypairindex,ncol=2,byrow=TRUE) ipi1 <- pairs[,1] %in% index.probs gem2 <- pairs[,2] pairs[ipi1,2] <- pairs[ipi1,1] pairs[ipi1,1] <- gem2[ipi1] famc$pairs <- pairs famc$clusters <- famc$clusters[ipi1] famc$familypairindex <- c(t(pairs)) invisible(famc) } ## }}} ##' @export coarse.clust <- function(clusters,max.clust=100) { ## {{{ if (is.numeric(clusters)) clusters <- sindex.prodlim(unique(clusters),clusters) cluster.size <- length(unique(clusters)) qq <- unique(quantile(clusters, probs = seq(0, 1, by = 1/max.clust))) qqc <- cut(clusters, breaks = qq, include.lowest = TRUE) cclusters <- as.integer(qqc)-1 return(cclusters) } ## }}} ##' @export faster.reshape <- function(data,clusters,index.type=FALSE,num=NULL,Rindex=1) { ## {{{ if (NCOL(data)==1) data <- cbind(data) ### uses data.matrix if (!is.matrix(data)) data <- data.matrix(data) if (is.character(clusters)) clusters <- data[,clusters] n <- length(clusters) if (nrow(data)!=n) stop("nrow(data) and clusters of different lengths\n"); if (index.type==FALSE) { max.clust <- length(unique(clusters)) if (is.numeric(clusters)) clusters <- fast.approx(unique(clusters),clusters)-1 else { max.clust <- length(unique(clusters)) clusters <- as.integer(factor(clusters, labels = 1:max.clust))-1 } } if ((!is.null(num))) { ### different types in different columns if (length(num)!=n) stop("clusters and num of different lengths\n"); mednum <- 1 if (is.numeric(num)) num <- fast.approx(unique(num),num)-1 else num <- as.integer(factor(num, labels = seq(length(unique(clusters))))) -1 } else { num <- 0; mednum <- 0; } clustud <- .Call("clusterindexdata",as.integer(clusters),as.integer(mednum), as.integer(num),iddata=data,PACKAGE="mets") if (Rindex==1) clustud$idclust <- clustud$idclust+1 ### if(Rindex==1) idclust[idclust==0] <- NA maxclust <- clustud$maxclust xny <- clustud$iddata xnames <- colnames(data); missingname <- (colnames(data)=="") xnames[missingname] <- paste(seq_len(maxclust))[missingname] xny <- data.frame(xny) mm <- as.vector(outer(xnames,seq_len(maxclust),function(...) paste(...,sep="."))) names(xny) <- mm return(xny); } ## }}} mets/R/logLik.biprobit.R0000644000176200001440000000050113623061405014574 0ustar liggesusers##' @export logLik.biprobit <- function(object,indiv=FALSE,...) { if (indiv) return(object$logLik) n <- sum(object$N[1]) p <- length(coef(object)) loglik <- sum(object$logLik) attr(loglik, "nall") <- n attr(loglik, "nobs") <- n attr(loglik, "df") <- p class(loglik) <- "logLik" return(loglik) } mets/R/binomial.twostage.R0000644000176200001440000016470313623061405015207 0ustar liggesusers##' Fits Clayton-Oakes or bivariate Plackett (OR) models for binary data ##' using marginals that are on logistic form. ##' If clusters contain more than two times, the algoritm uses a compososite likelihood ##' based on all pairwise bivariate models. ##' ##' The pairwise pairwise odds ratio model provides an alternative to the alternating logistic ##' regression (ALR). ##' ##' The reported standard errors are based on a cluster corrected score equations from the ##' pairwise likelihoods assuming that the marginals are known. This gives correct standard errors ##' in the case of the Odds-Ratio model (Plackett distribution) for dependence, but incorrect standard ##' errors for the Clayton-Oakes types model (that is also called "gamma"-frailty). For the additive gamma version of the ##' standard errors ##' are adjusted for the uncertainty in the marginal models via an iid deomposition using the iid() function of ##' lava. For the clayton oakes model that is not speicifed via the random effects these can be ##' fixed subsequently using the iid influence functions for the marginal model, but typically this does not ##' change much. ##' ##' For the Clayton-Oakes version of the model, given the gamma distributed random effects it is ##' assumed that the probabilities are indpendent, and that the marginal survival functions are on logistic form ##' \deqn{ ##' logit(P(Y=1|X)) = \alpha + x^T \beta ##' } ##' therefore conditional on the random effect the probability of the event is ##' \deqn{ ##' logit(P(Y=1|X,Z)) = exp( -Z \cdot Laplace^{-1}(lamtot,lamtot,P(Y=1|x)) ) ##' } ##' ##' Can also fit a structured additive gamma random effects model, such ##' the ACE, ADE model for survival data: ##' ##' Now random.design specificies the random effects for each subject within a cluster. This is ##' a matrix of 1's and 0's with dimension n x d. With d random effects. ##' For a cluster with two subjects, we let the random.design rows be ##' \eqn{v_1} and \eqn{v_2}. ##' Such that the random effects for subject ##' 1 is \deqn{v_1^T (Z_1,...,Z_d)}, for d random effects. Each random effect ##' has an associated parameter \eqn{(\lambda_1,...,\lambda_d)}. By construction ##' subjects 1's random effect are Gamma distributed with ##' mean \eqn{\lambda_j/v_1^T \lambda} ##' and variance \eqn{\lambda_j/(v_1^T \lambda)^2}. Note that the random effect ##' \eqn{v_1^T (Z_1,...,Z_d)} has mean 1 and variance \eqn{1/(v_1^T \lambda)}. ##' It is here asssumed that \eqn{lamtot=v_1^T \lambda} is fixed over all clusters ##' as it would be for the ACE model below. ##' ##' The DEFAULT parametrization uses the variances of the random effecs (var.par=1) ##' \deqn{ ##' \theta_j = \lambda_j/(v_1^T \lambda)^2 ##' } ##' ##' For alternative parametrizations (var.par=0) one can specify how the parameters relate ##' to \eqn{\lambda_j} with the function ##' ##' Based on these parameters the relative contribution (the heritability, h) is ##' equivalent to the expected values of the random effects \eqn{\lambda_j/v_1^T \lambda} ##' ##' Given the random effects the probabilities are independent and on the form ##' \deqn{ ##' logit(P(Y=1|X)) = exp( - Laplace^{-1}(lamtot,lamtot,P(Y=1|x)) ) ##' } ##' with the inverse laplace of the gamma distribution with mean 1 and variance lamtot. ##' ##' The parameters \eqn{(\lambda_1,...,\lambda_d)} ##' are related to the parameters of the model ##' by a regression construction \eqn{pard} (d x k), that links the \eqn{d} ##' \eqn{\lambda} parameters ##' with the (k) underlying \eqn{\theta} parameters ##' \deqn{ ##' \lambda = theta.des \theta ##' } ##' here using theta.des to specify these low-dimension association. Default is a diagonal matrix. ##' ##' @export ##' @aliases binomial.twostage binomial.twostage.time ##' @references ##' Two-stage binomial modelling ##' @examples ##' library("timereg") ##' data("twinstut",package="mets") ##' twinstut0 <- subset(twinstut, tvparnr<2300000) ##' twinstut <- twinstut0 ##' twinstut$binstut <- (twinstut$stutter=="yes")*1 ##' theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) ##' margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) ##' bin <- binomial.twostage(margbin,data=twinstut,var.link=1, ##' clusters=twinstut$tvparnr,theta.des=theta.des,detail=0, ##' score.method="fisher.scoring") ##' summary(bin) ##' ##' twinstut$cage <- scale(twinstut$age) ##' theta.des <- model.matrix( ~-1+factor(zyg)+cage,data=twinstut) ##' bina <- binomial.twostage(margbin,data=twinstut,var.link=1, ##' clusters=twinstut$tvparnr,theta.des=theta.des) ##' summary(bina) ##' ##' theta.des <- model.matrix( ~-1+factor(zyg)+factor(zyg)*cage,data=twinstut) ##' bina <- binomial.twostage(margbin,data=twinstut,var.link=1, ##' clusters=twinstut$tvparnr,theta.des=theta.des) ##' summary(bina) ##' ##' ## refers to zygosity of first subject in eash pair : zyg1 ##' ## could also use zyg2 (since zyg2=zyg1 within twinpair's)) ##' out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, ##' response="binstut",id="tvparnr",var.link=1, ##' theta.formula=~-1+factor(zyg1)) ##' summary(out) ##' ##' ## refers to zygosity of first subject in eash pair : zyg1 ##' ## could also use zyg2 (since zyg2=zyg1 within twinpair's)) ##' desfs<-function(x,num1="zyg1",num2="zyg2") ##' c(x[num1]=="dz",x[num1]=="mz",x[num1]=="os")*1 ##' ##' out3 <- easy.binomial.twostage(binstut~factor(sex)+age, ##' data=twinstut,response="binstut",id="tvparnr",var.link=1, ##' theta.formula=desfs,desnames=c("mz","dz","os")) ##' summary(out3) ##' ##' ### use of clayton oakes binomial additive gamma model ##' ########################################################### ##' \donttest{ ## Reduce Ex.Timings ##' data <- simbinClaytonOakes.family.ace(10000,2,1,beta=NULL,alpha=NULL) ##' margbin <- glm(ybin~x,data=data,family=binomial()) ##' margbin ##' ##' head(data) ##' data$number <- c(1,2,3,4) ##' data$child <- 1*(data$number==3) ##' ##' ### make ace random effects design ##' out <- ace.family.design(data,member="type",id="cluster") ##' out$pardes ##' head(out$des.rv) ##' ##' bints <- binomial.twostage(margbin,data=data, ##' clusters=data$cluster,detail=0,var.par=1, ##' theta=c(2,1),var.link=0, ##' random.design=out$des.rv,theta.des=out$pardes) ##' summary(bints) ##' ##' data <- simbinClaytonOakes.twin.ace(10000,2,1,beta=NULL,alpha=NULL) ##' out <- twin.polygen.design(data,id="cluster",zygname="zygosity") ##' out$pardes ##' head(out$des.rv) ##' margbin <- glm(ybin~x,data=data,family=binomial()) ##' ##' bintwin <- binomial.twostage(margbin,data=data, ##' clusters=data$cluster,detail=1,var.par=1, ##' theta=c(2,1),random.design=out$des.rv,theta.des=out$pardes) ##' summary(bintwin) ##' concordanceTwinACE(bintwin) ##' } ##' ##' @keywords binomial regression ##' @author Thomas Scheike ##' @export ##' @param margbin Marginal binomial model ##' @param data data frame ##' @param score.method Scoring method default is "fisher.scoring" among "fisher.scoring","nlminb","optimize","nlm" ##' @param Nit Number of iterations ##' @param detail Detail ##' @param clusters Cluster variable ##' @param silent Debug information ##' @param weights Weights for log-likelihood, can be used for each type of outcome in 2x2 tables. ##' @param control Optimization arguments ##' @param theta Starting values for variance components ##' @param theta.des design for dependence parameters, when pairs are given this is could be a (pairs) x (numer of parameters) x (max number random effects) matrix ##' @param var.link Link function for variance ##' @param var.par parametrization ##' @param var.func when alternative parametrizations are used this function can specify how the paramters are related to the \eqn{\lambda_j}'s. ##' @param iid Calculate i.i.d. decomposition when iid>=1, when iid=2 then avoids adding the uncertainty for marginal paramters for additive gamma model (default). ##' @param step Step size ##' @param notaylor Taylor expansion ##' @param model model ##' @param marginal.p vector of marginal probabilities ##' @param beta.iid iid decomposition of marginal probability estimates for each subject, if based on GLM model this is computed. ##' @param Dbeta.iid derivatives of marginal model wrt marginal parameters, if based on GLM model this is computed. ##' @param strata strata for fitting: considers only pairs where both are from same strata ##' @param max.clust max clusters ##' @param se.clusters clusters for iid decomposition for roubst standard errors ##' @param numDeriv uses Fisher scoring aprox of second derivative if 0, otherwise numerical derivatives ##' @param random.design random effect design for additive gamma model, when pairs are given this is a (pairs) x (2) x (max number random effects) matrix, see pairs.rvs below ##' @param pairs matrix with rows of indeces (two-columns) for the pairs considered in the pairwise composite score, useful for case-control sampling when marginal is known. ##' @param pairs.rvs for additive gamma model and random.design and theta.des are given as arrays, this specifice number of random effects for each pair. ##' @param additive.gamma.sum this is specification of the lamtot in the models via a matrix that is multiplied onto the parameters theta (dimensions=(number random effects x number of theta parameters), when null then sums all parameters. Default is a matrix of 1's ##' @param pair.ascertained if pairs are sampled only when there are events in the pair i.e. Y1+Y2>=1. ##' @param case.control if data is case control data for pair call, and here 2nd column of pairs are probands (cases or controls) ##' @param twostage default twostage=1, to fit MLE use twostage=0 ##' @param beta is starting value for beta for MLE version binomial.twostage <- function(margbin,data=sys.parent(), score.method="fisher.scoring",Nit=60,detail=0,clusters=NULL,silent=1,weights=NULL, control=list(),theta=NULL,theta.des=NULL,var.link=0,var.par=1,var.func=NULL, iid=1,step=1.0,notaylor=1,model="plackett",marginal.p=NULL,beta.iid=NULL,Dbeta.iid=NULL, strata=NULL,max.clust=NULL,se.clusters=NULL,numDeriv=0, random.design=NULL,pairs=NULL,pairs.rvs=NULL,additive.gamma.sum=NULL, pair.ascertained=0,case.control=0, twostage=1,beta=NULL) { ## {{{ ## {{{ seting up design and variables rate.sim <- 1; sym=1; if (model=="clayton.oakes" || model=="gamma") dep.model <- 1 else if (model=="plackett" || model=="or") dep.model <- 2 else stop("Model must by either clayton.oakes or plackett \n"); antpers <- NROW(data); if (!is.null(pairs)) nn <- NROW(pairs) else nn <- 1 ### marginal prediction and binomial response, two types of calls ## {{{ if (class(margbin)[1]=="glm") { ps <- predict(margbin,newdata=data,type="response") if (margbin$family$family!="binomial") warning("not binomial family\n"); ### takes data to extract response and predictions, these could be different for pairs call ### cause <- margbin$y ### print(all.vars(margbin$formula)[1]) cause <- data[,all.vars(margbin$formula)[1]] if (!is.numeric(cause)) stop(paste("response in data",margbin$formula)[1],"not numeric\n"); if (is.null(beta.iid)) beta.iid <- iid(margbin,id=clusters) if (is.null(Dbeta.iid)) Dbeta.iid <- model.matrix(margbin$formula,data=data) * ps if (twostage==0) Xbeta <- model.matrix(margbin$formula,data=data) } else if (class(margbin)[1]=="formula") { margbin <- glm(margbin,data=data,family=binomial()) ps <- predict(margbin,type="response") cause <- margbin$y if (twostage==0) Xbeta <- model.matrix(margbin$formula,data=data) if (is.null(Dbeta.iid)) Dbeta.iid <- model.matrix(margbin$formula,data=data) * ps if (is.null(beta.iid)) beta.iid <- iid(margbin,id=clusters) } else if (is.null(marginal.p)) stop("without marginal model, marginal p's must be given\n"); if (!is.null(marginal.p)) { if (length(margbin)!=antpers) stop("with marginal margbin is response \n") else cause <- margbin if (length(marginal.p)!=antpers) stop("length same as data dimension \n") else ps <- marginal.p } ## }}} notaylor <- 1 if (is.null(weights)==TRUE) weights <- rep(1,antpers); if (is.null(strata)==TRUE) strata<- rep(1,antpers); if (length(strata)!=antpers) stop("Strata must have length equal to number of data points \n"); # {{{ cluster setup out.clust <- cluster.index(clusters); clusters <- out.clust$clusters maxclust <- out.clust$maxclust antclust <- out.clust$cluster.size clusterindex <- out.clust$idclust clustsize <- out.clust$cluster.size call.secluster <- se.clusters if (is.null(se.clusters)) { se.clusters <- clusters; antiid <- nrow(clusterindex);} else { iids <- unique(se.clusters); antiid <- length(iids); if (is.numeric(se.clusters)) se.clusters <- fast.approx(iids,se.clusters)-1 else se.clusters <- as.integer(factor(se.clusters, labels = seq(antiid)))-1 } if (length(se.clusters)!=length(clusters)) stop("Length of seclusters and clusters must be same\n"); if ((!is.null(max.clust))) if (max.clust< antiid) { coarse.clust <- TRUE qq <- unique(quantile(se.clusters, probs = seq(0, 1, by = 1/max.clust))) qqc <- cut(se.clusters, breaks = qq, include.lowest = TRUE) se.clusters <- as.integer(qqc)-1 max.clusters <- length(unique(se.clusters)) maxclust <- max.clust antiid <- max.clusters } # }}} if (is.null(beta)==TRUE & twostage==0) beta <- coef(margbin) else beta <- 0 ## }}} dimbeta <- length(beta); ### ### if (!is.null(random.design)) { ### different parameters for Additive random effects # {{{ ### dep.model <- 3 ###### if (is.null(random.design)) random.design <- matrix(1,antpers,1); ### dim.rv <- ncol(random.design); ### if (is.null(theta.des)) theta.des<-diag(dim.rv); ###### ptheta <- dimpar <- ncol(theta.des); ### ###### if (dim(theta.des)[2]!=ncol(random.design)) ###### stop("nrow(theta.des)!= ncol(random.design),\nspecifies restrictions on paramters, if theta.des not given =diag (free)\n"); ### } else { random.design <- matrix(0,1,1); dim.rv <- 1; } ### ### if (is.null(theta.des)==TRUE) ptheta<-1; ### if (is.null(theta.des)==TRUE) theta.des<-matrix(1,antpers,ptheta) ### else theta.des<-as.matrix(theta.des); ###### ptheta<-ncol(theta.des); ###### if (nrow(theta.des)!=antpers) stop("Theta design does not have correct dim"); ### ### if (!is.null(pairs)) { pair.structure <- 1; } else pair.structure <- 0; ### if (length(dim(theta.des))==3) ptheta<-dim(theta.des)[2] else if (length(dim(theta.des))==2) ptheta<-ncol(theta.des) ### if (nrow(theta.des)!=antpers & dep.model!=3 & pair.structure==0 ) stop("Theta design does not have correct dim"); ### if (nrow(theta.des)!=nn & dep.model!=3 & pair.structure==1 ) stop("Theta design does not have correct dim"); ### ### if (length(dim(theta.des))!=3) theta.des <- as.matrix(theta.des) ###### theta.des <- as.matrix(theta.des) ### ### dimbeta <- length(beta); ### if (is.null(theta)==TRUE) { ### if (var.link==1) theta<- rep(-0.7,ptheta); ### if (var.link==0) theta<- rep(exp(-0.7),ptheta); ### } ### if (length(theta)!=ptheta) theta<-rep(theta[1],ptheta); ### theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); ### ### if (maxclust==1) stop("No clusters, maxclust size=1\n"); ### ### antpairs <- 1; ### to define ### if (is.null(additive.gamma.sum)) additive.gamma.sum <- matrix(1,dim.rv,ptheta) ### ### ### if (pair.structure==1 & dep.model==3) { ## {{{ ###### something with dimensions of rv.des ###### theta.des ### antpairs <- nrow(pairs); ### if ( (length(dim(theta.des))!=3) & (length(dim(random.design))==3) ) ### { ### Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) ### for (i in 1:antpairs) Ptheta.des[,,i] <- theta.des ### theta.des <- Ptheta.des ### } ### if ( (length(dim(theta.des))==3) & (length(dim(random.design))!=3) ) ### { ### rv.des <- array(0,c(2,ncol(random.design),antpairs)) ### for (i in 1:antpairs) { ### rv.des[1,,i] <- random.design[pairs[i,1],] ### rv.des[2,,i] <- random.design[pairs[i,2],] ### } ### random.design <- rv.des ### } ### if ( (length(dim(theta.des))!=3) & (length(dim(random.design))!=3) ) ### { ### Ptheta.des <- array(0,c(nrow(theta.des),ncol(theta.des),antpairs)) ### rv.des <- array(0,c(2,ncol(random.design),antpairs)) ### for (i in 1:antpairs) { ### rv.des[1,,i] <- random.design[pairs[i,1],] ### rv.des[2,,i] <- random.design[pairs[i,2],] ### Ptheta.des[,,i] <- theta.des ### } ### theta.des <- Ptheta.des ### random.design <- rv.des ### } ### ### if (max(pairs)>antpers) stop("Indices of pairs should refer to given data \n"); ### if (is.null(pairs.rvs)) pairs.rvs <- rep(dim(random.design)[2],antpairs) ###### if (max(pairs.rvs)> dim(random.design)[3] | max(pairs.rvs)>ncol(theta.des[1,,])) ###### stop("random variables for each cluster higher than possible, pair.rvs not consistent with random.design or theta.des\n"); ### clusterindex <- pairs-1; ### } ## }}} ### ### if (pair.structure==1 & dep.model!=3) { ### clusterindex <- pairs-1; ### antpairs <- nrow(pairs); ### pairs.rvs <- 1 ### } ### ### if (pair.structure==1) { ### if (length(case.control)!=antpairs) case.control <- rep(case.control[1],antpairs) ### if (length(pair.ascertained)!=antpairs) pair.ascertained <- rep(pair.ascertained[1],antpairs) ### if (any(case.control+pair.ascertained==2)) stop("Each pair is either case.control pair or pair.ascertained \n"); ### } ### ### if (is.null(Dbeta.iid)) Dbeta.iid <- matrix(0,length(cause),1); ### ptrunc <- rep(1,antpers); #### }}} ### ### setting design for random variables, in particular with pairs are given ddd <- randomDes(dep.model,random.design,theta.des,theta,antpers,additive.gamma.sum,pairs,pairs.rvs,var.link,clusterindex) random.design=ddd$random.design;clusterindex=ddd$clusterindex; antpairs=ddd$antpairs; pairs.rvs=ddd$pairs.rvs; theta=ddd$theta;ptheta=ddd$ptheta;theta.des=ddd$theta.des pair.structure=ddd$pair.structure; dep.model=ddd$dep.model dim.rv <- ddd$dim.rv; additive.gamma.sum=ddd$additive.gamma.sum ### print(dep.model); print(theta); print(head(theta.des)); if (dep.model==3) model <- "clayton.oakes" if (pair.structure==1) { if (length(case.control)!=antpairs) case.control <- rep(case.control[1],antpairs) if (length(pair.ascertained)!=antpairs) pair.ascertained <- rep(pair.ascertained[1],antpairs) if (any(case.control+pair.ascertained==2)) stop("Each pair is either case.control pair or pair.ascertained \n"); } if (is.null(Dbeta.iid)) Dbeta.iid <- matrix(0,length(cause),1); ptrunc <- rep(1,antpers); theta.score<-rep(0,ptheta);Stheta<-var.theta<-matrix(0,ptheta,ptheta); loglike <- function(par) { ## {{{ if (pair.structure==0 | dep.model!=3) Xtheta <- as.matrix(theta.des) %*% matrix(c(par[seq(1,ptheta)]),nrow=ptheta,ncol=1); if (pair.structure==1 & dep.model==3) Xtheta <- matrix(0,antpers,1); ## not needed if (pair.structure==1 & dep.model!=3) Xtheta <- as.matrix(theta.des) %*% matrix(c(par[seq(1,ptheta)]),nrow=ptheta,ncol=1); DXtheta <- array(0,c(1,1,1)); if (twostage==0) epar <- par[seq(1,ptheta)] else epar <- par if (twostage==0) { ### update, marginal.p og score for logistic model ### print(c(ptheta+1,ptheta+dimbeta)) beta <- par[seq(ptheta+1,ptheta+dimbeta)] lp <- c(Xbeta %*% beta) ### print(summary(ps)) psu <- exp(lp)/(1+exp(lp)) ### print(summary(psu)) dpsu <- psu/(1+exp(lp)) ### update predictions and DbetaP ### print(beta); print(dim(Xbeta)); print(length(dpsu)); Dbeta.iid <- Xbeta * dpsu ### print(Dbeta.iid) ### print(apply(Dbeta.iid,2,sum)) ps <- psu } if (var.link==1 & dep.model==3) epar <- c(exp(epar)) else epar <- c(epar) partheta <- epar if (var.par==1 & dep.model==3) { ## from variances to if (is.null(var.func)) { sp <- sum(epar) partheta <- epar/sp^2 } else partheta <- epar; ## par.func(epar) } if (pair.structure==0) outl<-.Call("twostageloglikebin", ## {{{ icause=cause,ipmargsurv=ps, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=strata,iseclusters=se.clusters,iantiid=antiid, irvdes=random.design,iags=additive.gamma.sum,ibetaiid=Dbeta.iid,pa=pair.ascertained,twostage=twostage, PACKAGE="mets") ## }}} else outl<-.Call("twostageloglikebinpairs", ## {{{ icause=cause,ipmargsurv=ps, itheta=c(partheta),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta),ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, ivarlink=var.link,iiid=iid,iweights=weights,isilent=silent,idepmodel=dep.model, itrunkp=ptrunc,istrata=strata,iseclusters=se.clusters,iantiid=antiid, irvdes=random.design, idimthetades=dim(theta.des),idimrvdes=dim(random.design),irvs=pairs.rvs, iags=additive.gamma.sum,ibetaiid=Dbeta.iid,pa=pair.ascertained,twostage=twostage, icasecontrol=case.control, PACKAGE="mets") ## }}} if (detail==3) print(c(par,outl$loglike)) ## variance parametrization, and inverse.link if (dep.model==3) {# {{{ if (var.par==1) { ## from variances to and with sum for all random effects if (is.null(var.func)) { if (var.link==0) { ### print(c(sp,epar)) mm <- matrix(-epar*2*sp,length(epar),length(epar)) diag(mm) <- sp^2-epar*2*sp } else { mm <- -c(epar) %o% c(epar)*2*sp diag(mm) <- epar*sp^2-epar^2*2*sp } mm <- mm/sp^4 } else mm <- numDeriv::hessian(var.func,par) } else { if (var.link==0) mm <- diag(length(epar)) else mm <- diag(length(c(epar)))*c(epar) } if (twostage==0) { ### beta for logistic regression also part of model mm0 <- diag(length(par)) mm0[1:nrow(mm),1:nrow(mm)] <- mm mm <- mm0 } }# }}} if (dep.model==3) {# {{{ outl$score <- t(mm) %*% outl$score if (twostage==1) outl$DbetaDtheta <- t(mm) %*% outl$DbetaDtheta outl$Dscore <- t(mm) %*% outl$Dscore %*% mm if (iid==1) outl$theta.iid <- t(t(mm) %*% t(outl$theta.iid)) ### print(crossprod(outl$theta.iid)); print(outl$Dscore) ### print(c(outl$score)) ### print(apply(outl$theta.iid,2,sum)) }# }}} attr(outl,"grad") <- attr(outl,"gradient") <-outl$score attr(outl,"hessian") <- outl$Dscore if (oout==0) ret <- c(-1*outl$loglike) else if (oout==1) ret <- sum(outl$score^2) else if (oout==3) ret <- outl$score else ret <- outl return(ret) } ## }}} if (score.method=="optimize" && ptheta!=1) {cat("optimize only works for d==1, score.mehod set to nlminb \n"); score.method <- "nlminb";} theta.iid <- NULL logl <- NULL p <- theta if (twostage==0) p <- c(p,beta); theta <- p if (score.method=="fisher.scoring") { ## {{{ oout <- 2; ### output control for obj if (Nit>0) for (i in 1:Nit) { out <- loglike(p) hess <- -1* out$Dscore if (!is.na(sum(hess))) hessi <- lava::Inverse(out$Dscore) else hessi <- hess if (detail==1) {## {{{ cat(paste("Fisher-Scoring ===================: it=",i,"\n")); cat("theta:");print(c(p)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(out$Dscore,"\n"); }## }}} delta <- hessi %*% out$score *step if (Nit>0) { p <- p + delta* step theta <- p; } if (is.nan(sum(out$score))) break; if (sum(abs(out$score))<0.00001) break; if (max(abs(theta))>20 & var.link==0) { cat("theta too large lacking convergence \n"); break; } } if (!is.nan(sum(p))) { if (detail==1 && iid==1) cat("iid decomposition\n"); out <- loglike(p) logl <- out$loglike score1 <- score <- out$score oout <- 0; hess1 <- hess <- -1*out$Dscore ### if (iid==1) theta.iid <- out$theta.iid if (detail==1 && iid==1) cat("finished iid decomposition\n"); } if (numDeriv==1) { if (detail==1 ) cat("starting numDeriv for second derivative \n"); oout <- 0; score2 <- numDeriv::jacobian(loglike,p) if (detail==1) { cat("Derivative\n"); cat(c(out$score)) cat("\n Numerical Derivative\n"); cat(c(score2)) cat("\n") } score1 <- matrix(score2,ncol=1) oout <- 3 hess <- numDeriv::jacobian(loglike,p) if (detail==1 ){ cat("finished numDeriv for second derivative \n"); cat("Numerical derivative second derivative \n"); print(hess) cat("average second moment, for fisher-scoring\n"); print(out$Dscore) } } if (detail==1 & Nit==0) {## {{{ cat(paste("Fisher-Scoring ===================: final","\n")); cat("theta:");print(c(p)) cat("loglike:");cat(c(out$loglike),"\n"); cat("score:");cat(c(out$score),"\n"); cat("hess:\n"); cat(out$Dscore,"\n"); }## }}} if (!is.na(sum(hess))) hessi <- lava::Inverse(hess) else hessi <- diag(nrow(hess)) ## }}} } else if (score.method=="nlminb") { ## {{{ nlminb optimizer oout <- 0; tryCatch(opt <- nlminb(theta,loglike,control=control),error=function(x) NA) if (detail==1) print(opt); if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 theta <- opt$par out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- - out$Dscore if (iid==1) theta.iid <- out$theta.iid if (numDeriv==1) { oout <- 3; p <- theta hess <- -1 * numDeriv::jacobian(loglike,theta) } hessi <- lava::Inverse(hess); ## }}} } else if (score.method=="optimize" && ptheta==1) { ## {{{ optimizer oout <- 0; if (var.link==1) {mino <- -20; maxo <- 10;} else {mino <- 0.001; maxo <- 100;} tryCatch(opt <- optimize(loglike,c(mino,maxo))); if (detail==1) print(opt); opt$par <- opt$minimum theta <- opt$par if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$par) logl <- out$loglike score1 <- score <- out$score hess1 <- hess <- - out$Dscore if (iid==1) theta.iid <- out$theta.iid if (numDeriv==1) { oout <- 3; p <- opt$par hess <- -1* numDeriv::jacobian(loglike,p) } hessi <- lava::Inverse(hess); ## }}} } else if (score.method=="nlm") { ## {{{ nlm optimizer iid <- 0; oout <- 0; tryCatch(opt <- nlm(loglike,theta,hessian=TRUE,print.level=detail),error=function(x) NA) iid <- 1; hess <- opt$hessian score <- opt$gradient if (detail==1) print(opt); hessi <- lava::Inverse(hess); theta <- opt$estimate if (detail==1 && iid==1) cat("iid decomposition\n"); oout <- 2 out <- loglike(opt$estimate) logl <- out$loglike score1 <- out$score hess1 <- -1* out$Dscore if (iid==1) theta.iid <- out$theta.iid ## }}} } else stop("score.methods = optimize(dim=1) nlm nlminb fisher.scoring\n"); ## {{{ handling output iid.tot <- NULL var.tot <- robvar.theta <- NULL beta <- NULL if (iid>=1) { theta.iid <- out$theta.iid %*% hessi if (dep.model==3 & iid!=2 & (!is.null(beta.iid))) if (nrow(beta.iid)==nrow(out$theta.iid) & twostage==1) { theta.beta.iid <- (beta.iid %*% t(out$DbetaDtheta) ) %*% hessi theta.iid <- theta.iid+theta.beta.iid iid.tot <- cbind(theta.iid,beta.iid) var.tot <- crossprod(iid.tot) } var.theta <- robvar.theta <- (t(theta.iid) %*% theta.iid) if (is.null(var.tot)) var.tot <- var.theta } else var.theta <- -1* hessi if (class(margbin)[1]=="glm") beta <- coef(margbin); if (twostage==0) beta <- theta[seq(ptheta,ptheta+dimbeta)] if (iid==1) var.theta <- robvar.theta else var.theta <- -hessi if (!is.null(colnames(theta.des))) thetanames <- colnames(theta.des) else thetanames <- paste("dependence",1:length(theta),sep="") ### fix names !!! ### theta <- matrix(theta,length(c(theta)),1) if (length(thetanames)==nrow(theta)) { rownames(theta) <- thetanames; rownames(var.theta) <- colnames(var.theta) <- thetanames; } ud <- list(theta=theta,score=score,hess=hess,hessi=hessi,var.theta=var.theta,model=model,robvar.theta=robvar.theta, theta.iid=theta.iid,thetanames=thetanames, loglike=-logl,score1=score1,Dscore=out$Dscore, margsurv=ps,iid.tot=iid.tot,var.tot=var.tot,beta=beta); class(ud)<-"mets.twostage" attr(ud, "binomial") <- TRUE attr(ud, "ptheta") <- ptheta attr(ud, "Formula") <- formula attr(ud, "Clusters") <- clusters attr(ud,"sym")<-sym; attr(ud,"var.link")<-var.link; attr(ud,"var.par")<-var.par; attr(ud,"var.func")<-var.func; attr(ud,"antpers")<-antpers; attr(ud,"antclust")<-antclust; attr(ud, "Type") <- model attr(ud,"DbetaDtheta")<-out$DbetaDtheta; attr(ud,"ags")<- additive.gamma.sum attr(ud,"twostage")<- twostage attr(ud,"pair.ascertained")<- pair.ascertained ### to be consistent with structure for survival twostage model attr(ud, "additive-gamma") <- (dep.model==3)*1 if (dep.model==3 & pair.structure==1) attr(ud, "likepairs") <- c(out$likepairs) if (dep.model==3 & pair.structure==0) attr(ud, "pardes") <- theta.des if (dep.model==3 & pair.structure==0) attr(ud, "theta.des") <- theta.des if (dep.model==3 & pair.structure==1) attr(ud, "pardes") <- theta.des[,,1] if (dep.model==3 & pair.structure==1) attr(ud, "theta.des") <- theta.des[,,1] if (dep.model==3 & pair.structure==0) attr(ud, "rv1") <- random.design[1,,drop=FALSE] if (dep.model==3 & pair.structure==1) attr(ud, "rv1") <- random.design[,,1] attr(ud, "response") <- "binomial" return(ud); ## }}} } ## }}} ##' @export p11.binomial.twostage.RV <- function(theta,rv1,rv2,p1,p2,pardes,ags=NULL,link=0,i=1,j=1) { ## {{{ ## computes p11 pij for additive gamma binary random effects model if (is.null(ags)) ags <- matrix(1,dim(pardes)) out <- .Call("claytonoakesbinRV",theta,i,j,p1,p2,rv1,rv2,pardes,ags,link,PACKAGE="mets")$like return(out) } ## }}} ##' @export concordanceTwostage<- function(theta,p,rv1,rv2,theta.des,additive.gamma.sum=NULL,link=0,var.par=0,...) {# {{{ ### takes dependence paramter from output ptheta <- length(theta) ### ptheta <- attr(object,"ptheta") ### theta <- object$theta[seq(1,ptheta)] ### robvar.theta <- object$robvar.theta[seq(1,ptheta),seq(1,ptheta)] if (var.par==1) theta <- theta/sum(theta)^2 nn <- nrow(as.matrix(rv1)) if (is.matrix(p)==FALSE) { ll <- length(p); p <- matrix(p,ll,2); } if (ncol(p)!=2) p <- matrix(p,ncol=2) if (is.matrix(rv1)==FALSE) rv1 <- matrix(rv1,nn,length(rv1),byrow=TRUE) if (is.matrix(rv2)==FALSE) rv2 <- matrix(rv2,nn,length(rv1),byrow=TRUE) if (is.null(additive.gamma.sum)) ags <- matrix(1,ncol(rv1),ptheta) else ags <- additive.gamma.sum tabs <- list() for (i in 1:nn) { p1 <- p[i,1] p2 <- p[i,2] p11 <- p11.binomial.twostage.RV(theta,rv1[i,],rv2[i,],p1,p2,theta.des,ags=ags,link=link) p01 <- p[i,1]-p11 p10 <- p[i,2]-p11 p00 <- 1-p01-p10+p11 tabs[[i]] <- list(pmat=matrix(c(p00,p10,p01,p11),2,2),casewise=c(p11/p1,p11/p2),marg=c(p1,p2)) } return(tabs) } # }}} ##' @export concordanceTwinACE<- function(object,rv1=NULL,rv2=NULL,xmarg=NULL,type="ace",...) {# {{{ if (type=="ace" | type=="ade") { if (is.null(rv1)) rv1 <- rbind(c(1,0,0,0,1),c(0,1,1,0,1)) if (is.null(rv2)) rv2 <- rbind(c(1,0,0,0,1),c(0,1,0,1,1)) } if (type=="ae" | type=="de") { if (is.null(rv1)) rv1 <- rbind(c(1,0,0,0),c(0,1,1,0)) if (is.null(rv2)) rv2 <- rbind(c(1,0,0,0),c(0,1,0,1)) } var.par <- attr(object,"var.par") var.link <- attr(object,"var.link") theta.des <- attr(object,"theta.des") twostage <- attr(object,"twostage") if (twostage==0) { pt <- attr(object,"ptheta") theta <- object$theta[seq(1,pt)] beta <- object$theta[seq(pt+1,length(object$theta))] var.theta <- object$robvar.theta[seq(1,pt),seq(1,pt)] var.tot <- object$var.theta } else { theta <- object$theta; beta <- object$beta var.theta <- object$var.theta; var.tot <- object$var.tot } if (var.link==1) theta <- exp(theta) ###print(beta) ags <- attr(object,"ags"); if (is.null(xmarg)) {xmarg <- rep(0,length(beta)); xmarg[1] <- 1;} nn <- nrow(rv1) if (is.matrix(rv1)==FALSE) rv1 <- matrix(rv1,nn,length(rv1),byrow=TRUE) if (is.matrix(rv2)==FALSE) rv2 <- matrix(rv2,nn,length(rv1),byrow=TRUE) if (is.null(ags)) ags <- matrix(1,ncol(rv1),length(theta)); fp <- function(par) {# {{{ pp <- par[1:length(theta)]; beta <- par[(length(theta)+1):length(par)]; xp <- sum(xmarg*beta); pm <- exp(xp)/(1+exp(xp)); if (var.par==1) pp <- pp/sum(pp)^2 p11 <- p11.binomial.twostage.RV(pp,rv1l,rv2l,pm,pm,theta.des,ags=ags,link=0) casewise <- p11/pm ret <- c(p11,casewise,pm) names(ret) <- c("concordance","casewise concordance","marginal") return(ret) }# }}} nnn<-c("MZ","DZ") tabs <- list() for (i in 1:nn) { rv1l <- rv1[i,] rv2l <- rv2[i,] tabs<-c(tabs,setNames(list(tabs[[i]] <- lava::estimate(coef=c(theta,beta),vcov=var.tot,f=function(p) fp(p))), nnn[i])) } return(tabs) } # }}} ##' @export binomial.twostage.time <- function(formula,data,id,...,silent=1,fix.censweights=1, breaks=Inf,pairsonly=TRUE,fix.marg=NULL,cens.formula,cens.model="aalen",weights="w") { ## {{{ m <- match.call(expand.dots = FALSE) m <- m[match(c("","data"),names(m),nomatch = 0)] Terms <- terms(cens.formula,data=data) m$formula <- Terms m[[1]] <- as.name("model.frame") M <- eval(m,envir=parent.frame()) censtime <- model.extract(M, "response") status <- censtime[,2] time <- censtime[,1] timevar <- colnames(censtime)[1] outcome <- as.character(terms(formula)[[2]]) if (is.null(breaks)) breaks <- quantile(time,c(0.25,0.5,0.75,1)) outcome0 <- paste(outcome,"_dummy") res <- list() logor <- cif <- conc <- c() k <- 0 for (tau in rev(breaks)) { if ((length(breaks)>1) & (silent==0)) message(tau) ### construct min(T_i,tau) or T_i and related censoring variable, ### thus G_c(min(T_i,tau)) or G_c(T_i) as weights if ((fix.censweights==1 & k==0) | (fix.censweights==0)) { data0 <- data time0 <- time status0 <- status } cond0 <- (time>tau) if ((fix.censweights==1 & k==0) | (fix.censweights==0)) status0[cond0 & status==1] <- 3 if (fix.censweights==0) status0[cond0 & status==1] <- 3 data0[,outcome] <- data[,outcome] data0[cond0,outcome] <- FALSE if ((fix.censweights==1 & k==0) | (fix.censweights==0)) time0[cond0] <- tau ### if (fix.censweights==0 ) time0[cond0] <- tau if ((fix.censweights==1 & k==0) | (fix.censweights==0)) { data0$S <- survival::Surv(time0,status0==1) } if ((fix.censweights==1 & k==0) | (fix.censweights==0)) dataw <- ipw(update(cens.formula,S~.),data=data0,cens.model=cens.model, obsonly=TRUE) if ((fix.censweights==1)) dataw[,outcome] <- (dataw[,outcome])*(dataw[,timevar]0) { sts <- strsplit(st,"[\"']")[[1]] foundsep <- any(grepl("|", sts, fixed=TRUE)) p <- length(quotepos) ##repl <- rep(c("(\"","\")"),p) for (i in seq(p/2)*2-1) { sts[i] <- paste0(sts[i],"(\"") sts[i+1] <- paste0(sts[i+1],"\")") } ## To handle regular expression entered as strings in the formula, we add a 'filter' expression at the end of the formula if (!foundsep) sts <- c(sts,"|1") formula <- as.formula(paste(sts,collapse="")) } } aa <- attributes(terms(formula,data=data,specials="regex")) if (aa$response == 0) { res <- NULL } else { res <- paste(deparse(formula[[2]]), collapse = "") } filter.expression <- NULL foundsep <- FALSE pred <- filter <- c() if (!is.null(sep) && length(aa$term.labels) > 0) { foundsep <- any(grepl(sep,aa$term.labels)) if (foundsep) { if (nsep>1) { xc <- gsub(" ","",unlist(lapply(aa$term.labels, function(z) strsplit(z,sep)[[1]]))) pred <- xc[1] filter <- xc[-1] } else { xc <- gsub(" ","",unlist(lapply(aa$term.labels, function(z) { spl <- regexpr(sep,z) ## first appearance pred <- substr(z,1,spl-1) filter <- substr(z,spl+1,nchar(z)) return(c(pred,filter)) }))) pred <- xc[1] filter <- xc[2] } if (any(pred==".")) { f <- as.formula(paste0(paste0(c(res,filter),collapse="+"),"~.")) x <- attributes(terms(f,data=data))$term.labels pred <- x } if (filter%in%c("0","-1")) { filter <- list() filter.expression <- NULL } else { filter.expression <- parse(text=filter) filter <- as.list(filter) } } } if (!foundsep) pred <- aa$term.labels expandst <- function(st) { st <- res <- unlist(strsplit(gsub(" ","",st),"\\+")) if (any(unlist(lapply(st, function(x) grepl("^\\(",x))))) { res <- c() for (x in st) { if (grepl("^\\(",x)) { x <- gsub('\\"',"",x) x <- gsub('^\\(',"",x) x <- gsub('\\)$',"",x) res <- c(res,unlist(procform(x,data=data,regex=regex, no.match=FALSE)$response)) } else { res <- c(res,x) } res <- unique(res) } } return(res) } res <- expandst(res) pred <- expandst(pred) if (any(res==".")) { diffset <- c(".",setdiff(pred,res)) res <- setdiff(union(res,colnames(data)),diffset) } filter <- lapply(filter, expandst) if (!is.null(specials)) { foundspec <- replicate(length(specials),c()) names(foundspec) <- specials rmidx <- c() spec <- paste0("^",specials,"\\(") val <- lapply(spec, function(x) which(grepl(x,pred))) for (i in seq_along(val)) { if (length(val[[i]])>0) { # special function found rmidx <- c(rmidx,val[[i]]) cleanpred <- gsub("\\)$","",gsub(spec[i],"",pred[val[[i]]])) foundspec[[i]] <- c(foundspec[[i]],cleanpred) } } if (length(rmidx)>0) pred <- pred[-rmidx] if (length(pred)==0) pred <- NULL specials <- foundspec for (i in seq_along(specials)) if (is.null(specials[[i]])) specials[i] <- NULL if (length(specials)==0) specials <- NULL } if (return.formula) { if (foundsep && !is.null(filter)) { filter <- lapply(filter, function(z) as.formula(paste0(c("~", paste0(z,collapse="+"))))) } if (length(pred)>0) pred <- as.formula(paste0(c("~", paste0(pred,collapse="+")))) if (length(res)>0) res <- as.formula(paste0(c("~", paste0(res,collapse="+")))) if (!is.null(specials)) { specials <- lapply(specials,function(x) as.formula(paste0(c("~", paste0(x,collapse="+"))))) } } res <- list(response=res, predictor=pred, filter=filter, filter.expression=filter.expression, specials=specials) if (!return.list) return(unlist(unique(res))) return(res) } ##' @export procformdata <- function(formula,data,sep="\\|", na.action=na.pass, do.filter=TRUE, ...) { res <- procform(formula,sep=sep,data=data,return.formula=TRUE,...) if (inherits(res,"formula")) { res <- list(response=res) } y <- x <- NULL filter <- res$filter.expression if (!do.filter) { filter <- NULL } ### print(filter); print(missing(filter)); print(is.null(filter)); print(filter[[1]]) ### when filter.expression is expression(1) then also no filter, ts if ((!missing(filter))) if (!is.null(filter)) if (as.character(filter)=="1") filter <- NULL if (length(res$response)>0) { if (is.null(filter)) y <- model.frame(res$response,data=data,na.action=na.action) else y <- model.frame(res$response,data=subset(data,eval(filter)),na.action=na.action) } if (length(res$predictor)>0) { if (is.null(filter)) x <- model.frame(res$predictor,data=data,na.action=na.action) else x <- model.frame(res$predictor,data=subset(data,eval(filter)),na.action=na.action) } specials <- NULL if (!is.null(res$specials)) { specials <- lapply(res$specials, function(x) { if (is.null(filter)) model.frame(x,data=data,na.action=na.action) else model.frame(x,data=subset(data,eval(filter)),na.action=na.action) }) } if (!do.filter) { group <- lapply(res$filter, function(x) model.frame(x,data=data,na.action=na.action)) return(list(response=y,predictor=x,group=group,specials=specials)) } return(list(response=y,predictor=x,specials=specials)) }# }}} procform2 <- function(y,x=NULL,z=NULL,...) {# {{{ yx <- procform(y,return.formula=FALSE,...) y <- yx$response x0 <- yx$predictor z0 <- NULL if (length(yx$filter)>0) z0 <- yx$filter[[1]] if (is.null(x) && length(y)>0) x <- x0 if (NCOL(x)==0) x <- NULL if (length(y)==0) y <- x0 if (!is.null(x)) { x <- unlist(procform(x,return.formula=FALSE,...)) } if (is.null(z)) z <- z0 if (!is.null(z)) { zz <- unlist(procform(z,return.formula=FALSE,...)) } if (is.null(z)) z <- z0 return(list(y=y,x=x,z=z)) }# }}} ##' @export procform3 <- function(y,x=NULL,z=NULL,...) {# {{{ yx <- procform(y,return.formula=FALSE,...) x0 <- yx$predictor y <- yx$response if (is.null(yx$predictor)) { x0 <- yx$response ; y <- NULL} if (is.null(y)) if (!is.null(x)) { x <- procform(x,return.formula=FALSE,...) y <- c(x$predictor,x$response) } return(list(y=y,x=x0,z=z)) }# }}} ## Specials <- function(f,spec,split2="+",...) { ## tt <- terms(f,spec) ## pos <- attributes(tt)$specials[[spec]] ## if (is.null(pos)) return(NULL) ## x <- rownames(attributes(tt)$factors)[pos] ## st <- gsub(" ","",x) ## res <- unlist(strsplit(st,"[()]"))[2] ## if (is.null(split2)) return(res) ## unlist(strsplit(res,"+",fixed=TRUE)) ## } ## f <- Surv(lefttime,time,status)~x1+id(~1+z,cluster) ## spec <- "id" ## split1="," ## split2="+" ## myspecials <- c("id","strata","f") ## f <- Event(leftime,time,cause) ~ id(~1+z+z2,cluster) + strata(~s1+s2) + f(a) + z*x ## ff <- Specials(f,"id",split2=",") Specials <- function(f,spec,split1=",",split2=NULL,...) {# {{{ tt <- terms(f,spec) pos <- attributes(tt)$specials[[spec]] if (is.null(pos)) return(NULL) x <- rownames(attributes(tt)$factors)[pos] st <- gsub(" ","",x) ## trim ## res <- unlist(strsplit(st,"[()]")) spec <- unlist(strsplit(st,"[()]"))[[1]] res <- substr(st,nchar(spec)+2,nchar(st)-1) if (!is.null(split1)) res <- unlist(strsplit(res,split1)) res <- as.list(res) for (i in seq(length(res))) { if (length(grep("~",res[[i]]))>0) res[[i]] <- as.formula(res[[i]]) } return(res) }# }}} decomp.specials <- function (x, pattern = "[()]", sep = ",", ...) { st <- gsub(" ", "", x) if (!is.null(pattern)) st <- rev(unlist(strsplit(st, pattern, ...)))[1] unlist(strsplit(st, sep, ...)) } mets/R/marginalprobit.R0000644000176200001440000000107413623061405014562 0ustar liggesusers marginalprobit <- function(mu,dmu,S,dS,y,w=NULL,indiv=FALSE,...) { sigma <- S^0.5 alpha <- alpha0 <- pnorm(mu,sd=sigma) alpha[y==0] <- 1-alpha[y==0] M <- -sigma*dnorm(mu/sigma) V <- S*alpha0+mu*M U1 <- 0.5*t(dS)%*%(-alpha0+V/S)/S U <- matrix(0,ncol(dmu)+nrow(U1),ncol(U1)) if (is.null(w)) w <- rep(1,ncol(U)) for (i in seq(ncol(U))) { U[,i] <- c(- dmu[i,,drop=FALSE]*(1/S*M[i]),U1[,i])/alpha[i]* ifelse(y[i]==0,-1,1)*w[i] } if (indiv) return(structure(t(U),logLik=log(alpha))) return(structure(rowSums(U),logLik=sum(log(alpha)))) } mets/R/discrete-survival-haplo.R0000644000176200001440000010711413623061405016326 0ustar liggesusers##' Discrete time to event haplo type analysis ##' ##' Can be used for logistic regression when time variable is "1" for all id. ##' ##' Cycle-specific logistic regression of haplo-type effects with known ##' haplo-type probabilities. Given observed genotype G and unobserved haplotypes H ##' we here mix out over the possible haplotypes using that P(H|G) is provided. ##' ##' \deqn{ ##' S(t|x,G)) = E( S(t|x,H) | G) = \sum_{h \in G} P(h|G) S(t|z,h) ##' } ##' so survival can be computed by mixing out over possible h given g. ##' ##' Survival is based on logistic regression for the discrete hazard function of the ##' form ##' \deqn{ ##' logit(P(T=t| T \geq t, x,h)) = \alpha_t + x(h) \beta ##' } ##' where x(h) is a regression design of x and haplotypes \eqn{h=(h_1,h_2)} ##' ##' Likelihood is maximized and standard errors assumes that P(H|G) is known. ##' ##' The design over the possible haplotypes is constructed by merging X with Haplos and ##' can be viewed by design.only=TRUE ##' ##' @param X design matrix data-frame (sorted after id and time variable) with id time response and desnames ##' @param y name of response (binary response with logistic link) from X ##' @param time.name to sort after time for X ##' @param Haplos (data.frame with id, haplo1, haplo2 (haplotypes (h)) and p=P(h|G)) haplotypes given as factor. ##' @param id name of id variale from X ##' @param desnames names for design matrix ##' @param designfunc function that computes design given haplotypes h=(h1,h2) x(h) ##' @param beta starting values ##' @param no.opt optimization TRUE/FALSE ##' @param method NR, nlm ##' @param stderr to return only estimate ##' @param designMatrix gives response and designMatrix directly not implemented (mush contain: p, id, idhap) ##' @param response gives response and design directly designMatrix not implemented ##' @param idhap name of id-hap variable to specify different haplotypes for different id ##' @param design.only to return only design matrices for haplo-type analyses. ##' @param covnames names of covariates to extract from object for regression ##' @param fam family of models, now binomial default and only option ##' @param weights weights following id for GLM ##' @param offsets following id for GLM ##' @param idhapweights weights following id-hap for GLM (WIP) ##' @param ... Additional arguments to lower level funtions lava::NR optimizer or nlm ##' @author Thomas Scheike ##' @examples ##' ## some haplotypes of interest ##' types <- c("DCGCGCTCACG","DTCCGCTGACG","ITCAGTTGACG","ITCCGCTGAGG") ##' ##' ## some haplotypes frequencies for simulations ##' data(hapfreqs) ##' ##' www <-which(hapfreqs$haplotype %in% types) ##' hapfreqs$freq[www] ##' ##' baseline=hapfreqs$haplotype[9] ##' baseline ##' ##' designftypes <- function(x,sm=0) {# {{{ ##' hap1=x[1] ##' hap2=x[2] ##' if (sm==0) y <- 1*( (hap1==types) | (hap2==types)) ##' if (sm==1) y <- 1*(hap1==types) + 1*(hap2==types) ##' return(y) ##' }# }}} ##' ##' tcoef=c(-1.93110204,-0.47531630,-0.04118204,-1.57872602,-0.22176426,-0.13836416, ##' 0.88830288,0.60756224,0.39802821,0.32706859) ##' ##' data(hHaplos) ##' data(haploX) ##' ##' haploX$time <- haploX$times ##' Xdes <- model.matrix(~factor(time),haploX) ##' colnames(Xdes) <- paste("X",1:ncol(Xdes),sep="") ##' X <- dkeep(haploX,~id+y+time) ##' X <- cbind(X,Xdes) ##' Haplos <- dkeep(ghaplos,~id+"haplo*"+p) ##' desnames=paste("X",1:6,sep="") # six X's related to 6 cycles ##' out <- haplo.surv.discrete(X=X,y="y",time.name="time", ##' Haplos=Haplos,desnames=desnames,designfunc=designftypes) ##' names(out$coef) <- c(desnames,types) ##' out$coef ##' summary(out) ##' @aliases simTTP predictSurvd plotSurvd ##' @export haplo.surv.discrete <- function (X=NULL,y="y",time.name="time",Haplos=NULL,id="id",desnames=NULL,designfunc=NULL, beta=NULL,no.opt=FALSE,method="NR",stderr=TRUE,designMatrix=NULL,response=NULL,idhap=NULL,design.only=FALSE, covnames=NULL,fam=binomial,weights=NULL,offsets=NULL,idhapweights=NULL,...) { ## {{{ cond=NULL if (is.null(designMatrix)) { if (!is.null(Haplos)) { ## with haplo-types {{{ ## X: y, Xdes, id ## Haplos, haplo1, haplo2, id, p (HgivenG) bothid <- intersect(X$id,Haplos$id) X <- subset(X,id %in% bothid) Haplos <- subset(Haplos,id %in% bothid) ## new iid starts at 1 Haplos$id <- fast.approx(bothid,Haplos$id) iiid <- Haplos$id-1 X$id <- fast.approx(bothid,X$id) Xo <- X Xhap <- merge(X,Haplos,by.x="id",by.y="id") Xhap <- dsort2(Xhap,~id+"haplo*"+time) Haplos <- dsort2(Haplos,~id+"haplo*") time <- Xhap[,time.name] tn <- match(time.name,names(Xhap)) Xhap <- Xhap[,-tn] response <- Xhap[,y] yn <- match(y,names(Xhap)) Xhap <- Xhap[,-yn] mm <- grep("haplo*",names(Xhap)) Xhaps <- Xhap[,mm] if (!is.null(designfunc)) { Xo <- X <- as.matrix(apply(Xhap[,mm],1,designfunc)) if (ncol(X)==nrow(Xhap)) X <- t(X) colnames(X) <- paste("haplo",1:ncol(X),sep="") X <- as.matrix(cbind(Xhap[,desnames],X)) } else Xo <- X <- as.matrix(Xhap[,desnames]) ## X(i)^T %*% X(i) for each row X2 <- .Call("vecMatMat",X,X)$vXZ ## creates sub-index for haplo-types within each id nmm <- names(Xhap)[mm] ### lll <- lapply(Xhap[,c("id",nmm)],as.numeric) ### stratidhap <- as.numeric(survival::strata(lll)) ms <- mystrata(Xhap[,c("id",nmm)]) stratidhap <- ms ###nidhap <- length(unique(stratidhap)) nidhap <- attr(ms,"nlevel") nid <- length(unique(Haplos$id)) ## weights will follow id if (is.null(weights)) wiid <- rep(1,nid) else wiid <- weights ## idhap weights will follow id-hap if (is.null(idhapweights)) whapiid <- rep(1,nidhap) else whapiid <- idhapweights ## offsets can follow both Haplo or X design and will then appear in mixed design if (is.null(offsets)) offiid <- rep(0,nrow(X)) else offiid <- offsets ### to make the optimizer more flexible and use for interval censored data if (is.null(cond)) cond <- rep(0,nidhap) hgiveng <- Haplos$p # }}} } else { ## standard glm {{{ ## X: y, Xdes, id id.name <- id ## id going from 1 to #id's id <- X$id <- fast.approx(unique(X[,id]),X[,id]) Xhap <- Xo <- X iiid <- unique(X$id)-1 nid <- length(iiid) stratidhap <- id nidhap <- length(unique(stratidhap)) ### response <- Xhap[,y] yn <- match(y,names(Xhap)) Xhap <- Xhap[,-yn] X <- as.matrix(Xhap[,desnames]) ## X(i)^T %*% X(i) for each row X2 <- .Call("vecMatMat",X,X)$vXZ ## weights will follow id if (is.null(weights)) wiid <- rep(1,nid) else wiid <- weights ## idhap weights will follow id-hap if (is.null(idhapweights)) wph <- rep(1,nidhap) else wph <- idhapweights ## offsets can follow both Haplo or X design and will then appear in mixed design if (is.null(offsets)) offiid <- rep(0,nrow(X)) else offiid <- offsets if (is.null(cond)) cond <- rep(0,nidhap) hgiveng <- rep(1,nid) }# }}} } else {# {{{ hgiveng <- designMatrix$p X <- designMatrix[,desnames] id <- designMatrix[,id] iiid <- unique(id)-1 stratidhap <- designMatrix[,idhap] nidhap <- length(unique(stratidhap)) nid <- length(iiid) design.only <- FALSE ## weights will follow id if (is.null(weights)) wiid <- rep(1,nid) else wiid <- weights ## idhap weights will follow id-hap if (is.null(idhapweights)) wph <- rep(1,nidhap) else wph <- idhapweights ## offsets can follow both Haplo or X design and will then appear in mixed design if (is.null(offsets)) offiid <- rep(0,nrow(X)) else offiid <- offsets if (is.null(cond)) cond <- rep(0,nidhap) }# }}} if (!design.only) { if (is.null(beta)) beta <- rep(0,ncol(X)) expit <- function(z) 1/(1+exp(-z)) ## expit obj <- function(pp,all=FALSE) { # {{{ lp <- X %*% pp ## plp <- family$linkinv(lp) plp <- expit(lp+ offiid) nplp <- 1-plp ###lognp <- log(nplp) ### logpht <- (response - plp)/family$variance(plp) logpht <- log(plp)*response+log(nplp)*(1-response) pht <-c(exp(logpht)) Dlogpht <- X* c(response-plp) D2logpht <- c(plp/(1+exp(lp)))*X2 ph <- c(exp(sumstrata(logpht,stratidhap-1,nidhap))) pg <- c(sumstrata(ph*hgiveng,iiid,nid)) logl <- wiid*log(pg) ## Derivative Dlogph <- apply(Dlogpht,2,sumstrata,stratidhap-1,nidhap) Dph <- c(ph)*Dlogph Dpg <- apply(Dph*hgiveng,2,sumstrata,iiid,nid)# {{{}}} Dlogl <- wiid*Dpg/pg DpgDpg <- .Call("vecMatMat",Dpg,Dpg)$vXZ ## 2nd Derivative D2logph <- apply(D2logpht,2,sumstrata,stratidhap-1,nidhap) DphDlogph <- .Call("vecMatMat",Dph,Dlogph)$vXZ D2ph <- ph*D2logph+DphDlogph D2pg <-apply(D2ph*hgiveng,2,sumstrata,iiid,nid) D2logi <- wiid*(pg*D2pg-DpgDpg)/pg^2 D2log <- apply(D2logi,2,sum) D2log <- matrix(D2log,ncol(X),ncol(X)) ploglik <- sum(logl) gradient <- apply(Dlogl,2,sum) hessian <- D2log if (all) { ihess <- solve(hessian) beta.iid <- Dlogl %*% ihess ## %*% t(Dlogl) robvar <- crossprod(beta.iid) val <- list(par=pp,ploglik=ploglik,gradient=gradient,hessian=hessian,ihessian=ihess, iid=beta.iid,robvar=robvar,var=ihess, id=iiid, se=diag(ihess)^.5,se.robust=diag(robvar)^.5) return(val) } structure(-ploglik,gradient=-gradient,hessian=hessian) }# }}} p <- ncol(X) opt <- NULL if (p>0) { if (no.opt==FALSE) { if (tolower(method)=="nr") { tim <- system.time(opt <- lava::NR(beta,obj,...)) opt$timing <- tim opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) } else { val <- obj(0,all=TRUE) } } else val <- NULL val <- c(list(Xhap=Xhap,X=X,Haplos=Haplos),val) class(val) <- "survd" return(val) } ## }}} ##' @export summary.survd <- function(object,...) return(lava::estimate(object,...)) ##' @export print.survd <- function(x,...) return(lava::estimate(x,...)) ##' @export vcov.survd <- function(object,...) return(object$var) ##' @export coef.survd <- function(object,...) return(object$coef) ##' @export simTTP <- function(coef=NULL,n=100,Xglm=NULL,times=NULL) {# {{{ Z <- Xglm if (!is.null(Z)) n <- nrow(Z) if (!is.null(Z)) data <- Z else data <- data.frame(id=1:n) if (!is.null(times)) { timesf <- data.frame(times=rep(times,n),id=rep(1:n,each=length(times))) data <- merge(data,timesf,by.x="id",by.y="id") mt <- model.matrix(~factor(times),data) nm <- match(c("id","times"),names(data)) Z <- cbind(mt,data[,-nm]) } expit <- function(z) 1/(1+exp(-z)) ## expit p <- c(expit(as.matrix(Z) %*% coef)) y <- rbinom(length(p),1,p) data <- cbind(y,data) data <- count.history(data,status="y",id="id",types=1) data <- subset(data,data$Count1<=0) attr(data,"coef") <- beta return(data) }# }}} ##' @export predictSurvd <- function(ds,Z,times=1:6,se=FALSE,type="prob") {# {{{ if (!is.null(Z)) n <- nrow(Z) if (!is.null(Z)) data <- Z else data <- data.frame(id=1:n) Z <- data.frame(Z) Z$id <- 1:n ccc <- ds$coef if (!se) {# {{{{{{ data <- Z if (!is.null(times)) { timesf <- data.frame(times=rep(times,n),id=rep(1:n,each=length(times))) data <- merge(data,timesf,by.x="id",by.y="id") mt <- model.matrix(~factor(times),data) nm <- match(c("id","times"),names(data)) Z <- cbind(mt,data[,-nm]) } if (ncol(Z)!=length(c(ccc))) { print(head(Z)) print(ccc) stop("dimension of Z not consistent with length of coefficients"); } p <- c(expit(as.matrix(Z) %*% ccc)) preds <- data.frame(p=p,id=data$id,times=data$times) survt <- exp(cumsumstrata(log(1-preds$p),data$id-1,6)) if (type=="prob") pred <- 1-survt if (type=="surv") pred <- survt if (type=="hazard") pred <- p if (type=="rrm") { ## restricted residual mean ll <- length(survt) pred <- cumsum(c(1,survt[-ll])) } preds <- cbind(preds,pred) # }}} } else {# {{{ expit <- function(p) exp(p)/(1+exp(p)) Ft <- function(p) { xp <- as.matrix(Zi) %*% p lam <- expit(xp) st <- cumprod(1-lam) if (type=="prob") st <- 1-st if (type=="surv") st <- st if (type=="hazard") st <- lam if (type=="rrm") { ## restricted residual mean ll <- length(st) st <- cumsum(c(1,st[-ll])) } return(st) } preds <- c() for (i in 1:nrow(Z)) { Zi <- data.frame(Z[i,,drop=FALSE]) data <- Zi if (!is.null(times)) { timesf <- data.frame(times=rep(times,n),id=rep(1:n,each=length(times))) data <- merge(data,timesf,by.x="id",by.y="id") mt <- model.matrix(~factor(times),data) nm <- match(c("id","times"),names(data)) Zi <- cbind(mt,data[,-nm]) } if (is.null(ds$var)) covv <- vcov(ds) else covv <- ds$var eud <- estimate(coef=ds$coef,vcov=covv,f=function(p) Ft(p)) cmat <- data.frame(eud$coefmat) cmat$id <- i cmat$times <- times names(cmat)[1:4] <- c("pred","se","lower","upper") preds <- rbind(preds,cmat) } }# }}} return(preds) }# }}} ## }}} ##' @export plotSurvd <- function(ds,ids=NULL,add=FALSE,se=FALSE,cols=NULL,ltys=NULL,...) {# {{{ if (is.null(ids)) ids <- unique(ds$id) if (is.null(cols)) cols <- 1:length(ids) if (is.null(ltys)) ltys <- 1:length(ids) k <- 1 fplot <- 0 for (i in ids) { timei <- ds$time[ds$id==i] predi <- ds$pred[ds$id==i] if (fplot==0) { if (!add) plot(timei,predi,type="s",col=cols[k],lty=ltys[k],...) if (add) lines(timei,predi,type="s",col=cols[k],lty=ltys[k],...) fplot <- 1 } else lines(timei,predi,type="s",col=cols[k],lty=ltys[k],...) if (se) { loweri <- ds$lower[ds$id==i] upperi <- ds$upper[ds$id==i] plotConfRegion(timei,cbind(loweri,upperi),col=cols[k]) } k <- k+1 } } ## }}} ##' ## uses HaploSurvival package of github install via devtools ##' ## devtools::install_github("scheike/HaploSurvival") ##' ## this is only used for simulations ##' ## out <- simHaplo(1,100,tcoef,hapfreqs) ###simHaplo <- function(i,n,tcoef,hapfreqs) ###{ ## {{{ ### ### haplos <- sample(19,2*n,replace=TRUE,prob=hapfreqs$freq) ### haplos <- matrix(haplos,n,2) ### hap1 <- hapfreqs$haplotype[haplos[,1]] ### hap2 <- hapfreqs$haplotype[haplos[,2]] ### ### ### X <- t(apply(cbind(hap1,hap2),1,designftypes)) ### X <- data.frame(X,id=1:n) ### sud <- simTTP(coef=tcoef,Xglm=X,n=n,times=1:6) ### ## known haplotypes ### ssud <- glm(y~factor(times)+X1+X2+X3+X4+X5,data=sud,family=binomial()) ### ### genotype <- c() ### for (i in 1:11) ### genotype <- cbind(genotype,substr(hap1,i,i), substr(hap2,i,i) ) ### ### setup <- geno.setup(genotype,haplo.baseline=baseline,sep="") ### wh <- match(setup$uniqueHaploNames,hapfreqs$haplotype) ### wwf <- wh[!is.na(wh)] ### ghaplos <- matrix(unlist(setup$HPIordered),byrow=TRUE,ncol=2) ### ghaplos <- cbind(rep(1:n,setup$nPossHaps),ghaplos) ### ghaplos <- data.frame(ghaplos) ### names(ghaplos) <- c("id","haplo1","haplo2") ### haploff <- rep(0,length(setup$uniqueHaploNames)) ### haploff[!is.na(wh)] <- hapfreqs[wwf,"freq"] ###### ### hap1f <- haploff[ghaplos[,2]] ### hap2f <- haploff[ghaplos[,3]] ### hap12f <- hap1f*hap2f ### hapsshed <- hap12f ### ghaplos$p <- hapsshed ### ghaplos <- subset(ghaplos,p>0) ### ## back to characters for indentification of design ### ghaplos$haplo1 <- as.factor(setup$uniqueHaploNames[ghaplos$haplo1]) ### ghaplos$haplo2 <- as.factor(setup$uniqueHaploNames[ghaplos$haplo2]) ### ptot <- sumstrata(ghaplos$p,ghaplos$id-1,n) ### ghaplos$p <- ghaplos$p/ptot[ghaplos$id] ### ###sud$time <- sud$times ###Xdes <- model.matrix(~factor(time),sud) ###colnames(Xdes) <- paste("X",1:ncol(Xdes),sep="") ###X <- dkeep(sud,~id+y+time) ###X <- cbind(X,Xdes) ###Haplos <- dkeep(ghaplos,~id+"haplo*"+p) ###dtable(Haplos,~"haplo*",level=1) ######Haplos ###### ###y <- "y" ###time.name="time" ###desnames=paste("X",1:6,sep="") ###### ###### ###mm <- system.time( ###mud <- haplo.surv.discrete(X=X,y="y",time.name="time",##design.only=TRUE, ### Haplos=Haplos,designfunc=designftypes,desnames=desnames) ###) ### ### ### max haplo-type ### Haplos$nhaplo1 <- as.numeric(Haplos$haplo1) ### Haplos$nhaplo2 <- as.numeric(Haplos$haplo2) ### dsort(Haplos) <- ~id+nhaplo1+nhaplo2-p ### Haplos <- count.history(Haplos,status="p",types="1") ### mHaplos <- subset(Haplos,lbnr__id==1) ### bothid <- intersect(X$id, mHaplos$id) ### X <- subset(X, id %in% bothid) ### mHaplos <- subset(mHaplos, id %in% bothid) ### Xhap <- merge(X, mHaplos, by.x = "id", by.y = "id") ### mm <- grep("haplo*", names(Xhap)) ### X <- t(as.matrix(apply(Xhap[, mm], 1, designftypes))) ### ### ### mmud <- glm(y~factor(time)+X,data=Xhap,family=binomial()) ### ###ud <- list(coef=mud$coef,se=mud$se,se.robust=mud$se.robust,mcoef=mmud$coef,kcoef=ssud$coef) ###return(ud) ###} ## }}} ### ##' Discrete time to event interval censored data ##' ##' \deqn{ ##' logit(P(T >t | x)) = log(G(t)) + x \beta ##' } ##' \deqn{ ##' P(T >t | x) = \frac{1}{1 + G(t) exp( x \beta) } ##' } ##' ##' Input are intervals given by ]t_l,t_r] where t_r can be infinity for right-censored intervals ##' When truly discrete ]0,1] will be an observation at 1, and ]j,j+1] will be an observation at j+1 ##' ##' Likelihood is maximized: ##' \deqn{ ##' \prod P(T_i >t_{il} | x) - P(T_I> t_{ir}| x) ##' } ##' ##' @param formula formula ##' @param data data ##' @param beta starting values ##' @param no.opt optimization TRUE/FALSE ##' @param method NR, nlm ##' @param stderr to return only estimate ##' @param weights weights following id for GLM ##' @param offsets following id for GLM ##' @param exp.link parametrize increments exp(alpha) > 0 ##' @param increment using increments dG(t)=exp(alpha) as parameters ##' @param ... Additional arguments to lower level funtions lava::NR optimizer or nlm ##' @author Thomas Scheike ##' @examples ##' data(ttpd) ##' out <- interval.logitsurv.discrete(Interval(entry,time2)~X1+X2+X3+X4,ttpd) ##' summary(out) ##' ##' n <- 100 ##' Z <- matrix(rbinom(n*4,1,0.5),n,4) ##' outsim <- simlogitSurvd(out$coef,Z) ##' outsim <- transform(outsim,left=time,right=time+1) ##' outsim <- dtransform(outsim,right=Inf,status==0) ##' ##' outss <- interval.logitsurv.discrete(Interval(left,right)~+X1+X2+X3+X4,outsim) ##' ##' Z <- matrix(0,5,4) ##' Z[2:5,1:4] <- diag(4) ##' pred <- predictlogitSurvd(out,se=FALSE) ##' plotSurvd(pred) ##' ##' ## simulations ##' n <- 100 ##' Z <- matrix(rbinom(n*4,1,0.5),n,4) ##' outsim <- simlogitSurvd(out$coef,Z) ##' ### ##' outsim <- transform(outsim,left=time,right=time+1) ##' outsim <- dtransform(outsim,right=Inf,status==0) ##' ##' out$coef ##' outss <- interval.logitsurv.discrete(Interval(left,right)~+X1+X2+X3+X4,outsim) ##' summary(outss) ##' ##' @aliases Interval dInterval simlogitSurvd predictlogitSurvd ##' @export interval.logitsurv.discrete <- function (formula,data,beta=NULL,no.opt=FALSE,method="NR", stderr=TRUE,weights=NULL,offsets=NULL,exp.link=1,increment=1,...) { ## {{{ cl <- match.call() m <- match.call(expand.dots = TRUE)[1:3] special <- c("strata", "cluster","offset") Terms <- terms(formula, special, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") m <- eval(m, parent.frame()) Y <- model.extract(m, "response") if (ncol(Y)==2) { time2 <- eventtime <- Y[,2] entrytime <- Y[,1] left <- 0 } else { time2 <- eventtime <- Y[,2] status <- delta <- Y[,3] entrytime <- Y[,1] left <- 1 if (max(entrytime)==0) left <- 0 } id <- strata <- NULL if (!is.null(attributes(Terms)$specials$cluster)) { ts <- survival::untangle.specials(Terms, "cluster") pos.cluster <- ts$terms Terms <- Terms[-ts$terms] id <- m[[ts$vars]] } else pos.cluster <- NULL if (!is.null(attributes(Terms)$specials$strata)) { ts <- survival::untangle.specials(Terms, "strata") pos.strata <- ts$terms Terms <- Terms[-ts$terms] strata <- m[[ts$vars]] strata.name <- ts$vars } else { strata.name <- NULL; pos.strata <- NULL} X <- model.matrix(Terms, m) if (!is.null(intpos <- attributes(Terms)$intercept)) X <- X[,-intpos,drop=FALSE] if (ncol(X)>0) X.names <- colnames(X) else X.names <- NULL ### if (ncol(X)==0) X <- NULL ## times 1 -> mutimes , 0 til start utimes <- sort(unique(c(time2,entrytime))) ### time2 <- fast.approx(utimes,time2)-1 ### entrytime <- fast.approx(utimes,entrytime)-1 mutimes <- max(utimes[utimes0) { X2 <- .Call("vecMatMat",X,X)$vXZ XtL <- .Call("vecMatMat",X,tL)$vXZ XtR <- .Call("vecMatMat",X,tR)$vXZ } tL2 <- .Call("vecMatMat",tL,tL)$vXZ tR2 <- .Call("vecMatMat",tR,tR)$vXZ ## weights/offets will follow id if (is.null(weights)) weights <- rep(1,n); # else wiid <- weights if (is.null(offsets)) offsets <- rep(0,n); # else offsets <- offsets if (is.null(beta)) beta <- rep(0,ncol(X)+mutimes) expit <- function(z) 1/(1+exp(-z)) ## expit logit <- function(p) log(p/(1-p)) ## logit beta[1:mutimes] <- (1:mutimes)*exp(logit( (sum(time20) { betal <- pp[-c(1:mutimes)] Zbeta <- c(X %*% betal+offsets) } else {Zbeta <- offsets } xltheta <- c(tL %*% theta) xrtheta <- c(tR %*% theta) EZbeta <- exp(Zbeta) GEl <- xltheta * EZbeta GEr <- xrtheta * EZbeta Stl <- 1/(1+GEl) Str <- 1/(1+GEr) ############################################ ## likelihood ############################################ # {{{ p <- Stl-Str*(time20) { DbetaStl <- -X*GEl*Stl^2 DbetaStr <- -(time20) { Dlogliid <- cbind(Dglogp*weights,Dbetalogp*weights) Dlogl <- apply(Dlogliid,2,sum) } else { Dlogliid <- Dglogp*weights Dlogl <- apply(Dlogliid,2,sum) } if (exp.link==1) { Dlogliid[,1:mutimes] <- t( t(Dlogliid[,1:mutimes])*theta) Dlogl[1:mutimes] <- Dlogl[1:mutimes]*theta } # }}} ############################################ ## 2nd Derivative ############################################ # {{{ if (ncol(X)>0) { D2betaStl <- X2*(GEl^2-GEl)*Stl^3 D2betaStr <- X2*(time20) { DbetalpDbetalp <- .Call("vecMatMat",Dbetalogp,Dbetalogp)$vXZ DbetalpDglp <- .Call("vecMatMat",Dbetalogp,Dglogp)$vXZ D2betalogp <- (D2betaStl-D2betaStr)/p - DbetalpDbetalp Dbetaglogp <- (DbetagStl-DbetagStr)/p - DbetalpDglp D2beta <- apply(weights*D2betalogp,2,sum) Dbetag <- apply(weights*Dbetaglogp,2,sum) } D2log <- matrix(0,length(pp),length(pp)) D2log[1:mutimes,1:mutimes] <- D2g if (ncol(X)>0) { ###D2log[1:mutimes,(mutimes+1):length(pp)] <- Dbetag D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag D2log[1:mutimes,(mutimes+1):length(pp)] <- t(D2log[(mutimes+1):length(pp),1:mutimes]) D2log[(mutimes+1):length(pp),(mutimes+1):length(pp)] <- D2beta } if (exp.link==1) { D2log[1:mutimes,1:mutimes] <- diag(Dlogl[1:mutimes]) + D2log[1:mutimes,1:mutimes]*(theta %o% theta) if (ncol(X)>0) { D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag*rep(theta,each=length(betal)) ###D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag*rep(theta,length(betal)) D2log[1:mutimes,(mutimes+1):length(pp)] <- t(D2log[(mutimes+1):length(pp),1:mutimes]) } } # }}} ############################################ ploglik <- sum(logl) gradient <- Dlogl hessian <- D2log if (all) { ihess <- solve(hessian) beta.iid <- Dlogliid %*% ihess ## %*% t(Dlogl) robvar <- crossprod(beta.iid) val <- list(par=pp,ploglik=ploglik,gradient=gradient,hessian=hessian,ihessian=ihess, iid=beta.iid,robvar=robvar,var=-ihess, se=diag(-ihess)^.5,se.robust=diag(robvar)^.5) return(val) } structure(-ploglik,gradient=-gradient,hessian=-hessian) }# }}} p <- ncol(X) opt <- NULL if (no.opt==FALSE) { if (tolower(method)=="nr") { tim <- system.time(opt <- lava::NR(beta,obj,...)) opt$timing <- tim opt$estimate <- opt$par } else { opt <- nlm(obj,beta,...) opt$method <- "nlm" } cc <- opt$estimate; if (!stderr) return(cc) val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) } else val <- c(list(coef=beta),obj(beta,all=TRUE)) uu <- utimes[utimes0) X.names <- colnames(X) else X.names <- NULL ###### if (ncol(X)==0) X <- NULL ### ### ## times 1 -> mutimes , 0 til start ### utimes <- sort(unique(c(time2,entrytime))) ###### time2 <- fast.approx(utimes,time2)-1 ###### entrytime <- fast.approx(utimes,entrytime)-1 ### mutimes <- max(utimes[utimes0) { ### X2 <- .Call("vecMatMat",X,X)$vXZ ### XtL <- .Call("vecMatMat",X,tL)$vXZ ### XtR <- .Call("vecMatMat",X,tR)$vXZ ### } ### tL2 <- .Call("vecMatMat",tL,tL)$vXZ ### tR2 <- .Call("vecMatMat",tR,tR)$vXZ ### ### ### ## weights/offets will follow id ### if (is.null(weights)) weights <- rep(1,n); # else wiid <- weights ### if (is.null(offsets)) offsets <- rep(0,n); # else offsets <- offsets ### if (is.null(beta)) beta <- rep(0,ncol(X)+mutimes) ### expit <- function(z) 1/(1+exp(-z)) ## expit ### ### beta[1:mutimes] <- (1:mutimes)*exp(logit( (sum(time20) { ###Zbeta <- c(X %*% betal+offsets) ###} else {Zbeta <- offsets } ###xltheta <- c(tL %*% theta) ###xrtheta <- c(tR %*% theta) ###EZbeta <- exp(Zbeta) ###GEl <- xltheta * EZbeta ###GEr <- xrtheta * EZbeta ###Stl <- 1/(1+GEl) ###Str <- 1/(1+GEr) ### ############################################### ##### likelihood ############################################### #### {{{ ###p <- Stl-Str*(time20) { ###DbetaStl <- -X*GEl*Stl^2 ###DbetaStr <- -(time20) { ###Dlogl <- c(apply(Dglogp*weights,2,sum),apply(Dbetalogp*weights,2,sum)) ###} else Dlogl <- c(apply(Dglogp*weights,2,sum)) ###if (exp.link==1) { ###Dlogl[1:mutimes] <- Dlogl[1:mutimes]*theta ###} #### }}} ############################################### ##### 2nd Derivative ############################################### #### {{{ ###if (ncol(X)>0) { ###D2betaStl <- X2*(GEl^2-GEl)*Stl^3 ###D2betaStr <- X2*(time20) { ###DbetalpDbetalp <- .Call("vecMatMat",Dbetalogp,Dbetalogp)$vXZ ###DbetalpDglp <- .Call("vecMatMat",Dbetalogp,Dglogp)$vXZ ### ###D2betalogp <- (D2betaStl-D2betaStr)/p - DbetalpDbetalp ###Dbetaglogp <- (DbetagStl-DbetagStr)/p - DbetalpDglp ###D2beta <- apply(weights*D2betalogp,2,sum) ###Dbetag <- apply(weights*Dbetaglogp,2,sum) ###} ### ### ### ###D2log <- matrix(0,length(pp),length(pp)) ###D2log[1:mutimes,1:mutimes] <- D2g ### ###if (ncol(X)>0) { ######D2log[1:mutimes,(mutimes+1):length(pp)] <- Dbetag ###D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag ###D2log[1:mutimes,(mutimes+1):length(pp)] <- t(D2log[(mutimes+1):length(pp),1:mutimes]) ###D2log[(mutimes+1):length(pp),(mutimes+1):length(pp)] <- D2beta ###} ### ###if (exp.link==1) { ###D2log[1:mutimes,1:mutimes] <- diag(Dlogl[1:mutimes]) + D2log[1:mutimes,1:mutimes]*(theta %o% theta) ###if (ncol(X)>0) { ###D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag*rep(theta,each=length(betal)) ######D2log[(mutimes+1):length(pp),1:mutimes] <- Dbetag*rep(theta,length(betal)) ###D2log[1:mutimes,(mutimes+1):length(pp)] <- t(D2log[(mutimes+1):length(pp),1:mutimes]) ###} ###} ### #### }}} ############################################### ### ###ploglik <- sum(logl) ###gradient <- Dlogl ###hessian <- D2log ### ### if (all) { ### ihess <- solve(hessian) ### beta.iid <- Dlogl %*% ihess ## %*% t(Dlogl) ### robvar <- crossprod(beta.iid) ### val <- list(par=pp,ploglik=ploglik,gradient=gradient,hessian=hessian,ihessian=ihess, ### iid=beta.iid,robvar=robvar,var=-ihess, ### se=diag(-ihess)^.5,se.robust=diag(robvar)^.5) ### return(val) ### } ### structure(-ploglik,gradient=-gradient,hessian=-hessian) ###}# }}} ### ### p <- ncol(X) ### opt <- NULL ### if (p>0) { ### if (no.opt==FALSE) { ### if (tolower(method)=="nr") { ### tim <- system.time(opt <- lava::NR(beta,obj,...)) ### opt$timing <- tim ### opt$estimate <- opt$par ### } else { ### opt <- nlm(obj,beta,...) ### opt$method <- "nlm" ### } ### cc <- opt$estimate; ### if (!stderr) return(cc) ### val <- c(list(coef=cc),obj(opt$estimate,all=TRUE)) ### } else val <- c(list(coef=beta),obj(beta,all=TRUE)) ### } else { ### val <- obj(0,all=TRUE) ### } ### ### uu <- utimes[utimes 0) cuts <- c(cut.first,cuts) ### lleft <- fast.approx(cuts,time,type="left") rright <- fast.approx(cuts,time2,type="right") out <- data.frame(time=time,time2=time2,left=lleft-1,right=rright-1) attr(out,"cuts") <- cuts out$leftd <- cuts[lleft] out$rightd <- cuts[rright] if (max(cuts)==Inf) out$right[out$rightd==Inf] <- Inf if (any(out$timeout$rightd)) warning("right not in [leftd,rightd]\n") if (show) { mtime <- mmtime <- max(cuts[cuts0) EZ <- exp(sum(Zi*beta)) else EZ <- 1 pred <- 1/(1+Gt*EZ) return(pred) }# }}} preds <- c() for (i in 1:length(EZbeta)) { if (is.null(x$var)) covv <- vcov(x) else covv <- x$var eud <- estimate(coef=x$coef,vcov=covv,f=function(p) Ft(p,Zi=Z[i,])) cmat <- data.frame(eud$coefmat) cmat$id <- i cmat$times <- times names(cmat)[1:4] <- c("pred","se","lower","upper") preds <- rbind(preds,cmat) } }# }}} return(preds) } ## }}} mets/R/twinlm.R0000644000176200001440000005750513623061405013074 0ustar liggesusers###{{{ twinlm ##' Fits a classical twin model for quantitative traits. ##' ##' @title Classic twin model for quantitative traits ##' @return Returns an object of class \code{twinlm}. ##' @author Klaus K. Holst ##' @seealso \code{\link{bptwin}}, \code{\link{twinlm.time}}, \code{\link{twinlm.strata}}, \code{\link{twinsim}} ##' @aliases twinlm twinlm.strata ##' @export ##' @examples ##' ## Simulate data ##' set.seed(1) ##' d <- twinsim(1000,b1=c(1,-1),b2=c(),acde=c(1,1,0,1)) ##' ## E(y|z1,z2) = z1 - z2. var(A) = var(C) = var(E) = 1 ##' ##' ## E.g to fit the data to an ACE-model without any confounders we simply write ##' ace <- twinlm(y ~ 1, data=d, DZ="DZ", zyg="zyg", id="id") ##' ace ##' ## An AE-model could be fitted as ##' ae <- twinlm(y ~ 1, data=d, DZ="DZ", zyg="zyg", id="id", type="ae") ##' ## LRT: ##' lava::compare(ae,ace) ##' ## AIC ##' AIC(ae)-AIC(ace) ##' ## To adjust for the covariates we simply alter the formula statement ##' ace2 <- twinlm(y ~ x1+x2, data=d, DZ="DZ", zyg="zyg", id="id", type="ace") ##' ## Summary/GOF ##' summary(ace2) ##' \donttest{ ## Reduce Ex.Timings ##' ## An interaction could be analyzed as: ##' ace3 <- twinlm(y ~ x1+x2 + x1:I(x2<0), data=d, DZ="DZ", zyg="zyg", id="id", type="ace") ##' ace3 ##' ## Categorical variables are also supported ##' d2 <- transform(d,x2cat=cut(x2,3,labels=c("Low","Med","High"))) ##' ace4 <- twinlm(y ~ x1+x2cat, data=d2, DZ="DZ", zyg="zyg", id="id", type="ace") ##' } ##' @keywords models ##' @keywords regression ##' @param formula Formula specifying effects of covariates on the response ##' @param data \code{data.frame} with one observation pr row. In ##' addition a column with the zygosity (DZ or MZ given as a factor) of ##' each individual much be ##' specified as well as a twin id variable giving a unique pair of ##' numbers/factors to each twin pair ##' @param id The name of the column in the dataset containing the twin-id variable. ##' @param zyg The name of the column in the dataset containing the ##' zygosity variable ##' @param DZ Character defining the level in the zyg variable ##' corresponding to the dyzogitic twins. If this argument is missing, ##' the reference level (i.e. the first level) will be interpreted as ##' the dyzogitic twins ##' @param group Optional. Variable name defining group for interaction analysis (e.g., gender) ##' @param group.equal If TRUE marginals of groups are asummed to be the same ##' @param strata Strata variable name ##' @param weights Weights matrix if needed by the chosen estimator. For use ##' with Inverse Probability Weights ##' @param type Character defining the type of analysis to be ##' performed. Should be a subset of "aced" (additive genetic factors, common ##' environmental factors, unique environmental factors, dominant ##' genetic factors). ##' @param twinnum The name of the column in the dataset numbering the ##' twins (1,2). If it does not exist in \code{data} it will ##' automatically be created. ##' @param binary If \code{TRUE} a liability model is fitted. Note that if the right-hand-side of the formula is a factor, character vector, og logical variable, then the liability model is automatically chosen (wrapper of the \code{bptwin} function). ##' @param ordinal If non-zero (number of bins) a liability model is fitted. ##' @param keep Vector of variables from \code{data} that are not ##' specified in \code{formula}, to be added to data.frame of the SEM ##' @param estimator Choice of estimator/model ##' @param constrain Development argument ##' @param control Control argument parsed on to the optimization routine ##' @param messages Control amount of messages shown ##' @param ... Additional arguments parsed on to lower-level functions twinlm <- function(formula, data, id, zyg, DZ, group=NULL, group.equal=FALSE, strata=NULL, weights=NULL, type=c("ace"), twinnum="twinnum", binary=FALSE,ordinal=0, keep=weights,estimator=NULL, constrain=TRUE,control=list(),messages=1,...) { cl <- match.call(expand.dots=TRUE) opt <- options(na.action="na.pass") mf <- model.frame(formula,data) mt <- attr(mf, "terms") y <- model.response(mf, "any") ## formula <- update(formula, ~ . + 1) yvar <- getoutcome(formula) if (missing(zyg)) stop("Zygosity variable not specified") if (!(zyg%in%colnames(data))) stop("'zyg' not found in data") if (!(id%in%colnames(data))) stop("'id' not found in data") if (missing(id)) stop("Twin-pair variable not specified") if (binary || ordinal || is.factor(mf[,yvar]) || is.character(mf[,yvar]) || is.logical(mf[,yvar])) { if (length(unique(mf[,yvar]))>2 || ordinal) { if (is.character(mf[,yvar])) { y <- as.factor(y) } if (ordinal<2) ordinal <- length(unique(mf[,yvar])) y <- as.numeric(y)-1 } else { args <- as.list(cl) names(args)[which(names(args)=="formula")] <- "x" args[[1]] <- NULL return(do.call("bptwin",args,envir=parent.frame())) } } cl$ordinal <- ordinal formulaId <- unlist(Specials(formula,"cluster")) formulaStrata <- unlist(Specials(formula,"strata")) formulaSt <- paste("~.-cluster(",formulaId,")-strata(",paste(formulaStrata,collapse="+"),")") formula <- update(formula,formulaSt) if (!is.null(formulaId)) { id <- formulaId cl$id <- id } if (!is.null(formulaStrata)) strata <- formulaStrata cl$formula <- formula if (!is.null(strata)) { dd <- split(data,interaction(data[,strata])) nn <- unlist(lapply(dd,nrow)) dd[which(nn==0)] <- NULL if (length(dd)>1) { fit <- lapply(seq(length(dd)),function(i) { if (messages>0) message("Strata '",names(dd)[i],"'") cl$data <- dd[[i]] eval(cl) }) res <- list(model=fit) res$strata <- names(res$model) <- names(dd) class(res) <- c("twinlm.strata","twinlm") res$coef <- unlist(lapply(res$model,coef)) res$vcov <- blockdiag(lapply(res$model,vcov)) res$N <- length(dd) res$idx <- seq(length(coef(res$model[[1]]))) rownames(res$vcov) <- colnames(res$vcov) <- names(res$coef) return(res) } } type <- tolower(type) ## if ("u" %in% type) type <- c("ue") varnames <- all.vars(formula) latentnames <- c("a1","a2","c1","c2","d1","d2","e1","e2") if (any(latentnames%in%varnames)) stop(paste(paste(latentnames,collapse=",")," reserved for names of latent variables.",sep="")) M <- model.matrix(formula,mf) options(opt) covars <- colnames(M) hasIntercept <- FALSE if (attr(terms(formula),"intercept")==1) { hasIntercept <- TRUE covars <- covars[-1] } if(length(covars)<1) covars <- NULL zygstat <- data[,zyg] if(!is.factor(zygstat)) { zygstat <- as.factor(zygstat) } zyglev <- levels(zygstat) if (length(zyglev)>2) stop("More than two zygosity levels found. For opposite sex (OS) analysis use the 'group' argument (and regroup OS group as DZ, e.g. DZ=c('OS','DZ'))") if (tolower(type)=="cor") type <- "u" if (!is.null(group) && type%in%c("u","flex","sat")) stop("Only polygenic models are allowed with 'group' ('type' subset of 'acde'). See also the 'strata' argument.") ## To wide format: num <- NULL; if (twinnum%in%colnames(data)) num <- twinnum if (!is.null(group)) data[,group] <- as.factor(data[,group]) y <- data.frame(y); names(y) <- yvar #y <- cbind(as.vector(y)); colnames(y) <- yvar data <- cbind(y,data[,c(keep,num,zyg,id,group)],M) ddd <- fast.reshape(data,id=c(id),varying=c(yvar,keep,covars,group),keep=zyg,num=num,sep=".",labelnum=TRUE) groups <- paste(group,".",1:2,sep="") outcomes <- paste(yvar,".",1:2,sep="") if (missing(DZ)) { warning("Using first level, `",zyglev[1],"', in status variable as indicator for 'dizygotic'", sep="") DZ <- zyglev[1] } MZ <- setdiff(zyglev,DZ) wide1 <- ddd[which(ddd[,zyg]==MZ),,drop=FALSE] wide2 <- ddd[which(ddd[,zyg]%in%DZ),,drop=FALSE] mm <- nn <- c() dd <- list() levgrp <- NULL if (!is.null(group)) { levgrp <- levels(data[,group]) for (i1 in levgrp) { for (i2 in levgrp) { idxMZ <- which(wide1[,groups[1]]==i1 & wide1[,groups[2]]==i2) dMZ <- wide1[idxMZ,,drop=FALSE] idxDZ <- which(wide2[,groups[1]]==i1 & wide2[,groups[2]]==i2) dDZ <- wide2[idxDZ,,drop=FALSE] m0 <- twinsem1(outcomes,c(i1,i2), levels=levgrp,covars=covars,type=type, data=list(dMZ,dDZ),constrain=constrain, equal.marg=group.equal,intercept=hasIntercept, ordinal=ordinal)$model if (length(idxMZ)>0) { nn <- c(nn,paste("MZ:",i1,sep="")) dd <- c(dd,list(dMZ)) mm <- c(mm,list(m0[[1]])) } if (length(idxDZ)>0) { nn <- c(nn,paste("DZ:",i1," ",i2,sep="")) dd <- c(dd,list(dDZ)) mm <- c(mm,list(m0[[2]])) } } }; names(mm) <- nn; names(dd) <- nn } else { mm <- twinsem1(outcomes,NULL, levels=NULL,covars=covars,type=type, data=list(wide1,wide2),constrain=constrain, intercept=hasIntercept,ordinal=ordinal)$model dd <- list(MZ=wide1,DZ=wide2) } newkeep <- unlist(sapply(keep, function(x) paste(x, 1:2, sep = "."))) if (!is.null(estimator) && (inherits(estimator,c("numeric","logical")) && !estimator)) return(multigroup(mm, dd, missing=TRUE,fix=FALSE,keep=newkeep,type=2)) optim <- list() if (is.null(control$start)) { optim <- list(start=rep(0.1,length(coef(mm[[1]]))*length(mm))) ## optim <- list(method="nlminb2",refit=FALSE,gamma=1,start=rep(0.1,length(coef(mm[[1]]))*length(mm))) optim$start <- twinlmStart(formula,na.omit(mf),type,hasIntercept, surv=inherits(data[,yvar],"Surv"),ordinal=ordinal, model=mm, group=levgrp, group.equal=group.equal) } if (length(control)>0) { optim[names(control)] <- control } if (inherits(data[,yvar],"Surv")) { ##if (!requireNamespace("lava.tobit",quietly=TRUE)) stop("lava.tobit required") if (!is.null(estimator) && estimator%in%c("gaussian","tobit")) optim$method <- "nlminb1" suppressWarnings(e <- estimate(mm,dd,control=optim,estimator=estimator,...)) } else { suppressWarnings(e <- estimate(mm,dd,weights=weights,estimator=estimator,fix=FALSE,control=optim,...)) } if (!is.null(optim$refit) && optim$refit) { optim$method <- "NR" optim$start <- pars(e) if (inherits(mf[,yvar],"Surv")) { suppressWarnings(e <- estimate(mm,dd,estimator=estimator,fix=FALSE,control=optim,...)) } else { suppressWarnings(e <- estimate(mm,dd,weights=weights,estimator=estimator,fix=FALSE,control=optim,...)) } } e$vcov <- Inverse(information(e,type="hessian")) counts <- function(dd) { dd0 <- apply(dd,2,function(x) !is.na(x)) pairs <- sum(dd0[,1]*dd0[,2]) singletons <- sum((!dd0[,1])*dd0[,2] + (!dd0[,2])*dd0[,1]) return(c(pairs,singletons)) } counts <- lapply(dd, function(x) counts(x[,outcomes])) ## mz <- counts(object$data.mz[,object$outcomes]) ## dz <- counts(object$data.dz[,object$outcomes]) if (!e$model$missing) { zygtab <- c("MZ-pairs"=counts[[1]][1],"DZ-pairs"=counts[[2]][1]) } else { zygtab <- c(paste(counts[[1]],collapse="/"),paste(counts[[2]],collapse="/")) names(zygtab) <- c("MZ-pairs/singletons","DZ-pairs/singletons") } res <- list(coefficients=e$opt$estimate, vcov=e$vcov, estimate=e, model=mm, call=cl, data=data, zyg=zyg, id=id, twinnum=twinnum, type=type, group=group, constrain=constrain, outcomes=outcomes, zygtab=zygtab, nam=nn, groups=levgrp, group.equal=group.equal, counts=counts,ordinal=ordinal) class(res) <- "twinlm" return(res) } ###}}} twinlm ###{{{ twinsem1 (create lava model) ##outcomes <- c("y1","y2"); groups <- c("M","F"); covars <- NULL; type <- "ace" ##twinsem1(c("y1","y2"),c("M","F")) twinsem1 <- function(outcomes,groups=NULL,levels=NULL,covars=NULL,type="ace",data,constrain=TRUE,equal.marg=FALSE,intercept=TRUE,ordinal=0,...) { isA <- length(grep("a",type))>0 & type!="sat" isC <- length(grep("c",type))>0 isD <- length(grep("d",type))>0 isE <- length(grep("e",type))>0 | type=="sat" | type=="u" lambdas <- c("lambda[a]","lambda[c]","lambda[d]","lambda[e]") varidx <- which(c(isA,isC,isD,isE)) vMZ1 <- c("a1","c1","d1","e1") vMZ2 <- c("a1","c1","d1","e2") vDZ2 <- c("a2","c1","d2","e2") rhoA <- rhoD <- zA <- zD <- NULL ##if (ordinal>0) { ## mm <- lapply(mm, function(x) { ## x ## }) ## } if (is.list(outcomes)) { if (!is.null(groups) & is.null(levels)) stop("missing levels") if (is.null(groups)) groups <- c("","") grp <- paste(sort(groups),collapse=" ") sameGroup <- groups[1]==groups[2] model1 <- outcomes[[1]] model2 <- outcomes[[2]] if (!is.null(levels)) { pars <- c() for (i in seq(length(levels)-1)) for (j in seq(i+1,length(levels))) pars <- c(pars,paste(sort(levels)[c(i,j)],collapse=" ")) if (isA) { parameter(model1) <- paste("z(A):",pars,sep="") parameter(model2) <- paste("z(A):",pars,sep="") } if (isD) { parameter(model1) <- paste("z(D):",pars,sep="") parameter(model2) <- paste("z(D):",pars,sep="") } } outcomes <- endogenous(model1) if (!(type%in%c("u","flex","sat"))) { if (equal.marg) { regression(model1,to=outcomes[1],from=vMZ1[varidx]) <- lambdas[varidx] regression(model1,to=outcomes[2],from=vMZ2[varidx]) <- lambdas[varidx] regression(model2,to=outcomes[1],from=vMZ1[varidx]) <- lambdas[varidx] regression(model2,to=outcomes[2],from=vDZ2[varidx]) <- lambdas[varidx] } else { regression(model1,to=outcomes[1],from=vMZ1[varidx]) <- paste(lambdas,groups[1],sep="")[varidx] regression(model1,to=outcomes[2],from=vMZ2[varidx]) <- paste(lambdas,groups[2],sep="")[varidx] regression(model2,to=outcomes[1],from=vMZ1[varidx]) <- paste(lambdas,groups[1],sep="")[varidx] regression(model2,to=outcomes[2],from=vDZ2[varidx]) <- paste(lambdas,groups[2],sep="")[varidx] } } if (sameGroup) { if (isA) covariance(model2,a1~a2) <- 0.5 if (isD) covariance(model2,d1~d2) <- 0.25 } else { if (isA) { rhoA <- paste("Kinship[A]:",grp,sep="") zA <- paste("z(A):",grp,sep="") covariance(model2, a1~a2) <- rhoA constrain(model2, rhoA,zA) <- function(x) tanh(x) } if (isD) { rhoD <- paste("Kinship[D]:",grp,sep="") zD <- paste("z(D):",grp,sep="") covariance(model2, d1~d2) <- rhoD constrain(model2, rhoD,zD) <- function(x) tanh(x) } } if (ordinal>0) { for (i in c("model1","model2")) { model <- get(i) yy <- lava::endogenous(model) if (type=="sat") { lava::ordinal(model,K=ordinal) <- yy } else { pname <- paste0("t",seq_len(ordinal-1)) if (type=="flex") pname <- paste0(pname,gsub("model","",i)) lava::ordinal(model,K=ordinal,pname) <- yy } if (!(type%in%c("u","flex","sat"))) { lava::covariance(model,yy) <- 0 lava::regression(model,from="e1",to=yy[1]) <- 1 lava::regression(model,from="e2",to=yy[2]) <- 1 } assign(i,model) } } return(list(model=list(MZ=model1,DZ=model2), zA=zA, rhoA=rhoA, zD=zD, rhoD=rhoD)) } ### Build model from scratch.... model1<- lvm() if (!(type%in%c("u","flex","sat"))) { model1 <- regression(model1,to=outcomes[1],from=vMZ1[varidx]) model1 <- regression(model1,to=outcomes[2],from=vMZ2[varidx]) } else { addvar(model1) <- outcomes covariance(model1) <- outcomes } latent(model1) <- union(vMZ1[varidx],vMZ2[varidx]) intercept(model1,latent(model1)) <- 0 if (!is.null(covars)) for (i in 1:length(covars)) { regression(model1, from=paste(covars[i],".1",sep=""), to=outcomes[1],silent=TRUE) <- paste("beta[",i,"]",sep="") regression(model1, from=paste(covars[i],".2",sep=""), to=outcomes[2],silent=TRUE) <- paste("beta[",i,"]",sep="") } covariance(model1,outcomes) <- 0 covariance(model1, latent(model1)) <- 1 if (!type%in%c("sat","flex")) { intercept(model1,outcomes) <- "mu" } if (type%in%c("u","flex","sat")) { kill(model1) <- ~e1+e2 covariance(model1,outcomes) <- "v1" } model2 <- model1 if (!(type%in%c("u","flex","sat"))) { model2 <- cancel(model2,c(outcomes[2],vMZ2[varidx])) model2 <- regression(model2,to=outcomes[2],from=vDZ2[varidx]) latent(model2) <- vDZ2[varidx] intercept(model2, latent(model2)) <- 0 covariance(model2, latent(model2)) <- 1 } if (type=="flex") { varMZ <- paste("var(MZ)",groups,sep="") varDZ <- paste("var(DZ)",groups,sep="") intercept(model1,outcomes) <- "mu1" intercept(model2,outcomes) <- "mu2" covariance(model1,outcomes) <- varMZ covariance(model2,outcomes) <- varDZ } if (type=="sat") { varMZ <- c(paste("var(MZ)1",groups[1],""), paste("var(MZ)2",groups[2],"")) varDZ <- c(paste("var(DZ)1",groups[1],""), paste("var(DZ)2",groups[2],"")) covariance(model1,outcomes) <- varMZ covariance(model2,outcomes) <- varDZ } if (type%in%c("u","flex","sat")) { if (constrain) { if (ordinal) { covariance(model1,outcomes,pairwise=TRUE) <- "covMZ" covariance(model2,outcomes,pairwise=TRUE) <- "covDZ" constrain(model1,"atanh(rhoMZ)","covMZ") <- tanh constrain(model2,"atanh(rhoDZ)","covDZ") <- tanh } if (type=="sat") { if (!ordinal) { model1 <- covariance(model1,outcomes,constrain=TRUE,rname="atanh(rhoMZ)",cname="covMZ",lname="log(var(MZ)).1",l2name="log(var(MZ)).2") model2 <- covariance(model2,outcomes,constrain=TRUE,rname="atanh(rhoDZ)",cname="covDZ",lname="log(var(DZ)).1",l2name="log(var(DZ)).2") } } else { if (type=="flex") { if (!ordinal) { model1 <- covariance(model1,outcomes,constrain=TRUE,rname="atanh(rhoMZ)",cname="covMZ",lname="log(var(MZ))") model2 <- covariance(model2,outcomes,constrain=TRUE,rname="atanh(rhoDZ)",cname="covDZ",lname="log(var(DZ))") } } else { if (!ordinal) { model1 <- covariance(model1,outcomes,constrain=TRUE,rname="atanh(rhoMZ)",cname="covMZ",lname="log(var)") model2 <- covariance(model2,outcomes,constrain=TRUE,rname="atanh(rhoDZ)",cname="covDZ",lname="log(var)") } } } } else { covariance(model1,outcomes[1],outcomes[2]) <- "covMZ" covariance(model2,outcomes[1],outcomes[2]) <- "covDZ" } } if (!is.null(covars) & type%in%c("flex","sat")) { sta <- "" if (type=="sat") sta <- "b" for (i in 1:length(covars)) { regression(model1, from=paste(covars[i],".1",sep=""), to=outcomes[1],silent=TRUE) <- paste("beta1[",i,"]",sep="") regression(model1, from=paste(covars[i],".2",sep=""), to=outcomes[2],silent=TRUE) <- paste("beta1",sta,"[",i,"]",sep="") regression(model2, from=paste(covars[i],".1",sep=""), to=outcomes[1],silent=TRUE) <- paste("beta2[",i,"]",sep="") regression(model2, from=paste(covars[i],".2",sep=""), to=outcomes[2],silent=TRUE) <- paste("beta2",sta,"[",i,"]",sep="") } } if (!intercept) { intercept(model1,outcomes) <- 0 intercept(model2,outcomes) <- 0 } ## Full rank covariate/design matrix? if (!missing(data)) for (i in covars) { myvars <- paste(i,c(1,2),sep=".") dif <- data[[1]][,myvars[1]]-data[[1]][,myvars[2]] mykeep <- myvars if (all(na.omit(dif)==00)) { mykeep <- mykeep[-2] } trash <- setdiff(myvars,mykeep) if (length(mykeep)==1) { regression(model1, to=outcomes[2], from=mykeep) <- lava::regfix(model1)$label[trash,outcomes[2]] kill(model1) <- trash } dif <- data[[2]][,myvars[1]]-data[[2]][,myvars[2]] mykeep <- myvars if (all(na.omit(dif)==00)) { mykeep <- mykeep[-2] } trash <- setdiff(myvars,mykeep) if (length(mykeep)==1) { regression(model2, to=outcomes[2], from=mykeep) <- lava::regfix(model2)$label[trash,outcomes[2]] kill(model2) <- trash } } twinsem1(list(MZ=model1,DZ=model2),groups=groups,type=type,levels=levels,constrain=constrain,equal.marg=equal.marg,ordinal=ordinal) } ###}}} twinsem1 ###{{{ twinlmStart (starting values) twinlmStart <- function(formula,mf,type,hasIntercept,surv=FALSE,ordinal=0,model,group=NULL,group.equal,...) { if (surv) { l <- survival::survreg(formula,data=mf,dist="gaussian") beta <- coef(l) sigma <- l$scale } else { if (ordinal) { l <- lava::ordreg(formula,mf) beta <- coef(l) sigma <- 1 } else { l <- lm.fit(model.matrix(formula,mf),mf[,1]) beta <- l$coefficients sigma <- sd(l$residuals) } } intidx <- 1 if (ordinal) intidx <- seq_len(ordinal-1) start <- rep(sigma/sqrt(nchar(type)),nchar(type)) if (ordinal) start <- start[-length(start)] if (hasIntercept) { start <- c(beta[intidx],start) start <- c(start,beta[-intidx]) } else start <- c(start,beta) varp <- 0.5 if (type=="sat") { if (!ordinal) varp <- c(rep(log(sigma^2),2),varp) start <- c() if (hasIntercept) { start <- rep(beta[intidx],4) beta <- beta[-intidx] } start <- c(start,rep(c(rep(beta,2),varp),2)) } if (type=="flex") { if (!ordinal) varp <- c(log(sigma^2),varp) start <- c() if (hasIntercept) { start <- c(beta[intidx],beta[intidx]) beta <- beta[-intidx] } start <- c(start,rep(c(beta,varp),2)) } if (type=="u") { start <- c(varp,varp) if (!ordinal) start <- c(log(sigma^2),start) start <- c(beta,start) } names(start) <- NULL if (!is.null(group)) { cc <- coef(model[[1]]) iA <- grep(c("z(A):"),cc,fixed=TRUE) iD <- grep(c("z(D):"),cc,fixed=TRUE) nplus <- length(iA) + length(iD) + max(length(iA),length(iD)) start <- c(start,rep(.2,nplus)) ii <- sort(c(iA,iD)) start <- c(start[seq(ii[1]-1)],rep(0.3,length(ii)),start[seq(ii[1]+1,length(start))]) } return(start) } ###}}} twinlmStart mets/R/ipw.R0000644000176200001440000004356713623061405012364 0ustar liggesusers##' Internal function. ##' Calculates Inverse Probability of Censoring ##' Weights (IPCW) and adds them to a data.frame ##' ##' @title Inverse Probability of Censoring Weights ##' @param formula Formula specifying the censoring model ##' @param data data frame ##' @param cluster clustering variable ##' @param same.cens For clustered data, should same censoring be assumed (bivariate probability calculated as mininum of the marginal probabilities) ##' @param obs.only Return data with uncensored observations only ##' @param weight.name Name of weight variable in the new data.frame ##' @param indi.weight Name of individual censoring weight in the new data.frame ##' @param trunc.prob If TRUE truncation probabilities are also calculated and stored in 'weight.name2' (based on Clayton-Oakes gamma frailty model) ##' @param weight.name2 Name of truncation probabilities ##' @param cens.model Censoring model (default Aalens additive model) ##' @param pairs For paired data (e.g. twins) only the complete pairs are returned (With pairs=TRUE) ##' @param theta.formula Model for the dependence parameter in the Clayton-Oakes model (truncation only) ##' @param ... Additional arguments to censoring model ##' @author Klaus K. Holst ##' @examples ##' \dontrun{ ##' data("prt",package="mets") ##' prtw <- ipw(Surv(time,status==0)~country, data=prt[sample(nrow(prt),5000),], ##' cluster="id",weight.name="w") ##' plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") ##' count <- 0 ##' for (l in unique(prtw$country)) { ##' count <- count+1 ##' prtw <- prtw[order(prtw$time),] ##' with(subset(prtw,country==l), ##' lines(time,w,col=count,lwd=2)) ##' } ##' legend("topright",legend=unique(prtw$country),col=1:4,pch=-1,lty=1) ##' } ##' @export ipw <- function(formula,data,cluster, same.cens=FALSE,obs.only=TRUE, weight.name="w", trunc.prob=FALSE,weight.name2="wt",indi.weight="pr", cens.model="aalen", pairs=FALSE, theta.formula=~1, ...) { ## {{{ ##iid=TRUE, ##cens.args <- c(list(formula,n.sim=0,robust=0,data=eval(data)),list(...)) if (tolower(cens.model)%in%c("weibull","phreg.par","phreg.weibull")) { ud.cens <- phreg.par(formula,data,...) pr <- predict(ud.cens) noncens <- which(!ud.cens$status) } else { ## {{{ m <- match.call(expand.dots = FALSE) m <- m[match(c("", "formula", "data", "subset", "na.action"), names(m), nomatch = 0)] special <- c("strata", "factor", "NN", "cluster", "dummy") if (missing(data)) Terms <- terms(formula) else Terms <- terms(formula, data = data) m$formula <- Terms m[[1]] <- as.name("model.frame") M <- eval(m, parent.frame()) censtime <- model.extract(M, "response") if (ncol(censtime)==3) { status <- censtime[,3] otimes <- censtime[,2] ltimes <- censtime[,1] } else { status <- censtime[,2] otimes <- censtime[,1] } noncens <- !status if (is.null(attr(terms(formula,"prop"),"specials")$prop)) { ud.cens <- aalen(formula,n.sim=0,robust=0,data=data,...) XZ <- model.matrix(formula,data) ### Gcx <- ud.cens$cum[prodlim::sindex(ud.cens$cum[,1],otimes),-1] Gcx<-Cpred(ud.cens$cum,otimes)[,-1]; Gcx<-exp(-apply(Gcx*XZ,1,sum)) } else { ud.cens <- cox.aalen(formula,n.sim=0,robust=0,data=data,...) XZ <- model.matrix(formula,data) Gcx<-Cpred(ud.cens$cum,otimes)[,-1]; Gcx<-exp(-apply(Gcx*XZ,1,sum)) } ##ud.cens <- do.call(cens.model,cens.args) Gcx[Gcx>1]<-1; Gcx[Gcx<0]<-0 pr <- Gcx data[,indi.weight] <- Gcx } ## }}} if (trunc.prob) stop("Under development\n"); if (trunc.prob & ncol(censtime)==3) { ## truncation ## {{{ data$truncsurv <- Surv(ltimes,otimes,noncens) trunc.formula <- update(formula,truncsurv~.) ud.trunc <- aalen(trunc.formula,data=data,robust=0,n.sim=0,residuals=0,silent=1) dependX0 <- model.matrix(theta.formula,data) twostage.fit <-two.stage(ud.trunc,data=data,robust=0,detail=0, clusters=data[,cluster], theta.des=dependX0)#,Nit=20,step=1.0,notaylor=1) pre.theta <- dependX0 %*% twostage.fit$theta X <- model.matrix(formula,data) Xnam <- colnames(X) X <- cbind(X,pre.theta) colnames(X)[ncol(X)] <- "pre.theta" ww <- fast.reshape(cbind(X,".num"=seq(nrow(X)),".lefttime"=ltimes),varying=c(".num",".lefttime"),id=data[,cluster]) if (anyNA(ww)) stop("not balanced for predict two stage\n"); Prob <- predict.two.stage(twostage.fit,X=ww[,Xnam], times=ww[,".lefttime1"],times2=ww[,".lefttime2"], theta=ww$pre.theta) P0 <- numeric(nrow(X)) P0[ww[,".num1"]] <- Prob$St1t2 P0[ww[,".num2"]] <- Prob$St1t2 data[,weight.name2] <- P0 print(summary(P0)) } data[,weight.name] <- pr ## }}} if (same.cens & missing(cluster)) message("no cluster for same-cens given \n"); if (same.cens & !missing(cluster)) { ## {{{ ### message("Minimum weights...") myord <- order(data[,cluster]) data <- data[myord,,drop=FALSE] id <- table(data[,cluster]) if (pairs) { gem <- data[,cluster]%in%(names(id)[id==2]) id <- id[id==2] data <- data[gem,] } d0 <- subset(data,select=c(cluster,weight.name)) noncens <- with(data,!eval(terms(formula)[[2]][[3]])) d0[,"observed."] <- noncens timevar <- paste("_",cluster,weight.name,sep="") d0[,timevar] <- unlist(lapply(id,seq)) Wide <- reshape(d0,direction="wide",timevar=timevar,idvar=cluster) W <- apply(Wide[,paste(weight.name,1:2,sep=".")],1, function(x) min(x,na.rm=TRUE)) Wmarg <- d0[,weight.name] data[,weight.name] <- 1/Wmarg Wmin <- rep(W,id) obs1only <- rep(with(Wide, observed..1 & (is.na(observed..2) | !observed..2)),id) obs2only <- rep(with(Wide, observed..2 & (is.na(observed..1) | !observed..1)),id) obsOne <- which(na.omit(obs1only|obs2only)) obsBoth <- rep(with(Wide, !is.na(observed..1) & !is.na(observed..2) & observed..2 & observed..1),id) data[obsBoth,weight.name] <- ifelse(noncens[obsBoth],1/Wmin[obsBoth],0) data[obsOne,weight.name] <- ifelse(noncens[obsOne],1/Wmarg[obsOne],0) } ## }}} if (obs.only) data <- data[noncens,,drop=FALSE] return(data) } ## }}} ##' Internal function. ##' Calculates Inverse Probability of Censoring and Truncation ##' Weights and adds them to a data.frame ##' ##' @title Inverse Probability of Censoring Weights ##' @param data data frame ##' @param times possible time argument for speciying a maximum value of time tau=max(times), to specify when things are considered censored or not. ##' @param entrytime nam of entry-time for truncation. ##' @param time name of time variable on data frame. ##' @param cause name of cause indicator on data frame. ##' @param same.cens For clustered data, should same censoring be assumed and same truncation (bivariate probability calculated as mininum of the marginal probabilities) ##' @param cluster name of clustering variable ##' @param pairs For paired data (e.g. twins) only the complete pairs are returned (With pairs=TRUE) ##' @param strata name of strata variable to get weights stratified. ##' @param obs.only Return data with uncensored observations only ##' @param cens.formula model for Cox models for truncation and right censoring times. ##' @param cens.code censoring.code ##' @param pair.cweight Name of weight variable in the new data.frame for right censorig of pairs ##' @param pair.tweight Name of weight variable in the new data.frame for left truncation of pairs ##' @param pair.weight Name of weight variable in the new data.frame for right censoring and left truncation of pairs ##' @param cname Name of weight variable in the new data.frame for right censoring of individuals ##' @param tname Name of weight variable in the new data.frame for left truncation of individuals ##' @param weight.name Name of weight variable in the new data.frame for right censoring and left truncation of individuals ##' @param prec.factor To let tied censoring and truncation times come after the death times. ##' @param ... Additional arguments to censoring model ##' @author Thomas Scheike ##' @examples ##' library("timereg") ##' d <- simnordic.random(3000,delayed=TRUE,ptrunc=0.7, ##' cordz=0.5,cormz=2,lam0=0.3,country=FALSE) ##' d$strata <- as.numeric(d$country)+(d$zyg=="MZ")*4 ##' times <- seq(60,100,by=10) ##' c1 <- comp.risk(Event(time,cause)~1+cluster(id),data=d,cause=1, ##' model="fg",times=times,max.clust=NULL,n.sim=0) ##' mm=model.matrix(~-1+zyg,data=d) ##' out1<-random.cif(c1,data=d,cause1=1,cause2=1,same.cens=TRUE,theta.des=mm) ##' summary(out1) ##' pc1 <- predict(c1,X=1,se=0) ##' plot(pc1) ##' ##' dl <- d[!d$truncated,] ##' dl <- ipw2(dl,cluster="id",same.cens=TRUE,time="time",entrytime="entry",cause="cause", ##' strata="strata",prec.factor=100) ##' cl <- comp.risk(Event(time,cause)~+1+ ##' cluster(id), ##' data=dl,cause=1,model="fg", ##' weights=dl$indi.weights,cens.weights=rep(1,nrow(dl)), ##' times=times,max.clust=NULL,n.sim=0) ##' pcl <- predict(cl,X=1,se=0) ##' lines(pcl$time,pcl$P1,col=2) ##' mm=model.matrix(~-1+factor(zyg),data=dl) ##' out2<-random.cif(cl,data=dl,cause1=1,cause2=1,theta.des=mm, ##' weights=dl$weights,censoring.weights=rep(1,nrow(dl))) ##' summary(out2) ##' @export ipw2 <- function(data,times=NULL,entrytime=NULL,time="time",cause="cause", same.cens=FALSE,cluster=NULL,pairs=FALSE, strata=NULL,obs.only=TRUE,cens.formula=NULL,cens.code=0, pair.cweight="pcw",pair.tweight="ptw",pair.weight="weights", cname="cweights",tname="tweights",weight.name="indi.weights", prec.factor=100,...) { ## {{{ ### first calculates weights based on marginal ### estimators of censoring and truncation ## {{{ weights, up at T_i or min(T_i,max(times)) if (is.null(times)) times <- max(data[,time]) if (is.null(entrytime)) entry <- rep(0,nrow(data)) else entry <- data[,entrytime] mtt <- max(times) prec <- .Machine$double.eps * prec.factor trunc.model <- cens.model <- NULL ## output of Cox models for entry cens if (is.null(cens.formula)) { if (is.null(strata)) { ## {{{ if (!is.null(entrytime)) { surv.trunc <- survival::survfit(Surv(-data[,time],-entry+prec,rep(1,nrow(data))) ~ 1) trunc.dist <- summary(surv.trunc) trunc.dist$time <- rev(-trunc.dist$time) trunc.dist$surv <- c(rev(trunc.dist$surv)[-1], 1) Lfit <-Cpred(cbind(trunc.dist$time,trunc.dist$surv),data[,time],strict=TRUE) Lw <- Lfit[,2] } else { Lw <- 1; } if (!is.null(entrytime)) ud.cens<- survival::survfit(Surv(entry,data[,time],data[,cause]==0)~+1) else ud.cens<- survival::survfit(Surv(data[,time],data[,cause]==0)~+1) Gfit<-cbind(ud.cens$time,ud.cens$surv) Gfit<-rbind(c(0,1),Gfit); Gcx<-Cpred(Gfit,pmin(mtt,data[,time]),strict=TRUE)[,2]; weights <- 1/(Lw*Gcx); cweights <- Gcx; tweights <- Lw; ### ## }}} } else { ## {{{ ### compute for each strata and combine vstrata <- as.numeric(factor(data[,strata])) weights <- rep(1,nrow(data)) cweights <- rep(1,nrow(data)) tweights <- rep(1,nrow(data)) for (i in unique(vstrata)) { ## {{{ for each strata who <- (vstrata == i) if (sum(who) <= 1) stop(paste("strata",i,"less than 1 observation\n")); datas <- subset(data,who) entrytimes <- entry[who] if (!is.null(entrytime)) { surv.trunc <- survival::survfit(Surv(-datas[,time],-entrytimes+prec,rep(1,nrow(datas))) ~ +1) trunc.dist <- summary(surv.trunc) trunc.dist$time <- rev(-trunc.dist$time) trunc.dist$surv <- c(rev(trunc.dist$surv)[-1], 1) Lfit <-Cpred(cbind(trunc.dist$time,trunc.dist$surv),datas[,time],strict=TRUE) Lw <- Lfit[,2] } else {Lw <- 1; } if (!is.null(entrytime)) ud.cens<- survival::survfit(Surv(entrytimes,datas[,time],datas[,cause]==0)~+1) else ud.cens<- survival::survfit(Surv(entrytimes,datas[,time],datas[,cause]==0)~+1) Gfit<-cbind(ud.cens$time,ud.cens$surv) Gfit<-rbind(c(0,1),Gfit); Gcx<-Cpred(Gfit,pmin(mtt,datas[,time]),strict=TRUE)[,2]; weights[who]<- 1/(Lw*Gcx); cweights[who] <- Gcx; tweights[who] <- Lw; } ## }}} } ## }}} } else { ### cens.formula Cox models ## {{{ X <- model.matrix(cens.formula,data=data)[,-1,drop=FALSE]; if (!is.null(entrytime)) { ### trunc.model <- cox.aalen(Surv(-data[,time],-entrytime+prec,rep(1,nrow(data))) ~ prop(X)) trunc.model <- survival::coxph(Surv(-data[,time],-entrytime+prec,rep(1,nrow(data))) ~ X) ### baseout <- cens.model$cum baseout <- survival::basehaz(trunc.model,centered=FALSE); baseout <- cbind(rev(-baseout$time),rev(baseout$hazard)) ### Lfit <-Cpred(baseout,data[,time],strict=TRUE)[,-1] RR<-exp(as.matrix(X) %*% coef(trunc.model)) Lfit<-exp(-Lfit*RR) Lw <- Lfit } else {Lw <- 1; } ### if (!is.null(entrytime)) cens.model <- survival::coxph(Surv(entrytime,data[,time],data[,cause]==0)~+X) else cens.model <- survival::coxph(Surv(data[,time],data[,cause]==0)~+X) baseout <- survival::basehaz(cens.model,centered=FALSE); ### baseout <- cens.model$cum baseout <- cbind(baseout$time,baseout$hazard) Gfit<-Cpred(baseout,pmin(mtt,data[,time]),strict=TRUE)[,2]; RR<-exp(as.matrix(X) %*% coef(cens.model)) Gfit<-exp(-Gfit*RR) weights <- 1/(Lw*Gfit); cweights <- Gfit tweights <- Lw } ## }}} data[,weight.name] <- weights data[,"cw"] <- 1 if (!is.null(entrytime)) { mint <- min(tweights); maxt <- min(tweights) if (mint<0 | mint>1) warning("min(truncation weights) strange, maybe prec.factor should be different\n") if (maxt<0 | maxt>1) warning("max(truncation weights) strange, maybe prec.factor should be different\n") } if (!is.null(entrytime)) { attr(data,"trunc.model") <- trunc.model attr(data,"cens.model") <- cens.model } data[,cname] <- cweights data[,tname] <- tweights ## }}} observed <- ((data[,time]>mtt & data[,cause]==cens.code)) | (data[,cause]!=cens.code) data[,"observed."] <- observed if (same.cens & is.null(cluster)) message("no cluster for same-cens given \n"); if (same.cens & !is.null(cluster)) { ## {{{ ### message("Minimum weights.cens..") ### message("Maximum weights.trunc..") myord <- order(data[,cluster]) data <- data[myord,,drop=FALSE] id <- table(data[,cluster]) observed <- ((data[,time]>mtt & data[,cause]==cens.code)) | (data[,cause]!=cens.code) d0 <- data[,c(cluster,cname,tname,time,cause,strata)] noncens <- observed d0[,"observed."] <-observed timevar <- paste("_",cluster,cname,sep="") d0[,timevar] <- unlist(lapply(id,seq)) ### print(head(d0)) ### Wide <- reshape(d0,direction="wide",timevar=timevar,idvar=cluster) Wide <- fast.reshape(d0,id=cluster) ### censoring same cens cause1 <- paste(cause,"1",sep=""); cause2 <- paste(cause,"2",sep="") obs1 <- "observed.1"; obs2 <- "observed.2" time1 <- paste(time,"1",sep=""); time2 <- paste(time,"1",sep="") ### print(c(time1,time2,cause1,cause2)) ### print(head(Wide)) ### tmax <- apply(Wide[,paste(time,1:2,sep="")],1, ### function(x) max(x)) ## NA when there is just one ### maxstat <- ifelse(Wide[,time1]> Wide[,time2],Wide[,cause1],Wide[,cause2]) ### obsstat <- ifelse(Wide[,time1]> Wide[,time2],Wide[,obs1],Wide[,obs2])*1 ### print(head(tmax,10)); print(head(maxstat,10)) ### print(names(Wide)) ### datp <- data.frame(time=tmax,cause=obsstat,strata=Wide[,paste(strata,"1",sep="")]) ### print(head(datp)) ### datp <- pred.stratKM(datp) ### print(head(tmax,datp)) ### ### ud.cens<- survival::survfit(Surv(tmax,obsstat==0)~+1) ### Gfit<-cbind(ud.cens$time,ud.cens$surv) ### Gfit<-rbind(c(0,1),Gfit); ### tmaxna <- tmax; tmaxna[is.na(tmax)] <- 0 ### Gcx<-Cpred(Gfit,pmin(mtt,tmaxna),strict=TRUE)[,2]; ### Wd <- Gcx ### ### data[,"tmax"] <- rep(tmax,id) ### data[,"stattmax"] <- rep(maxstat,id) W <- apply(Wide[,paste(cname,1:2,sep="")],1, function(x) min(x)) ## NA when there is just one ### function(x) min(x,na.rm=TRUE)) Wmin <- rep(W,id) data[,pair.cweight] <- 1/Wmin ### data[,paste(pair.cweight,"max",sep="")] <- 1/rep(Wd,id) ### when pair-weight is NA takes individual weight naW <- is.na(Wmin) data[naW,pair.cweight] <- 1/data[naW,cname] data[naW,paste(pair.cweight,"max",sep="")] <- 1/data[naW,cname] ### truncation same truncation if (!is.null(entrytime)) { Wt <- apply(Wide[,paste(tname,1:2,sep="")],1, function(x) min(x)) ## NA when there is just one ### Wtmarg <- d0[,tname] ### data[,pair.tweight] <- 0; ##1/Wtmarg Wtmax <- rep(Wt,id) data[,pair.tweight] <- 1/Wtmax ### when pair-weight is NA takes individual weight naW <- is.na(Wtmax) data[naW,pair.tweight] <- 1/data[naW,tname] } if (!is.null(entrytime)) { data[,pair.weight] <- data[,pair.cweight]*data[,pair.tweight] } else data[,pair.weight] <- data[,pair.cweight] } ## }}} if (obs.only) { data <- data[observed,] } id <- table(data[,cluster]) if (pairs) { gem <- data[,cluster]%in%(names(id)[id==2]) id <- id[id==2] data <- data[gem,] } else data[,"pairs."] <- data[,cluster]%in%(names(id)[id==2]) return(data) } ## }}} mets/R/jumptimes.R0000644000176200001440000000244713623061405013572 0ustar liggesusers##' @export jumptimes <- function(time, status=TRUE, id,cause, sample,sample.all=TRUE, strata=NULL,num=NULL, ...) { if (missing(id)) { time <- if (missing(cause)) time[status>0] else time[status==cause] } else { ww <- na.omit(fast.reshape(cbind(time=time,status=status),id=id,num=num)) statusvar <- grep("status",colnames(ww)) timevar <- grep("time",colnames(ww)) if (missing(cause)) { idx <- which(rowSums(ww[,statusvar]>0)==length(statusvar)) } else { idx <- which(apply(as.matrix(ww[,statusvar]),1,function(x) all(x==cause))) } time <- na.omit(do.call(pmax,as.list(ww[idx,timevar]))) } if (!missing(sample) && sample1]<-1; Gcx[Gcx<0]<-0 Gfit<-rbind(c(0,1),cbind(time,Gcx)); if (is.null(entry.call)==FALSE) { Gcxe<-Cpred(Gfit,entry)[,-1]; Gcxe<-exp(-apply(Gcxe*XZ,1,sum)) Gcxe[Gcxe>1]<-1; Gcxe[Gcxe<0]<-0 } Gcx <- Gcx/Gcxe; ### Gctimes<-Cpred(Gfit,times)[,2]; Gctimes<- Gcx ## }}} } } else { Gcx <- cens.weight; Gctimes <- cens.weight;} } else { Gcx <- censoring.weights Gctimes <- cens.weight } ntimes<-length(times); ## }}} ## {{{ set up cluster + theta design + define iid variables if (is.null(clusters)== TRUE) { ## take clusters from cif model clusters <- attr(cif,"clusters"); antclust<- length(unique(clusters)); max.clust <- attr(cif,"max.clust") if (attr(cif,"coarse.clust")) stop("Max.clust should be NULL in marginal model, or clusters should be given at call \n"); } else { clus<-unique(clusters); antclust<-length(clus); clusters <- as.integer(factor(clusters, labels = 1:(antclust)))-1; } outc <- cluster.index(clusters,index.type=TRUE); clustsize <- outc$cluster.size maxclust <- outc$maxclust clusterindex <- outc$idclust if (maxclust==1) stop("No clusters given \n"); if (model!="ARANCIF") { if (is.null(theta.des)==TRUE) { ptheta<-1; theta.des<-matrix(1,antpers,ptheta); colnames(theta.des) <- "intercept"; } else theta.des<-as.matrix(theta.des); ptheta<-ncol(theta.des); if (is.null(dimpar) & is.null(par.func)) dimpar<-ptheta; } if (model=="ARANCIF") { ### different parameters for Additive random effects if (is.null(random.design)) random.design <- matrix(1,antpers,1); dim.rv <- ncol(random.design); if (is.null(theta.des)==TRUE) theta.des<-diag(dim.rv); dimpar <- ncol(theta.des); if (nrow(theta.des)!=ncol(random.design)) stop("nrow(theta.des)!= ncol(random.design)"); ### score.method <- "nlminb"; ### force nlminb because derivatives are not working } else random.design <- matrix(0,1,1); if ( (!is.null(par.func)) && is.null(dimpar) ) stop("Must specify dimension of parameters when specifying R-functions\n") if ( (is.null(theta)==TRUE) && (model=="ARANCIF")) theta<-rep(0.5,dimpar); if (is.null(theta)==TRUE) theta<-rep(0.1,dimpar); if (length(theta)!=dimpar) theta<-rep(theta[1],dimpar); Biid<-c(); gamma.iid <- 0; B2iid<-c(); gamma2.iid <- 0; if (notaylor==0) { for (i in 1:antclust) Biid<-cbind(Biid,cif$B.iid[[i]]); if (npar==TRUE) gamma.iid<-0 else gamma.iid<-cif$gamma.iid; if ((model!="COR") && (cause1!=cause2)) { B2iid<-c() for (i in 1:antclust) B2iid<-cbind(B2iid,cif2$B.iid[[i]]); if (npar2==TRUE) gamma2.iid<-0 else gamma2.iid<-cif2$gamma.iid; } else { B2iid<-Biid; gamma2.iid<-gamma.iid; } } var.theta<-hess<-matrix(0,dimpar,dimpar); score<-rep(0,dimpar); time.pow<-attr(cif,"time.pow"); #if (sum(time.pow)==0) time.pow<-rep(1,pg); theta.iid<-matrix(0,antclust,dimpar); if ((nrow(theta.des)!=nrow(X)) && (model!="ARANCIF")) stop("Dependence design not consistent with data\n"); if (length(trunkp)!=antpers) trunkp <- rep(1,antpers) if (is.null(weights)==TRUE) weights <- rep(1,antpers); ## }}} ### ## {{{ function and derivative if (is.null(par.func)==FALSE) { flex.func<-1; # use flexible design if (is.null(dpar.func)) { cat("Must provide derivative that is used for iid decomposition for SE's\n"); score.method <- "nlminb" dpar.func <- par.func } ### if (score.method=="fisher.scoring") ### cat("Score.method set to nlminb for flexible modelling \n"); } ## }}} Zgamma <- c(Z %*% gamma); Z2gamma2 <- c(Z2 %*% gamma2); dep.model <- 0; dep.model <- switch(model,COR=1,RR=2,OR=3,RANCIF=4,ARANCIF=5) if (dep.model==0) stop("model must be COR, OR, RR, RANCIF, ARANCIF \n"); if (dep.model<=4) rvdes <- matrix(0,1,1); ### if (dep.model==4 & !is.null(cif2) ) dep.model <- 6 ## two cause random cif ### if (dep.model==6) stop("Different causes under development \n"); obj <- function(par) { ## {{{ if (is.null(par.func)==TRUE) { Xtheta <- theta.des %*% par; DXtheta <- array(0,c(1,1,1)); } else { Xtheta <- c(); DXtheta <- array(0,c(length(times),antpers,dimpar)); if (is.null(dpar.func)) stop("Must also provide derivative of function wrt to parameters") s <- 0 for (t in times) { s <- 1+s Xttheta <- par.func(par,t,theta.des) if (length(Xttheta)!=antpers) stop("parfunc(par,t,theta.des) must length n"); Xtheta <- cbind(Xtheta,Xttheta) Dttheta <- dpar.func(par,t,theta.des); if (dim(Dttheta)[1]!=antpers || dim(Dttheta)[2]!=dimpar) stop("dparfunc must return matrix n x dimpar when called on dparfunc(par,t,theta.des)"); DXtheta[s,,] <- Dttheta } ### print(dim(Xtheta)); print(dim(DXtheta)) } outl<-.Call("cor", ## {{{ itimes=times,iy=time,icause=cause,iCA1=cause1,iKMc=Gcx, iz=X,iest=matrix(est[,-1],ncol=ncol(est)-1),iZgamma=c(Zgamma),isemi=semi,izsem=Z, itheta=c(par),iXtheta=Xtheta,iDXtheta=DXtheta,idimDX=dim(DXtheta), ithetades=theta.des, icluster=clusters,iclustsize=clustsize,iclusterindex=clusterindex, iinverse=inverse,iCA2=cause2, ix2=X2,isemi2=semi2,iest2=as.matrix(est2[,-1]),iZgamma2=c(Z2gamma2), iflexfunc=flex.func,iiid=iid,isym=sym,iweights=weights, isamecens=as.numeric(same.cens),istabcens=as.numeric(stab.cens), iKMtimes=Gctimes,isilent=silent, icifmodel=cif.model,idepmodel=dep.model, iestimator=estimator,ientryage=entry,icif1entry=cif1entry, icif2entry=cif2entry,itrunkp=trunkp,irvdes=random.design, ## Biid,gamma.iid,time.pow, ## B2iid,gamma2.iid,body(htheta),body(dhtheta),new.env(), PACKAGE="mets" ) ## }}} attr(outl,"gradient") <-outl$score if (oout==0) return(outl$ssf) else if (oout==1) return(sum(outl$score^2)) else return(outl) } ## }}} p <- theta iid <- 0; ###no-iid representation for iterations if (score.method=="fisher.scoring") { ## {{{ oout <- 2; ### output control for obj if (Nit>0) for (i in 1:Nit) { oout <- 2 out <- obj(p) hess <- out$Dscore if (!is.na(sum(hess))) hessi <- lava::Inverse(out$Dscore) else hessi <- hess if (detail==1) {## {{{ print(paste("Fisher-Scoring ===================: it=",i)); cat("theta:");print(c(p)) cat("score:");print(c(out$score)); cat("hess:"); print(hess); }## }}} delta <- hessi %*% out$score ### for test purposes ### oout <- 0; ### output control for obj ### score1 <- numDeriv::jacobian(obj,p) ### hess1 <- numDeriv::hessian(obj,p) ### print(score1) ### print(hess1) ## do not update last iteration if (i20) { cat("NR increment > 20, lower step zize, increment= \n"); cat(delta); break; } } if (!is.nan(sum(p))) { ## {{{ iid decomposition oout <- 2 theta <- p iid <- 1; out <- obj(p) score <- out$score hess <- out$Dscore } ## }}} if (detail==1 & Nit==0) {## {{{ print(paste("Fisher-Scoring ===================: final")); cat("theta:");print(c(p)) cat("score:");print(c(out$score)); cat("hess:"); print(hess); ### oout <- 0; hess1 <- numDeriv::hessian(obj,p); print(hess1) }## }}} if (!is.na(sum(hess))) hessi <- lava::Inverse(out$Dscore) else hessi <- diag(nrow(hess)) ### score1 <- numDeriv::jacobian(obj,p) score1 <- score; ## }}} } else if (score.method=="nlminb") { ## {{{ nlminb optimizer iid <- 0; oout <- 0; tryCatch(opt <- nlminb(theta,obj,control=control),error=function(x) NA) if (detail==1) print(opt); iid <- 1; hess <- numDeriv::hessian(obj,opt$par) score <- numDeriv::jacobian(obj,opt$par) hessi <- lava::Inverse(hess); theta <- opt$par if (detail==1) cat("iid decomposition\n"); oout <- 2; out <- obj(opt$par) score1 <- out$score ## }}} } else if (score.method=="nlm") { ## {{{ nlm optimizer iid <- 0; oout <- 0; tryCatch(opt <- nlm(obj,theta,hessian=TRUE,print.level=detail),error=function(x) NA) iid <- 1; hess <- opt$hessian score <- opt$gradient if (detail==1) print(opt); hessi <- lava::Inverse(hess); theta <- opt$estimate if (detail==1) cat("iid decomposition\n"); oout <- 2; out <- obj(opt$estimate) score1 <- out$score ## }}} } else stop("score.methods = nlm nlminb fisher.scoring\n"); theta.iid <- out$theta.iid %*% hessi if (is.null(par.func)) var.theta <- t(theta.iid) %*% theta.iid else var.theta <- hessi var.theta <- t(theta.iid) %*% theta.iid if (is.null(par.func)) thetanames <- colnames(theta.des) else thetanames <- rep("R-func",dimpar) ud <- list(theta=theta,score=score,hess=hess,hessi=hessi,var.theta=var.theta, theta.iid=theta.iid,score1=c(score1),thetanames=thetanames, brierscore=out$ssf,p11=out$p11); if (dep.model<=3) class(ud)<-"cor" else if (dep.model==4) class(ud) <- "randomcif" else if (dep.model==6) class(ud) <- "randomcif" else if (dep.model==5) class(ud) <- "randomcifrv" attr(ud, "Formula") <- formula attr(ud, "Clusters") <- clusters attr(ud,"cause1")<-cause1; attr(ud,"cause2")<-cause2 attr(ud,"sym")<-sym; attr(ud,"inverse")<-inverse; attr(ud,"antpers")<-antpers; attr(ud,"antclust")<-antclust; attr(ud,"var.link")<-var.link; if (dep.model==4) attr(ud, "Type") <- "randomcif" if (dep.model==6) attr(ud, "Type") <- "randomcif" if (model=="COR") attr(ud, "Type") <- "cor" if (model=="RR") attr(ud, "Type") <- "RR" if (model=="OR") attr(ud, "Type") <- "OR-cif" if (dep.model==5) attr(ud, "pardes") <- theta.des if (dep.model==5) attr(ud, "rv1") <- random.design[1,] return(ud); } ## }}} ###mysolve <- function(A) ###{ ### ee <- eigen(A); ### threshold <- 1e-12 ### idx <- ee$values>threshold ### ee$values[idx] <- 1/ee$values[idx]; ### if (!all(idx)) ### ee$values[!idx] <- 0 ### V <- with(ee, vectors%*%diag(values)%*%t(vectors)) ### return(V) ###} ##' Fits a parametric model for the log-cross-odds-ratio for the ##' predictive effect of for the cumulative incidence curves for \eqn{T_1} ##' experiencing cause i given that \eqn{T_2} has experienced a cause k : ##' \deqn{ ##' \log(COR(i|k)) = h(\theta,z_1,i,z_2,k,t)=_{default} \theta^T z = ##' } ##' with the log cross odds ratio being ##' \deqn{ ##' COR(i|k) = ##' \frac{O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ ##' O(T_1 \leq t,cause_1=i)} ##' } ##' the conditional odds divided by the unconditional odds, with the odds ##' being, respectively ##' \deqn{ ##' O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_1=k) = ##' \frac{ ##' P_x(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ ##' P_x((T_1 \leq t,cause_1=i)^c | T_2 \leq t,cause_2=k)} ##' } ##' and ##' \deqn{ ##' O(T_1 \leq t,cause_1=i) = ##' \frac{P_x(T_1 \leq t,cause_1=i )}{P_x((T_1 \leq t,cause_1=i)^c )}. ##' } ##' Here \eqn{B^c} is the complement event of \eqn{B}, ##' \eqn{P_x} is the distribution given covariates ##' (\eqn{x} are subject specific and \eqn{z} are cluster specific covariates), and ##' \eqn{h()} is a function that is the simple identity ##' \eqn{\theta^T z} by default. ##' ##' The OR dependence measure is given by ##' \deqn{ ##' OR(i,k) = ##' \log ( ##' \frac{O(T_1 \leq t,cause_1=i | T_2 \leq t,cause_2=k)}{ ##' O(T_1 \leq t,cause_1=i) | T_2 \leq t,cause_2=k)} ##' } ##' This measure is numerically more stabile than the COR measure, and is symetric in i,k. ##' ##' The RR dependence measure is given by ##' \deqn{ ##' RR(i,k) = ##' \log ( ##' \frac{P(T_1 \leq t,cause_1=i , T_2 \leq t,cause_2=k)}{ ##' P(T_1 \leq t,cause_1=i) P(T_2 \leq t,cause_2=k)} ##' } ##' This measure is numerically more stabile than the COR measure, and is symetric in i,k. ##' ##' The model is fitted under symmetry (sym=1), i.e., such that it is assumed ##' that \eqn{T_1} and \eqn{T_2} can be interchanged and leads to ##' the same cross-odd-ratio (i.e. ##' \eqn{COR(i|k) = COR(k|i))}, ##' as would be expected for twins ##' or without symmetry as might be the case with mothers and daughters (sym=0). ##' ##' \eqn{h()} may be specified as an R-function of the parameters, ##' see example below, but the default is that it is simply \eqn{\theta^T z}. ##' ##' @title Cross-odds-ratio, OR or RR risk regression for competing risks ##' @aliases or.cif rr.cif ##' @param cif a model object from the comp.risk function with the ##' marginal cumulative incidence of cause1, i.e., the event of interest, and whose ##' odds the comparision is compared to the conditional odds given cause2 ##' @param data a data.frame with the variables. ##' @param cause specifies the causes related to the death ##' times, the value cens.code is the censoring value. When missing it comes from marginal cif. ##' @param times time-vector that specifies the times used for the estimating euqations for the cross-odds-ratio estimation. ##' @param cause1 specificies the cause considered. ##' @param cause2 specificies the cause that is conditioned on. ##' @param cens.code specificies the code for the censoring if NULL then uses the one from the marginal cif model. ##' @param cens.model specified which model to use for the ICPW, KM is Kaplan-Meier alternatively it may be "cox" ##' @param Nit number of iterations for Newton-Raphson algorithm. ##' @param detail if 0 no details are printed during iterations, if 1 details are given. ##' @param clusters specifies the cluster structure. ##' @param theta specifies starting values for the cross-odds-ratio parameters of the model. ##' @param theta.des specifies a regression design for the cross-odds-ratio parameters. ##' @param step specifies the step size for the Newton-Raphson algorithm. ##' @param sym specifies if symmetry is used in the model. ##' @param weights weights for estimating equations. ##' @param par.func parfunc ##' @param dpar.func dparfunc ##' @param dimpar dimpar ##' @param score.method "nlminb", can also use "fisher-scoring". ##' @param same.cens if true then censoring within clusters are assumed to be the same variable, default is independent censoring. ##' @param censoring.weights these probabilities are used for the bivariate censoring dist. ##' @param silent 1 to suppress output about convergence related issues. ##' @param ... Not used. ##' @return returns an object of type 'cor'. With the following arguments: ##' \item{theta}{estimate of proportional odds parameters of model.} ##' \item{var.theta}{variance for gamma. } ##' \item{hess}{the derivative of the used score.} ##' \item{score}{scores at final stage.} ##' \item{score}{scores at final stage.} ##' \item{theta.iid}{matrix of iid decomposition of parametric effects.} ##' @author Thomas Scheike ##' @references ##' Cross odds ratio Modelling of dependence for ##' Multivariate Competing Risks Data, Scheike and Sun (2012), Biostatistics. ##' ##' A Semiparametric Random Effects Model for Multivariate Competing Risks Data, ##' Scheike, Zhang, Sun, Jensen (2010), Biometrika. ##' @examples ##' library("timereg") ##' data(multcif); ##' multcif$cause[multcif$cause==0] <- 2 ##' zyg <- rep(rbinom(200,1,0.5),each=2) ##' theta.des <- model.matrix(~-1+factor(zyg)) ##' ##' times=seq(0.05,1,by=0.05) # to speed up computations use only these time-points ##' add<-comp.risk(Event(time,cause)~+1+cluster(id),data=multcif,cause=1, ##' n.sim=0,times=times,model="fg",max.clust=NULL) ##' add2<-comp.risk(Event(time,cause)~+1+cluster(id),data=multcif,cause=2, ##' n.sim=0,times=times,model="fg",max.clust=NULL) ##' ##' out1<-cor.cif(add,data=multcif,cause1=1,cause2=1) ##' summary(out1) ##' ##' out2<-cor.cif(add,data=multcif,cause1=1,cause2=1,theta.des=theta.des) ##' summary(out2) ##' ##' ##out3<-cor.cif(add,data=multcif,cause1=1,cause2=2,cif2=add2) ##' ##summary(out3) ##' ########################################################### ##' # investigating further models using parfunc and dparfunc ##' ########################################################### ##' \donttest{ ## Reduce Ex.Timings ##' set.seed(100) ##' prt<-simnordic.random(2000,cordz=2,cormz=5) ##' prt$status <-prt$cause ##' table(prt$status) ##' ##' times <- seq(40,100,by=10) ##' cifmod <- comp.risk(Event(time,cause)~+1+cluster(id),data=prt, ##' cause=1,n.sim=0, ##' times=times,conservative=1,max.clust=NULL,model="fg") ##' theta.des <- model.matrix(~-1+factor(zyg),data=prt) ##' ##' parfunc <- function(par,t,pardes) ##' { ##' par <- pardes %*% c(par[1],par[2]) + ##' pardes %*% c( par[3]*(t-60)/12,par[4]*(t-60)/12) ##' par ##' } ##' head(parfunc(c(0.1,1,0.1,1),50,theta.des)) ##' ##' dparfunc <- function(par,t,pardes) ##' { ##' dpar <- cbind(pardes, t(t(pardes) * c( (t-60)/12,(t-60)/12)) ) ##' dpar ##' } ##' head(dparfunc(c(0.1,1,0.1,1),50,theta.des)) ##' ##' names(prt) ##' or1 <- or.cif(cifmod,data=prt,cause1=1,cause2=1,theta.des=theta.des, ##' same.cens=TRUE,theta=c(0.6,1.1,0.1,0.1), ##' par.func=parfunc,dpar.func=dparfunc,dimpar=4, ##' score.method="fisher.scoring",detail=1) ##' summary(or1) ##' ##' cor1 <- cor.cif(cifmod,data=prt,cause1=1,cause2=1,theta.des=theta.des, ##' same.cens=TRUE,theta=c(0.5,1.0,0.1,0.1), ##' par.func=parfunc,dpar.func=dparfunc,dimpar=4, ##' control=list(trace=TRUE),detail=1) ##' summary(cor1) ##' ##' ### piecewise contant OR model ##' gparfunc <- function(par,t,pardes) ##' { ##' cuts <- c(0,80,90,120) ##' grop <- diff(t0.001) warning("WARNING: check score for convergence\n") coefs <- coef(object,...) ocasewise <- oconcordance <- NULL if (is.null(marg.cif)==FALSE) { ## {{{ time <- marg.cif$time marg.cif <- marg.cif$P1 if (is.null(marg.cif2)==FALSE) marg.cif2 <- marg.cif2$P1 else { if (attr(object,"cause2")==attr(object,"cause1")) marg.cif2 <- marg.cif else stop("causes not the same and second marginal cif not given\n"); } pmarg.cif <- marg.cif*marg.cif2 thetav <- coefs[,1] thetavl <- thetav-1.96*coefs[,2] thetavu <- thetav+1.96*coefs[,2] namev <- object$thetanames if (is.null(namev)) namev <- paste("name",1:length(thetav),sep="") ocasewise <- oconcordance <- list() k <- 0 for (theta in thetav) { k <- k+1 thetal <- thetavl[k]; thetau <- thetavu[k] if (attr(object,"Type")=="cor") { ## {{{ concordance <- exp(theta)*pmarg.cif/((1-marg.cif)+exp(theta)*marg.cif) conclower <- exp(thetal)*pmarg.cif/((1-marg.cif)+exp(thetal)*marg.cif) concup <- exp(thetau)*pmarg.cif/((1-marg.cif)+exp(thetau)*marg.cif) casewise <- concordance/marg.cif caselower <- conclower/marg.cif caseup <- concup/marg.cif } else if (attr(object,"Type")=="RR") { casewise<- exp(coefs[,1])*c(marg.cif) concordance <- exp(coefs[,1])*pmarg.cif caselower <- marg.cif*exp(thetal) caseup <- marg.cif*exp(thetau) conclower <- pmarg.cif* exp(thetal) concup <- pmarg.cif*exp(thetau) } else if (attr(object,"Type")=="OR-cif") { casewise<- plack.cif2(marg.cif,marg.cif,c(theta))/marg.cif concordance <- plack.cif2(marg.cif,marg.cif,c(theta)) caselower <- plack.cif2(marg.cif,marg.cif,thetal)/marg.cif caseup <- plack.cif2(marg.cif,marg.cif,thetau)/marg.cif conclower <- plack.cif2(marg.cif,marg.cif,thetal) concup <- plack.cif2(marg.cif,marg.cif,thetau) } else if (attr(object,"Type")=="randomcif") { theta <- 1/theta thetal <- 1/thetal thetau <- 1/thetau lam <- 1-marg.cif p11<- 1-lam -lam +lap(theta,2*ilap(theta, lam)) concordance <- p11 conclower <- 1-lam -lam +lap(thetal,2*ilap(thetal, lam)) concup <- 1-lam -lam +lap(thetau,2*ilap(thetau, lam)) casewise <- concordance/marg.cif caselower <- conclower/marg.cif caseup <- concup/marg.cif } ## }}} outcase <- cbind(time,casewise,caselower,caseup) outconc <- cbind(time,concordance,conclower,concup) ### rownames(outcase) <- rownames(outconc) <- rownames(coefs) colnames(outcase) <- c("time","casewise concordance","2.5 %","97.5%") colnames(outconc) <- c("time","concordance","2.5 %","97.5%") if (length(thetav)==1) { ocasewise <- outcase oconcordance <- outconc } else { ocasewise[[k]] <- outcase oconcordance[[k]] <- outconc } } if (length(thetav)>1) { if (length(ocasewise)==length(namev)) { names(ocasewise) <- namev names(oconcordance) <- namev } } } ## }}} res <- list(casewise=ocasewise,concordance=oconcordance,estimates=coefs, marg.cif=marg.cif, marg.cif2=marg.cif2,type=attr(object,"Type"), sym=attr(object,"sym"),cause1=attr(object,"cause1"),cause2=attr(object,"cause2")) class(res) <- "summary.cor" res } ## }}} ##' @export coef.cor <- function(object,...) { ## {{{ res <- cbind(object$theta, diag(object$var.theta)^0.5) se<-diag(object$var.theta)^0.5 wald <- object$theta/se waldp <- (1 - pnorm(abs(wald))) * 2 cor<-exp(object$theta) res <- as.matrix(cbind(res, wald, waldp,cor,se*cor)) if (attr(object,"Type")=="cor") colnames(res) <- c("log-Coef.", "SE", "z", "P-val","Cross odds ratio","SE") else colnames(res) <- c("log-ratio Coef.", "SE", "z", "P-val","Ratio","SE") if (!is.null(object$thetanames)) rownames(res)<-object$thetanames return(res) } ## }}} ##' @export print.cor<-function(x,digits=3,...) { ## {{{ print(x$call); cat("\n") print(summary(x)); } ## }}} ##' @export concordance.cor <- function(object,...) { concordanceCor(object,...) } ##' Concordance for Twins ##' ##' The concordance is the probability that both twins have experienced the ##' event of interest and is defined as ##' \deqn{ ##' cor(t) = P(T_1 \leq t, \epsilon_1 =1 , T_2 \leq t, \epsilon_2=1) ##' } ##' ##' Similarly, the casewise concordance is ##' \deqn{ ##' casewise(t) = \frac{cor(t)}{P(T_1 \leq t, \epsilon_1=1) } ##' } ##' that is the probability that twin "2" has the event given that twins "1" has. ##' ##' @title Concordance Computes concordance and casewise concordance ##' @param object Output from the cor.cif, rr.cif or or.cif function ##' @param cif1 Marginal cumulative incidence ##' @param cif2 Marginal cumulative incidence of other cause (cause2) if it is different from cause1 ##' @param messages To print messages ##' @param model Specfifies wich model that is considered if object not given. ##' @param coefs Specfifies dependence parameters if object is not given. ##' @param ... Extra arguments, not used. ##' @author Thomas Scheike ##' @aliases concordanceCor concordance.cor ##' @references ##' Estimating twin concordance for bivariate competing risks twin data ##' Thomas H. Scheike, Klaus K. Holst and Jacob B. Hjelmborg, ##' Statistics in Medicine 2014, 1193-1204 ##' ##' Estimating Twin Pair Concordance for Age of Onset. ##' Thomas H. Scheike, Jacob V B Hjelmborg, Klaus K. Holst, 2015 ##' in Behavior genetics DOI:10.1007/s10519-015-9729-3 ##' ##' @export concordanceCor <- function(object,cif1,cif2=NULL,messages=TRUE,model=NULL,coefs=NULL,...) { ## {{{ if (is.null(model)) { if (!inherits(object, "cor")) stop("Must be a rr.cif, cor.cif or or.cif object") model <- attr(object,"Type") } if (is.null(coefs)) coefs <- coef(object) if (is.null(coefs)) stop("Must give dependence parameters\n"); if (!is.null(object)) { cause1 <- attr(object,"cause1"); cause2 <- attr(object,"cause2"); } else cause1 <- cause2 <- 1 if (is.null(cif2)==TRUE) cif2 <- cif1; if (messages) { if (model=="cor") { ## {{{ message("Cross odds ratio dependence for competing risks\n\n") message("Odds of cause1=",cause1," given cause2=",cause2," relative to Odds of cause1=",cause1,"\n",fill=TRUE,sep="") } else if (model=="RR") { message("Ratio of joint and product of marginals for competing risks\n\n") message("Ratio of cumulative incidence for cause1=",cause1," and cause2=",cause2,sep=" ") } else if (model=="OR-cif") { message("OR for dependence for competing risks\n\n") message("OR of cumulative incidence for cause1=",cause1," and cause2=",cause2,sep=" ") } ## }}} } out <- list() for (k in 1:nrow(coefs)) { ## {{{ if (model=="cor") { concordance <- exp(coefs[k,1])*cif1*cif2/((1-cif1)+exp(coefs[k,1])*cif1) conclower <- exp(coefs[k,1]-1.96*coefs[k,2])*cif1*cif2/((1-cif1)+exp(coefs[k,1]-1.96*coefs[k,2])*cif1) concup <- exp(coefs[k,1]+1.96*coefs[k,2])*cif1*cif2/((1-cif1)+exp(coefs[k,1]+1.96*coefs[k,2])*cif1) casewise <- concordance/cif1 caselower <- conclower/cif1 caseup <- concup/cif1 } else if (model=="RR") { casewise<- exp(coefs[k,1])*c(cif2) concordance <- exp(coefs[k,1])*cif1*cif2 caselower <- cif2*exp(coefs[k,1]-1.96*coefs[k,2]) caseup <- cif2*exp(coefs[k,1]+1.96*coefs[k,2]) conclower <- cif1*cif2* exp(coefs[k,1]-1.96*coefs[k,2]) concup <- cif1*cif2*exp(coefs[k,1]+1.96*coefs[k,2]) } else if (model=="OR-cif") { thetal <- coefs[k,1]-1.96*coefs[k,2] thetau <- coefs[k,1]+1.96*coefs[k,2] casewise<- plack.cif2(cif1,cif2,c(coefs[k,1]))/cif1 concordance <- plack.cif2(cif1,cif2,c(coefs[k,1])) caselower <- plack.cif2(cif1,cif2,thetal)/cif1 caseup <- plack.cif2(cif1,cif2,thetau)/cif1 conclower <- plack.cif2(cif1,cif2,thetal) concup <- plack.cif2(cif1,cif2,thetau) } outcase <- cbind(c(casewise),c(caselower),c(caseup)) outconc <- cbind(c(concordance),c(conclower),c(concup)) colnames(outcase) <- c("casewise concordance","2.5 %","97.5%") colnames(outconc) <- c("concordance","2.5 %","97.5%") ## }}} out[[k]] <- list(concordance=outconc,casewise=outcase) names(out)[k] <- rownames(coefs)[k] ###k <- k+1 } return(out) } ## }}} ##' .. content for description (no empty lines) .. ##' ##' @title plack Computes concordance for or.cif based model, that is Plackett random effects model ##' @aliases plack.cif2 ##' @export ##' @param cif1 Cumulative incidence of first argument. ##' @param cif2 Cumulative incidence of second argument. ##' @param object or.cif object with dependence parameters. ##' @author Thomas Scheike plack.cif <- function(cif1,cif2,object) { ## {{{ coefs <- coef(object) theta <- exp(object$theta); cif1 <- c(cif1); cif2 <- c(cif2) cifs=cif1+cif2; valn=2*(theta-1); val1=(1+(theta-1)*(cifs))-( ((1+(theta-1)*cifs))^2-4*cif1*cif2*theta*(theta-1))^0.5; vali=cif1*cif2; valr <- vali; valr[valn!=0] <- val1/valn; valr <- matrix(valr,length(c(theta)),1) rownames(valr)=colnames(coefs) return(valr); } ## }}} ##' @export plack.cif2 <- function(cif1,cif2,theta) { ## {{{ theta <- exp(c(theta)) cif1 <- c(cif1); cif2 <- c(cif2) cifs=cif1+cif2; valn=2*(theta-1); val1=(1+(theta-1)*(cifs))-( ((1+(theta-1)*cifs))^2-4*cif1*cif2*theta*(theta-1))^0.5; vali=cif1*cif2; valr <- vali; valr[valn!=0] <- val1/valn; return(valr); } ## }}} ##' @export predictPairPlack <- function(cif1,cif2,status1,status2,theta) { ## {{{ theta <- exp(c(theta)) cif1 <- c(cif1); cif2 <- c(cif2) cifs=cif1+cif2; valn=2*(theta-1); val1=(1+(theta-1)*(cifs))-( ((1+(theta-1)*cifs))^2-4*cif1*cif2*theta*(theta-1))^0.5; vali=cif1*cif2; valr <- vali; valr[valn!=0] <- val1/valn; p11 <- valr; p10 <- cif1-p11 p01 <- cif2-p11 p00 <- 1- p10-p01-p11 # pred <- (status1==1)*(status2==1)*p11+ (status1==1)*(status2==0)*p10+ (status1==0)*(status2==1)*p01+ (status1==0)*(status2==0)*p00 return(pred); } ## }}} ##' @export summary.randomcif<-function (object, ...) { ## {{{ if (!inherits(object, "randomcif")) stop("Must be a random.cif object") cat("Random effect variance for variation due to clusters\n\n") cat("Cause", attr(object, "cause1"), "and cause", attr(object, "cause2"), fill = TRUE) cat("\n") if (sum(abs(object$score)) > 0.001) cat("WARNING: check score for convergence") cat("\n") coef.randomcif(object, ...) } ## }}} ##' @export coef.randomcif<- function (object, digits = 3, ...) { ## {{{ res <- cbind(object$theta, diag(object$var.theta)^0.5) se <- diag(object$var.theta)^0.5 wald <- object$theta/se waldp <- (1 - pnorm(abs(wald))) * 2 cor <- object$theta + 1 res <- as.matrix(cbind(res, wald, waldp, cor, se)) colnames(res) <- c("Coef.", "SE", "z", "P-val", "Cross odds ratio", "SE") if (!is.null(object$thetanames)) rownames(res)<-object$thetanames ### prmatrix(signif(res, digits)) return(res) } ## }}} ##' @export print.randomcif<- function (x , digits = 3, ...) { ## {{{ } ## }}} ##' @export summary.randomcifrv<-function (object, ...) { ## {{{ if (!inherits(object, "randomcifrv")) stop("Must be a random.cifrv object") cat("Random effect parameters for additive gamma random effects \n\n") cat("Cause", attr(object, "cause1"), "and cause", attr(object, "cause2"), fill = TRUE) cat("\n") if (sum(abs(object$score)) > 1e-06) cat("WARNING: check score for convergence") cat("\n") res <- coef.randomcifrv(object, ...) var.link <- attr(object,"var.link"); rv1 <- attr(object,"rv1"); theta.des <- attr(object,"pardes"); if (var.link==1) par <- theta.des %*% exp(object$theta) else par <- theta.des %*% object$theta if (var.link==1) { fp <- function(p){ res <- exp(p)/sum(rv1* (theta.des %*% exp(p))); return(res); } e <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) fp(p)) pare <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) exp(p)) res <- list(estimate=res,h=e,exppar=pare) } else { fp <- function(p) { p/sum(rv1* (theta.des %*% p)) } e <- lava::estimate(coef=object$theta,vcov=object$var.theta,f=function(p) fp(p)) res <- list(estimate=res,h=e) } res } ## }}} ##' @export coef.randomcifrv<- function (object, digits = 3, ...) { ## {{{ if (attr(object,"inverse")==1) elog <- 1 else elog <- 0; if (elog==1) theta <- exp(object$theta) else theta <- object$theta se <- diag(object$var.theta)^0.5 res <- cbind(object$theta, se) wald <- object$theta/se waldp <- (1 - pnorm(abs(wald))) * 2 res <- as.matrix(cbind(res, wald, waldp)) if (elog==0) colnames(res) <- c("Coef.", "SE", "z", "P-val") if (elog==1) res <- cbind(res,exp(object$theta), exp(object$theta)^2*se) if (elog==1) colnames(res) <- c("log-parameter","SE","z","P-val","exp(theta)","SE") if (!is.null(object$thetanames)) rownames(res)<-object$thetanames prmatrix(signif(res, digits)) ### cat("\n\n Random effect variances for gamma random effects \n\n") ### varpar <- theta/sum(theta)^2 ### res <- as.matrix(varpar); ### if (elog==0) { var.theta <- object$var.theta; ### df <- 0*var.theta; ### for (i in 1:nrow(var.theta)) ### df[i,] <- -theta[i]*2*theta; ### diag(df) <- diag(df)+sum(theta)^2 ### df <- df/sum(theta)^4 ### var.varpar <- df %*% var.theta %*% df ### } ### if (elog==1) { ### var.theta <- object$var.theta; ### var.varpar <- var.theta ### } ### res <- cbind(res,diag(var.varpar)^.5) ### colnames(res) <- c("variance","SE") ### if (is.null((rownames(res))) == TRUE) rownames(res) <- rep(" ", nrow(res)) ### prmatrix(signif(res, digits)) } ## }}} ##' @export print.randomcifrv<- function (x , digits = 3, ...) { ## {{{ summary(x, ...) } ## }}} ## summary.cor<-function(object,digits=3,marg.cif=NULL,...) ## { ## {{{ ## if (!inherits(object, "cor")) stop("Must be a cor.cif object") ## if (sum(abs(object$score))>0.001) warning("WARNING: check score for convergence\n") ## coefs <- coef.cor(object,...); ## outcase <- outconc <- NULL ## if (is.null(marg.cif)==FALSE) { ## marg.cif <- max(marg.cif) ## ## {{{ ## if (attr(object,"Type")=="cor") { ## concordance <- exp(coefs[,1])*marg.cif^2/((1-marg.cif)+exp(coefs[,1])*marg.cif) ## conclower <- exp(coefs[,1]-1.96*coefs[,2])*marg.cif^2/((1-marg.cif)+exp(coefs[,1]-1.96*coefs[,2])*marg.cif) ## concup <- exp(coefs[,1]+1.96*coefs[,2])*marg.cif^2/((1-marg.cif)+exp(coefs[,1]+1.96*coefs[,2])*marg.cif) ## casewise <- concordance/marg.cif ## caselower <- conclower/marg.cif ## caseup <- concup/marg.cif ## } else if (attr(object,"Type")=="RR") { ## casewise<- exp(coefs[,1])*c(marg.cif) ## concordance <- exp(coefs[,1])*marg.cif^2 ## caselower <- marg.cif*exp(coefs[,1]-1.96*coefs[,2]) ## caseup <- marg.cif*exp(coefs[,1]+1.96*coefs[,2]) ## conclower <- marg.cif^2* exp(coefs[,1]-1.96*coefs[,2]) ## concup <- marg.cif^2*exp(coefs[,1]+1.96*coefs[,2]) ## } else if (attr(object,"Type")=="OR-cif") { ## thetal <- coefs[,1]-1.96*coefs[,2] ## thetau <- coefs[,1]+1.96*coefs[,2] ## casewise<- plack.cif2(marg.cif,marg.cif,c(coefs[,1]))/marg.cif ## concordance <- plack.cif2(marg.cif,marg.cif,c(coefs[,1])) ## caselower <- plack.cif2(marg.cif,marg.cif,thetal)/marg.cif ## caseup <- plack.cif2(marg.cif,marg.cif,thetau)/marg.cif ## conclower <- plack.cif2(marg.cif,marg.cif,thetal) ## concup <- plack.cif2(marg.cif,marg.cif,thetau) ## } ## outcase <- cbind(casewise,caselower,caseup) ## outconc <- cbind(concordance,conclower,concup) ## rownames(outcase) <- rownames(outconc) <- rownames(coefs) ## colnames(outcase) <- c("casewise concordance","2.5 %","97.5%") ## colnames(outconc) <- c("concordance","2.5 %","97.5%") ## } ## ## }}} ## res <- list(casewise=outcase,concordance=outconc,estimates=coefs,marg=marg.cif,type=attr(object,"Type"),sym=attr(object,"sym"),cause1=attr(object,"cause1"),cause2=attr(object,"cause2")) ## class(res) <- "summary.cor" ## res ## } ## }}} ## coef.cor<-function(object,...) ## { ## {{{ ## res <- cbind(object$theta, diag(object$var.theta)^0.5) ## se<-diag(object$var.theta)^0.5 ## wald <- object$theta/se ## waldp <- (1 - pnorm(abs(wald))) * 2 ## cor<-exp(object$theta) ## res <- as.matrix(cbind(res, wald, waldp,cor,se*cor)) ## if (attr(object,"Type")=="cor") ## colnames(res) <- c("log-Coef.", "SE", "z", "P-val","Cross odds ratio","SE") ## else colnames(res) <- c("log-ratio Coef.", "SE", "z", "P-val","Ratio","SE") ## if (is.null((rownames(res)))==TRUE) rownames(res)<-rep(" ",nrow(res)) ## return(res) ## } ## }}} mets/R/summary.bptwin.R0000644000176200001440000002163113623061405014550 0ustar liggesusers##' @export summary.bptwin <- function(object,level=0.05,transform=FALSE,...) { logit <- function(p) log(p/(1-p)) tigol <- function(z) 1/(1+exp(-z)) dlogit <- function(p) 1/(p*(1-p)) dtigol <- function(z) tigol(z)^2*exp(-z) trnam <- " " vcoef1 <- paste("var(",c("A","C","D"),")",sep="") if (object$transform$invname!="") { vcoef1 <- paste(object$transform$invname,"(",vcoef1,")",sep="") } vcoef2 <- paste("atanh(", c(paste("rho)","MZ",sep=trnam), paste("rho)","DZ",sep=trnam)),sep="") idx1 <- na.omit(match(vcoef1,names(coef(object)))) idx2 <- na.omit(match(vcoef2,names(coef(object)))) CIs <- c() alpha <- level/2 CIlab <- paste(c(alpha*100,100*(1-alpha)),"%",sep="") V <- c() if (length(idx2)>0) { idx <- idx2 V <- vcov(object)[idx,idx] arho <- coef(object)[idx2[1:2]] mz <- multinomlogit(coef(object)[idx2[1]]); names(mz) <- c("U","E") dz <- multinomlogit(coef(object)[idx2[2]]); names(dz) <- c("U","E") cc <- tanh(arho) names(cc) <- c("Tetrachoric correlation MZ","Tetrachoric correlation DZ") corMZ <- cc[1]; corDZ <- cc[2] D <- diag(object$tr$dtr(arho)) h <- function(x) 2*(x[1]-x[2]) dh <- function(x) c(2,-2) i1 <- 1:2 corr <- NULL } if (length(idx1)>0) { idx <- idx1 V <- vcov(object)[idx,idx] ACD <- match(names(coef(object))[idx1],vcoef1) nn <- c(c("A","C","D")[ACD],"E") dzsc <- c(1/2,1,1/4)[ACD] pp <- coef(object)[idx1] cc <- multinomlogit(pp,object$transform$tr,object$transform$dtr); names(cc) <- nn D <- attributes(cc)$gradient vcovACDE <- (D%*%V%*%t(D)) if (transform) { cc2 <- logit(cc) D2 <- diag(dlogit(cc)) DD <- D2%*%D Vc2 <- DD%*%V%*%t(DD) CIs <- tigol(cc2%x%cbind(1,1)+diag(Vc2)^0.5%x%cbind(-1,1)*qnorm(1-alpha)) } else { CIs <- cbind(cc-qnorm(1-alpha)*sqrt(diag(vcovACDE)),cc+qnorm(1-alpha)*sqrt(diag(vcovACDE))) } K <- length(ACD) Ki <- seq_len(K) corMZ <- sum(cc[Ki]); corDZ <- sum(cc[Ki]*dzsc) i1 <- na.omit(match(c("D","A"),nn)) h <- function(x) sum(x) dh <- function(x) rep(1,length(i1)) ## dh <- function(x) { res <- rep(0,length(x)); res[i1] <- 1; res } ## h <- function(x) 2*(sum(x[i1])-sum(x[i1]*dzsc)) ## dh <- function(x) 2*(1-dzsc) } Vc <- D%*%V%*%t(D) datanh <- function(r) 1/(1-r^2) if (length(idx1)>0) { pp <- coef(object)[idx] b <- cbind(rep(1,K)) corMZ.sd <- (t(b)%*%Vc[Ki,Ki]%*%b)[1]^0.5 corDZ.sd <- (t(dzsc)%*%Vc[Ki,Ki]%*%dzsc)[1]^0.5 corr <- rbind(c(corMZ,corMZ.sd),c(corDZ,corDZ.sd)) zrho <- atanh(corr[,1]) zrho.var <- datanh(corr[,1])^2*corr[,2]^2 corr <- cbind(corr, tanh(zrho%x%cbind(1,1)+zrho.var^0.5%x%cbind(-1,1)*qnorm(1-alpha))) rownames(corr) <- c("MZ Tetrachoric Cor","DZ Tetrachoric Cor") } else { zrho <- atanh(cc) zrho.var <- datanh(cc)^2*diag(Vc) CIs <- tanh(zrho%x%cbind(1,1)+zrho.var^0.5%x%cbind(-1,1)*qnorm(1-alpha)) } newcoef <- rbind(cbind(cc,diag(Vc)^0.5,CIs),corr); ## CIs <- rbind(CIs,c(NA,NA),c(NA,NA)) ## newcoef <- cbind(newcoef,CIs) colnames(newcoef) <- c("Estimate","Std.Err",CIlab) H <- h(cc[i1]) hstd <- (t(dh(cc[i1]))%*%Vc[i1,i1]%*%dh(cc[i1]))^.5 if (!transform) { ci <- c(H-hstd*qnorm(1-alpha),H+hstd*qnorm(1-alpha)) } else { logith <- function(x) logit(h(x)) dlogith <- function(x) dlogit(h(x))*dh(x) Dlh <- dlogith(cc[i1]) sdlh <- (t(Dlh)%*%Vc[i1,i1]%*%(Dlh))[1]^0.5 suppressWarnings(ci <- tigol(logith(cc[i1]) + qnorm(1-alpha)*c(-1,1)*sdlh)) } rhoOS <- NULL if (object$OS) { rEst <- object$coef[nrow(object$coef),1] rSE <- object$coef[nrow(object$coef),2] rhoOS <- tanh(rbind(c(rEst,rEst+qnorm(1-alpha)*c(-1,1)*rSE))) colnames(rhoOS) <- c("Estimate",CIlab) if (length(idx1)==0) { rownames(rhoOS) <- "Tetrachoric correlation OS" } else { rownames(rhoOS) <- "Kinship OS" } } concordance <- conditional <- marg <- c() probs <- function(p,idx=1) { if (idx==0) { m <- p[1] ##else m <- p[length(object$midx0)+1] S <- object$SigmaFun(p) conc1 <- pmvn(upper=c(m,m),sigma=S[[1]]) conc2 <- pmvn(upper=c(m,m),sigma=S[[2]]) marg <- pnorm(m,sd=S[[1]][1,1]^0.5) return(logit((conc1-conc2)/(marg*(1-marg)))) } S <- (object$SigmaFun(p))[[idx]] m <- 0 if((object$npar$intercept==1 & idx==1) | object$eqmean) m <- p[1] else m <- p[length(object$midx0)+1] mu.cond <- function(x) m+S[1,2]/S[2,2]*(x-m) var.cond <- S[1,1]-S[1,2]^2/S[2,2] conc <- pmvn(upper=c(m,m),sigma=S) disconc <- pmvn(lower=c(-Inf,m),upper=c(m,Inf),sigma=S) marg <- pnorm(m,sd=S[1,1]^0.5) cond <- conc/marg discond <- disconc/(1-marg) logOR <- log(cond)-log(1-cond)-log(discond)+log(1-discond) lambdaR <- cond/marg c(logit(c(conc,cond,marg)),lambdaR,logOR) } mycoef <- coef(object) ## formals(probs) <- alist(p=,idx=0) ## hp <- probs(mycoef) ## Dhp <- numDeriv::grad(probs,mycoef) ## shp <- diag(t(Dhp)%*%vcov(object)%*%(Dhp))^0.5 formals(probs) <- alist(p=,idx=1) probMZ <- probs(mycoef) Dp0 <- numDeriv::jacobian(probs,mycoef) formals(probs) <- alist(p=,idx=2) probDZ <- probs(mycoef) Dp1 <- numDeriv::jacobian(probs,mycoef) sprobMZ <- diag((Dp0)%*%vcov(object)%*%t(Dp0))^0.5 sprobDZ <- diag((Dp1)%*%vcov(object)%*%t(Dp1))^0.5 probMZ <- cbind(probMZ,probMZ-qnorm(1-alpha)*sprobMZ,probMZ+qnorm(1-alpha)*sprobMZ) probMZ[1:3,] <- tigol(probMZ[1:3,]) probDZ <- cbind(probDZ,probDZ-qnorm(1-alpha)*sprobDZ,probDZ+qnorm(1-alpha)*sprobDZ) probDZ[1:3,] <- tigol(probDZ[1:3,]) rownames(probMZ) <- rownames(probDZ) <- c("Concordance","Casewise Concordance","Marginal","Rel.Recur.Risk","log(OR)") colnames(probMZ) <- colnames(probDZ) <- c("Estimate",CIlab) ## mu <- coef(object)[c(object$bidx0[1],object$bidx1[1])] ## Sigma <- list(object$Sigma0,object$Sigma1) ## for (i in 1:2) { ## conc <- function() ## mu.cond <- function(x) mu+Sigma[[i]][1,2]/Sigma[[i]][2,2]*(x-mu[i]) ## var.cond <- Sigma[[i]][1,1]-Sigma[[i]][1,2]^2/Sigma[[i]][2,2] ## cc0 <- pmvn(upper=c(mu[i],mu[i]),sigma=Sigma[[i]]) ## px <- pnorm(mu[i],sd=Sigma[[i]][2,2]^0.5) ## concordance <- c(concordance,cc0) ## marg <- c(marg,px) ## conditional <- c(conditional,cc0/px) ## } ## names(concordance) <- names(conditional) <- c("MZ","DZ") hval <- rbind(c(H,hstd,ci)); colnames(hval) <- c("Estimate","Std.Err",CIlab); if (hval[1]>1) hval[1,] <- c(1,NaN,NaN,NaN) ## hval <- rbind(hval, tigol(c(hp,NA,hp-qnorm(1-alpha)*shp,hp+qnorm(1-alpha)*shp))) rownames(hval) <- c("Broad-sense heritability")##,"Risk-scale Heritability") Nstr <- object$N nN <- ncol(object$N) ngroups <- ifelse(object$OS,3,2) postn <- "MZ/DZ"; if (object$OS) postn <- paste(postn,"OS",sep="/") npos <- seq(ngroups) Nstr <- cbind(paste(Nstr[npos],collapse="/"), paste(Nstr[npos+ngroups],collapse="/"), paste(Nstr[npos+2*ngroups],collapse="/")) rownames(Nstr) <- "" colnames(Nstr) <- unlist(lapply(strsplit(colnames(object$N)[(1:3)*ngroups],".",fixed=TRUE), function(x) paste(x[1], postn))) all <- rbind(hval[,c(1,3,4),drop=FALSE],newcoef[,c(1,3,4),drop=FALSE]) allprob <- rbind(probMZ,probDZ); rownames(allprob) <- c(paste("MZ",rownames(probMZ)),paste("DZ",rownames(probDZ))) all <- rbind(all,allprob) cc <- object$coef; cc[,2] <- diag(vcov(object))^.5; cc[,3] <- cc[,1]/cc[,2]; cc[,4] <- 2*(pnorm(abs(cc[,1]/cc[,2]),lower.tail=FALSE)) res <- list(heritability=hval, par=cc, probMZ=probMZ, probDZ=probDZ, Nstr=Nstr, rhoOS=rhoOS, coef=newcoef, all=all, vcov=vcov(object), AIC=AIC(object), time=attributes(object)$time, logLik=logLik(object)) ##, concordance=concordance, conditional=conditional) class(res) <- "summary.bptwin" res } ##' @export print.summary.bptwin <- function(x,digits = max(3, getOption("digits") - 2),...) { cat("\n") printCoefmat(x$par,digits=digits,...) cat("\n") ## x$Nstr <- x$Nstr[,which((colnames(x$Nstr)!="Complete MZ/DZ")),drop=FALSE] NN <- x$Nstr[,c(1,3),drop=FALSE]; colnames(NN)[1] <- gsub("Complete ","",colnames(NN)[1]) print(NN,quote=FALSE) cat("\n") cc <- rbind(x$coef[,-2,drop=FALSE],x$rhoOS) print(RoundMat(cc,digits=digits),quote=FALSE) cat("\nMZ:\n"); print(RoundMat(x$probMZ,digits=digits),quote=FALSE) cat("DZ:\n") print(RoundMat(x$probDZ,digits=digits),quote=FALSE) ## cat("\nConcordance (MZ; DZ):\t\t", x$concordance,"\n") ## cat("Case-wise concordance (MZ; DZ):\t", x$conditional,"\n\n") cat("\n") print(RoundMat(x$heritability[,-2,drop=FALSE],digits=digits),quote=FALSE) cat("\n") if (!is.null(x$time)) { cat("\n") cat("Event of interest before time ", x$time, "\n", sep="") } } mets/R/bptwin.R0000644000176200001440000005640413623061405013062 0ustar liggesusers##' Liability-threshold model for twin data ##' ##' @aliases bptwin twinlm.time bptwin.time ##' @title Liability model for twin data ##' @seealso \code{\link{twinlm}}, \code{\link{twinlm.time}}, \code{\link{twinlm.strata}}, \code{\link{twinsim}} ##' @param x Formula specifying effects of covariates on the response. ##' @param data \code{data.frame} with one observation pr row. In ##' addition a column with the zygosity (DZ or MZ given as a factor) of ##' each individual much be ##' specified as well as a twin id variable giving a unique pair of ##' numbers/factors to each twin pair. ##' @param id The name of the column in the dataset containing the twin-id variable. ##' @param zyg The name of the column in the dataset containing the ##' zygosity variable. ##' @param DZ Character defining the level in the zyg variable ##' corresponding to the dyzogitic twins. ##' @param group Optional. Variable name defining group for interaction analysis (e.g., gender) ##' @param num Optional twin number variable ##' @param weights Weight matrix if needed by the chosen estimator (IPCW) ##' @param biweight Function defining the bivariate weight in each cluster ##' @param strata Strata ##' @param messages Control amount of messages shown ##' @param control Control argument parsed on to the optimization routine. Starting values may be parsed as '\code{start}'. ##' @param type Character defining the type of analysis to be ##' performed. Should be a subset of "acde" (additive genetic factors, common ##' environmental factors, dominant ##' genetic factors, unique environmental factors). ##' @param eqmean Equal means (with type="cor")? ##' @param pairs.only Include complete pairs only? ##' @param stderr Should standard errors be calculated? ##' @param robustvar If TRUE robust (sandwich) variance estimates of the variance are used ##' @param p Parameter vector p in which to evaluate log-Likelihood and score function ##' @param indiv If TRUE the score and log-Likelihood contribution of each twin-pair ##' @param constrain Development argument ##' @param samecens Same censoring ##' @param allmarg Should all marginal terms be included ##' @param bound Development argument ##' @param varlink Link function for variance parameters ##' @param ... Additional arguments to lower level functions ##' @author Klaus K. Holst ##' @export ##' @examples ##' data(twinstut) ##' b0 <- bptwin(stutter~sex, ##' data=droplevels(subset(twinstut,zyg%in%c("mz","dz"))), ##' id="tvparnr",zyg="zyg",DZ="dz",type="ae") ##' summary(b0) bptwin <- function(x, data, id, zyg, DZ, group=NULL, num=NULL, weights=NULL, biweight=function(x) 1/min(x), strata=NULL, messages=1, control=list(trace=0), type="ace", eqmean=TRUE, pairs.only=FALSE, samecens=TRUE, allmarg=samecens&!is.null(weights), stderr=TRUE, robustvar=TRUE, p, indiv=FALSE, constrain, bound=FALSE, varlink, ...) { ###{{{ setup mycall <- match.call() formulaId <- unlist(Specials(x,"cluster")) formulaStrata <- unlist(Specials(x,"strata")) formulaSt <- paste("~.-cluster(",formulaId,")-strata(",paste(formulaStrata,collapse="+"),")") formula <- update(x,formulaSt) if (!is.null(formulaId)) { id <- formulaId mycall$id <- id } if (!is.null(formulaStrata)) strata <- formulaStrata mycall$formula <- formula if (!is.null(strata)) { dd <- split(data,interaction(data[,strata])) nn <- unlist(lapply(dd,nrow)) dd[which(nn==0)] <- NULL if (length(dd)>1) { fit <- lapply(seq(length(dd)),function(i) { if (messages>0) message("Strata '",names(dd)[i],"'") mycall$data <- dd[[i]] eval(mycall) }) res <- list(model=fit) res$strata <- names(res$model) <- names(dd) class(res) <- c("twinlm.strata","biprobit") res$coef <- unlist(lapply(res$model,coef)) res$vcov <- blockdiag(lapply(res$model,vcov.biprobit)) res$N <- length(dd) res$idx <- seq(length(coef(res$model[[1]]))) rownames(res$vcov) <- colnames(res$vcov) <- names(res$coef) return(res) } } ################################################## ### No strata if (is.null(control$method)) { if (!samecens & !is.null(weights)) { control$method <- "bhhh" } else { if (requireNamespace("ucminf",quietly=TRUE)) { control$method <- "gradient" } else control$method <- "nlminb" } } if (tolower(type)=="cor") type <- "u" if (length(grep("flex",tolower(type)))>0) { type <- "u"; eqmean <- FALSE } yvar <- paste(deparse(formula[[2]]),collapse="") data <- data[order(data[,id]),] idtab <- table(data[,id]) if (sum(idtab>2)) stop("More than two individuals with the same id ") ## suppressMessages(browser()) if (pairs.only) { data <- data[as.character(data[,id])%in%names(idtab)[idtab==2],] idtab <- table(data[,id]) } if (is.logical(data[,yvar])) data[,yvar] <- data[,yvar]*1 if (is.factor(data[,yvar])) data[,yvar] <- as.numeric(data[,yvar])-1 idx2 <- NULL if (missing(DZ)) { DZ <- levels(as.factor(data[,zyg]))[1] message("Using '",DZ,"' as DZ",sep="") } OS <- NULL OSon <- FALSE if (!is.null(OS)) { idx2 <- which(data[,zyg]==OS) OSon <- TRUE if (length(idx2)==0) { warning("No OS twins found") OSon <- FALSE } } idx1 <- which(data[,zyg]==DZ) ## DZ if (length(idx1)==0) stop("No DZ twins found") idx0 <- which(!(data[,zyg]%in%c(DZ,OS))) ## MZ if (length(idx1)==0) stop("No MZ twins found") zyg2 <- rep(1,nrow(data)); zyg2[idx0] <- 0; zyg2[idx2] <- 2 data[,zyg] <- zyg2 ## MZ=0, DZ=1, OS=2 ## time <- "time" ## while (time%in%names(data)) time <- paste(time,"_",sep="") ## data[,time] <- unlist(lapply(idtab,seq)) ## ff <- paste(as.character(formula)[3],"+", ## paste(c(id,zyg,weights,num),collapse="+")) ## ff <- paste("~",yvar,"+",ff) ##formula0 <- as.formula(ff) opt <- options(na.action="na.pass") ## Data <- model.matrix(formula0,data) Data <- cbind(model.matrix(formula,data),data[,c(yvar,id,zyg,weights,num)]) options(opt) ## rnames1 <- setdiff(colnames(Data),c(yvar,time,id,weights,zyg)) rnames1 <- setdiff(colnames(Data),c(yvar,id,weights,zyg,num)) nx <- length(rnames1) if (nx==0) stop("Zero design not allowed") bidx0 <- seq(nx) midx0 <- bidx0; midx1 <- midx0+nx dS0. <- rbind(rep(1,4),rep(1,4),rep(1,4)) ## MZ dS1. <- rbind(c(1,.5,.5,1),rep(1,4),c(1,.25,.25,1)) ## DZ dS2. <- rbind(c(1,0,0,1),rep(1,4),c(1,0,0,1),c(0,1,1,0)) ##mytr <- function(x) x; dmytr <- function(x) 1 ##mytr <- function(x) x^2; dmytr <- function(x) 2*x ##mytr <- function(z) 1/(1+exp(-z)); dmytr <- function(z) exp(-z)/(1+exp(-z))^2 ACDU <- sapply(c("a","c","d","e","u"),function(x) length(grep(x,tolower(type)))>0) ACDU <- c(ACDU,os=OSon) if (missing(varlink) || (!is.null(varlink) && varlink%in%"log")) { mytr <- exp; dmytr <- exp; myinvtr <- log trname <- "exp"; invtrname <- "log" } else { mytr <- myinvtr <- identity; dmytr <- function(x) rep(1,length(x)) trname <- ""; invtrname <- "" } dmytr2 <- function(z) 4*exp(2*z)/(exp(2*z)+1)^2 mytr2 <- tanh; myinvtr2 <- atanh trname2 <- "tanh"; invtrname2 <- "atanh" if (OSon) { ## logit <- function(p) log(p/(1-p)) ## tigol <- function(z) 1/(1+exp(-z)) ## dlogit <- function(p) 1/(p*(1-p)) ## dtigol <- function(z) tigol(z)^2*exp(-z) ## mytr <- function(p) c(exp(p[-length(p)]),tigol(p[length(p)])) ## myinvtr <- function(z) c(log(z[-length(z)]),logit(z[length(z)])) ## dmytr <- function(p) c(exp(p[-length(p)]),dtigol(p[length(p)])) mytr <- function(x) c(exp(x[-length(x)]),mytr2(x[length(x)])) myinvtr <- function(z) c(log(z[-length(z)]),myinvtr2(z[length(z)])) dmytr <- function(x) c(exp(x[-length(x)]),dmytr2(x[length(x)])) } if (ACDU["u"]) { ## datanh <- function(r) 1/(1-r^2) dmytr <- dmytr2 mytr <- mytr2; myinvtr <- myinvtr2 trname <- trname2; invtrname <- invtrname2 dS0 <- rbind(c(0,1,1,0)) vidx0 <- 1 vidx1 <- 2 vidx2 <- 3 dS2 <- dS1 <- dS0 nvar <- length(vidx0)+length(vidx1) if (OSon) nvar <- nvar+length(vidx2) } else { nvar <- sum(ACDU[1:3]) vidx0 <- vidx1 <- seq(nvar); vidx2 <- seq(nvar+1) if (OSon) nvar <- nvar+1 dS0 <- dS0.[ACDU[1:3],,drop=FALSE] dS1 <- dS1.[ACDU[1:3],,drop=FALSE] dS2 <- dS2.[which(c(ACDU[1:3],TRUE)),,drop=FALSE] } if (eqmean) { bidx2 <- bidx1 <- bidx0 } else { bidx1 <- bidx0+nx bidx2 <- bidx1+nx if (OSon) nx <- 3*nx else nx <- 2*nx; } vidx0 <- vidx0+nx; vidx1 <- vidx1+nx; vidx2 <- vidx2+nx vidx <- nx+seq_len(nvar) midx <- seq_len(nx) plen <- nx+nvar Am <- matrix(c(1,.5,.5,1),ncol=2) Dm <- matrix(c(1,.25,.25,1),ncol=2) Vm <- matrix(c(1,0,0,1),ncol=2) Rm <- matrix(c(0,1,1,0),ncol=2) ################################################## ## system.time(Wide <- reshape(as.data.frame(Data),idvar=c(id,zyg),timevar=time,direction="wide")) ## system.time(Wide <- as.data.frame(fast.reshape(Data,id=c(id),sep="."))) Wide <- as.data.frame(fast.reshape(Data,id=c(id,zyg),sep=".",idcombine=FALSE,labelnum=TRUE)) yidx <- paste(yvar,1:2,sep=".") rmidx <- c(id,yidx,zyg) W0 <- W1 <- W2 <- NULL if (!is.null(weights)) { widx <- paste(weights,1:2,sep=".") rmidx <- c(rmidx,widx) W0 <- as.matrix(Wide[which(Wide[,zyg]==0),widx,drop=FALSE]) W1 <- as.matrix(Wide[which(Wide[,zyg]==1),widx,drop=FALSE]) W2 <- as.matrix(Wide[which(Wide[,zyg]==2),widx,drop=FALSE]) } XX <- as.matrix(Wide[,setdiff(colnames(Wide),rmidx)]) XX[is.na(XX)] <- 0 Y0 <- as.matrix(Wide[which(Wide[,zyg]==0),yidx,drop=FALSE]) Y1 <- as.matrix(Wide[which(Wide[,zyg]==1),yidx,drop=FALSE]) Y2 <- as.matrix(Wide[which(Wide[,zyg]==2),yidx,drop=FALSE]) XX0 <- XX[which(Wide[,zyg]==0),,drop=FALSE] XX1 <- XX[which(Wide[,zyg]==1),,drop=FALSE] XX2 <- XX[which(Wide[,zyg]==2),,drop=FALSE] ################################################## ###}}} setup ###{{{ Mean/Var function ## suppressMessages(browser()) ##Marginals etc. MyData0 <- ExMarg(Y0,XX0,W0,dS0,eqmarg=TRUE,allmarg=allmarg) MyData1 <- ExMarg(Y1,XX1,W1,dS1,eqmarg=TRUE,allmarg=allmarg) MyData2 <- ExMarg(Y2,XX2,W2,dS2,eqmarg=TRUE,allmarg=allmarg) N <- cbind(length(idx0),length(idx1),length(idx2)); N <- cbind(N, 2*nrow(MyData0$Y0)+if (!pairs.only) NROW(MyData0$Y0_marg) else 0, 2*nrow(MyData1$Y0)+if (!pairs.only) NROW(MyData1$Y0_marg) else 0, 2*nrow(MyData2$Y0)+if (!pairs.only) NROW(MyData2$Y0_marg) else 0, NROW(MyData0$Y0),NROW(MyData1$Y0),NROW(MyData2$Y0)) colnames(N) <- c("Total.MZ","Total.DZ","Total.OS","Complete.MZ","Complete.DZ","Complete.OS","Complete pairs.MZ","Complete pairs.DZ","Complete pairs.OS") rownames(N) <- rep("",nrow(N)) if (!OSon) N <- N[,-c(3,6,9),drop=FALSE] if (samecens & !is.null(weights)) { MyData0$W0 <- cbind(apply(MyData0$W0,1,biweight)) if (!is.null(MyData0$Y0_marg)) MyData0$W0_marg <- cbind(apply(MyData0$W0_marg,1,biweight)) MyData1$W0 <- cbind(apply(MyData1$W0,1,biweight)) if (!is.null(MyData1$Y0_marg)) MyData1$W0_marg <- cbind(apply(MyData1$W0_marg,1,biweight)) MyData2$W0 <- cbind(apply(MyData2$W0,1,biweight)) if (!is.null(MyData2$Y0_marg)) MyData2$W0_marg <- cbind(apply(MyData2$W0_marg,1,biweight)) } rm(Y0,XX0,W0,Y1,XX1,W1,Y2,XX2,W2) Sigma <- function(p0) { Sigma2 <- NULL p0[vidx] <- mytr(p0[vidx]) if (ACDU["u"]) { pos0 <- ifelse(OSon, plen-2, plen-1) Sigma0 <- diag(2) + p0[pos0]*Rm Sigma1 <- diag(2) + p0[pos0+1]*Rm if (OSon) Sigma2 <- diag(2) + p0[pos0+2]*Rm } else { ii <- ACDU; ii[4:5] <- FALSE pv <- ACDU*1; pv[ii] <- p0[vidx] Sigma0 <- Vm*pv["e"] + pv["a"] + pv["c"] + pv["d"] Sigma1 <- Vm*pv["e"] + pv["a"]*Am + pv["c"] + pv["d"]*Dm Sigma2 <- Vm*pv["e"] + pv["c"] + (pv["a"] + pv["d"])*Vm + pv["os"]*(pv["a"] + pv["d"])*Rm if (OSon) { dS2 <- dS2. dS2[c(1,3),2:3] <- pv["os"] dS2[4,2:3] <- pv["a"]+pv["d"] dS2 <- dS2[which(c(ACDU[1:3],TRUE)),] } } return(list(Sigma0=Sigma0,Sigma1=Sigma1,Sigma2=Sigma2,dS2=dS2)) } ## p0 <- op$par ## ff <- function(p) as.vector(Sigma(p)$Sigma2) ## numDeriv::jacobian(ff,p0) ## Sigma(p0)$dS2 ## dmytr(p0[vidx]) ## Sigma(p0)$dS2[1,]*dmytr(p0[vidx])[1] ## Sigma(p0)$dS2[2,]*dmytr(p0[vidx])[2] ## Sigma(p0)$dS2[3,]*dmytr(p0[vidx])[3] ###}}} Mean/Var function ###{{{ U p0 <- rep(-1,plen); ##p0[vidx] <- 0 if (!missing(varlink) && is.null(varlink)) p0 <- rep(0.5,plen) if (OSon) p0[length(p0)] <- 0.3 if (type=="u") p0[vidx] <- 0.3 if (!is.null(control$start)) { p0 <- control$start control$start <- NULL } else { X <- rbind(MyData0$XX0[,midx0,drop=FALSE],MyData0$XX0[,midx1,drop=FALSE]) Y <- rbind(MyData0$Y0[,1,drop=FALSE],MyData0$Y0[,2,drop=FALSE]) g <- suppressWarnings(glm(Y~-1+X,family=binomial(probit))) p0[midx] <- coef(g) } U <- function(p,indiv=FALSE) { b0 <- cbind(p[bidx0]) b1 <- cbind(p[bidx1]) b2 <- cbind(p[bidx2]) b00 <- b0; b11 <- b1; b22 <- b2 if (bound) p[vidx] <- min(p[vidx],20) S <- Sigma(p) lambda <- eigen(S$Sigma0)$values if (any(lambda<1e-12 | lambda>1e9)) stop("Variance matrix out of bounds") Mu0 <- with(MyData0, cbind(XX0[,midx0,drop=FALSE]%*%b00, XX0[,midx1,drop=FALSE]%*%b00)) U0 <- with(MyData0, .Call("biprobit0", Mu0, S$Sigma0,dS0,Y0,XX0,W0,!is.null(W0),samecens, PACKAGE="mets")) if (!is.null(MyData0$Y0_marg) &&!pairs.only) { mum <- with(MyData0, XX0_marg%*%b00) dSmarg <- dS0[,1,drop=FALSE] U_marg <- with(MyData0, .Call("uniprobit", mum,XX0_marg, S$Sigma0[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) U0$score <- rbind(U0$score,U_marg$score) U0$loglik <- c(U0$loglik,U_marg$loglik) } Mu1 <- with(MyData1, cbind(XX0[,midx0,drop=FALSE]%*%b11, XX0[,midx1,drop=FALSE]%*%b11)) U1 <- with(MyData1, .Call("biprobit0", Mu1, S$Sigma1,dS1,Y0,XX0,W0,!is.null(W0),samecens, PACKAGE="mets")) if (!is.null(MyData1$Y0_marg) &&!pairs.only) { mum <- with(MyData1, XX0_marg%*%b11) dSmarg <- dS1[,1,drop=FALSE] U_marg <- with(MyData1, .Call("uniprobit", mum,XX0_marg, S$Sigma1[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) U1$score <- rbind(U1$score,U_marg$score) U1$loglik <- c(U1$loglik,U_marg$loglik) } U2 <- val2 <- NULL if (OSon) { Mu2 <- with(MyData2, cbind(XX0[,midx0,drop=FALSE]%*%b22, XX0[,midx1,drop=FALSE]%*%b22)) U2 <- with(MyData2, .Call("biprobit0", Mu2, S$Sigma2,S$dS2,Y0,XX0,W0,!is.null(W0),samecens, PACKAGE="mets")) if (!is.null(MyData2$Y0_marg) &&!pairs.only) { mum <- with(MyData2, XX0_marg%*%b22) dSmarg <- S$dS2[,1,drop=FALSE] U_marg <- with(MyData2, .Call("uniprobit", mum,XX0_marg, S$Sigma2[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE, PACKAGE="mets")) U2$score <- rbind(U2$score,U_marg$score) U2$loglik <- c(U2$loglik,U_marg$loglik) } } if (indiv) { ll0 <- U0$loglik ll1 <- U1$loglik val0 <- U0$score[MyData0$id,,drop=FALSE] val1 <- U1$score[MyData1$id,,drop=FALSE] N0 <- length(MyData0$id) idxs0 <- seq_len(N0) if (length(MyData0$margidx)>0) { for (i in seq_len(N0)) { idx0 <- which((MyData0$idmarg)==(MyData0$id[i]))+N0 idxs0 <- c(idxs0,idx0) val0[i,] <- val0[i,]+colSums(U0$score[idx0,,drop=FALSE]) } val0 <- rbind(val0, U0$score[-idxs0,,drop=FALSE]) ll0 <- c(ll0,ll0[-idxs0]) } N1 <- length(MyData1$id) idxs1 <- seq_len(N1) if (length(MyData1$margidx)>0) { for (i in seq_len(N1)) { idx1 <- which((MyData1$idmarg)==(MyData1$id[i]))+N1 idxs1 <- c(idxs1,idx1) val1[i,] <- val1[i,]+colSums(U1$score[idx1,,drop=FALSE]) } val1 <- rbind(val1, U1$score[-idxs1,,drop=FALSE]) ll1 <- c(ll1,ll1[-idxs1]) } if (OSon) { ll2 <- U2$loglik val2 <- U2$score[MyData2$id,,drop=FALSE] N2 <- length(MyData2$id) idxs2 <- seq_len(N2) if (length(MyData2$margidx)>0) { for (i in seq_len(N2)) { idx2 <- which((MyData2$idmarg)==(MyData2$id[i]))+N2 idxs2 <- c(idxs2,idx2) val2[i,] <- val2[i,]+colSums(U2$score[idx2,,drop=FALSE]) } val2 <- rbind(val2, U2$score[-idxs2,,drop=FALSE]) ll2 <- c(ll2,ll2[-idxs2]) } } val <- matrix(0,ncol=plen,nrow=nrow(val0)+nrow(val1) + NROW(val2)) val[seq_len(nrow(val0)),c(bidx0,vidx0)] <- val0 val[nrow(val0)+seq_len(nrow(val1)),c(bidx1,vidx1)] <- val1 if (OSon) { val[nrow(val0)+nrow(val1)+seq_len(nrow(val2)),c(bidx2,vidx2)] <- val2 } trp <- dmytr(p[vidx]) for (i in seq(length(vidx))) { val[,vidx[i]] <- val[,vidx[i]]*trp[i] } attributes(val)$logLik <- c(U0$loglik,U1$loglik,U2$loglik) return(val) } val <- numeric(plen) val[c(bidx0,vidx0)] <- colSums(U0$score) val[c(bidx1,vidx1)] <- val[c(bidx1,vidx1)]+colSums(U1$score) if (OSon) val[c(bidx2,vidx2)] <- val[c(bidx2,vidx2)]+colSums(U2$score) val[vidx] <- val[vidx]*dmytr(p[vidx]) attributes(val)$logLik <- sum(U0$loglik)+sum(U1$loglik)+sum(U2$loglik) return(val) } ###}}} U ###{{{ optim if (!missing(p)) return(U(p,indiv=indiv)) f <- function(p) crossprod(U(p))[1] f0 <- function(p) -sum(attributes(U(p))$logLik) g0 <- function(p) -as.numeric(U(p)) h0 <- function(p) crossprod(U(p,indiv=TRUE)) if (!missing(constrain)) { freeidx <- is.na(constrain) f <- function(p) { p1 <- constrain; p1[freeidx] <- p res <- U(p1)[freeidx] crossprod(res)[1] } f0 <- function(p) { p1 <- constrain; p1[freeidx] <- p -sum(attributes(U(p1))$logLik) } g0 <- function(p) { p1 <- constrain; p1[freeidx] <- p -as.numeric(U(p1)[freeidx]) } p0 <- p0[is.na(constrain)] } ## Derivatives, Sanity check ## ff <- function(p) attributes(U(p,indiv=FALSE))$logLik ## pp <- c(0,-.1,.1,0.5) ## numDeriv::grad(ff,pp) ## U(pp,indiv=FALSE) controlstd <- list(hessian=0) controlstd[names(control)] <- control control <- controlstd nlminbopt <- intersect(names(control),c("eval.max","iter.max","trace","abs.tol","rel.tol","x.tol","step.min")) ucminfopt <- intersect(names(control),c("trace","grtol","xtol","stepmax","maxeval","grad","gradstep","invhessian.lt")) optimopt <- names(control) op <- switch(tolower(control$method), nlminb=nlminb(p0,f0,gradient=g0,control=control[nlminbopt]), optim=optim(p0,fn=f0,gr=g0,control=control[ucminfopt]), ucminf=, quasi=, gradient=ucminf::ucminf(p0,fn=f0,gr=g0,control=control[ucminfopt],hessian=0), ## , ## bhhh={ ## controlnr <- list(stabil=FALSE, ## gamma=0.1, ## gamma2=1, ## ngamma=5, ## iter.max=200, ## epsilon=1e-12, ## tol=1e-9, ## trace=1, ## stabil=FALSE) ## controlnr[names(control)] <- control ## lava:::NR(start=p0,NULL,g0, h0,control=controlnr) ## }, ## op <- switch(mycontrol$method, ## ucminf=ucminf(p0,f,control=mycontrol[ucminfopt],hessian=F), ## optim=optim(p0,f,control=mycontrol[ucminfopt],...), nlminb(p0,f,control=control[nlminbopt])) if (stderr) { UU <- U(op$par,indiv=TRUE) I <- -numDeriv::jacobian(U,op$par) tol <- 1e-15 iI <- Inverse(I,tol) V <- iI sqrteig <- attributes(V)$sqrteig J <- NULL if (robustvar) { J <- crossprod(UU) V <- iI%*%J%*%iI } if (any(sqrteig1) breaks <- list(breaks) break.points <- FALSE if (is.list(breaks)) { break.points <- TRUE if (length(x)!=length(breaks) & length(breaks)!=1) warning("length of variables not consistent with list of breaks"); if (length(breaks)!=ll) breaks <- rep(list(breaks[[1]]),ll) } if (!break.points) { if (length(x)!=length(breaks) & length(breaks)!=1) warning("length of variables not consistent with breaks"); if (length(breaks)!=ll) breaks<- rep(breaks[1],ll) } if (ll==1 & !is.list(labels)) labels <- list(labels) if (!is.list(labels)) labels <- list(labels); if (length(labels)!=ll ) labels <- rep(list(labels[[1]]),ll) if (!is.list(labels)) stop("labels should be given as list"); for (k in 1:ll) { xx <- x[[k]] if (is.numeric(xx)) { if (!is.list(breaks)) { if (!is.null(probs)) { bb <- quantile(xx, probs,na.rm=na.rm, ...) } else { if (!equi) { probs <- seq(0, 1, length.out = breaks[k] + 1) bb <- quantile(xx, probs, na.rm=na.rm,...) } if (equi) { rr <- range(xx,na.rm=na.rm) bb <- seq(rr[1],rr[2],length.out=breaks[k]+1) } } name<-paste(xnames[k],breaks[k],sep=sep) } else { bb <- breaks[[k]]; name<-paste(xnames[k],breaks[[k]][1],sep=sep) } if (usernames) name <- newnames[k] if (sum(duplicated(bb))==0) data[,name] <- cut(xx,breaks=bb,include.lowest=TRUE,labels=labels[[k]],...) else { if (all==TRUE) { wd <- which(duplicated(bb)) mb <- min(diff(bb[-wd])) bb[wd] <- bb[wd] + (mb/2)*seq(length(wd))/length(wd) data[,name] <- cut(xx,breaks=bb,include.lowest=TRUE,labels=labels[[k]],...) warning(paste("breaks duplicated for=",xnames[k])) } } } } return(data) }# }}} }# }}} ##' @export "dcut<-" <- function(data,...,value) dcut(data,y=value,...) ##' relev levels for data frames ##' ##' levels shows levels for variables in data frame, relevel relevels a factor in data.frame ##' @param data if x is formula or names for data frame then data frame is needed. ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param x name of variable, or fomula, or names of variables on data frame. ##' @param ref new reference variable ##' @param newlevels to combine levels of factor in data frame ##' @param regex for regular expressions. ##' @param sep seperator for naming of cut names. ##' @param overwrite to overwrite variable ##' @param ... Optional additional arguments ##' @author Klaus K. Holst and Thomas Scheike ##' @examples ##' ##' data(mena) ##' dstr(mena) ##' dfactor(mena) <- ~twinnum ##' dnumeric(mena) <- ~twinnum.f ##' ##' dstr(mena) ##' ##' mena2 <- drelevel(mena,"cohort",ref="(1980,1982]") ##' mena2 <- drelevel(mena,~cohort,ref="(1980,1982]") ##' mena2 <- drelevel(mena,cohortII~cohort,ref="(1980,1982]") ##' dlevels(mena) ##' dlevels(mena2) ##' drelevel(mena,ref="(1975,1977]") <- ~cohort ##' drelevel(mena,ref="(1980,1982]") <- ~cohort ##' dlevels(mena,"coh*") ##' dtable(mena,"coh*",level=1) ##' ##' ### level 1 of zyg as baseline for new variable ##' drelevel(mena,ref=1) <- ~zyg ##' drelevel(mena,ref=c("DZ","[1973,1975]")) <- ~ zyg+cohort ##' drelevel(mena,ref=c("DZ","[1973,1975]")) <- zygdz+cohort.early~ zyg+cohort ##' ### level 2 of zyg and cohort as baseline for new variables ##' drelevel(mena,ref=2) <- ~ zyg+cohort ##' dlevels(mena) ##' ##' ##################### combining factor levels with newlevels argument ##' ##' dcut(mena,labels=c("I","II","III","IV")) <- cat4~agemena ##' dlevels(drelevel(mena,~cat4,newlevels=1:3)) ##' dlevels(drelevel(mena,ncat4~cat4,newlevels=3:2)) ##' drelevel(mena,newlevels=3:2) <- ncat4~cat4 ##' dlevels(mena) ##' ##' dlevels(drelevel(mena,nca4~cat4,newlevels=list(c(1,4),2:3))) ##' ##' drelevel(mena,newlevels=list(c(1,4),2:3)) <- nca4..2 ~ cat4 ##' dlevels(mena) ##' ##' drelevel(mena,newlevels=list("I-III"=c("I","II","III"),"IV"="IV")) <- nca4..3 ~ cat4 ##' dlevels(mena) ##' ##' drelevel(mena,newlevels=list("I-III"=c("I","II","III"))) <- nca4..4 ~ cat4 ##' dlevels(mena) ##' ##' drelevel(mena,newlevels=list(group1=c("I","II","III"))) <- nca4..5 ~ cat4 ##' dlevels(mena) ##' ##' drelevel(mena,newlevels=list(g1=c("I","II","III"),g2="IV")) <- nca4..6 ~ cat4 ##' dlevels(mena) ##' ##' @aliases dlevels dlevel dlev drelevel drelev dlev<- dlevel<- drelev<- drelevel<- dfactor dfactor<- dnumeric dnumeric<- ##' @export drelevel <- function(data,y=NULL,x=NULL,ref=NULL,newlevels=NULL,regex=mets.options()$regex,sep=NULL,overwrite=FALSE,...) {# {{{ if (is.null(ref) && is.null(newlevels)) stop("specify baseline-reference level or new levels \n") if (!is.null(ref) & !is.null(newlevels)) { warning("can only either change ref or combine old levels, will change ref") newlevels <- NULL } if (is.null(sep)) sep <- "." if (is.vector(data) | inherits(data,"factor")) {# {{{ if (is.vector(data)) data <- factor(data) if (!is.null(ref)) { if (is.numeric(ref)) ref <- levels(data)[ref] gx <- relevel(data,ref=ref,...) return(gx) } if (!is.null(newlevels)) { pnewlevels <- levlev(data,newlevels) levels(data,...) <- pnewlevels return(data) } } # }}} if (is.data.frame(data)) {# {{{ usernames <- FALSE# {{{ vars <-mets::procform3(y,x,data=data,regex=regex,...) x <- xnames <- vars$x if (!is.null(vars$y)) { usernames<-TRUE newnames <- vars$y if (length(vars$y)!=length(vars$x)) { warning("length of new names not consistent with length of cut variables, uses default naming\n"); usernames <- FALSE } } # }}} if (is.character(x) && length(x)1 & length(ref)==1) ref <- rep(ref,ll) if (length(x)!=length(ref)) stop("length of baseline reference 'ref' not consistent with variables") } if (!is.null(newlevels)) { if (ll==1 & !is.list(newlevels)) newlevels <- list(newlevels) if (is.list(newlevels) && !is.list(newlevels[[1]])) newlevels <- list(newlevels) if (length(x)!=length(newlevels)) warning("length of variables not consistent with list of breaks"); if (length(newlevels)!=ll) newlevels <- rep(list(newlevels[[1]]),ll) } for (k in 1:ll) { xx <- x[[k]] if (!is.factor(xx)) xx <- factor(xx) if (usernames) name <- newnames[k] if (!is.null(ref)) { name<- paste(xnames[k],ref[k],sep=sep) if (usernames) name <- newnames[k] if (overwrite) name<-xnames[k] if (is.numeric(ref[k])) refk <- levels(xx)[ref[k]] else refk <- ref[k] gx <- relevel(xx,ref=refk,...) data[,name] <- gx } if (!is.null(newlevels)) { name<- paste(xnames[k],newlevels[[k]][1],sep=sep) if (usernames) name <- newnames[k] if (overwrite) name<-xnames[k] pnewlevels <- levlev(xx,newlevels[[k]]) levels(xx,...) <- pnewlevels data[,name] <- xx } } return(data) }# }}} }# }}} ##' @export "drelev<-" <- function(data,x=NULL,...,value) drelevel(data,y=value,x=x,...) ##' @export drelev <- function(data,y=NULL,x=NULL,...) drelevel(data,y=y,x=x,...) ##' @export "drelevel<-" <- function(data,x=NULL,...,value) drelevel(data,y=value,x=x,...) tsglob2rx <- function(x) { glob2rx(gsub("\\+","\\\\+",x)) } levlev <- function(fac,ref,regex=FALSE) {# {{{ if (!is.list(ref)) ref <- list(ref) lf <- levels(fac) lfr <- lf listnames <- names(ref) newreflist <- list() for (k in 1:length(ref)) { if (!is.null(listnames)) nn <- listnames[k] else nn <- NULL ln <- length(ref[[k]]) if (is.numeric(ref[[k]])) refs <- lf[ref[[k]]] else refs <- ref[[k]] xxx <- c() for (xx in refs) { if (!regex) xx <- tsglob2rx(xx) n <- grep(xx,lf) xxx <- c(xxx,lf[n]) } xxx<- xxx[!duplicated(xxx)] refs <- xxx ln <- length(refs) if (is.null(nn) || nn=="") { if (length(refs)>1) nn <- paste(refs[1],refs[ln],sep="-") else nn <- refs[1] } newreflist <- c(newreflist,setNames(list(refs),nn)) mm <- match(refs,lfr) lfr <- lfr[-mm] } if (length(lfr)>=1) { for (k in 1:length(lfr)) { nn <- paste(lfr[k]) ### newreflist <- c(newreflist,list(nn1=lfr[k])) newreflist <- c(newreflist,setNames(list(lfr[k]),nn)) } } return(newreflist) }# }}} ##' @export dlevels <- function(data,y=NULL,x=NULL,regex=mets.options()$regex,max.levels=20,cols=FALSE,...) {# {{{ if (is.factor(data)) { return(base::levels(data,...)) } if (is.data.frame(data)) { usernames <- FALSE# {{{ vars <-mets::procform3(y,x,data=data,regex=regex,...) x <- xnames <- vars$x if (!is.null(vars$y)) { usernames<-TRUE newnames <- vars$y if (length(vars$y)!=length(vars$x)) { warning("length of new names not consistent with length of cut variables, uses default naming\n"); usernames <- FALSE } } # }}} if (is.character(x) && length(x) maxl, base::nlevels(xx), maxl); antfactor <- antfactor+1; namesfac <- c(namesfac,xnames[k]) nlev <- c(nlev,base::nlevels(xx)) m <- m+1 lll[[m]] <- base::levels(xx) } } if (cols==FALSE) cat("-----------------------------------------\n") } } if (cols==TRUE) { mout <- matrix("",maxl,antfactor) for (k in 1:antfactor) { mout[1:nlev[k],k] <- lll[[k]] } colnames(mout) <- namesfac rownames(mout) <- rep(" ",nrow(mout)) prmatrix(mout,quote=FALSE) } } }# }}} ##' @export dlevel <- function(data,y=NULL,x=NULL,...) dlevels(data,y=y,x=x,...) ##' @export dlev <- function(data,y=NULL,x=NULL,...) dlevels(data,y=y,x=x,...) ##' @export drename <- function(data,y=NULL,x=NULL,fun=base::tolower,...) { # {{{ vars <-mets::procform3(y,x,data=data,...) x <- xnames <- vars$x if (!is.null(vars$y)) { newnames <- vars$y if (length(vars$y)!=length(vars$x)) { stop("length of new names not consistent with length of cut variables, uses default naming\n"); } } else { ## if newnames not given then use fun newnames <- do.call(fun,list(x)) } varpos <- match(x,colnames(data)) if (length(varpos)!= length(newnames)) stop("length of old and new variables must match") colnames(data)[varpos] <- newnames return(data) } # }}} ##' @export "drename<-" <- function(data,x=NULL,...,value) drename(data,y=value,x=x,...) ##' @export dfactor <- function(data,y=NULL,x=NULL,regex=mets.options()$regex,sep=NULL,usernames=NULL,levels,labels,...) {# {{{ if (is.null(sep)) sep <- ".f" if (!is.data.frame(data)) { if (!is.factor(data) || !missing(levels) || !missing(labels)) { args <- list(data) if (!missing(levels)) { if (is.numeric(levels) & is.factor(data)) levels <- levels(data)[levels] args <- c(args,list(levels=levels,...)) } if (!missing(labels)) { args <- c(args,list(labels=labels,...)) } gx <- do.call(factor,args) return(gx) } } if (is.data.frame(data)) { usernames <- FALSE# {{{ vars <-mets::procform3(y,x,data=data,regex=regex,...) x <- xnames <- vars$x if (!is.null(vars$y)) { usernames<-TRUE newnames <- vars$y if (length(vars$y)!=length(vars$x)) { usernames <- FALSE } } # }}} if (is.character(x) && length(x)<=ncol(data)) { x <- lapply(xnames,function(z) data[,z]) } dots <- list() args <- lapply(dots, function(x) { if (length(x)==1 && is.character(x)) x <- data[,x]; x }) if (!is.list(x)) x <- list(x) ll <- length(x) if (!missing(levels)) if (!is.list(levels)) levels <- list(levels) if (!missing(labels)) if (!is.list(labels) ) labels <- list(labels) ### if (!missing(levels) ) print(levels) ### if (!missing(labels) ) print(labels) misslabel <- TRUE if (!missing(labels)) { misslabel <- FALSE if ((length(x)!=length(labels))) { warning("length of label list not consistent with variables") labels <- rep(list(labels[[1]]),ll) ### print(labels) } } misslevel <- TRUE if (!missing(levels)) { misslevel <- FALSE if ((length(x)!=length(levels))) { warning("length of levels list not consistent with variables") levels <- rep(list(levels[[1]]),ll) } } for (k in 1:ll) { xx <- x[[k]] name<- paste(xnames[k],sep,sep="") if (usernames) name <- newnames[k] if (!is.factor(xx) || !missing(levels) || !missing(labels)) { args <- list(xx) if (!misslevel) { if (is.numeric(levels[[k]]) & is.factor(xx)) llevels <- levels(xx)[levels[[k]]] else llevels <- levels[[k]] args <- c(args,list(levels=llevels,...)) } if (!misslabel) args <- c(args,list(labels=labels[[k]],...)) gx <- do.call(factor,args) data[,name] <- gx } } return(data) } }# }}} ##' @export "dfactor<-" <- function(data,x=NULL,...,value) dfactor(data,y=value,x=x,...) #####' @export ###dfactor <- function(data,y=NULL,x=NULL,regex=mets.options()$regex,sep=NULL,usernames=NULL,levels,labels,...) ###{# {{{ ### ### if (is.null(sep)) sep <- ".f" ### ### if (is.vector(data)) { ### if (!is.factor(data)) { ### args <- list(data) ### if (!missing(levels)) args <- c(args,list(levels=levels,...)) ### if (!missing(labels)) args <- c(args,list(labels=labels,...)) ### gx <- do.call(factor,args) ### } else gx <- data ### return(gx) ### } ### ###if (is.data.frame(data)) { ### ### usernames <- FALSE# {{{ ### ###vars <-mets::procform3(y,x,data=data,regex=regex,...) ###x <- xnames <- vars$x ### ###if (!is.null(vars$y)) { ### usernames<-TRUE ### newnames <- vars$y ### if (length(vars$y)!=length(vars$x)) { ### usernames <- FALSE ### } ###} #### }}} ### ### if (is.character(x) && length(x)cuti) to the data-set for each knot of the spline. ##' The full spline is thus given by x and spline variables added to the data-set. ##' ##' @param data if x is formula or names for data frame then data frame is needed. ##' @param y name of variable, or fomula, or names of variables on data frame. ##' @param x name of variable, or fomula, or names of variables on data frame. ##' @param probs groups defined from quantiles ##' @param breaks number of breaks, for variables or vector of break points, ##' @param equi for equi-spaced breaks ##' @param regex for regular expressions. ##' @param sep seperator for naming of cut names. ##' @param na.rm to remove NA for grouping variables. ##' @param labels to use for cut groups ##' @param all to do all variables, even when breaks are not unique ##' @param ... Optional additional arguments ##' @author Thomas Scheike ##' @examples ##' data(TRACE) ##' TRACE <- dspline(TRACE,~wmi,breaks=c(1,1.3,1.7)) ##' cca <- coxph(Surv(time,status==9)~age+vf+chf+wmi,data=TRACE) ##' cca2 <- coxph(Surv(time,status==9)~age+wmi+vf+chf+wmi.spline1+wmi.spline2+wmi.spline3,data=TRACE) ##' anova(cca,cca2) ##' ##' nd=data.frame(age=50,vf=0,chf=0,wmi=seq(0.4,3,by=0.01)) ##' nd <- dspline(nd,~wmi,breaks=c(1,1.3,1.7)) ##' pl <- predict(cca2,newdata=nd) ##' plot(nd$wmi,pl,type="l") ##' ##' @export ##' @aliases dspline<- dspline <- function(data,y=NULL,x=NULL,breaks=4,probs=NULL,equi=FALSE,regex=mets.options()$regex,sep=NULL,na.rm=TRUE,labels=NULL,all=FALSE,...) {# {{{ if (is.vector(data)) {# {{{ if (is.list(breaks)) breaks <- unlist(breaks) if (length(breaks)==1) { if (!is.null(probs)) { breaks <- quantile(data, probs, na.rm=na.rm, ...) breaks <- breaks[-c(1,length(breaks))] } else { if (!equi) { probs <- seq(0, 1, length.out = breaks + 1) breaks <- quantile(data, probs,na.rm=na.rm, ...) breaks <- breaks[-c(1,length(breaks))] } if (equi) { rr <- range(data,na.rm=na.rm) breaks <- seq(rr[1],rr[2],length.out=breaks+1) breaks <- breaks[-c(1,length(breaks))] } } } if (sum(duplicated(breaks))==0) { gx <- LinSpline(data, breaks, ...) attr(gx,"breaks") <- breaks } else { wd <- which(duplicated(breaks)) mb <- min(diff(breaks[-wd])) breaks[wd] <- breaks[wd] + (mb/2)*seq(length(wd))/length(wd) gx <- LinSpline(data, breaks,...) attr(gx,"breaks") <- breaks warning(paste("breaks duplicated")) } return(gx) }# }}} if (is.data.frame(data)) {# {{{ if (is.null(sep)) sep <- "." usernames <- FALSE# {{{ vars <-mets::procform3(y,x,data=data,regex=regex,...) x <- xnames <- vars$x if (!is.null(vars$y)) { usernames<-TRUE newnames <- vars$y if (length(vars$y)!=length(vars$x)) { warning("length of new names not consistent with length of cut variables, uses default naming\n"); usernames <- FALSE } } # }}} if (is.character(x) && length(x)1) breaks <- list(breaks) break.points <- FALSE if (is.list(breaks)) { break.points <- TRUE if (length(x)!=length(breaks) & length(breaks)!=1) warning("length of variables not consistent with list of breaks"); if (length(breaks)!=ll) breaks <- rep(list(breaks[[1]]),ll) } if (!break.points) { if (length(x)!=length(breaks) & length(breaks)!=1) warning("length of variables not consistent with breaks"); if (length(breaks)!=ll) breaks<- rep(breaks[1],ll) } if (ll==1 & !is.list(labels)) labels <- list(labels) if (!is.list(labels)) labels <- list(labels); if (length(labels)!=ll ) labels <- rep(list(labels[[1]]),ll) if (!is.list(labels)) stop("labels should be given as list"); for (k in 1:ll) { xx <- x[[k]] if (is.numeric(xx)) { if (!is.list(breaks)) { if (!is.null(probs)) { bb <- quantile(xx, probs,na.rm=na.rm, ...) bb <- bb[-c(1,length(bb))] } else { if (!equi) { probs <- seq(0, 1, length.out = breaks[k] + 1) bb <- quantile(xx, probs, na.rm=na.rm,...) bb <- bb[-c(1,length(bb))] } if (equi) { rr <- range(xx,na.rm=na.rm) bb <- seq(rr[1],rr[2],length.out=breaks[k]+1) bb <- bb[-c(1,length(bb))] } } ### name<-paste(xnames[k],breaks[k],sep=sep) name<-xnames[k] } else { bb <- breaks[[k]]; ### name<-paste(xnames[k],breaks[[k]][1],sep=sep) name<-xnames[k] } if (usernames) name <- newnames[k] if (sum(duplicated(bb))==0) { attr(data,paste(name,"spline.breaks",sep="")) <- bb for (i in seq_along(c(bb))) { namei <- paste(name,".spline",i,sep="") data[,namei] <- (xx-bb[i])*(xx>bb[i]) } } else { if (all==TRUE) { wd <- which(duplicated(bb)) mb <- min(diff(bb[-wd])) bb[wd] <- bb[wd] + (mb/2)*seq(length(wd))/length(wd) attr(data,paste(name,"spline.breaks",sep="")) <- bb for (i in seq_along(c(breaks))) { namei <- paste(name,".spline",i,sep="") data[,namei] <- (xx-bb[i])*(xx>bb[i]) } warning(paste("breaks duplicated for=",xnames[k])) } } } } return(data) }# }}} }# }}} ##' @export "dspline<-" <- function(data,...,value) dspline(data,y=value,...) ##' Simple linear spline ##' ##' Simple linear spline ##' ##' @param x variable to make into spline ##' @param knots cut points ##' @param num to give names x1 x2 and so forth ##' @param name name of spline expansion name.1 name.2 and so forth ##' @author Thomas Scheike ##' @keywords survival ##' @export LinSpline <- function(x,knots,num=TRUE,name="Spline") {# {{{ lspline <- matrix(0,length(c(x)),length(c(knots))) for (i in seq_along(c(knots))) { lspline[,i] <- (x-knots[i])*(x>knots[i]) } lspline <- as.data.frame(lspline) if (num==TRUE) names(lspline) <- paste(name,seq_along(c(knots)),sep="") else if (!is.null(signif)) names(lspline) <- paste(name,round(c(knots),signif),sep="") return(lspline) }# }}} mets/R/predict.biprobit.R0000644000176200001440000000543013623061405015013 0ustar liggesusers##' @export predict.biprobit <- function(object,newdata,X,Z,which=NULL,fun=NULL,type,...) { if (missing(newdata)) newdata <- data.frame(1) if (missing(X)) { ff <- object$formula; ff[2] <- NULL X <- model.matrix(ff,newdata) } if (missing(Z)) Z <- model.matrix(object$rho.formula,newdata) p <- coef(object) h <- function(p) log(p/(1-p)) ## logit ih <- function(z) 1/(1+exp(-z)) ## expit if (!missing(type)) { h <- asin; ih <- sin if (is.null(type)) { h <- ih <- identity } if (is.list(type)) { h <- type[[1]]; ih <- type[[2]] } } prob <- function(p,which=NULL,fun=NULL,...) { blen <- object$model$blen beta1 <- p[seq(blen)] if (object$model$eqmarg) { beta2 <- beta1 } else { beta2 <- beta1[-seq(blen/2)] beta1 <- beta1[seq(blen/2)] } gamma <- p[-seq(blen)] m1 <- X%*%beta1 m2 <- X%*%beta2 r <- object$SigmaFun(gamma,cor=TRUE,Z=Z) pp <- data.frame(mu1=m1,mu2=m2,rho=r$rho) p11 <- with(pp, pmvn(lower=c(0,0),upper=c(Inf,Inf),mu=cbind(mu1,mu2),sigma=cbind(rho),cor=TRUE)) p10 <- with(pp, pmvn(lower=c(0,-Inf),upper=c(Inf,0),mu=cbind(mu1,mu2),sigma=cbind(rho),cor=TRUE)) p01 <- with(pp, pmvn(lower=c(-Inf,0),upper=c(0,Inf),mu=cbind(mu1,mu2),sigma=cbind(rho),cor=TRUE)) p00 <- with(pp, pmvn(lower=c(-Inf,-Inf),upper=c(0,0),mu=cbind(mu1,mu2),sigma=cbind(rho),cor=TRUE)) p1 <- p11+p10 p2 <- p11+p01 res <- cbind(p11,p10,p01,p00,p1,p2,as.matrix(pp)) if (!is.null(fun)) return(fun(res)) if (!is.null(which)) { tr.idx <- base::which(which<7) res <- res[,which,drop=FALSE] if (length(tr.idx)>0) res[,tr.idx] <- h(res[,tr.idx]) return(structure(res,tr.idx=tr.idx)) } return(res) } pp <- prob(p,which=which,fun=fun) if (!is.null(fun)) { res <- estimate(object,prob,fun=fun)$coefmat if (!missing(newdata) && nrow(newdata)==nrow(res)) { suppressWarnings(res <- cbind(res,parameter=rownames(res),newdata)) } return(res) } if (!is.null(which)) { res <- estimate(object,prob,which=which)$coefmat[,c(1,3,4),drop=FALSE] tr.idx <- (attributes(pp)$tr.idx-1)*nrow(pp) if (length(tr.idx)>0) { for (ii in tr.idx) { idx <- ii+seq(nrow(pp)) res[idx,] <- ih(res[idx,]) } } rownames(res) <- rep(colnames(pp),each=nrow(pp)) pp <- res } if (!missing(newdata)) { suppressWarnings(pp <- cbind(pp,parameter=rownames(pp),newdata)) } return(pp) } mets/R/surv.boxarea.R0000644000176200001440000001430213623061405014165 0ustar liggesusers#####' @export ###surv.boxarea <- function(left.trunc,right.cens,data,timevar="time",status="status",id="id",covars=NULL,covars.pairs=NULL,num=NULL,silent=1,boxtimevar="boxtime") ###{ ## {{{ ### if (is.null(data[,id])) stop("Wrong cluster variable") ### if (is.null(data[,timevar])) stop("Wrong time variable") ### if (is.null(data[,status])) stop("Wrong status variable") ### data <- data[order(data[,id]),] ### if (silent<=-1) { ### message("survboxare()") ### print(head(data)) ### print(summary(data[,id])) ### } ### if (is.null(num)) { ### idtab <- table(data[,id]) ### num <- "num" ### while (num%in%names(data)) num <- paste(num,"_",sep="") ### data[,c(num)] <- unlist(lapply(idtab,seq_len)) ### } ### ### timevar2 <- paste(timevar,1:2,sep="") ### status2 <- paste(status,1:2,sep="") ### num2 <- paste(num,1:2,sep="") ### covars2 <- NULL; covars.pairs2 <- NULL; ### if (length(covars)>0) covars2 <- paste(covars,1:2,sep="") ### if (length(covars.pairs)>0) covars.pairs2 <- paste(covars.pairs,1:2,sep="") ### ### if (silent<=-1) { ### message("survboxare()") ### print(head(data)) ### print( c(timevar,status,covars,covars.pairs,id,num)) ### print(c(id,num)) ### print(summary(data)) ### } ### ww0 <- fast.reshape(data[,c(timevar,status,covars,covars.pairs,id,num)],id=id,num=num,labelnum=TRUE) ### if (silent<=-1) { ### message("survboxarea(), ww1") ### print(head(ww0)) ### print(summary(ww0)) ### print(c(timevar2,status2,covars2,covars.pairs2,id,num2)) ### ww0 <- data.frame(ww0); ### print(table(ww0$status1,ww0$status2)) ### } ### mleft <- (ww0[,timevar2[1]]>left.trunc[1]) & (ww0[,timevar2[2]]>left.trunc[2]) ## Both not-truncated ### ### if (length(na.idx <- which(is.na(mleft)))>0) { ### ## warning("Removing incomplete cases", na.idx) ### mleft <- mleft[-na.idx] ### ww0 <- ww0[-na.idx,,drop=FALSE] ### } ### if (sum(mleft)==0) stop("No data selected\n"); ### ww0 <- ww0[which(mleft),,drop=FALSE] ### ### right1 <- which(ww0[,timevar2[1]] > right.cens[1]) ### right2 <- which(ww0[,timevar2[2]] > right.cens[2]) ### ww0[,timevar2[1]][right1] <- right.cens[1] ### ww0[,timevar2[2]][right2] <- right.cens[2] ### ww0[,status2[1]][right1] <- 0 ### ww0[,status2[2]][right2] <- 0 ### truncvar2 <- c("left1","left2") ### ww0 <- cbind(ww0,left.trunc[1]) ### ww0 <- cbind(ww0,left.trunc[2]) ### colnames(ww0)[c(-1,0) + ncol(ww0)] <- truncvar2 ### ### if (silent<=-1) print(head(ww0)) ### if (silent<=0) ### message(paste(" Number of joint events:",sum(apply(ww0[,status2],1,sum)==2),"of ",nrow(ww0)),"\n"); ### ### varying <- c(timevar,status,"left",covars) ### lr.data <- data.frame(fast.reshape(ww0,varying=varying,numname=num)) ### if (silent<=-1) { ### print("surv.boxarea after fast.reshape"); ### print(head(lr.data)) ### print(summary(lr.data[,id])) ### } ### lr.data[,boxtimevar] <- lr.data[,timevar]-lr.data[,"left"] ### return(structure(lr.data,num=num,time=boxtimevar,status=status,covars=covars,id=id,left=left)) ###} ## }}} ##' @export surv.boxarea <- function(left.trunc,right.cens,data,timevar="time",status="status",id="id",covars=NULL,covars.pairs=NULL,num=NULL,silent=1,boxtimevar="boxtime") { ## {{{ if (is.null(data[,id])) stop("Wrong cluster variable") if (is.null(data[,timevar])) stop("Wrong time variable") if (is.null(data[,status])) stop("Wrong status variable") data <- data[order(data[,id]),] if (silent<=-1) { message("survboxare()") print(head(data)) print(summary(data[,id])) } if (is.null(num)) { idtab <- table(data[,id]) num <- "num" while (num%in%names(data)) num <- paste(num,"_",sep="") data[,c(num)] <- unlist(lapply(idtab,seq_len)) } ### if (is.null(ssname)) { ### idtab <- table(data[,id]) ### num <- "num" ### while (num%in%names(data)) num <- paste(num,"_",sep="") ### data[,c(num)] <- unlist(lapply(idtab,seq_len)) ### } timevar2 <- paste(timevar,1:2,sep="") status2 <- paste(status,1:2,sep="") num2 <- paste(num,1:2,sep="") covars2 <- NULL; covars.pairs2 <- NULL; if (length(covars)>0) covars2 <- paste(covars,1:2,sep="") if (length(covars.pairs)>0) covars.pairs2 <- paste(covars.pairs,1:2,sep="") if (silent<=-1) { message("survboxare()") print(head(data)) print( c(timevar,status,covars,covars.pairs,id,num)) print(c(id,num)) print(summary(data)) } ww0 <- fast.reshape(data[,c(timevar,status,covars,covars.pairs,id,num)],id=id,num=num,labelnum=TRUE) if (silent<=-1) { message("survboxarea(), ww1") print(head(ww0)) print(summary(ww0)) print(c(timevar2,status2,covars2,covars.pairs2,id,num2)) ww0 <- data.frame(ww0); print(table(ww0$status1,ww0$status2)) } mleft <- (ww0[,timevar2[1]]>left.trunc[1]) & (ww0[,timevar2[2]]>left.trunc[2]) ## Both not-truncated if (length(na.idx <- which(is.na(mleft)))>0) { ## warning("Removing incomplete cases", na.idx) mleft <- mleft[-na.idx] ww0 <- ww0[-na.idx,,drop=FALSE] } if (sum(mleft)==0) cat("No data selected\n"); if (sum(mleft)!=0) { ww0 <- ww0[which(mleft),,drop=FALSE] right1 <- which(ww0[,timevar2[1]] > right.cens[1]) right2 <- which(ww0[,timevar2[2]] > right.cens[2]) ww0[,timevar2[1]][right1] <- right.cens[1] ww0[,timevar2[2]][right2] <- right.cens[2] ww0[,status2[1]][right1] <- 0 ww0[,status2[2]][right2] <- 0 truncvar2 <- c("left1","left2") ww0 <- cbind(ww0,left.trunc[1]) ww0 <- cbind(ww0,left.trunc[2]) colnames(ww0)[c(-1,0) + ncol(ww0)] <- truncvar2 ### ww0[,"intnames1"] <- paste("[",left.trunc[1],",",right.cens[1],")",sep="") ### ww0[,"intnames2"] <- paste("[",left.trunc[2],",",right.cens[2],")",sep="") if (silent<=-1) print(head(ww0)) if (silent<=0) message(paste(" Number of joint events:",sum(apply(ww0[,status2],1,sum)==2),"of ",nrow(ww0)),"\n"); varying <- c(timevar,status,"left",covars) lr.data <- data.frame(fast.reshape(ww0,varying=varying,numname=num)) if (silent<=-1) { print("surv.boxarea after fast.reshape"); print(head(lr.data)) print(summary(lr.data[,id])) } lr.data[,boxtimevar] <- lr.data[,timevar]-lr.data[,"left"] ### print(head(lr.data)) return(structure(lr.data,num=num,time=boxtimevar,status=status,covars=covars,id=id)) } else return(NULL); } ## }}} mets/R/divide.conquer.R0000644000176200001440000000650013623061405014466 0ustar liggesusers##' @export folds<- function (n, folds = 10) { ## {{{ split(sample(1:n), rep(1:folds, length = n)) } ## }}} ##' Split a data set and run function ##' ##' @title Split a data set and run function ##' @param func called function ##' @param data data-frame ##' @param size size of splits ##' @param splits number of splits (ignored if size is given) ##' @param id optional cluster variable ##' @param ... Additional arguments to lower level functions ##' @author Thomas Scheike, Klaus K. Holst ##' @export ##' @examples ##' library(timereg) ##' data(TRACE) ##' res <- divide.conquer(prop.odds,TRACE, ##' formula=Event(time,status==9)~chf+vf+age,n.sim=0,size=200) divide.conquer <- function(func=NULL,data,size,splits,id=NULL,...) { ## {{{ nn <- nrow(data) if (!is.null(id)) { if (is.character(id) && length(id)==1) id <- data[,id] if (length(id)!=nn) stop("Wrong length of id variable") cc <- cluster.index(id) if (!missing(size)) splits <- round(cc$uniqueclust/size) splits <- min(splits,cc$uniqueclust) all.folds <- folds(cc$uniqueclust,splits) res <- lapply(all.folds, function(i) { idx <- na.omit(as.vector(cc$idclustmat[i,]+1)) do.call(func, c(list(data=data[idx,]),...)) }) return(res) } splits <- round(nn/size) all.folds <- folds(nn,splits) res <- lapply(all.folds, function(i) do.call(func, c(list(data=data[i,]),...))) res } ## }}} ##' Split a data set and run function of cox-aalen type and aggregate results ##' ##' @title Split a data set and run function from timereg and aggregate ##' @param func called function ##' @param data data-frame ##' @param size size of splits ##' @param ... Additional arguments to lower level functions ##' @author Thomas Scheike, Klaus K. Holst ##' @export ##' @examples ##' library(timereg) ##' data(TRACE) ##' a <- divide.conquer.timereg(prop.odds,TRACE, ##' formula=Event(time,status==9)~chf+vf+age,n.sim=0,size=200) ##' coef(a) ##' a2 <- divide.conquer.timereg(prop.odds,TRACE, ##' formula=Event(time,status==9)~chf+vf+age,n.sim=0,size=500) ##' coef(a2) ##' ##' if (interactive()) { ##' par(mfrow=c(1,1)) ##' plot(a,xlim=c(0,8),ylim=c(0,0.01)) ##' par(new=TRUE) ##' plot(a2,xlim=c(0,8),ylim=c(0,0.01)) ##' } divide.conquer.timereg <- function(func=NULL,data,size,...) { ## {{{ res <- divide.conquer(func=func,data,size,...) K <- length(res) gamma <- Reduce("+", lapply(res,function(x) x$gamma))/K gammas <- do.call("cbind", lapply(res,function(x) x$gamma)) var.gamma <- Reduce("+", lapply(res,function(x) x$var.gamma))/K^2 robvar.gamma <- Reduce("+", lapply(res,function(x) x$robvar.gamma))/K^2 times <- c(0,sort(unlist(lapply(res,function(x) x$cum[-1,1])))) cum <- Reduce("+",lapply(res,function(x) Cpred(x$cum,times)))/K var.cum <- Reduce("+", lapply(res,function(x) Cpred(x$var.cum,times)))/K^2 robvar.cum <- Reduce("+", lapply(res,function(x) Cpred(x$robvar.cum,times)))/K^2 robvar.cum[,1] <- var.cum[,1] <- times res <- list(gamma=gamma, var.gamma=var.gamma, robvar.gamma=robvar.gamma, gammas=gammas, sdgammas=apply(gammas,1,sd), cum=cum,var.cum=var.cum,robvar.cum=robvar.cum, res=res,prop.odds=TRUE,score=0,D2linv=diag(nrow(gamma))) class(res) <- "cox.aalen" return(res) } ## }}} mets/MD50000644000176200001440000004322213623150474011542 0ustar liggesusers63582757f2b101f7698d9a2e25084613 *DESCRIPTION 837ab4be216e8d6e8685bfc8aab4ed79 *NAMESPACE bc2a685759e75c3d17ce9fd0057c8ed8 *NEWS af2d661540f399907241277b5cc102e6 *R/Dbvn.R 7ab6e05e625f27bf60630fde9ef75162 *R/RcppExports.R 385f13b50c7960b9188a38e44a4a5a8b *R/aalenfrailty.R 80d4cb61ae947adfe1e12cc8e4e0af81 *R/bicomprisk.R 89962eced59b6f59bee83fb8a9cc5b5b *R/bicomprisksim.R a190c3d55bb74adf4fce3c5248298c84 *R/binomial.regression.R 1b111ceb83303750a2877da90916bcd9 *R/binomial.twostage.R c59130869e4e1eb30f18e5bed06cda35 *R/biprobit.R 89f0ba1b2ca3aecbcd41af60d4383556 *R/biprobit.strata.R e06025c62e8caa65aca2e90809a95e0e *R/biprobit.time.R 0b2faf24c511f1c09a8ce75c76e3f276 *R/blocksample.R 0c89194d234ddcd2cbdbb0c36ca65131 *R/bptwin.R 55fbd8cc4e66cb3e58d90ffa8f21ebc0 *R/casewise.R 3fdd18135405faa1fefd23ad006f6205 *R/cifreg.R 8a07ec0dd981c5216c99277977429a23 *R/claytonakes.R cd86e4d240944c39e1f0e1be95b96a6f *R/clusterindex-reshape.R 396128307cc075e897c3b576481dc6ab *R/coef.biprobit.R e3f009ba35ba8dbae0cfb2cd8928cadd *R/cor.R d5613f95eb295bc97185e7654e68e179 *R/cumh.R 2a2cc34b97653777bc89c69b4df8acc4 *R/daggregate.R 639d7c845ebcae12e00692c1d8afdda1 *R/dby.R 79e0730f43ad99084f9d30d1cd5d86d3 *R/discrete-survival-haplo.R 7649e1c3e5c1673e280c839e9cc97aef *R/divide.conquer.R 7f4073d3f1da949d4c102f2d7f8bf9d2 *R/dprint.R 013150a925ecf1844ebfb5c33699da87 *R/dreg.R f6b29225395d9c4cc07648123b19296b *R/dsort.R 3e501d6032a3fb75bfdbc697516414dc *R/dtable.R 17ebafdb2290154027ca8b257bc23897 *R/dtransform.R 928411578cb8ba21268245f44c52bfd1 *R/dutils.R 081dfb8ed862ef38ceda68cc381dfa81 *R/exmarg.R 307f9bc8d42a9f071750802cdbe3850c *R/fastapprox.R 832de0fab75477b87151e13ff248fc41 *R/fastcluster.R 350c1f10faa177694cd0d436c8f1cce3 *R/fastpattern.R e1ed50fd366dc285b36871592f3d0b96 *R/fastreshape.R 66813e58f107646d49b31628068b90f9 *R/force.same.cens.R 3102f83ee06b383f8662ef46da9339fb *R/gof-phreg.R 77f8de565a7a0f8ce8c4d463468dc272 *R/ipw.R 40719b88e966a2728bcd79c48e4cac6c *R/jumptimes.R 4ad140f085120cd4814ee859da1e8bfe *R/lifecourse.R fc01593e10534f86d078c470ee19b353 *R/lifetable.R 5b3601eea5ebbbf41c21a170420d32ea *R/logLik.biprobit.R 3df605295134e29eb212dcc2f1b60d0e *R/marginalprobit.R f772cdbbe902c233ec62c1bfdaa556e1 *R/methodstwinlm.R 1d9a68ff55e638779c45aea21d488906 *R/mets-package.R 5ea30f406ba1c4ce58ab0f4a97eb2484 *R/mutinomialreg.R 081b3c96c2f837f3f3046360e4b0a31a *R/normal0.R d069740db8cc52990c62780e28ae3da5 *R/npc.R 33298aef3545196b8af3a3c8896e4d36 *R/onload.R 5c06932ffc82248f589e97b3047f08d9 *R/options.R 829faf4ccd46d6b2347cb89111998451 *R/pch.R f56507e16477a88bf2b5a0592ec2c85a *R/phreg.R 117bd8a3ef9cc69547857d130706d25c *R/phreg.par.R 02447480cc62b5c621114f20aad09454 *R/plot.bptwin.R 936d669fd52e6a92156d9dd6102f50d8 *R/plotcr.R dd21a8b7f70c3ef33c152cbafbe28f48 *R/pmvn.R 0d80d849b109aa23263892f3c88ded5c *R/predict.biprobit.R 719e376ca4b5290fb6e4e96342a7fea2 *R/print.biprobit.R dce3ddcf5d24e0d34e1cb96463adc2cf *R/print.summary.biprobit.R 0d894546616b57c61521781eab3f9a20 *R/procformula.R b1e8e71fccc5f3248cf5754ba4233b8a *R/prop-odds.R 47b5a23cabba5a598da75a579253320e *R/recurrent.marginal.R 0faa3f91fabc55c417a9fd2ba6a6e6d4 *R/score.biprobit.R c022fab324a8e9ee6cd581a60cb9c9b3 *R/sim-nordic-twin.R 26374a2446fc7f0432e5f658b60e4d51 *R/sim.bptwin.R c9ea231c97bdd04a5b8585d383647187 *R/sim.clayton.oakes.R d093ba14a69f98d7385de90f06d1cc73 *R/sim.coxph.R 95982cdaffe3584eb6185a05e4c1ba84 *R/summary.biprobit.R 9019b136ba6085cc2f5194e2fe7efe30 *R/summary.bptwin.R af28a1e4d4edebff272b1e4a702b1274 *R/surv.boxarea.R c2773c8b667bbf3b800f25e97c300396 *R/tetrachor.R 59c68b3e1a064e675c9a5c3ac2206956 *R/twin.clustertrunc.r e1ed2bd76fd5ee0edf5c4fa9a2548386 *R/twinlm.R 31ecfad2d2220025e858041464879433 *R/twinlm.time.R c485b5b35de8963adec573191b663d61 *R/twinsim.R fbb208d8727307068958f484976b31d3 *R/twostage.R 12f6e9ba61bce52f709fd421537f32ab *R/utils.R 7dd9f35f83fe27e7dbcd6683592b40e3 *R/vcov.biprobit.R eee6981d5c2e39622c029e5ff2b4887a *R/wild-phreg.R 375033b7c92949523bd334ff615de480 *build/vignette.rds 7de139a42d407f8f192c09001b3aff87 *data/base1cumhaz.txt.xz 3bf9962cc49fc09331b9f82f694dd236 *data/base44cumhaz.txt.gz 4aa78069cd2f1f4663cc870baf62793e *data/base4cumhaz.txt.xz 88afc9f8a26be76d1e842cba923bac28 *data/datalist 3f20f6cc6684c009694186cd0e400dbe *data/dermalridges.rda ff179c749c45ee161c59be3929427b91 *data/dermalridgesMZ.rda d3109147281d3bae0cde9950715e1f1f *data/drcumhaz.txt.xz 2f73af5df1f4889aac9664b72e157d17 *data/hHaplos.rda 2d8decdf784e19128399e5055e39f212 *data/hapfreqs.rda 667c7c27aa3423b2d39fa2dda35f48f4 *data/haploX.rda b727c94dfd45a7fc7dd130c2a244a507 *data/mena.rda 08c31d30aedd2a20d1e35fbe51130283 *data/migr.txt.xz 3d38e49cf846b831580ed86cd8dc4eab *data/multcif.txt.xz 334a7d7e55ee2619b7504d9cd8998a71 *data/np.txt.xz c3301bedf23d9f5ef13af210945195d1 *data/prt.rda 60c1a649e622fe5fb9b8fd250a2ed63f *data/ttpd.rda ddf8e6287011910671414e1e78f1befc *data/twinbmi.txt.xz bf72221d78336c591f8ad85e21f2752f *data/twinstut.txt.xz 0b0e0f8a029ee55472268a4e0a4eb1cb *demo/00Index 85c5313212b7fe3fa40d0ee8071ddd48 *demo/mets.R 0e05a7599d9d7d4341f374b2c63cf794 *demo/models.R 4c46ad887d2099ae91846a32df25db20 *demo/tools.R 1b52526641e263ef6a041e2f25f45cbb *inst/CITATION 8483fe7f09ddc5107662ee63d2e1b7e4 *inst/devel/bptwin2.R 913d99912ad01d7ff667e324a33ca90c *inst/devel/dreg.R d835038893d56f0af1628cb410cecdc3 *inst/doc/basic-dutils.ltx 94dfbd0283b005f092a8c615b86a107d *inst/doc/basic-dutils.pdf fbab3a080f4d20b27056ac6b7dde8ede *inst/doc/binomial-case-control-ascertainment.ltx 81e856e0aca1e2bcde318c4e9814e3cd *inst/doc/binomial-case-control-ascertainment.pdf 998ecfb2a0857355329aecee710e26b4 *inst/doc/binomial-family.ltx e44df923ec764b8df48299e0392af809 *inst/doc/binomial-family.pdf cf9fff39f408ce613043433e9a026d0a *inst/doc/binomial-twin.ltx f46cd7cbe63d100a8ac4ba3da9c09179 *inst/doc/binomial-twin.pdf 3f76e852d56afed0d2a118ce03c2c7a6 *inst/doc/competing.ltx 989ec221163b41c2e014c784e730b176 *inst/doc/competing.pdf 1cafc47debbfcb7eea5c59a473f8bbbf *inst/doc/marginal-cox.ltx a57a595434a4a74e7fc57b603a8c733b *inst/doc/marginal-cox.pdf f92ef80eacbb8d845a9067a4bc5de760 *inst/doc/quantitative-twin.ltx 52c08e594b3b7ba1bbf452351af21b67 *inst/doc/quantitative-twin.pdf 0bda4054faeeb4f6702c9e9ddc5af067 *inst/doc/recurrent-events.ltx fcd8942667a40d84bf36ab8dbdd1c16d *inst/doc/recurrent-events.pdf 024b0a2b44d790094c0e01bc1af1b56d *inst/doc/twostage-survival-case-control.ltx 2e78f9d7a79695ec14a5d49fce742f86 *inst/doc/twostage-survival-case-control.pdf c8d6f19ae15006011b190effc707c445 *inst/doc/twostage-survival.ltx d453f24e18c3a0b30bf1c05306f29ea6 *inst/doc/twostage-survival.pdf 46393666564385006416ad5948c22484 *inst/documentation/dutils.org 7ec9e2c35a66a5b6a1ddfdfab98fc44b *inst/include/mets.h ecc046fadfe85d537b00b625ddd9eb26 *inst/include/mets_RcppExports.h c682bccf2683cd08933c8b44449d352f *inst/misc/binfam.rda 2db060b6bc3324b9c9e90ac9c0e5e7fe *inst/misc/binomialtwostage.R 0d267747e68a564e78e09325649068db *inst/misc/casewisea.png 4fbc7784178f73238a4b1b9a39b7bca1 *inst/misc/cif2.png 78372a577ba20547edea3905a956d167 *inst/misc/cifMZ.png 191b8a32894b4dc63f525800641c6e35 *inst/misc/conc2.png 925b5f3a171e0bbd1faab284545b7262 *inst/misc/concordance.png 811775355fee413d197fe037933d1284 *inst/misc/cumh.png 5742e3f94d8bdf0b9d67bb87abf2789b *inst/misc/ipw.png 49e073436d613746d41d7f0bf5bad6ea *inst/misc/mena.html 03fa5bde649da03810bf1cbbaaf538ed *inst/misc/menalong.rda 9829b57d272e548de249a8d15a1c9054 *inst/misc/mets1.png dd71ff5cd1ab76b3a8139c5f32f6f769 *inst/misc/obs/workshop-ts.R ebc9998e4419b62014f888c0c136557a *inst/misc/obs/workshop.R a314d95a5cd781a0e58fef12778b02dc *inst/misc/obs/workshop.html e63682330161445227c26fb14c9341b7 *inst/misc/obs/workshop.org 2bb47a553eaaece9e2233c2aa68e13b8 *inst/misc/orgmode1.css 529358a88380052a28341c21d0baabc1 *inst/misc/orgmode2.css a402a9e82ee04f0bfa9ed6c8c354beb6 *inst/misc/pairwise-competing-risks-ace.r d669467921cf8bd6e7681c80f2aabcec *inst/misc/pairwise-twostage.r 1257d9cb0e712725280ef468745c04da *inst/misc/pcif.png 7cb154d5d9a561e4411ddc0ea0dcf5e8 *inst/misc/pcif2.png 69ad9d38525badea754eee6418f03a5b *inst/misc/pcifl.png 8e54451b15b8464e07249ae110797b8f *inst/misc/phenotype1.rda 1f3f2c553d732cafd9dcda88afd62864 *inst/misc/run-all.R 077d07fa77ce242fee0ebf61973df731 *inst/misc/sim-cens-ts.r bfb718d4efbf7b6ecdecc927b2448e1e *inst/misc/sim-nordic-twin.r aaa138578e071d0f6abfb77ae48fff12 *inst/misc/twinbmi.R 0ffeb4b1e32703d94206a3218b47618a *inst/misc/twinbmi2.rda ef2ac73a441c20d192204df490a60e00 *inst/misc/workshop-run.html c24ea9ef7c22cdcf1e948cc9151e1ff7 *inst/misc/workshop-src.org cf29a5d5511e766f172e51f34ea02396 *inst/misc/workshop.html 149b74965ecb0639df38e25acc677504 *man/Bootphreg.Rd 24a392e7de82e6c67fc5f087661e692d *man/ClaytonOakes.Rd a26bf2a78cb05f8fdcc9fad96e7d38e5 *man/Dbvn.Rd 4b920ca03e2905b08da8a1af5ef68171 *man/EVaddGam.Rd 0eaf2b32b0517deb83bbc8a2c9ac7682 *man/Grandom.cif.Rd e9dde38ba062553c0384b7adcd3ac2eb *man/LinSpline.Rd d403f51d32262708e366243762e53505 *man/aalenfrailty.Rd 242d5096c86b54fa7e94e8e6bb1afe9b *man/back2timereg.Rd 37cd7c43a5fb8e550e81eccc9d159ebd *man/base1cumhaz.Rd a81a94cb32ea2ecbf65b8e5ad3832d4e *man/base44cumhaz.Rd f2d0a8cc997deac3d37e4220d4b005b4 *man/base4cumhaz.Rd 1ed45663ca83789a79cd4650d4bf662d *man/basehazplot.phreg.Rd 5943a9447005b936382fb3136f727f6e *man/bicomprisk.Rd 7f747cec18edec58d10e61e361305a15 *man/binomial.twostage.Rd 844c4c26d5dff497639cb725762493b5 *man/binreg.Rd 42f03b98443042143ce2869bee9ba108 *man/biprobit.Rd cb4489e92ec9071fa8fb32ac1cfdd5c8 *man/blocksample.Rd 0e9483ae2111140ee191c115ee531058 *man/bptwin.Rd 21cb8ae1138fc1fca526dc24cbb63b4c *man/casewise.Rd 555de864d843288787e2848e6fa34050 *man/casewise.test.Rd c276a15739e985ba5afed222d0973016 *man/cif.Rd f659b587daac8100bd9612ad74db1776 *man/cifreg.Rd 9eb14627cdb4a2f545f7c38da9ed7584 *man/cluster.index.Rd f2760f5b6ea82a11d44d3763f16f3f31 *man/concordanceCor.Rd 99f0f26b79c779e667f54ea351b59c02 *man/cor.cif.Rd 78a360ec4e45a6f6dcdafe681360e365 *man/count.history.Rd 2592ba4da97a82c6c6f0a710023bc0ce *man/covarianceRecurrent.Rd 0a4a663597e5f5c93791751a005c95a9 *man/daggregate.Rd 6eb93f728fd484a228ea0b184f51e46a *man/dby.Rd b2bd16e782f8d37ddac7c28159527195 *man/dcor.Rd 887c13e7a9e501c7c07bf40795c346f8 *man/dcut.Rd bee2f2fd0705c18acc905f882a02eb2d *man/dermalridges.Rd 769e1ece727eb78020f254b0d5480af7 *man/dermalridgesMZ.Rd 3f4a72b8d1f0f2d62dac21b9359bfe40 *man/divide.conquer.Rd 6022db60c476bd980264773ef32fb0a6 *man/divide.conquer.timereg.Rd 09a8091c62ae3879692cf5fe81759583 *man/dlag.Rd 6e16f61658dcdd0bf9de37caea369b8e *man/dprint.Rd 4254e934bf7d260c014e5705f2e67ec9 *man/drcumhaz.Rd 562597a6d90851c3073c7ac3d1a24d6f *man/dreg.Rd 26e17651e77e607df1c084c315dbea74 *man/drelevel.Rd e310f8fcadda96379d2dd4e787b5a5b1 *man/dsort.Rd aa55fa569d42d14383f77ba0dcd12c0a *man/dspline.Rd c4f29fb7a70fadd2a550e782ffac464d *man/dtable.Rd b8273f5278933a35e86aa44a71a08008 *man/dtransform.Rd 8c3dc16b84b38a712f234b46470a1858 *man/easy.binomial.twostage.Rd 507978a9c470d646714d40e77b67bcde *man/easy.survival.twostage.Rd 94b664a2e569aaab9de0dbb8e9b2b11c *man/eventpois.Rd f6a595eb42e4181eda6e3aba2c960651 *man/familycluster.index.Rd 9e994d6c97e0c82c0f95897febbab569 *man/familyclusterWithProbands.index.Rd 4af69539342f4b90d253cb9a0b5f183f *man/fast.approx.Rd b100e520c04a6995ea4d54b52e57fa11 *man/fast.pattern.Rd 4b79d9871b4df487a1994da6320322b7 *man/fast.reshape.Rd d71e37fd52ddcece6d60209112ad7ba6 *man/ghaplos.Rd 633d1ba2d2893f0f6ef42d59cf2744b2 *man/gof.phreg.Rd 55edf6f0165c4e3611f300e5f2811c1c *man/gofG.phreg.Rd 02024e80ea63a38c44fb9c4a5b713cb8 *man/gofM.phreg.Rd e1dbccdc81013c43838228a1cc49d9d6 *man/gofZ.phreg.Rd fd6bfd00dca261b1c8904f41e449029f *man/hapfreqs.Rd f3a4a3e109f2825161edf891ad101d5a *man/haplo.surv.discrete.Rd ecd71b7776dd65b943a670cf6194a9af *man/haploX.Rd 673f1fad59ad2e3b4fb4594bfb6ded57 *man/internal.Rd ae878987e43a32545b4e55e12c706259 *man/interval.logitsurv.discrete.Rd 0a6aa5d6cfead24228a50151eb0f0659 *man/ipw.Rd 5b57e6ae189700ddd778445ff95d7a65 *man/ipw2.Rd c45f355b39c0f7d086770e51c52f9a7b *man/km.Rd 3ebe34a81cd4aefa9732485c496dac11 *man/lifecourse.Rd 64aad75773abe91070da404713e891fc *man/lifetable.matrix.Rd 2b4597c39dcb1a4107dc6ed3516fb24e *man/logitSurv.Rd f9b8859a7bfe0dc41aeaaf6d91cbffa5 *man/mena.Rd 9476be53d0e33eb2e22bc4ea8f3eb702 *man/mets-package.Rd c026e0cd3e567bf4d24600ec0796b3bc *man/mets.options.Rd fc92d08114de9698f0f93ac232d0b4ab *man/migr.Rd 63f411ac16f7b5eb938069064f5b432a *man/mlogit.Rd 963c38c9aec093f952b75a001e1876d6 *man/multcif.Rd 0730c6405e87b448f04af7fef88754d6 *man/np.Rd 3b81ef428bbd1ec8fe0844f1687fbe5b *man/phreg.Rd 313b2f4eea264b051d421e1d0ba14677 *man/phregR.Rd cbd8167a2024fcb40ddbf2eb0b3269dc *man/plack.cif.Rd 9d20261fbe206277495e02d68d01a088 *man/pmvn.Rd 5c1a54a246454d4ff59c9235f93c143d *man/predict.phreg.Rd 664cac9612657755332853904b085668 *man/print.casewise.Rd a63f76a24171785341a13903c742248d *man/prob.exceed.recurrent.Rd 94db9766e13199ea68eee6af4a015579 *man/prt.Rd 976fcce63a0488391862d12473ac2bcb *man/random.cif.Rd 0ee3a433048e605156480820caade074 *man/recurrentMarginal.Rd 2940e9efbc5e7c849916409d6a62e9b2 *man/rpch.Rd c84e2cf7a1599844b9a422d2218ff85d *man/simAalenFrailty.Rd 10e6a1d5a5359b67873764c1ec747e52 *man/simClaytonOakes.Rd cbe072cd58cbf48646ed7f48240b2c30 *man/simClaytonOakesWei.Rd 8a9d6bba21a9f3160967da8f72b909a7 *man/simMultistate.Rd 27cb999b9ae0b499037a528152b1b188 *man/simRecurrent.Rd d3c2c184beafa482f02e21d87c99bebc *man/simRecurrentII.Rd a1d8369ff3008f009d6ab4812591b81f *man/simRecurrentTS.Rd a820b9d1d5667f5b2838d9309efa1d3d *man/summary.cor.Rd f3de654d09da8f734a861ccb4bdedc05 *man/survival.iterative.Rd 8972de7d3f6f971b1cd2ba8e08814558 *man/survival.twostage.Rd edb419306d024fe44f1556edea1f671f *man/test.conc.Rd f9a1792b9b6087b7acf0188b38311fca *man/tetrachoric.Rd 34278e523babe1920ff5b98461a9b0ed *man/ttpd.Rd c220286886a3f87846b6b80fa9153127 *man/twin.clustertrunc.Rd e472dafc182e01068eb917c9542c590f *man/twinbmi.Rd 1d4b21c5489cbeeecf0ef0db3ff2a6de *man/twinlm.Rd 3677adef9eec153a9c298aae4d7600d1 *man/twinsim.Rd 1515ccd70ba9032bd02d4dfb6cd9408b *man/twinstut.Rd 351fa681456727a767f9363967a045fc *man/twostageMLE.Rd 7d88169e165bf1c60255c384d6605ba3 *src/Makevars a0089cc1021ed29c492562045c3dadef *src/Makevars.win 2949d735a9ae15d0c48a74aa20b67c2c *src/RcppExports.cpp a30940a40d78379ef3455dea6a96b974 *src/aalenfrailty.cpp 528f928ae4152018ace94c938cdbec26 *src/apply.cpp 3a298271a03ae8aa7f2479c3bd746c43 *src/binomial-twostage.cpp a5080b6b3788f3a8ec8836b0ca5f71a6 *src/biprobit.cpp 234d9749cb4c0ed5f3b5171df8457feb *src/claytonoakes.cpp 604f715ee8c5ccab97a11bd3d26995f8 *src/clusterindex.cpp 653bdbec0beb490ca26f7547199ece86 *src/cor.cpp 35989b6c2f309b671428d74276304e45 *src/fastcox.cpp 4209af648d7169f85e9100c521baffed *src/fastcox.h 5ed44c63b944ae903201ee21bbb28c83 *src/init.c 082c1ab6fe2b65e57889b454b3769258 *src/mvn.cpp ae56b6ff31658de4ec8162fabee9e275 *src/mvn.h da47b690e3b738fa75d72f825597a13b *src/pch.cpp f2bfd61a310a221f0ce9bad8bc3047a8 *src/prop-odd.cpp 1d99a0831417bc35fe54e9ac05756cde *src/quadrule.h a83c7965c5072d9097831645d9ad8a7b *src/randomF77.c 8bc6d01fa703e6ca02867ae95d3f9344 *src/survival-twostage.cpp d98bb50ef813442c6980a994525eee5d *src/tools.cpp 9f3257d45c3d12b2b41708eaf67c3122 *src/tools.h 9cba1693b9b31affd2d670fdaf2e762d *src/tvpack.f e9f15c515993dce0e74c69682636b8e3 *src/twostage.h ed14a253253696f3a607929e3ad07b95 *tests/test-all.R 4f3dbcd28398e3e587e2e279d81a68d5 *tests/testthat/test_approx.R a39630c75f489709f68995beacbca753 *tests/testthat/test_claytonoakes.R c907788515930df21a6032c27c7976af *tests/testthat/test_dutils.R b725dd8e405af405aa02b0e918e3c2be *tests/testthat/test_reshape.R d835038893d56f0af1628cb410cecdc3 *vignettes/basic-dutils.ltx f1e67c9680d61ac2aeadc51455aeef8d *vignettes/basic-dutils.org fbab3a080f4d20b27056ac6b7dde8ede *vignettes/binomial-case-control-ascertainment.ltx 436197f863d546c90b417228c6611147 *vignettes/binomial-case-control-ascertainment.org 998ecfb2a0857355329aecee710e26b4 *vignettes/binomial-family.ltx 2c2c0b0cca9146cebfa5efeaf2e91c16 *vignettes/binomial-family.org cf9fff39f408ce613043433e9a026d0a *vignettes/binomial-twin.ltx e04e38b17032ee8de491f32f0f95536d *vignettes/binomial-twin.org 3f76e852d56afed0d2a118ce03c2c7a6 *vignettes/competing.ltx 72e184ea7e15da29fe46153f244776db *vignettes/competing.org 62c715f1875530c7e155c387d458efb5 *vignettes/header.org b5d6acb08eac32e7146532dd298447c6 *vignettes/index.html 0789f6831cd6ca9602da06e7e2a5ff84 *vignettes/marg1.jpg 1cafc47debbfcb7eea5c59a473f8bbbf *vignettes/marginal-cox.ltx b988454c71762b1bae0d72918431c449 *vignettes/marginal-cox.org 9a84999ad552c8a71f171ff3f31bd993 *vignettes/mets.bib f92ef80eacbb8d845a9067a4bc5de760 *vignettes/quantitative-twin.ltx 78a7b60cd9d5986b8f2744e8e97e6501 *vignettes/quantitative-twin.org 20c6a8a94575f0645ed9934e00078f8d *vignettes/rec1.jpg 1d096d973d6179b96bc4689323fbe313 *vignettes/rec2.jpg e5fb9ff58376ecad2e90154571a4c7e7 *vignettes/rec3.jpg eb53e9d4529c4783097d5f018bc0c6e7 *vignettes/rec4.jpg b118852f6e942b206daa786f62e66672 *vignettes/rec4Bi.jpg 9e59a1f023228fd070e5479abe7de683 *vignettes/rec4MV.jpg 578ebecd31adb287d3f74fc68b3e57d4 *vignettes/rec5.jpg d9c87f8885659813a0524dba488a56da *vignettes/rec6.jpg 225f3c61c2f04f6e50ff637756155bc8 *vignettes/rec7.jpg 0bda4054faeeb4f6702c9e9ddc5af067 *vignettes/recurrent-events.ltx 9f6098da7bbd101e6f6220fa4d882904 *vignettes/recurrent-events.org 1b26ed8aa1e3dca95d448b17173c0d5f *vignettes/robcox1.jpg 30c39cb6691b669fb5e46effb8e147d0 *vignettes/robcox2.jpg 41d23ee907cf1aba9a2b24c7525406ec *vignettes/robgofcox1.jpg d24990f90897fe61a3ebcdb64773f6ca *vignettes/scatter1.jpg 65df7ff0a60591a47f8effd9035c3867 *vignettes/scatter2.jpg 27de4cf04bfe79129edceebe11758633 *vignettes/surv-cc-base.jpg 024b0a2b44d790094c0e01bc1af1b56d *vignettes/twostage-survival-case-control.ltx c2305f22979ccf7a96d8f50b2ebd701f *vignettes/twostage-survival-case-control.org c8d6f19ae15006011b190effc707c445 *vignettes/twostage-survival.ltx b0381617fa836e1fe4b24e90eee081d6 *vignettes/twostage-survival.org mets/inst/0000755000176200001440000000000013623061747012210 5ustar liggesusersmets/inst/misc/0000755000176200001440000000000013623061405013132 5ustar liggesusersmets/inst/misc/orgmode1.css0000644000176200001440000003500713623061405015366 0ustar liggesusers/* orgmode.css - CSS Stylesheet for http://www.biostat.ku.dk/~kkho Copyright (C) 2013 Klaus K. Holst Author: Klaus K. Holst This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* /\* Solarized colors *\/ */ /* $base03: #002b36; */ /* $base02: #073642; */ /* $base01: #586e75; */ /* $base00: #657b83; */ /* $base0: #839496; */ /* $base1: #93a1a1; */ /* $base2: #eee8d5; */ /* $base3: #fdf6e3; */ /* $yellow: #b58900; */ /* $orange: #cb4b16; */ /* $red: #dc322f; */ /* $magenta: #d33682; */ /* $violet: #6c71c4; */ /* $blue: #268bd2; */ /* $cyan: #2aa198; */ /* $green: #859900; */ /* @mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3) */ /*************************************************/ /* General */ /*************************************************/ html { margin-top: 0.6em; margin-left: 0.8em; margin-right:0.8em; background: rgba(230,230,230,1.0); } body { text-align:justify; text-justify:inter-word; font-size: 12pt; font-family: arial, helvetica, sans-serif; color: #000000; margin-top: 0em; margin-left: .5em; margin-right: .5em; margin-bottom: 0.6em; background-color: #ffffff; background-image: url(http://www.biostat.ku.dk/~kkho/styles/logo.png); background-position: 5px 7px; background-repeat: no-repeat; border-top: 1px solid gray; border-bottom: 1px solid gray; border-right: 1px solid gray; border-left: 1px solid gray; padding-bottom: 0.5em; min-width: 800px; } #box-link { padding-left: 0em; padding-right: 0em; margin-left: -1.7em; top:0.5em; position: absolute; width: 90px; height: 110px; list-style: none; border: 1px solid transparent; } div { margin-left: 1.0em; margin-right: 1.0em; } dt { margin-left: 1.0em; margin-right: 1.0em; } p { margin-left: 1.0em; margin-right: 1.0em; } /* Two-columns in

environment... */ .columns { -moz-column-count:2; /* Firefox */ -webkit-column-count:2; /* Safari and Chrome */ column-width:100px; min-width:100px; column-count:2; } .title { /* [-moz- | -webkit-]column-span: all; */ } /*************************************************/ /* Headers */ /*************************************************/ h1, h2, h3, h4, h5, h6 { margin-top: .25em; margin-bottom: .2em; color: black; background: none; font-variant: small-caps; text-transform: none; font-weight: 100; margin-bottom: 0; font-weight:bold; } h2,h3,h4 { background-image:url(http://www.biostat.ku.dk/~kkho/images/dline.png); background-repeat: repeat-x; } h1 { color: black; font-weight: normal; letter-spacing: .02em; line-height: 1.1em; margin:0px; font-size: 2em; padding-top: 1em; padding-bottom: 1.0em; } .title { padding-left: 2.9em; text-align:left; font-weight:bold; } h2 { color: #6E2432; font-size: 1.4em; margin-top:.8em; margin-bottom:.5em; height:40px; padding-top: .3em; padding-bottom: 0.2em; } h3 { color: rgba(149,54,34,1); /* #A34D32; */ font-size: 1.2em; margin-top:1.5em; margin-bottom:.5em; height:40px; padding-top: .4em; padding-bottom: .1em; } h4 { color: rgba(163,107,40,1); /* #A34D32; */ /* #CC6600; */ font-size: 1em; margin-top:1.5em; margin-bottom:0em; height:40px; padding-top: .6em; padding-bottom: 0em; } h5 { color: #CC6600; /* #98855b; */ font-size: 1em; } /*************************************************/ /* Table of Contents */ /*************************************************/ /* Contents inspired by http://jashkenas.github.com/coffee-script */ #table-of-contents { z-index: 20; /* larger than navigation */ font-weight:bold; font-size: 10pt; position: fixed; margin-right: 0em; right: 0em; top: 0em; background: white; box-shadow: 0 0 1em #777777; -webkit-box-shadow: 0 0 1em #777777; -moz-box-shadow: 0 0 1em #777777; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; text-align: right; /* ensure doesn't flow off the screen when expanded */ max-height: 80%; } #table-of-contents h2 { background-image: none; filter: alpha(opacity=80); opacity: 0.8; color: rgba(20,50,134,1); /* #A34D32; */ font-size: 10pt; max-width: 9em; margin-top:.15em; margin-bottom:.2em; height:1.3em; font-weight: normal; font-weight:bold; padding-left: 1.7em; padding-right: 1.7em; padding-top: 0.2em; padding-bottom: 0.05em; } #table-of-contents #text-table-of-contents { font-size: 10pt; display: none; text-align: left; } #table-of-contents:hover #text-table-of-contents { overflow: auto; display: block; padding: 0.5em; margin-top: -1em; } /*************************************************/ /* Paragraphs */ /*************************************************/ .bigskip { color: red; } /*************************************************/ /* Tables */ /*************************************************/ table { /* font-family: Monaco, Consolas, "Lucida Console", monospace; */ font-size: 90%; margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaaaaa solid; border-collapse: collapse; box-shadow: 5px 5px 5px #999999; -webkit-box-shadow: 5px 5px 6px #999999; -moz-box-shadow: 5px 5px 6px #999999; } table th, table td { border: 1px rgb(232,232,232) solid; padding-left: 0.5em; padding-right: 0.5em; } td,th { padding-bottom: 0.2em; padding-top: 0.2em; } table th { background: #ccc; text-align: center; } table tr:nth-of-type(odd) { background-color: #eee; /* #E6E6FA; */ } /* table#plain tr:nth-of-type(even) { */ /* background-color: #ccc; /\* #E6E6FA; *\/ */ /* } */ /*table tr.stripe { background-color: #cfcfcf; } */ table caption { margin-left: inherit; margin-right: inherit; } .plain,.plaincenter,.plainright { font-size: 100%; border-color: #fff; color: black; text-align: center; padding: 0em; background: #fff; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none; } .plaincenter { margin-left: auto; margin-right: auto; } .plainright { margin-left: auto; } table#plain tr:nth-of-type(odd) { background-color: white; /* #E6E6FA; */ } .plain tr, .plain td, .plain th .plaincenter tr, .plaincenter td, .plaincenter th .plainright tr, .plainright td, .plainright th { background: #fff; border-color: #fff; padding-bottom: 0em; padding-top: 0em; } /*************************************************/ /* images & verbatim */ /*************************************************/ img, img.src { font-family: Monaco, Consolas, "Lucida Console", monospace; -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); -moz-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); box-shadow: 5px 5px 6px rgba(0,0,0,0.23); border: 1pt solid #AEBDCC; /* #eee; */ padding: 0pt; margin: 10pt; } /* Source blocks */ pre { font-family: Monaco, Consolas, "Lucida Console", monospace; -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); -moz-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); box-shadow: 5px 5px 6px rgba(0,0,0,0.23); border: 1pt solid #AEBDCC; padding: 5pt; font-size: 90%; overflow: auto; } /* results */ pre.example { font-family: Monaco, Consolas, "Lucida Console", monospace; -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); -moz-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); box-shadow: 5px 5px 6px rgba(0,0,0,0.23); border: 1pt solid #AEBDCC; background-color: #FFFFFF; /* #F3F5F7;*/ padding: 5pt; font-size: 90%; overflow: auto; margin: 0em; margin-left: 2.5em; margin-right: 2.5em; color: rgba(75,75,75,1); } pre.src { background-color: #ddd; color: #000; position: relative; overflow: visible; padding-top: 0.5em; padding: 0.5em; margin: 1em; } pre.src:before { display: none; position: absolute; background-color: white; top: -10px; right: 10px; padding: 3px; border: 1px solid black; } pre.src:hover:before { display: inline;} pre.src-sh:before { content: 'sh'; } pre.src-R:before { content: 'R'; } a:hover > img { /* border:5px solid; */ } /* a.image-link img { */ /* border:1px solid #000; */ /* margin-right:20px; */ /* } */ p.image-link { float:left; } /*************************************************/ /* Specific org entries */ /*************************************************/ .org-string { color: #00008a; } .org-constant { color: #E3319D; } .org-type { color: #4AA02C; } .org-comment-delimiter { color: #827839; } .org-comment { color: #aaa; } .org-keyword { color: #38ACEC; } .org-function-name { color: #FBB117; } #postamble { font-size: 60%; margin-top: 5em; padding: .1em; border: 1px solid gray; background-color: #eeeeee; } /*************************************************/ /* Navigation bar */ /*************************************************/ /* http://onwebdev.blogspot.com/2011/04/css-drop-down-menu-tutorial.html */ #navigation { z-index: 10; /* small than table of contents */ float:left; padding-left: 4.4em; top:0.64em; position: absolute; margin: 0; list-style: none; min-width: 50px; font-weight: bold; color: #6E2432; } #navigation > li { font-size: 60%; line-height: 3.5; text-transform: uppercase; float: left; height: 100%; color: #6E2432; margin-right: 0.5em; height: 100%; padding: 0 1.5em; } li:hover a { background: transparent; } #navigation > li > a { color: rgba(20,50,134,1); /* #A34D32; */ text-transform: uppercase; } #navigation > li > a:hover { /* color: orange; */ /* text-decoration: underline; */ } #navigation > li.sub { position: relative; } #navigation > li.sub li { line-height: 1.5; } #navigation > li.sub ul { width: 20em; margin: 0; margin-top: 0.5em; line-height: 1.1; text-transform: none; font-size: 140%; padding: 0.5em 0 0.2em 0; list-style: none; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; border-left: 1px solid #ccc; box-shadow: 0 0 1em #777777; -webkit-box-shadow: 0 0 1em #777777; -moz-box-shadow: 0 0 1em #777777; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; background: #fff; position: absolute; top: -1000em; overflow: visible; } #navigation > li.sub ul li { width: 90%; margin: 0 auto 0.3em auto; } #navigation > li.sub ul li a { font-size: 80%; height: 100%; display: block; padding: 0.25em; color: #6E2432; color: rgba(20,50,90,1); font-weight: bold; text-decoration: none; } #navigation > li.sub ul li a:hover { background: rgba(240,240,245,1); /* #c60; */ /* opacity: 1; */ /* text-decoration: underline; */ } #navigation > li.sub:hover ul { top: 1.5em; left: 0em; } /* Another simple navigation style */ #nav { width: 100%; float: left; margin: 0 0 3em 0; padding: 0; list-style: none; background-color: #f2f2f2; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; } #nav li { float: left; } #nav li a { display: block; padding: 8px 15px; text-decoration: none; font-weight: bold; color: #069; border-right: 1px solid #ccc; } #nav li a:hover { color: #c00; background-color: # } /*************************************************/ /* Links */ /*************************************************/ a { filter: alpha(opacity=80); opacity: 0.8; transition: opacity .35s ease-in-out; -moz-transition: opacity .35s ease-in-out; -webkit-transition: opacity .35s ease-in-out; } a,a.plain { text-decoration: none; border: none; background: none; color: rgba(20,50,134,1); /* #A34D32; */ } a:hover,a.plain:hover { /* text-decoration: underline; */ color: #6E2432; /* filter: alpha(opacity=100); */ /* opacity: 1; */ /* zoom: 1; */ /* border: 1px solid black; */ /* opacity: .5; */ } /* a.image-link img */ /* { */ /* opacity: 1; */ /* transition: opacity .25s ease-in-out; */ /* -moz-transition: opacity .25s ease-in-out; */ /* -webkit-transition: opacity .25s ease-in-out; */ /* } */ /* a.image-link:hover */ /* { */ /* opacity: 0.4; */ /* } */ /* .fade:hover { */ /* opacity: 0.2; */ /* } */ /*************************************************/ /* Hrz. rule */ /*************************************************/ hr { height: 1px; color: #aaa; background-color: #ddd; margin: 1em 0 .2em 0; } /*************************************************/ /* Fancy stuff */ /*************************************************/ div.shadow { width: 300px; margin: 20px; border: 1px solid #ccc; padding: 10px; } div.shadow:hover { -moz-box-shadow: 0 0 5px rgba(0,0,0,0.5); -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.5); box-shadow: 0 0 5px rgba(0,0,0,0.5); } .fade { opacity: 1; transition: opacity .25s ease-in-out; -moz-transition: opacity .25s ease-in-out; -webkit-transition: opacity .25s ease-in-out; } .fade:hover { opacity: 0.5; } .reflectionstop { border: none; /* #eee; */ -webkit-box-reflect: below -2px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(80%, transparent), /* to(white)); */ to(rgba(255,255,255,0.4))); } mets/inst/misc/pairwise-competing-risks-ace.r0000644000176200001440000002352513623061405021011 0ustar liggesusers library(mets) set.seed(100) n <- 40000 ## {{{ competing risks ace model with profile of baseline lam0 <- c(0.3,0.2) pars <- c(1,1,1,1,0.1,1)*0.25 ## genetic random effects, cause1, cause2 and overall parg <- pars[c(1,3,5)] ## environmental random effects, cause1, cause2 and overall parc <- pars[c(2,4,6)] ## simulate competing risks with two causes with hazards 0.5 and 0.3 ## ace for each cause, and overall ace out <- simCompete.twin.ace(n,parg,parc,0,2, lam0=lam0,overall=1,all.sum=1) ## setting up design for running the model ## {{{ setting pairs and random effects # mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 dout <- make.pairwise.design.competing(pairs,kinship, type="ace",compete=length(lam0),overall=1) head(dout$ant.rvs) ## MZ dim(dout$theta.des) dout$theta.des[,,1] dout$random.design[,,1] dout$theta.des[,,nrow(out)/2] dout$random.design[,,nrow(out)/2] ###table(out$status) ## }}} ## competing risks models, given as list cr.models=list(Surv(time,status==1)~+1, Surv(time,status==2)~+1) ms <- out$time %o% lam0 par(mfrow=c(1,1)) tsf <- twostage(NULL,data=out,clusters=out$cluster, theta=0.01+pars/sum(pars)^2, var.link=0,step=1.0,Nit=20,detail=1, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, numDeriv=0, marginal.status=out$status, marginal.survival=ms, two.stage=0,cr.models=cr.models) coef(tsf) pars/sum(pars)^2 summary(tsf$marginal.trunc) summary(tsf$marginal.surv) ###tsf$score; tsf$score1 ### source("../R/twostage.R") par(mfrow=c(1,1)) ts <- twostage(NULL,data=out,clusters=out$cluster, theta=tsf$theta, step=1.0,Nit=20,detail=1, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, numDeriv=0, marginal.status=out$status, two.stage=0,cr.models=cr.models) coef(ts) pars/sum(pars)^2 matplot.twostage(ts) abline(c(0,lam0[1])); abline(c(0,lam0[2])); system.time( out1 <- aalen(cr.models[[1]],data=out,robust=0) ) system.time( out1 <- aalen(Surv(time,status!=0)~+1,data=out,robust=0) ) ## }}} onec <- 1 if (onec==1) { ## {{{ one cause ACE survival # lam0 <- c(0.5) pars <- c(1,0.5); pars <- c(0.5,1); out <- simCompete.twin.ace(n,pars[1],pars[2],0,2,lam0=lam0,overall=0) ## {{{ mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 dout <- make.pairwise.design(pairs,kinship,type="ace") head(dout$ant.rvs) ## MZ dim(dout$theta.des) dout$theta.des[,,1] dout$random.design[,,1] ## DZ dout$theta.des[,,nrow(out)/2] dout$random.design[,,nrow(out)/2] ## }}} lams <- cbind(lam0[1]*out$time) table(out$status) ts <- twostage(NULL,data=out,clusters=out$cluster, theta=pars/sum(pars)^2, var.link=0,step=1.0,Nit=10,detail=0, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, numDeriv=0, marginal.surv=lams, marginal.status=out$status, two.stage=0) summary(ts) ts2 <- twostage(NULL,data=out,clusters=out$cluster, theta=ts$theta, var.link=0,step=1.0,Nit=10,detail=1, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, numDeriv=0, marginal.status=out$status, cr.model=list(Surv(time,status)~+1), two.stage=0) summary(ts2) ts2$score ## }}} } twoc <- 1 if (twoc==1) { ## {{{ two cause two independent ACE survival # lam0 <- c(0.5,0.4) pars <- c(0.5,1,0.5,1)*0.5; out <- simCompete.twin.ace(n,pars[c(1,3)],pars[c(2,4)],0,2,lam0=lam0,overall=0) table(out$status) out$status1 <- out$status==1 table(out$status1) ## {{{ mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 ###kinship <- c(rep(1,5000),rep(0.5,5000)) ### ###source("mets/R/twostage.R") ###dout <- make.pairwise.design(pairs,kinship,type="ace") dout <- make.pairwise.design.competing(pairs,kinship, type="ace",overall=0,compete=2) head(dout$ant.rvs) ## MZ dim(dout$theta.des) dout$theta.des[,,1] dout$random.design[,,1] dout$theta.des[,,nrow(out)/2] dout$random.design[,,nrow(out)/2] ### ### ###out$status[out$status==3] <- 2 # table(out$status) ## }}} ###lams <- cbind(lam0[1]*out$time,lam0[2]*out$time) lams <- cbind(out$time*lam0[1],out$time*lam0[2]) ts <- twostage(NULL,data=out,clusters=out$cluster, theta=pars/sum(pars)^2, var.link=0,step=1.0,Nit=10,detail=1, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, marginal.surv=lams, marginal.status=out$status, two.stage=0) summary(ts) ts$score ts2 <- twostage(NULL,data=out,clusters=out$cluster, theta=pars/sum(pars)^2, var.link=0,step=1.0,Nit=20,detail=1, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, marginal.status=out$status, two.stage=0, cr.models=list( Surv(time,status==1)~+1, Surv(time,status==2)~+1) ) ts2$theta pars/sum(pars)^2 matplot.twostage(ts2) abline(c(0,lam0[1])); abline(c(0,lam0[2])); } ## }}} itwoc <- 1 if (itwoc==1) { ## {{{ cause specific analyses because independence lam0 <- c(0.5,0.4) pars <- c(1,0.5); pars <- c(0.5,1,0.5,1); out <- simCompete.twin.ace(n, pars[c(1,3)],pars[c(2,4)], 0,2,lam0=lam0,overall=0,all.sum=1) table(out$status) ## {{{ mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 ###kinship <- c(rep(1,5000),rep(0.5,5000)) ### ###source("mets/R/twostage.R") ###dout <- make.pairwise.design(pairs,kinship,type="ace") dout <- make.pairwise.design.competing(pairs,kinship, type="ace",overall=0) head(dout$ant.rvs) ## MZ dim(dout$theta.des) dout$theta.des[,,1] dout$random.design[,,1] ## DZ dout$theta.des[,,nrow(out)/2] dout$random.design[,,nrow(out)/2] ### ### # table(out$status) out$statusc1 <- 1*(out$status==1) out$statusc2 <- 1*(out$status==2) ## }}} ## design for only cause 1 dout1 <- make.pairwise.design(pairs,kinship, type="ace") ## competing risks models, given as list cr.models=list(Surv(time,status==1)~+1,Surv(time,status==2)~+1) ts <- twostage(NULL,data=out,clusters=out$cluster, theta=pars, score.method="fisher.scoring", var.link=0,step=1.0,Nit=10,detail=0, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, numDeriv=0, marginal.status=out$status, two.stage=0,cr.models=cr.models) coef(ts) ### considering cause 1 alone cr.models1=list(Surv(time,statusc1==1)~+1) ## note due to parametrization ags=2 ! ts1 <- twostage(NULL,data=out,clusters=out$cluster, theta=pars[1:2], var.link=0,step=1.0,Nit=10,detail=0, random.design=dout1$random.design, theta.des=dout1$theta.des, pairs=pairs, marginal.status=out$statusc1, two.stage=0, cr.models=cr.models2) summary(ts1) ### considering cause 2 alone cr.models2=list(Surv(time,statusc2==1)~+1) ts2 <- twostage(NULL,data=out,clusters=out$cluster, theta=pars[1:2], var.link=0,step=1.0,Nit=10,detail=0, random.design=dout1$random.design, theta.des=dout1$theta.des,pairs=pairs, marginal.status=out$statusc2, two.stage=0, cr.models=cr.models2) summary(ts2) ## }}} } ## {{{ 2 compete+ overall ace, dependence test, cox ### conditional cox model lam0 <- c(0.5,0.5) pars <- rep(1,6) out <- simCompete.twin.ace(n,c(1,1,1),c(1,1,1),0,2, lam0=lam0,overall=1,all.sum=1) table(out$status) ### out2 <- fast.reshape(out,id="cluster") ### out2$mintime <- pmin(out2$time1,out2$time2) out2$whichmin <- ifelse(out2$time1out2$time2,out2$status1, out2$status2) ### out1 <- event.split(out2,time="time1",status="status1", cuts="time2") out1$mstat <- out1$status2*out1$num head(out1[out1$whichmin==2,]) head(out1[out1$whichmin==1,]) table(out1$status1) table(out1$mstat) ###out1[out1$num==1,] out1$mincause[out1$num==0] <- 0 ### coxph(Surv(start,time1,status1==1)~factor(mstat)*factor(zyg1),data=out1) ### coxph(Surv(start,time1,status1==2)~factor(mstat)*factor(zyg1),data=out1) mm <- familycluster.index(out$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) # kinship <- (out[pairs[,1],"zyg"]=="MZ")+ (out[pairs[,1],"zyg"]=="DZ")*0.5 dout <- make.pairwise.design.competing(pairs,kinship, type="ace",compete=length(lam0),overall=1) head(dout$ant.rvs) ## MZ dim(dout$theta.des) dout$theta.des[,,1] dout$random.design[,,1] ## DZ dout$theta.des[,,nrow(out)/2] dout$random.design[,,nrow(out)/2] ### ### cr.models=list(Surv(time,status==1)~+1,Surv(time,status==2)~+1) ts <- twostage(NULL,data=out,clusters=out$cluster, theta=pars, score.method="fisher.scoring", var.link=0,step=1.0,Nit=20,detail=0, random.design=dout$random.design, theta.des=dout$theta.des,pairs=pairs, marginal.status=out$status, two.stage=0,cr.models=cr.models) ## }}} mets/inst/misc/pcif2.png0000644000176200001440000004005413623061405014646 0ustar liggesusersPNG  IHDR) IDATxy\?lkkj%S[\ceX42\K]gH[ZVb"" ,y=1aΙ70g3 ˲#  RhB@@")4H!D  RhB@@")4H!D  RhB@@")4H!D  RhB@@")4H!D  RhB@@")4H!D  RhB@@")4H!D  RhB@@")4H!DJ!tSXX?,+t!pJrԩr\B~nl;޿ɓ'B֬Yc2²BW! :~4_ ۱c 1"jB?ׅ3OGz>..W^>>>֭3 ²ljjjLLLvvʕ+)z۶m/^V;uꄆ)B??aLbQl4iRTTԩS+**&L 7lؠV322L&SPPԩSj5?{.3V*j M)AlrFU*?{.36mѣ***/^ jZ~nu*JP( gg'x"!!A?["ٳj'66vϞ=iiiv `˛3gϟ?/tE3sЁgϞݻ\._rwn8Yonnn'N_r֭[.x~~tG :tƌD4t޽{/iѢE{s QF%&&QVVȑ#0 ߵkWoo5k֘-Zdɒ;zxx,[=:tP???:|Wlݺaaa7oB?qRRR]ƭ._|̘1zKZlٲeZ˃wWV8шJiV~:^/!"Z=s̝;wfeeM0K.]t<::k̏ ~F?󄕔snڴI*XGGǚ>(˲^^^5[n6 RyAr(zeew^zĉk$??߼ּysHMC SM&t~F??`79r\/tޝ<<<233,wa:88p^s(?Ȟ;w;3ۻw︸/1/[3τ~툣tǎ,˾t 7o6{n@@'XqnYZZڪU={Ԫn8\kKs-ޥFV^?rbbb233Ne??g}6qH//ÇO6nnnqqqjYYY{gqCB^q͛7gff )Sjq>"4f͚m߾qC.̃SLy5*##?4e-`~zC??0a?@ ` JVk.88xƌ n"_I&æjd]KTg~`2 F.\(H%?3gͬfŊB`5g1@@[6s}q0WM<ۻ}֭g@?$]ƼOhhݬIܚS&}"LU% ,`Y6==].ϮC=$\S ]tEFYjuYf1 YUUUswSLٱc^RZ|mvm߾_Ϟ=5`0XaĈ ,dѼW p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B@@")4H!D  R- IENDB`mets/inst/misc/mets1.png0000644000176200001440000002550613623061405014701 0ustar liggesusersPNG  IHDR) IDATx\TU3rU0rM[|tM:֣cEw!c)MFZjdf%_G0Qjd((8c"#?f=wx=s9sɛәsY,l#@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@Rjj3f̈R B7|7 qF 蘘S]!ā׸BC&);;;::: /***33l6+su"z)))F1+++44bedd(ShBybˈܰ0,NhBPPPPUUU]]}С)S(su"8srr ɓ'냃 2W-R(z` I ):<<\z)su"Ơۘ&LhGdEEdrtu #SNIIIݺukGnaÆ59矟8q¡,iΜ9zPPPPPP.\8yy%!HJ޷o_tlllMMZW1b~ذ$ņ )6Ia?H @Rh "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$E@h "@R4HI )$P@aÆN0矕:hB /1cx?\Hϟ0a?lX/^ܽ{EٳG6f)Ç߹s￯^|_|q\]ˬZ8x`JJJޜeZP@FG}E@0L~~~QQQfY)ԃNII1YYY$55,##C@s ͛7X_FDD憅F7fw3g49Y^^^__̺@ tbbbBBBZZZhhN;zhjj)S|d[nmrάdP@ 'O''' ;3f̘1cܲeΝ;Y)B~"Sm}<==պ:OQ ?+I$JB+ @RlR("+ :`%!tp$ )F@R4HI )$E@h "@R4HI )$E@hBA;P~m_ծ⫯z9qtX/]UBTTlƵ]^ Q Bokk1h "@R4HI )$yā`tA[W\矕,`e;sss***+\v@XbBo ,P*@3]ZZd=<%hK?PQZZv1c([_u__߸k׮k ݃ ںu{mml֭el}݀'Nn۶MzѢEyyy18@y{GGG_xQB4qqq/>|EEŋ>4;_~88899`0MpmtC ]+VB,\pԨQ^7 $2!oK.BW^yeȐ!O=c/o߾xƱ˰/^UTT8±3>a{Ń>8{gϞ={vǏW,ҥKfff;/c2233fs;f{[o}xV@k]׃t .4l޼977722k׮֕[nmglOS)7]I\Y[[[WWwʕK.2֕U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lS-S~-iz[]uy86Cvߤ{;[|G~rs-:+uE_~y}„~ѯ.AA6d0Ĝ{aj֬B:~_ԶXl4 +EeW4c?wZ\?anˣ~m˃r.=޺Ƒ#?NI-[(JnnK/ofSg<`9-8nn/ ]ĘP婧v ٴ'/ ml=W JKM~uKOWNNa*j/|x%)l\?dȇ/ޭ喩}լY+*wqݡC?tw:㭦FQamg/s'?$dwѽ{#&lٚO=]wǏ]xUԣߪHK3i#FlW}15*_~aXlaWTSmX좪v܆* K(کW:ZAo^vuuR @=i&r JpAj'Xhff9#r9I$D@" HB$!r9I$D@" HB$!r9I$D@" HB$!r9I$D@" HB$!r9I$D@" 6NIENDB`mets/inst/misc/binomialtwostage.R0000644000176200001440000001331713623061405016632 0ustar liggesusers onerunfam <- function(i,n,alr=0,manual=1,time=0,simplealr=1,theta=1) { ## {{{ ### n=200; beta=0.2; theta=1; time=0; i=1 print(i) dd <- simBinFam(n,beta=0,theta) ddl <- fast.reshape(dd,varying="y",keep="y") out2t <- system.time( marg <- glm(y~+1,data=ddl,family=binomial()) ) ps <- predict(marg,type="response") if (time==1) print(out2t) if (manual==1) { if (time==1) print(date()) ddl$ps <- ps fam <- familycluster.index(ddl$id) prtfam <- ddl[fam$familypairindex,] prtfam$subfam <- fam$subfamilyindex ### lave afhængighedsdesign pba af wide format zyg1*zyg2 feks prtfamclust <- data.frame(fast.reshape(prtfam,id="subfam")) ### des <- model.matrix(~-1+factor(num1):factor(num2),data=prtfamclust) mf <- with(prtfamclust,(num1=="m")*(num2=="f")*1) mb <- with(prtfamclust,(num1=="m" | num1=="f")*(num2=="b1" | num2=="b2")*1) bb <- with(prtfamclust,(num1=="b1" )*(num2=="b1" | num2=="b2")*1) des <- cbind(mf,mb,bb)*1 mulig <- (apply(des,2,sum)>0) names <- colnames(des) prtfamclust <- cbind(prtfamclust,des) prtfam <- fast.reshape(prtfamclust,varying=c("y","ps","num"),keep=c("y","ps","num","subfam","id",names)) prtfam$famclust <- prtfam$id1 destheta <- prtfam[,names] if (time==1) print(date()) udt <- system.time( udf <- binomial.twostage(prtfam$y,data=prtfam, clusters=prtfam$subfam, detail=0, ### score.method="nlminb", score.method="fisher.scoring", theta.des=prtfam[,names], max.clust=1000,iid=1, Nit=60,marginal.p=prtfam$ps,se.clusters=prtfam$famclust) ) if (time==1) print(udt) zfam <- rbind(c(1,0,0), ## m-f c(0,1,0), ## m-b1 c(0,1,0), ## m-b2 c(1,0,0), ## f-m c(0,1,0), ## f-b1 c(0,1,0), ## f-b2 c(0,1,0), ## b1-m c(0,1,0), ## b1-f c(0,0,1), ## b1-b2 c(0,1,0), ## b2-m c(0,1,0), ## b2-f c(0,0,1)) ## b2-b1 if (alr==1) { if (simplealr==0) { ### cvec <- (ddl$num=="m"| ddl$num=="f")*1 +(ddl$num=="b1"| ddl$num=="b2")*2 ### k <- 2 ### dmat <- rbind(c(1,0,0),c(0,1,0),c(0,0,1)) ### udz <- class2z(cvec,ddl$id,k,dmat) ### ### ZMAST <- rep(1,12) ### ZMAST <- cbind(ZMAST,c(0,0,0,0,1,1,0,1,1,0,1,1)) ### ### outl <- alr(ddl$y~+1,id=ddl$id,depmodel="general",ainit=rep(0.01,3),z=udz$z,zmast=0) if (!require(alr)) stop("'alr' package required") out4t <- system.time( outl <- alr(ddl$y~+1,id=ddl$id,depmodel="general",zlocs=rep(1:4,n),ainit=rep(0.01,3),z=zfam,zmast=1) ) if (time==1) print(out4t) outl <- c(summary(outl)$alpha[,1],summary(outl)$alpha[,2]) names(outl) <- c(rep("alr",3),rep("se-alr",3)) } else { outl <- alr(ddl$y~+1,id=ddl$id,depmodel="exchangeable",ainit=rep(0.01,1)) outl <- c(summary(outl)$alpha[,1],summary(outl)$alpha[,2]) names(outl) <- c(rep("alr",1),rep("se-alr",1)) } } } else { ### med design formula form <- ~factor(num1)*factor(num2) udbin <- easy.binomial.twostage(marg,data=ddl, response="y",id="id",theta.formula=form, marginal.p=ps, score.method="fisher.scoring") } ### if (alr==1) { ### alr til simpelt design ### outl <- alr(ddl$y~ddl$x,id=ddl$id,depm="exchangeable", ainit=0.01) ### outl <- summary(outl)$alpha ### ud <- c(udbin$theta,udbin$var.theta^.5,udbin$hessi^.5,c(outl)[1:2]) ### names(ud) <- c("TWO","se-two","se-twoR","alr","se-alr") ### } ud <- c(udf$theta,diag(udf$var.theta)^.5) if (alr==1) ud <- c(ud,outl) return(ud) } ## }}} onerunfam2 <- function(i,n,alr=0,manual=1,time=0,theta=1) { ## {{{ ### n=1000; beta=0.2; theta=1; time=0; i=1 print(i) dd <- simBinFam(n,beta=0,theta) ddl <- fast.reshape(dd,varying="y",keep="y") desfs <- function(x,num1="num1",num2="num2") { ## {{{ mf <- (x[num1]=="m")*(x[num2]=="f")*1 mb <- (x[num1]=="m" | x[num1]=="f")*(x[num2]=="b1" | x[num2]=="b2")*1 bb <- (x[num1]=="b1")*(x[num2]=="b1" | x[num2]=="b2")*1 c(mf,mb,bb) } ## }}} ud <- easy.binomial.twostage(y~+1,data=ddl, response="y",id="id", score.method="fisher.scoring",deshelp=0, theta.formula=desfs,desnames=c("pp","pc","cc")) ud <- c(ud$theta[,1],diag(ud$var.theta)^.5) zfam <- rbind(c(1,0,0), ## m-f c(0,1,0), ## m-b1 c(0,1,0), ## m-b2 c(1,0,0), ## f-m c(0,1,0), ## f-b1 c(0,1,0), ## f-b2 c(0,1,0), ## b1-m c(0,1,0), ## b1-f c(0,0,1), ## b1-b2 c(0,1,0), ## b2-m c(0,1,0), ## b2-f c(0,0,1)) ## b2-b1 if (alr==1) { if (!require(alr)) stop("'alr' package required") outl <- alr(ddl$y~+1,id=ddl$id, depmodel="general",zlocs=rep(1:4,n),ainit=rep(0.01,3),z=zfam,zmast=1) outl <- c(summary(outl)$alpha[,1],summary(outl)$alpha[,2]) names(outl) <- c(rep("alr",3),rep("se-alr",3)) } if (alr==1) ud <- c(ud,outl) return(ud) } ## }}} mets/inst/misc/binfam.rda0000644000176200001440000221170113623061405015062 0ustar liggesusersqg5LL&G&QderdeerQ+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ies (R>=2.15) :

install.packages(c("mets","cmprsk"), dependencies=TRUE)

OBS: At this point you might have to restart R to flush the cache of previously installed versions of the packages. If you have previously installed timereg and lava, make sure that you have the current versions installed (timereg: 1.8.4, lava: 1.2.6).

Load simulated data

library(mets)

The dataset prt contains (simulated) observations on prostate cancer with the following columns

country
Country (Denmark,Finland,Norway,Sweden)
time
exit time (censoring,death or prostate cancer)
status
Status (censoring=0,death=1 or prostate cancer=2)
zyg
Zygosity (DZ,MZ)
id
Twin id number
cancer
cancer indicator (status=2)
data(prt)
head(prt)
   country     time status zyg id cancer
31 Denmark 96.98833      1  DZ  1      0
32 Denmark 80.88885      1  DZ  1      0
39 Denmark 68.04498      1  DZ  3      0
40 Denmark 61.45903      1  DZ  3      0
51 Denmark 78.78068      1  DZ  5      0
52 Denmark 90.36252      1  DZ  5      0

Status table

prtwide <- fast.reshape(prt,id="id")
ftable(status1~status2,prtwide)
        status1    0    1    2
status2                       
0               9278  883  156
1                936 2308  193
2                163  199  106

Estimation of cumulative incidence

times <- seq(40,100,by=2)
cifmod <- comp.risk(Hist(time,status)~+1+cluster(id),data=prt,
                    cause=2,n.sim=0,
                    times=times,conservative=1,max.clust=NULL,model="fg")

theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status
or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,
              score.method="fisher.scoring",same.cens=TRUE)
summary(or1)
or1$score
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE    z    P-val Ratio    SE
factor(zyg)DZ           0.785 0.221 3.55 3.82e-04  2.19 0.485
factor(zyg)MZ           2.100 0.278 7.56 4.11e-14  8.14 2.260
              [,1]
[1,] -5.179525e-09
[2,]  4.202363e-08
pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0)
plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15))

pcif.png

Assumes that the censoring of the two twins are independent (when they are the same):

incorrect.or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des, 
                        theta=c(2.8,8.6),score.method="fisher.scoring")
summary(incorrect.or1)
## not  bad
incorrect.or1$score
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE    z    P-val  Ratio       SE
factor(zyg)DZ            2.84 0.469 6.06 1.37e-09   17.1     8.04
factor(zyg)MZ            8.61 5.810 1.48 1.39e-01 5460.0 31800.00

Correcting for country

table(prt$country)

times <- seq(40,100,by=2)
cifmodl <-comp.risk(Hist(time,status)~-1+factor(country)+cluster(id),data=prt,
                    cause=2,n.sim=0,times=times,conservative=1,
                    max.clust=NULL,cens.model="aalen")
pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0)
plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2))
legend("topleft",levels(prt$country),col=1:4,lty=1)

pcifl.png

Design for MZ/DZ status

theta.des <- model.matrix(~-1+factor(zyg),data=prt) 
or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des,
                     theta=c(0.8,2.1),score.method="fisher.scoring",same.cens=TRUE)

summary(or.country)
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE    z    P-val Ratio    SE
factor(zyg)DZ           0.736 0.234 3.15 1.66e-03  2.09 0.488
factor(zyg)MZ           1.860 0.279 6.67 2.54e-11  6.44 1.800

Concordance estimation

Ignoring country. Computing casewise, using prodlim. CIF:

outm <- prodlim(Hist(time,status)~+1,data=prt)

times <- 60:100
## cause is 2 (second cause)
cifmz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="MZ"))
cifdz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="DZ"))
### casewise 
pp33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),prodlim=TRUE)
pp33dz <- pp33$model$"DZ"
pp33mz <- pp33$model$"MZ"
concdz <- predict(pp33dz,cause=1,time=times,newdata=data.frame(zyg="DZ"))
concmz <- predict(pp33mz,cause=1,time=times,newdata=data.frame(zyg="MZ"))
par(mfrow=c(1,2))
plot(times,concdz,ylim=c(0,0.1),type="s")
lines(pcif$time,pcif$P1^2,col=2)
title(main="DZ Conc. Prostate cancer")
plot(times,concmz,ylim=c(0,0.1),type="s")
title(main="MZ Conc. Prostate cancer")
lines(pcif$time,pcif$P1^2,col=2)

concordance.png

par(mfrow=c(1,1))
cdz <- casewise(pp33dz,outm,cause.marg=2)
cmz <- casewise(pp33mz,outm,cause.marg=2)             
plot(cmz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE,col=c(3,2,1))
par(new=TRUE)
plot(cdz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE)

casewisea.png

Similar analyses using comp.risk for competing risks leads to tests for equal concordance and more correct standard errors

p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1)

p33dz <- p33$model$"DZ"$comp.risk
p33mz <- p33$model$"MZ"$comp.risk
head(cbind(p33mz$time, p33mz$P1, p33mz$se.P1))
head(cbind(p33dz$time, p33dz$P1, p33dz$se.P1))
         [,1]        [,2]         [,3]
[1,] 60.88384 0.001354486 0.0006759148
[2,] 64.98252 0.001738665 0.0007767791
[3,] 66.34227 0.002145175 0.0008759241
[4,] 67.23626 0.002553690 0.0009656368
[5,] 67.96152 0.002980112 0.0010544136
[6,] 68.37310 0.003852670 0.0012192761
         [,1]         [,2]         [,3]
[1,] 58.85519 0.0001741916 0.0001740997
[2,] 67.87387 0.0004044091 0.0002883926
[3,] 69.55123 0.0006488647 0.0003777479
[4,] 70.83183 0.0009069944 0.0004570724
[5,] 71.05738 0.0011672691 0.0005255212
[6,] 71.06602 0.0014276382 0.0005859026

Test for genetic effect, needs other form of bicomprisk with iid decomp

conc1 <- p33dz
conc2 <- p33mz

test.conc(p33dz,p33mz);
$test
           cum dif.         sd        z        pval
pepe-mori 0.3937372 0.09841628 4.000732 6.31468e-05

$mintime
[1] 60.88384

$maxtime
[1] 96.92463

$same.cluster
[1] FALSE

attr(,"class")
[1] "testconc"

OR expression of difference in concordance functions and Gray test

data33mz <- p33$model$"MZ"$data
data33mz$zyg <- 1
data33dz <- p33$model$"DZ"$data
data33dz$zyg <- 0
data33 <- rbind(data33mz,data33dz)

library(cmprsk)
ftime <- data33$time
fstatus <- data33$status
table(fstatus)
fstatus
   0    1    2 
9597  106 4519
group <- data33$zyg
graytest <- cuminc(ftime,fstatus,group)
graytest
Tests:
      stat           pv df
1 28.82416 7.925617e-08  1
2 33.79236 6.131919e-09  1
Estimates and Variances:
$est
              20         40           60          80        100
0 1 0.0000000000 0.00000000 0.0001741916 0.006741025 0.01880244
1 1 0.0000000000 0.00000000 0.0006710172 0.017420360 0.05031415
0 2 0.0006970762 0.01974882 0.1141800067 0.504364854 0.93797293
1 2 0.0009363302 0.01655314 0.0948098327 0.443996722 0.90692430

$var
              20           40           60           80          100
0 1 0.000000e+00 0.000000e+00 3.034323e-08 2.115863e-06 9.493584e-06
1 1 0.000000e+00 0.000000e+00 2.250627e-07 9.173278e-06 5.102841e-05
0 2 8.094463e-08 2.487399e-06 1.556735e-05 6.990685e-05 4.769058e-05
1 2 1.752378e-07 3.424511e-06 2.388136e-05 1.271394e-04 1.171775e-04
zygeffect <- comp.risk(Hist(time,status)~const(zyg),
                  data=data33,cause=1,
                  cens.model="aalen",model="logistic",conservative=1)
summary(zygeffect)
Competing risks Model 

Test for nonparametric terms 

Test for non-significant effects 
            Supremum-test of significance p-value H_0: B(t)=0
(Intercept)                          26.8                   0

Test for time invariant effects 
                  Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept)                          2.22                           0
                    Cramer von Mises test p-value H_0:constant effect
(Intercept)                          36.3                           0

Parametric terms : 
           Coef.    SE Robust SE    z    P-val
const(zyg) 0.944 0.218     0.218 4.34 1.45e-05
   
  Call: 
comp.risk(Hist(time, status) ~ const(zyg), data = data33, cause = 1, 
    cens.model = "aalen", model = "logistic", conservative = 1)

Liability model, ignoring censoring

(M <- with(prt, table(cancer,zyg)))
      zyg
cancer    DZ    MZ
     0 17408 10872
     1   583   359
coef(lm(cancer~-1+zyg,prt))
     zygDZ      zygMZ 
0.03240509 0.03196510

Saturated model

bpmz <- biprobit(cancer~1 + cluster(id), 
             data=subset(prt,zyg=="MZ"), eqmarg=TRUE)

logLik(bpmz) # Log-likelihood
AIC(bpmz) # AIC
coef(bpmz) # Parameter estimates
vcov(bpmz) # Asymptotic covariance
summary(bpmz) # concordance, case-wise, tetrachoric correlations, ...
'log Lik.' -1472.972 (df=2)
[1] 2949.943
(Intercept)  atanh(rho) 
 -1.8539454   0.8756506
             (Intercept)   atanh(rho)
(Intercept) 0.0007089726 0.0003033296
atanh(rho)  0.0003033296 0.0044023587

              Estimate    Std.Err          Z p-value
(Intercept)  -1.853945   0.026627 -69.627727       0
atanh(rho)    0.875651   0.066350  13.197393       0

    n pairs 
11231  5473 
Score: -3.453e-05 5.123e-06
logLik: -1472.972 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.70423  0.63252 0.76398
Concordance             0.01131  0.00886 0.01443
Case-wise/Conditional   0.35487  0.29391 0.42094
Marginal                0.03187  0.02834 0.03583
bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt)
summary(bp0)
------------------------------------------------------------
Strata 'DZ'

              Estimate    Std.Err          Z p-value
(Intercept)  -1.846841   0.019247 -95.955243       0
atanh(rho)    0.418065   0.050421   8.291446       0

    n pairs 
17991  8749 
Score: -0.001842 -0.0006881
logLik: -2536.242 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.39530  0.30882 0.47529
Concordance             0.00486  0.00361 0.00655
Case-wise/Conditional   0.15019  0.11459 0.19443
Marginal                0.03239  0.02976 0.03523

------------------------------------------------------------
Strata 'MZ'

              Estimate    Std.Err          Z p-value
(Intercept)  -1.853945   0.026627 -69.627727       0
atanh(rho)    0.875651   0.066350  13.197393       0

    n pairs 
11231  5473 
Score: -3.453e-05 5.123e-06
logLik: -1472.972 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.70423  0.63252 0.76398
Concordance             0.01131  0.00886 0.01443
Case-wise/Conditional   0.35487  0.29391 0.42094
Marginal                0.03187  0.02834 0.03583

Equal marginals MZ/DZ

bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt)
(s <- summary(bp1))
                 Estimate     Std.Err           Z p-value
(Intercept)     -1.849284    0.015601 -118.539777       0
atanh(rho) MZ    0.877667    0.065815   13.335456       0
atanh(rho) DZ    0.417475    0.050276    8.303615       0

 MZ/DZ       Complete pairs MZ/DZ
 11231/17991 5473/8749           

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.70525  0.63436 0.76438
Tetrachoric correlation DZ 0.39480  0.30854 0.47462

MZ:
                     Estimate 2.5%     97.5%   
Concordance           0.01149  0.00942  0.01400
Casewise Concordance  0.35672  0.29764  0.42049
Marginal              0.03221  0.03007  0.03449
Rel.Recur.Risk       11.07524  9.15861 12.99187
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.00482  0.00363 0.00640
Casewise Concordance 0.14956  0.11441 0.19315
Marginal             0.03221  0.03007 0.03449
Rel.Recur.Risk       4.64343  3.44806 5.83880

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.62090  0.41075 0.83104

Components (concordance,cor,…) can be extracted from returned list

s$all
                               Estimate        2.5%        97.5%
Broad-sense heritability    0.620895137 0.410750804  0.831039470
Tetrachoric correlation MZ  0.705248651 0.634356556  0.764377527
Tetrachoric correlation DZ  0.394801083 0.308543835  0.474618270
MZ Concordance              0.011489242 0.009421632  0.014004180
MZ Casewise Concordance     0.356715720 0.297643978  0.420492296
MZ Marginal                 0.032208397 0.030073567  0.034489384
MZ Rel.Recur.Risk          11.075239652 9.158610651 12.991868652
DZ Concordance              0.004817009 0.003625030  0.006398416
DZ Casewise Concordance     0.149557550 0.114405842  0.193154111
DZ Marginal                 0.032208397 0.030073567  0.034489384
DZ Rel.Recur.Risk           4.643433455 3.448063061  5.838803849

Likelihood Ratio Test

compare(bp0,bp1)
	- Likelihood ratio test -

data:  
chisq = 0.0468, df = 1, p-value = 0.8288
sample estimates:
log likelihood (model 1) log likelihood (model 2) 
               -4009.213                -4009.237

Polygenic Libability model via te bptwin function (type can be a subset of "acde", or "flex" for stratitified, "u" for random effects model with same marginals for MZ and DZ)

bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt)
summary(bp2)
             Estimate   Std.Err         Z p-value
(Intercept)  -3.40624   0.19032 -17.89736  0.0000
log(var(A))   0.74503   0.25710   2.89787  0.0038
log(var(C))  -1.25112   1.04238  -1.20024  0.2300

 MZ/DZ       Complete pairs MZ/DZ
 11231/17991 5473/8749           

                   Estimate 2.5%     97.5%   
A                   0.62090  0.41075  0.83104
C                   0.08435 -0.09373  0.26244
E                   0.29475  0.22992  0.35959
MZ Tetrachoric Cor  0.70525  0.63436  0.76438
DZ Tetrachoric Cor  0.39480  0.30854  0.47462

MZ:
                     Estimate 2.5%     97.5%   
Concordance           0.01149  0.00942  0.01400
Casewise Concordance  0.35672  0.29764  0.42049
Marginal              0.03221  0.03007  0.03449
Rel.Recur.Risk       11.07524  9.15861 12.99187
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.00482  0.00363 0.00640
Casewise Concordance 0.14956  0.11441 0.19315
Marginal             0.03221  0.03007 0.03449
Rel.Recur.Risk       4.64343  3.44806 5.83880

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.62090  0.41075 0.83104

Liability model, Inverse Probability Weighting

Probability weights based on Aalen's additive model

prtw <- ipw(Surv(time,status==0)~country, data=prt,
            cluster="id",weightname="w") 
plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability")
count <- 0
for (l in unique(prtw$country)) {
    count <- count+1
    prtw <- prtw[order(prtw$time),]
    with(subset(prtw,country==l), 
         lines(time,w,col=count,lwd=2))
}
legend("topright",legend=unique(prtw$country),col=1:4,pch=-1,lty=1)

ipw.png

bpmzIPW <- biprobit(cancer~1 + cluster(id), 
                    data=subset(prtw,zyg=="MZ"), 
                    weight="w")
(smz <- summary(bpmzIPW))
              Estimate    Std.Err          Z p-value
(Intercept)  -1.226276   0.043074 -28.469378       0
atanh(rho)    0.912670   0.100316   9.097911       0

    n pairs 
 2722   997 
Score: 3.329e-05 -2.252e-05
logLik: -6703.246 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.72241  0.61446 0.80381
Concordance             0.05490  0.04221 0.07113
Case-wise/Conditional   0.49887  0.41321 0.58460
Marginal                0.11005  0.09514 0.12696

Comparison with CIF

plot(pcif,multiple=1,se=1,uniform=0,ylim=c(0,0.15))
abline(h=smz$prob["Marginal",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray")

cifMZ.png

Concordance estimates

plot(pp33mz,ylim=c(0,0.1))
abline(h=smz$prob["Concordance",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray")

conc2.png

ACE model with IPW

bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp3)
             Estimate   Std.Err         Z p-value
(Intercept)  -2.31618   0.18673 -12.40359   0e+00
log(var(A))   0.85390   0.22689   3.76347   2e-04
log(var(C)) -29.43218   4.34216  -6.77823   0e+00

 MZ/DZ     Complete pairs MZ/DZ
 4716/8835 997/1809            

                   Estimate 2.5%    97.5%  
A                  0.70138  0.60824 0.79452
C                  0.00000      NaN     NaN
E                  0.29862  0.20548 0.39176
MZ Tetrachoric Cor 0.70138  0.59586 0.78310
DZ Tetrachoric Cor 0.35069  0.30328 0.39637

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.04857  0.03963 0.05940
Casewise Concordance 0.47238  0.39356 0.55260
Marginal             0.10281  0.09463 0.11161
Rel.Recur.Risk       4.59457  3.79490 5.39425
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.02515  0.02131 0.02965
Casewise Concordance 0.24461  0.21892 0.27226
Marginal             0.10281  0.09463 0.11161
Rel.Recur.Risk       2.37919  2.13966 2.61872

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.70138  0.60824 0.79452

Equal marginals but free variance structure between MZ and DZ

bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp4)
                Estimate    Std.Err          Z p-value
(Intercept)    -1.266427   0.024091 -52.568381       0
atanh(rho) MZ   0.898548   0.098841   9.090866       0
atanh(rho) DZ   0.312574   0.073668   4.243006       0

 MZ/DZ     Complete pairs MZ/DZ
 4716/8835 997/1809            

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.71559  0.60742 0.79771
Tetrachoric correlation DZ 0.30278  0.16662 0.42760

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.04974  0.04044 0.06104
Casewise Concordance 0.48442  0.40185 0.56785
Marginal             0.10268  0.09453 0.11144
Rel.Recur.Risk       4.71777  3.88751 5.54802
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.02269  0.01667 0.03081
Casewise Concordance 0.22097  0.16448 0.29013
Marginal             0.10268  0.09453 0.11144
Rel.Recur.Risk       2.15203  1.53917 2.76490

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.82563  0.50195 1.14931

Check convergence

mean(score(bp4)^2)
[1] 2.723881e-14

Liability model, adjusting for covariates

Main effect of country

bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp6)
                Estimate   Std.Err         Z p-value
(Intercept)     -2.81553   0.23889 -11.78590   0e+00
countryFinland   0.87558   0.16123   5.43061   0e+00
countryNorway    0.68483   0.17762   3.85567   1e-04
countrySweden    0.77248   0.12350   6.25468   0e+00
log(var(A))      0.77724   0.23186   3.35220   8e-04
log(var(C))    -28.96268   4.10060  -7.06303   0e+00

 MZ/DZ     Complete pairs MZ/DZ
 4716/8835 997/1809            

                   Estimate 2.5%    97.5%  
A                  0.68509  0.58704 0.78313
C                  0.00000      NaN     NaN
E                  0.31491  0.21687 0.41296
MZ Tetrachoric Cor 0.68509  0.57428 0.77124
DZ Tetrachoric Cor 0.34254  0.29262 0.39060

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.02236  0.01588 0.03141
Casewise Concordance 0.39194  0.30778 0.48305
Marginal             0.05705  0.04654 0.06977
Rel.Recur.Risk       6.86967  5.08343 8.65591
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.00989  0.00700 0.01394
Casewise Concordance 0.17329  0.14505 0.20570
Marginal             0.05705  0.04654 0.06977
Rel.Recur.Risk       3.03735  2.56114 3.51356

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.68509  0.58704 0.78313

bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp7)
                 Estimate    Std.Err          Z p-value
(Intercept)     -1.581478   0.051318 -30.817030   0e+00
countryFinland   0.491725   0.081517   6.032155   0e+00
countryNorway    0.385830   0.094254   4.093497   0e+00
countrySweden    0.433789   0.060648   7.152599   0e+00
atanh(rho) MZ    0.884166   0.099366   8.898113   0e+00
atanh(rho) DZ    0.271770   0.073240   3.710668   2e-04

 MZ/DZ     Complete pairs MZ/DZ
 4716/8835 997/1809            

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.70850  0.59760 0.79280
Tetrachoric correlation DZ 0.26527  0.12752 0.39298

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.02347  0.01664 0.03300
Casewise Concordance 0.41255  0.32395 0.50721
Marginal             0.05688  0.04643 0.06953
Rel.Recur.Risk       7.25251  5.40099 9.10403
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.00794  0.00489 0.01287
Casewise Concordance 0.13966  0.09312 0.20421
Marginal             0.05688  0.04643 0.06953
Rel.Recur.Risk       2.45511  1.47912 3.43110

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.88646  0.55608 1.21683

Stratified analysis

bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp8)
------------------------------------------------------------
Strata 'Denmark'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.583608   0.051241 -30.904856  0.0000
atanh(rho) MZ   0.992896   0.217349   4.568215  0.0000
atanh(rho) DZ   0.070588   0.186956   0.377566  0.7058

 MZ/DZ     Complete pairs MZ/DZ
 1334/2789 287/589             

                           Estimate 2.5%     97.5%   
Tetrachoric correlation MZ  0.75859  0.51308  0.88937
Tetrachoric correlation DZ  0.07047 -0.28750  0.41117

MZ:
                     Estimate 2.5%     97.5%   
Concordance           0.02611  0.01584  0.04274
Casewise Concordance  0.46093  0.28426  0.64799
Marginal              0.05664  0.04623  0.06922
Rel.Recur.Risk        8.13766  4.72047 11.55486
DZ:
                     Estimate 2.5%     97.5%   
Concordance           0.00420  0.00110  0.01596
Casewise Concordance  0.07422  0.01888  0.25037
Marginal              0.05664  0.04623  0.06922
Rel.Recur.Risk        1.31043 -0.43515  3.05601

                         Estimate 2.5% 97.5%
Broad-sense heritability   1      NaN  NaN  

------------------------------------------------------------
Strata 'Finland'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.087902   0.063221 -17.207912  0.0000
atanh(rho) MZ   0.859335   0.302752   2.838410  0.0045
atanh(rho) DZ   0.393145   0.179942   2.184840  0.0289

 MZ/DZ    Complete pairs MZ/DZ
 660/1633 134/316             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.69592  0.25985 0.89623
Tetrachoric correlation DZ 0.37407  0.04044 0.63265

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.07008  0.03975 0.12064
Casewise Concordance 0.50666  0.27641 0.73412
Marginal             0.13832  0.11316 0.16801
Rel.Recur.Risk       3.66298  1.85349 5.47246
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.04160  0.02237 0.07607
Casewise Concordance 0.30073  0.16558 0.48242
Marginal             0.13832  0.11316 0.16801
Rel.Recur.Risk       2.17417  1.00995 3.33838

                         Estimate 2.5%     97.5%   
Broad-sense heritability  0.64369 -0.21675  1.50414

------------------------------------------------------------
Strata 'Norway'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.192293   0.079124 -15.068598  0.0000
atanh(rho) MZ   0.916471   0.301133   3.043409  0.0023
atanh(rho) DZ   0.533761   0.252070   2.117509  0.0342

 MZ/DZ   Complete pairs MZ/DZ
 617/928 115/155             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.72422  0.31516 0.90635
Tetrachoric correlation DZ 0.48825  0.03969 0.77303

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.05918  0.03218 0.10633
Casewise Concordance 0.50764  0.27633 0.73572
Marginal             0.11657  0.08945 0.15057
Rel.Recur.Risk       4.35466  2.15709 6.55223
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.03945  0.01840 0.08257
Casewise Concordance 0.33842  0.15583 0.58636
Marginal             0.11657  0.08945 0.15057
Rel.Recur.Risk       2.90310  0.89710 4.90911

                         Estimate 2.5%     97.5%   
Broad-sense heritability  0.47195 -0.47133  1.41522

------------------------------------------------------------
Strata 'Sweden'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.149412   0.032155 -35.745836  0.0000
atanh(rho) MZ   0.836864   0.125476   6.669520  0.0000
atanh(rho) DZ   0.199677   0.092907   2.149202  0.0316

 MZ/DZ     Complete pairs MZ/DZ
 2105/3485 461/749             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.68414  0.53057 0.79423
Tetrachoric correlation DZ 0.19706  0.01758 0.36425

MZ:
                     Estimate 2.5%    97.5%  
Concordance          0.06055  0.04659 0.07835
Casewise Concordance 0.48365  0.38001 0.58872
Marginal             0.12519  0.11277 0.13877
Rel.Recur.Risk       3.86327  3.00137 4.72517
DZ:
                     Estimate 2.5%    97.5%  
Concordance          0.02515  0.01672 0.03766
Casewise Concordance 0.20088  0.13541 0.28746
Marginal             0.12519  0.11277 0.13877
Rel.Recur.Risk       1.60452  0.99901 2.21004

                         Estimate 2.5%    97.5%  
Broad-sense heritability 0.97416  0.53594 1.41238

Wald test (stratified vs main effect)

B <- contr(3,4)[-(1:3),]
compare(bp8,contrast=B)
	- Wald test -

	Null Hypothesis:
	[Denmark.atanh(rho) MZ] - [Finland.atanh(rho) MZ] = 0
	[Denmark.atanh(rho) MZ] - [Norway.atanh(rho) MZ] = 0
	[Denmark.atanh(rho) MZ] - [Sweden.atanh(rho) MZ] = 0
	[Denmark.atanh(rho) DZ] - [Finland.atanh(rho) DZ] = 0
	[Denmark.atanh(rho) DZ] - [Norway.atanh(rho) DZ] = 0
	[Denmark.atanh(rho) DZ] - [Sweden.atanh(rho) DZ] = 0

data:  
chisq = 3.4972, df = 6, p-value = 0.7443
sample estimates:
    Estimate   Std.Err       2.5%     97.5%
  0.13356053 0.3726923 -0.5969029 0.8640239
  0.07642511 0.3713780 -0.6514624 0.8043126
  0.15603178 0.2509676 -0.3358556 0.6479191
 -0.32255628 0.2594839 -0.8311353 0.1860227
 -0.46317298 0.3138347 -1.0782776 0.1519316
 -0.12908846 0.2087690 -0.5382682 0.2800912

Created: 2014-05-09 Fri 12:09

mets/inst/misc/mena.html0000644000176200001440000002264113623061405014745 0ustar liggesusers Analyzing twin survival data with 'mets'

Analyzing twin survival data with 'mets'

  1. Load the menarche data.
    library(mets)
    data("mena")
    
  2. Estimate the mean age at menarche in each cohort treating the censored observations as uncensored. Are there seemingly any significant effect of cohort?
  3. Estimate parameters from the Tobit regression model (linear normal regression with right censoring):
    s <- survreg(Surv(agemena,status) ~ 1+factor(cohort)+cluster(id),
                 dist="gaussian", data=mena)
    

    Interpret the output from the model.

  4. Calculate the Kaplan-Meier estimator for each cohort. Plot and interpret the results. What is the approximate age at median survival time?
    km1 <- survfit(Surv(agemena,status) ~ factor(cohort), data=mena)
    palette(c("darkblue","darkred","orange","olivedrab"))
    plot(km1,mark.time=FALSE,col=1:4)
    
  5. Add the survival curve from the Tobit regression to the plot (for the youngest cohort). Use the pnorm function and extract the mean and standard deviation (scale) from the survreg model.
    tt <- seq(0,16,length.out=100)
    ss <- 1-pnorm(tt,mean=coef(s)[1],sd=s$scale)
    lines(tt,ss,lty=2)
    
  6. Estimate a Cox regression model using the cox.aalen function from the timereg package.
    ca <- cox.aalen(Surv(agemena,status)~+1+prop(cohort)+cluster(id),
                    data=mena,max.clust=NULL,n.sim=0,robust=0)
    
  7. Calculate the two-stage Clayton-Oakes-Glidden estimate
    vardesign <- model.matrix(~-1+factor(zyg),mena)
    e <- two.stage(ca,data=mena,theta.des=vardesign)
    

    Interpret the results. Refit the model with a new variance regression design, vardesign, that makes it possible to assess the statistical significance of zygosity.

  8. Plot paired menarche times
    library(lava.tobit)
    menaw <- fast.reshape(mena,id="id")
    status <- menaw$status1+menaw$status2+1
    plot(agemena2~agemena1,data=menaw,pch=c(2,6,16)[status],col=Col(c(4,2,1)[status],0.6))
    
  9. Estimate parameters from ACE model
    s0 <- twinlm(agemena~1,zyg="zyg",DZ="DZ",id="id",data=mena)
    s0
    mena$S <- with(mena, Surv(agemena,status))
    s <- twinlm(S~1,zyg="zyg",DZ="DZ",id="id",data=mena,control=list(trace=1,start=coef(s0)))
    s
    

Created: 2013-05-15 Wed 07:30

mets/inst/misc/twinbmi2.rda0000644000176200001440000013370113623061405015362 0ustar liggesusers &W}~! QBX2-j_a{X0Zʬg,clX2jcX&(eQB& QB:D(eNiꭿ'nss:u[n)g EeZbAlq!׋{1q_<.O{ĭxxF|H<+>&w3yxI|-Ć8ax' xJG܊gćijc9Iq'>#^//ג bC xxD^qxR<%#n3CY1/ϋŗKkIW@\k#xL'ē)q+/ϊ'ŝxA|^(,^_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_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _xb,K_%/K_%/K_%/9%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/K_%/Y W+_ W+_ W+_+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ W+_ Wxޯ~+_ Wxޯ~+_ Wxޯ~+_ Wxޯ~+_ Wxޯ~+_ Wxޯ~+_ Wxޯ~7. 85ίq~k_85ίq~k_85ίq~k_hk_85q}k\_׸5q}k\_׸5q}k\_׸5q}k\_׸5q}k\_85q|k_85q|k_85q|k_85q|k_85q|k_85~{k^5~{k^5~{k^5~{k^5~{k^5~{k^5~{k^5~{k^5~zk^x5^zk^״k5nq{k^׸5nq{k^׸5nq{k^׸5nq{k^x5^zk^x5^zk^x5^zk^q6x=7 nop{7 nop{7 nop{np{|C{ op|78 nop{7 nop{78 >oy|7 m{7x ^oz7x ^oz7x ^oz7x ^oz7x ^ozvop{7 nop{7 nop{7 nop{7 nop{7 nop{7 nop{7 nop{7 nop{ m78 op|78 oh7x o|78 op|78 op|78 op|C۽ op|78 op|78 op|78* ǯp* ǯp* ǯp* ǯp* ǯp* ǯp* ǯ`WU}n_WU}n_WU@(`nۂ=}3QEDz۱۱~xxxxxxxg߱xxxxxxxxxxxxxxxxxxxxx8oqqqqqqqqqqqqqqqqqqqqqq[P^ec^[{nMmets/inst/misc/sim-cens-ts.r0000644000176200001440000001113313623061405015456 0ustar liggesusers data(prt) dim(prt) table(prt$status) ### 21000 7000 1000 library(mets) ### set.seed(100) prt<-simnordic(7500,cordz=3,cormz=4,cratemz=1.0,cratedz=1.0) prt$status <-prt$cause table(prt$status) prt<-simnordic(7500,cordz=2.0,cormz=3.,pcensmz=0.0,pcensdz=0.0,cratemz=200.4,cratedz=100.4) prt$status <-prt$cause prop.table(table(prt$status)) prt$cancer <- (prt$status==1) prt<-simnordic(7500,cordz=1,cormz=3,pcensmz=0.9,pcensdz=0.9,cratemz=0.4,cratedz=0.4) prt$status <-prt$cause prop.table(table(prt$status)) prt<-simnordic(75000,cordz=2.0,cormz=3.,pcensmz=0.0,pcensdz=0.0,cratemz=200.4,cratedz=100.4) prt$status <-prt$cause table(prt$status) prt$cancer <- (prt$status==1) ### bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp3) coef(bp3) exp(-0.1)/( exp(-0.1)+exp(-0.77)+1) exp(-0.77)/( exp(-0.1)+exp(-0.77)+1) gem <- c() for (pcens in seq(0,0.95,length=5)) { prt<-simnordic(7500,cordz=3,cormz=4,pcensmz=pcens,pcensdz=pcens,cratemz=0.4,cratedz=0.4) prt$status <-prt$cause tt <- table(prt$status) if (length(tt)==2) tt <- c(0,tt) prt$cancer <- (prt$status==1) ### bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp3) ### gem <- rbind(gem,c(pcens,tt,coef(bp3))) } gem gemmzdz <- c() concmz <- concdz <- marg <- cens <- gemmzdzc <- matrix(0,5,5) cens <- gemmzdzc <- matrix(0,5,5) gemmzdza <- matrix(0,5,5) j <- i <- 0 for (pcensmz in seq(0,0.95,length=5)) { i <- i+1 j <- 0 for (pcensdz in seq(0,0.95,length=5)) { j <- j+1 prt<-simnordic(100000,cordz=1.5,cormz=3,pcensmz=pcensmz,pcensdz=pcensdz,cratemz=0.9,cratedz=0.9) prt$status <-prt$cause tt <- table(prt$status) if (length(tt)==2) tt <- c(0,tt) prt$cancer <- (prt$status==1) ### bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) ud <- summary(bp3) ### gemmzdz <- rbind(gemmzdz,c(pcensmz,pcensdz,tt,coef(bp3))) print(c(i,j)) gemmzdza[i,j] <- coef(bp3)[2] gemmzdzc[i,j] <- coef(bp3)[3] marg[i,j] <- ud$probMZ[3,1] concmz[i,j] <- ud$probMZ[1,1] concdz[i,j] <- ud$probDZ[1,1] cens[i,j] <- tt[1]/sum(tt) } } ### gemmzdz gemmzdza gemmzdzc ### h <- exp(gemmzdza)/(exp(gemmzdza)+exp(gemmzdzc)+1) c <- exp(gemmzdzc)/(exp(gemmzdza)+exp(gemmzdzc)+1) ### round(h,2) round(c,2) round(cens,2) ### ###h2.3 <- h ###c2.3 <- c h15.3 <- h c15.3 <- c round(h1.3,2) round(c1.3,2) round(h2.3,2) round(c2.3,2) save(h1.3,file="h13.rda"); save(c1.3,file="c13.rda") save(h2.3,file="h23.rda"); save(c2.3,file="c23.rda") save(concmz,file="concMZ23.rda"); save(marg,file="marg23.rda") table(prt$zyg,prt$status) library(latextable) cbind(h1.3,c1.3) ######################################################################################## ##################### MC ######################################################################################## library(doMC) library(mets) registerDoMC() onerun <- function(k,cordz=1,cormz=3) {#{{{ print(k) pcensmz <- seq(0,0.95,length=5) j <- (k%%5) j[j==0] <- 5 i <-ceiling(k/5) print(c(i,j)) prt<-simnordic(300000,cordz=cordz,cormz=cormz,pcensmz=pcensmz[i],pcensdz=pcensmz[j],cratemz=0.3,cratedz=0.3) prt$status <-prt$cause cmzdz <- table(prt$status,prt$zyg) if (nrow(cmzdz)==3) cmzdz <- rbind(c(0,0),cmzdz) tt <- table(prt$status) ###print(tt) if (length(tt)==2) tt <- c(0,tt) prt$cancer <- (prt$status==1) ### bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) ud <- summary(bp3) ### return(list(index=c(i,j),cmzdz=cmzdz,status=tt,pcensmz=pcensmz[i],pcensdz=pcensmz[j],bp3=bp3)) }#}}} ud <- onerun(25) prop.table(ud$status) res <- c() res <- foreach (i=1:25) %dopar% onerun(i,cordz=1,cormz=3) ###res23 <- res res13 <- res ###res153 <- res gemmzdz <- c() concmz <- concdz <- marg <- cens <- gemmzdzc <- matrix(0,5,5) cens <- gemmzdzc <- matrix(0,5,5) gemmzdza <- matrix(0,5,5) for (k in 1:length(res)) { j <- (k%%5) j[j==0] <- 5 i <-ceiling(k/5) print(c(i,j)) print(res[[k]]$index) print(c(res[[k]]$pcensmz,res[[k]]$pcensdz)); bp3 <- res[[k]]$bp3 ud <- summary(bp3) gemmzdza[i,j] <- coef(bp3)[2] gemmzdzc[i,j] <- coef(bp3)[3] marg[i,j] <- ud$probMZ[3,1] concmz[i,j] <- ud$probMZ[1,1] concdz[i,j] <- ud$probDZ[1,1] tt <- res[[k]]$status cens[i,j] <- tt[1]/sum(tt) } cens h <- exp(gemmzdza)/(exp(gemmzdza)+exp(gemmzdzc)+1) c <- exp(gemmzdzc)/(exp(gemmzdza)+exp(gemmzdzc)+1) ### round(h,2) round(c,2) round(cens,2) # ###h153 <- h ###c153 <- c ###cens153 <- cens ###marg153 <- marg ###conc153 <- concmz ###h13 <- h ###c13 <- c ###cens13 <- cens h23 <- h c23 <- c cens23 <- cens conc23 <- concmz marg23 <- marg round(h13,2) round(h23,2) save(h13,file="h13.rda") save(h23,file="h23.rda") ### save(c13,file="c13.rda") save(c23,file="c23.rda") ### save(marg23,file="marg23.rda") save(conc23,file="conc23.rda") mets/inst/misc/cifMZ.png0000644000176200001440000001761513623061405014662 0ustar liggesusersPNG  IHDR&TTIDATx{XUumDQRgİh4@NN& =fRSy]F=sLg<:j`Y^2x <m{MkZ_=qZi wrB* rB* rB* rB* rB* rB* rB* rB* rB* rB* rB* rB* rB* rB* $@S]]sNSizcwygĈzsz7vAqyǖ-[VWW7sm۶O0!77jvvSə ϼqs9ZKKCBB9r3g D}aaa,Y$::Zr}]VWW7dȐӧO}TTTt](.ѭr|+UNjjiz k!BS[[;wXjXbccg͚U__/w/t:WZ;]$]RR~ )));UNrrrNNNFFF\\v]f_ t`bdff0 &&fԩ.k͚52{O96-/////OfwE!T@BP9!T@BP9!T@BP9!T@BP9!T@BP9!T@BP9!T@BP9!T@BӾ|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 r^.//_Rkׅdi.16DDWx^, [† +Vo ý/ "OV Ep0;wCzʼnD^$Qhby׮:"Ф$~0"''''66ŋ<7RѥK?͝+((.Nh9}Dfb W=3g4iܹsL&-}ukM/\`4HL&8daaalfC(r"##֮]~zfv0߸qaTfv0X}at`---M./]4 /11QVOOϴ46sabF9>B裏vv\I;;8h***tm6[lVڵkWv%4b뵒m~N|ʊ8++Ç zt5gggd2̙3ڱ[IhhzߒxD0br0!rD0F9"A#` rD0F9"A#` rD0h7h] /"""[ xw ƍU&...D$˩с5㢢b>;dT*FADݻw׷@h!3۷=x`ǎ##FL4ƍnnnz(@Op@5~QQQ!bqiiF<7@$j r:H$""{{{"^X,>q<9sFU8J.ki'& =}tqqAO}VrJPX[[?hp `/^0F9"A#` rD0F9"A#` rD0F?n̔D!IENDB`mets/inst/misc/obs/0000755000176200001440000000000013623061405013715 5ustar liggesusersmets/inst/misc/obs/workshop.R0000644000176200001440000001756013623061405015725 0ustar liggesusers ############################### ## installation, R (>=2.12.0) ############################### install.packages("mets") ############################### ## Load simulated data ############################### library(mets) data(prt) ############################### ## Estimation of cumulative incidence ############################### times <- seq(40,100,by=2) cifmod <- comp.risk(Surv(time,status>0)~+1+cluster(id),data=prt,prt$status,causeS=2,n.sim=0, times=times,conservative=1,max.clust=NULL,model="fg") theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des, score.method="fisher.scoring") summary(or1) or1$score pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0) png(filename="pcif.png") plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) dev.off() ############################### ## Correcting for country ############################### png(filename="pcifl.png") table(prt$country) times <- seq(40,100,by=2) cifmodl <-comp.risk(Surv(time,status>0)~-1+factor(country)+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1, max.clust=NULL,cens.model="aalen") pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) dev.off() theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des, theta=c(2.8,6.9),score.method="fisher.scoring") summary(or.country) cifmodlr <-comp.risk(Surv(time,status>0)~+1+const(factor(country))+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1,max.clust=NULL,model="fg", cens.model="aalen",cens.formula=~~factor(country)) pciflr <- predict(cifmodlr,X=rep(1,4),Z=rbind(c(0,0,0),c(1,0,0),c(0,1,0),c(0,0,1)),se=0,uniform=0) png(filename="pcif2.png") par(mfrow=c(1,2)) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) plot(pciflr,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) dev.off() or.countryr <- or.cif(cifmodlr,data=prt,cause1=2,cause2=2,theta.des=theta.des, theta=c(2.8,6.9),score.method="fisher.scoring") summary(or.countryr) ############################### ## Concordance estimation ############################### ### ignoring country p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1) p33dz <- p33$model$"DZ"$comp.risk p33mz <- p33$model$"MZ"$comp.risk png(filename="p33dz.png") plot(p33dz,ylim=c(0,0.1)) dev.off() png(filename="pcaconc.png") par(new=TRUE) plot(p33mz,ylim=c(0,0.1),col=3) title(main="Concordance Prostate cancer") lines(pcif$time,pcif$P1^2,col=2) dev.off() ### test for genetic effect conc1 <- p33dz conc2 <- p33mz test.conc(p33dz,p33mz); data33mz <- p33$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) library(cmprsk) ftime <- data33$time fstatus <- data33$status table(fstatus) group <- data33$zyg graytest <- cuminc(ftime,fstatus,group) graytest zygeffect <- comp.risk(Surv(time,status==0)~const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffect) png(filename="casewise.png") case33mz <- conc2case(p33mz,pcif) case33dz <- conc2case(p33dz,pcif) plot(case33mz$casewise,se=0,col=2) par(new=TRUE) plot(case33dz$casewise,se=0) dev.off() ############################### ## Effect of zygosity correcting for country ############################### p33l <- bicomprisk(Hist(time,status)~country+strata(zyg)+id(id), data=prt,cause=c(2,2),return.data=1,robust=1) data33mz <- p33l$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33l$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) zygeffectl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffectl) zygeffectpl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="fg",conservative=1) summary(zygeffectpl) zygeffectll <- comp.risk(Surv(time,status==0)~country+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffectll) ############################### ## Liability model, ignoring censoring ############################### (M <- with(prt, table(cancer,zyg))) coef(lm(cancer~-1+zyg,prt)) ## Saturated model bpmz <- biprobit(cancer~1 + cluster(id), data=subset(prt,zyg=="MZ"), eqmarg=TRUE) logLik(bpmz) # Log-likelihood AIC(bpmz) # AIC coef(bpmz) # Parameter estimates vcov(bpmz) # Asymptotic covariance summary(bpmz) # concordance, case-wise, tetrachoric correlations, ... bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt) summary(bp0) ## Eq. marginals MZ/DZ bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt) summary(bp1) # Components (concordance,cor,...) can be extracted from returned list compare(bp0,bp1) # LRT ## Polygenic model args(bptwin) bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp2) ############################### ## Liability model, IPCW ############################### png(filename="ipw.png") ## Probability weights based on Aalen's additive model prtw <- ipw(Surv(time,status==0)~country, data=prt, cluster="id",weightname="w") plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") count <- 0 for (l in unique(prtw$country)) { count <- count+1 prtw <- prtw[order(prtw$time),] with(subset(prtw,country==l), lines(time,w,col=count,lwd=2)) } legend("topright",legend=unique(prtw$country),col=1:4,pch=1) dev.off() bpmzIPW <- biprobit(cancer~1 + cluster(id), data=subset(prtw,zyg=="MZ"), weight="w") (smz <- summary(bpmzIPW)) png(filename="cif2.png") ## CIF plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) abline(h=smz$prob["Marginal",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray") dev.off() png(filename="conc2.png") ## Concordance plot(p33mz,ylim=c(0,0.1)) abline(h=smz$prob["Concordance",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray") dev.off() bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp3) bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp4) score(bp4) ## Check convergence bp5 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ade",data=prtw,weight="w") summary(bp5) ############################### ## Adjusting for covariates ############################### bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp6) bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp7) bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp8) ## Wald test B <- (lava::contrmat(3,4))[-(1:3),] compare(bp8,contrast=B) ############################### ## Cumulative heritability ############################### args(cumh) ch1 <- cumh(cancer~1,time="time",zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") #+BEGIN_SRC R summary(ch1) png(filename="cumh.png") plot(ch1) dev.off() mets/inst/misc/obs/workshop-ts.R0000644000176200001440000002341013623061405016340 0ustar liggesusers ############################### ## installation, R (>=2.12.0) ############################### ###install.packages("mets") ############################### ## Load simulated data ############################### library(mets) data(prt) ############################### ## Estimation of cumulative incidence ############################### times <- seq(40,100,by=2) cifmod <- comp.risk(Surv(time,status>0)~+1+cluster(id),data=prt,prt$status,causeS=2,n.sim=0, times=times,conservative=1,max.clust=NULL,model="fg") theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or1 <- mets::or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, score.method="fisher.scoring") summary(or1) or1$score rr1<-mets::rr.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE,score.method="fisher.scoring") summary(rr1) pcif <- predict(cifmod,X=1,resample.iid=1,uniform=0,se=1) png(filename="pcif.png") plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) abline(h=0.10143) abline(h=0.1105) dev.off() cifmodzyg <- comp.risk(Surv(time,status>0)~-1+factor(zyg)+cluster(id), data=prt,prt$status,causeS=2,n.sim=0,cens.model="aalen", times=times,conservative=1,max.clust=NULL,model="additive") pcifzyg <- predict(cifmodzyg,X=diag(2),resample.iid=0,uniform=0,se=0) plot(pcifzyg,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) abline(h=0.10143) abline(h=0.1105) out <- prodlim(Hist(time,status)~zyg,data=prt) poutmz <- predict(out,cause=2,time=times,newdata=data.frame(zyg="MZ")) poutdz <- predict(out,cause=2,time=times,newdata=data.frame(zyg="DZ")) ###plot(out,cause=2,ylim=c(0,0.15),confInt=FALSE) lines(times,poutmz,type="s",col=2) lines(times,poutdz,type="s",col=2) ###lines(times,c(pcifzyg$P1[1,]),col=4) ###lines(times,c(pcifzyg$P1[2,]),col=4) ############################### ## Correcting for country ############################### png(filename="pcifl.png") table(prt$country) times <- seq(40,100,by=2) cifmodl <-comp.risk(Surv(time,status>0)~-1+factor(country)+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1, max.clust=NULL,cens.model="aalen") pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) dev.off() theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, theta=c(0.8,1.8),score.method="fisher.scoring",detail=1) summary(or.country) or.country$score cifmodlr <-comp.risk(Surv(time,status>0)~+1+const(factor(country))+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1,max.clust=NULL,model="fg", cens.model="aalen",cens.formula=~~factor(country)) pciflr <- predict(cifmodlr,X=rep(1,4),Z=rbind(c(0,0,0),c(1,0,0),c(0,1,0),c(0,0,1)),se=0,uniform=0) png(filename="pcif2.png") par(mfrow=c(1,2)) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) plot(pciflr,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) dev.off() or.countryr <- or.cif(cifmodlr,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, theta=c(0.8,1.9),score.method="fisher.scoring") summary(or.countryr) ############################### ## Concordance estimation ############################### ### ignoring country p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1,robust=1) p33dz <- p33$model$"DZ"$comp.risk p33mz <- p33$model$"MZ"$comp.risk png(filename="p33dz.png") plot(p33dz,se=0,ylim=c(0,0.1)) lines(p33mz$time,p33mz$P1,col=3) title(main="Concordance Prostate cancer") lines(pcif$time,pcif$P1^2,col=2) ### test for genetic effect legend("topleft",c("DZ","MZ","Independence"),lty=rep(1,3),col=c(1,3,2)) dev.off() ### test for genetic effect test.conc(p33dz,p33mz); data33mz <- p33$model$"MZ"$data data33mz$zyg <- "MZ" data33dz <- p33$model$"DZ"$data data33dz$zyg <- "DZ" data33 <- rbind(data33mz,data33dz) data33$zyg <- factor(data33$zyg) library(cmprsk) ftime <- data33$time fstatus <- data33$status table(fstatus) group <- data33$zyg graytest <- cuminc(ftime,fstatus,group) graytest zygeffect <- comp.risk(Surv(time,status==0)~const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffect) case33mz <- conc2probandwise(p33mz,pcif) case33dz <- conc2probandwise(p33dz,pcif) png(filename="casewise.png") plot(case33mz$probandwise,se=0,col=3) lines(case33dz$probandwise$time,case33dz$probandwise$P1) title(main="Probandwise concordance") legend("topleft",c("MZ","DZ","Independence"),lty=rep(1,3),col=c(3,1,2)) lines(pcif$time,pcif$P1,col=2) dev.off() ############################### ## Effect of zygosity correcting for country ############################### p33l <- bicomprisk(Hist(time,status)~country+strata(zyg)+id(id), data=prt,cause=c(2,2),return.data=1,robust=1) data33mz <- p33l$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33l$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) zygeffectl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffectl) zygeffectpl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="fg",conservative=1) summary(zygeffectpl) zygeffectll <- comp.risk(Surv(time,status==0)~country+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffectll) ############################### ## Liability model, ignoring censoring ############################### (M <- with(prt, table(cancer,zyg))) coef(lm(cancer~-1+zyg,prt)) ## Saturated model bpmz <- biprobit(cancer~1 + cluster(id), data=subset(prt,zyg=="MZ"), eqmarg=TRUE) logLik(bpmz) # Log-likelihood AIC(bpmz) # AIC coef(bpmz) # Parameter estimates vcov(bpmz) # Asymptotic covariance summary(bpmz) # concordance, case-wise, tetrachoric correlations, ... bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt) summary(bp0) ## Eq. marginals MZ/DZ bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt) summary(bp1) # Components (concordance,cor,...) can be extracted from returned list compare(bp0,bp1) # LRT ## Polygenic model args(bptwin) bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp2) ############################### ## Liability model, IPCW ############################### png(filename="ipw.png") ## Probability weights based on Aalen's additive model prtw <- ipw(Surv(time,status==0)~zyg, data=prt, cluster="id",weightname="w") plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") count <- 0 for (l in unique(prtw$country)) { count <- count+1 prtw <- prtw[order(prtw$time),] with(subset(prtw,country==l), lines(time,w,col=count,lwd=2)) } legend("topright",legend=unique(prtw$country),col=1:4,pch=1) dev.off() bpmzIPW <- biprobit(cancer~1 + cluster(id), data=subset(prtw,zyg=="MZ"), weight="w") (smz <- summary(bpmzIPW)) bpdzIPW <- biprobit(cancer~1 + cluster(id), data=subset(prtw,zyg=="DZ"), weight="w") (sdz <- summary(bpdzIPW)) abline(h=0.495) abline(h=0.21) png(filename="cif2.png") ## CIF plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) abline(h=smz$prob["Marginal",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray") dev.off() png(filename="conc2.png") ## Concordance plot(p33mz,ylim=c(0,0.1)) abline(h=smz$prob["Concordance",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray") dev.off() bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp3) bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp4) score(bp4) ## Check convergence bp5 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ade",data=prtw,weight="w") summary(bp5) ############################### ## Adjusting for covariates ############################### bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp6) bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp7) bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp8) ## Wald test B <- (lava::contrmat(3,4))[-(1:3),] compare(bp8,contrast=B) ############################### ## Cumulative heritability ############################### args(cumh) ch1 <- cumh(cancer~1,time="time",zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") #+BEGIN_SRC R summary(ch1) png(filename="cumh.png") plot(ch1) dev.off() parfunc <- function(par,t,pardes) { par <- pardes %*% c(par[1],par[2]) + pardes %*% c( par[3]*(t-60)/12,par[4]*(t-60)/12) par } ###parfunc(c(0.1,1,0.1,1),50,theta.des) names(prt) theta.des <- model.matrix(~-1+factor(zyg),data=prt) cor1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, score.method="fisher.scoring",detail=1) summary(cor1) corl <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, par.func=parfunc,dimpar=4,control=list(trace=TRUE),detail=1) summary(corl) corl$score mets/inst/misc/obs/workshop.org0000644000176200001440000011036513623061405016310 0ustar liggesusers#+BEGIN_OPTIONS #+TITLE: Analyzing twin data with =mets= #+AUTHOR: Klaus K. Holst and Thomas Scheike #+DATE: <2012-05-20 Sun> #+PROPERTY: session *R* #+PROPERTY: cache yes #+PROPERTY: results output graphics #+PROPERTY: exports both #+PROPERTY: tangle yes #+STYLE: #+PROPERTY: tangle yes #+STARTUP: hideall #+OPTIONS: LaTeX:dvipng #+END_OPTIONS * Installation Set repositories (see also =chooseCRANmirror=, =chooseBioCmirror=) and install dependencies (=R= >=2.14) #+BEGIN_SRC R :exports none ############################### ## installation, R (>=2.14.0) ############################### palette(c("darkblue","darkred","orange","olivedrab")) #+END_SRC #+RESULTS[8a346c56f83ba895a925ff381d944f947cfd8cbe]: #+BEGIN_SRC R :exports code :eval never setRepositories() ## Choose CRAN and BioC Software (BioConductor) install.packages(c("mets","cmprsk")) #+END_SRC /OBS:/ At this point you might have to restart =R= to flush the cache of previously installed versions of the packages. If you have previously installed =timereg= and =lava=, make sure that you have the current versions installed (timereg: 1.6-5, lava: 1.0-5). * Load simulated data #+BEGIN_SRC R :exports none ############################### ## Load simulated data ############################### #+END_SRC #+RESULTS[02928e5bb0859e535f0f8436a7abb6f99589a14e]: #+NAME: Loading #+BEGIN_SRC R :exports code library(mets) data(prt) #+END_SRC #+RESULTS[1ac5ae8cf61c58ca9af113b15b7f062dfb3d7162]: Loading * Estimation of cumulative incidence #+BEGIN_SRC R :exports none ############################### ## Estimation of cumulative incidence ############################### #+END_SRC #+RESULTS[f112f393258523a6017aec5f028f0ca868ae8d18]: #+BEGIN_SRC R times <- seq(60,100,by=1) cifmod <- comp.risk(Surv(time,status>0)~+1+cluster(id),data=prt,prt$status,causeS=2,n.sim=0, times=times,conservative=1,max.clust=NULL,model="fg") theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, score.method="fisher.scoring") summary(or1) or1$score pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0) #+END_SRC #+RESULTS[0f9f1d6f4e42e90ca88a1113a01098f8319c1283]: : OR for dependence for competing risks : : OR of cumulative incidence for cause1= 2 and cause2= 2 : log-ratio Coef. SE z P-val Ratio SE : factor(zyg)DZ 0.80 0.111 7.23 4.86e-13 2.22 0.246 : factor(zyg)MZ 2.09 0.138 15.10 0.00e+00 8.07 1.110 : [,1] : [1,] 1.325225e-06 : [2,] 3.458932e-06 #+BEGIN_SRC R :file pcif.png plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) #+END_SRC #+RESULTS[5234604eb50e009ef23083db3cbabd66084b3ad0]: [[file:pcif.png]] * Correcting for country #+BEGIN_SRC R :exports none ############################### ## Correcting for country ############################### #+END_SRC #+RESULTS[68c4a7cd657ebc513b8b06ca5e33d302d5860d52]: #+BEGIN_SRC R :file pcifl.png table(prt$country) times <- seq(60,100,by=1) cifmodl <-comp.risk(Surv(time,status>0)~-1+factor(country)+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1, max.clust=NULL,cens.model="aalen") pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) #+END_SRC #+RESULTS[3a9565317ffa0ac815d0b8676a289da2d10572ea]: [[file:pcifl.png]] #+BEGIN_SRC R theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, theta=c(2.8,6.9),score.method="fisher.scoring") summary(or.country) or.country$score #+END_SRC #+RESULTS[7b0909e7376f0bc518fa09900d0faa5504b4eb35]: : OR for dependence for competing risks : : OR of cumulative incidence for cause1= 2 and cause2= 2 : log-ratio Coef. SE z P-val Ratio SE : factor(zyg)DZ 0.754 0.117 6.43 1.26e-10 2.12 0.249 : factor(zyg)MZ 1.850 0.139 13.30 0.00e+00 6.36 0.883 : [,1] : [1,] -1.201999e-06 : [2,] 1.558011e-06 #+BEGIN_SRC R cifmodlr <-comp.risk(Surv(time,status>0)~+1+const(factor(country))+cluster(id),data=prt, prt$status,causeS=2,n.sim=0,times=times,conservative=1,max.clust=NULL,model="fg", cens.model="aalen",cens.formula=~~factor(country)) pciflr <- predict(cifmodlr,X=rep(1,4),Z=rbind(c(0,0,0),c(1,0,0),c(0,1,0),c(0,0,1)),se=0,uniform=0) #+END_SRC #+RESULTS[b70ab6a063342157649738da4117457be713c6ca]: #+BEGIN_SRC R :file pcif2.png par(mfrow=c(1,2)) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) plot(pciflr,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) #+END_SRC #+RESULTS[4e97b31907acfbd4f8064533912000ddedda8680]: [[file:pcif2.png]] #+BEGIN_SRC R or.countryr <- or.cif(cifmodlr,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE, theta=c(2.8,6.9),score.method="fisher.scoring") summary(or.countryr) #+END_SRC #+RESULTS[4d66db4836791d64d433bd93abfcb00959618d03]: : OR for dependence for competing risks : : OR of cumulative incidence for cause1= 2 and cause2= 2 : log-ratio Coef. SE z P-val Ratio SE : factor(zyg)DZ 0.756 0.117 6.48 9.33e-11 2.13 0.249 : factor(zyg)MZ 1.850 0.139 13.40 0.00e+00 6.38 0.886 * Concordance estimation #+BEGIN_SRC R :exports none ############################### ## Concordance estimation ############################### #+END_SRC #+RESULTS[427cc15fc9e022294eb2043a773da04da8e82118]: #+BEGIN_SRC R :exports code ### ignoring country p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1,robust=1) p33dz <- p33$model$"DZ"$comp.risk p33mz <- p33$model$"MZ"$comp.risk #+END_SRC #+RESULTS[8932fd1ccf114ddeeeb0391df5ca2ba75cb4c370]: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R :file p33dz.png plot(p33dz,se=0,ylim=c(0,0.1)) lines(p33mz$time,p33mz$P1,col=3) title(main="Concordance Prostate cancer") lines(pcif$time,pcif$P1^2,col=2) legend("topleft",c("DZ","MZ","Independence"),lty=rep(1,3),col=c(1,3,2)) #+END_SRC #+RESULTS[b9596e1acca186c1bee1349b9b05b9977fb5ef50]: [[file:p33dz.png]] #+BEGIN_SRC R ### test for genetic effect test.conc(p33dz,p33mz); #+END_SRC #+RESULTS[9c9ec963fc3e9462696c88b0009dab02aa5f614b]: : : Pepe-Mori type test for H_0: conc_1(t)= conc_2(t) : Assuming independence for estimators : Time.range = 60.9 -- 96.9 : : cum dif. sd z pval : pepe-mori 0.394 0.095 4.15 3.39e-05 #+BEGIN_SRC R data33mz <- p33$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) library(cmprsk) ftime <- data33$time fstatus <- data33$status table(fstatus) #+END_SRC #+RESULTS[628462f3bd06049b27328dc94b008d294734ae03]: : fstatus : 0 1 2 : 9597 106 4519 #+BEGIN_SRC R group <- data33$zyg graytest <- cuminc(ftime,fstatus,group) graytest #+END_SRC #+RESULTS[26895e594e7441d7fe558b95a48a3e51d1fba2ae]: #+begin_example Tests: stat pv df 1 28.82416 7.925617e-08 1 2 33.79236 6.131919e-09 1 Estimates and Variances: $est 20 40 60 80 100 0 1 0.0000000000 0.00000000 0.0001741916 0.006741025 0.01880244 1 1 0.0000000000 0.00000000 0.0006710172 0.017420360 0.05031415 0 2 0.0006970762 0.01974882 0.1141800067 0.504364854 0.93797293 1 2 0.0009363302 0.01655314 0.0948098327 0.443996722 0.90692430 $var 20 40 60 80 100 0 1 0.000000e+00 0.000000e+00 3.034323e-08 2.115863e-06 9.493584e-06 1 1 0.000000e+00 0.000000e+00 2.250627e-07 9.173278e-06 5.102841e-05 0 2 8.094463e-08 2.487399e-06 1.556735e-05 6.990685e-05 4.769058e-05 1 2 1.752378e-07 3.424511e-06 2.388136e-05 1.271394e-04 1.171775e-04 #+end_example #+BEGIN_SRC R zygeffect <- comp.risk(Surv(time,status==0)~const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffect) #+END_SRC #+RESULTS[9558b1e3ed54d186ed8d2737a0b224b1c1e0cfa1]: #+begin_example Competing risks Model Test for nonparametric terms Test for non-significant effects Supremum-test of significance p-value H_0: B(t)=0 (Intercept) 25.5 0 Test for time invariant effects Kolmogorov-Smirnov test p-value H_0:constant effect (Intercept) 2.23 0 Cramer von Mises test p-value H_0:constant effect (Intercept) 36.2 0 Parametric terms : Coef. SE Robust SE z P-val const(zyg) 0.977 0.22 0.22 4.44 9.06e-06 Call: comp.risk(Surv(time, status == 0) ~ const(zyg), data = data33, data33$status, causeS = 1, cens.model = "aalen", model = "logistic", conservative = 1) #+end_example #+BEGIN_SRC R :file casewise.png :exports both case33mz <- conc2case(p33mz,pcif) case33dz <- conc2case(p33dz,pcif) plot(case33mz$casewise,se=0,col=3) lines(case33dz$casewise$time,case33dz$casewise$P1) title(main="Probandwise concordance") legend("topleft",c("MZ","DZ","Independence"),lty=rep(1,3),col=c(3,1,2)) lines(pcif$time,pcif$P1,col=2) #+END_SRC #+RESULTS[e1f3cb818ffe61c18faaa163b47bb44042dac3e2]: [[file:casewise.png]] * Effect of zygosity correcting for country #+BEGIN_SRC R :exports none ############################### ## Effect of zygosity correcting for country ############################### #+END_SRC #+RESULTS[62c9e498baa4832188df750124c66a5a4c62ca39]: #+BEGIN_SRC R :exports code p33l <- bicomprisk(Hist(time,status)~country+strata(zyg)+id(id), data=prt,cause=c(2,2),return.data=1,robust=1) data33mz <- p33l$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33l$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) #+END_SRC #+RESULTS[57f0018902fc7413874798338801d0f077e6c1ff]: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R zygeffectl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffectl) #+END_SRC #+RESULTS[546357a033b899af074a09ad8835de2dbcaa1797]: #+begin_example Competing risks Model Test for nonparametric terms Test for non-significant effects Supremum-test of significance p-value H_0: B(t)=0 (Intercept) 16.1 0 Test for time invariant effects Kolmogorov-Smirnov test p-value H_0:constant effect (Intercept) 2.01 0 Cramer von Mises test p-value H_0:constant effect (Intercept) 35.9 0 Parametric terms : Coef. SE Robust SE z P-val const(country)Finland 1.160 0.419 0.419 2.77 5.54e-03 const(country)Norway 0.655 0.458 0.458 1.43 1.53e-01 const(country)Sweden 0.796 0.372 0.372 2.14 3.23e-02 const(zyg) 0.932 0.230 0.230 4.05 5.15e-05 Call: comp.risk(Surv(time, status == 0) ~ const(country) + const(zyg), data = data33, data33$status, causeS = 1, cens.model = "aalen", model = "logistic", conservative = 1) #+end_example #+BEGIN_SRC R :exports code zygeffectpl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="fg",conservative=1) #+END_SRC #+RESULTS[d08e50b4d5eccd70aa13799712a5300b532b7f5d]: #+BEGIN_SRC R print(summary(zygeffectpl)) #+END_SRC #+RESULTS[ce1c35673b56773ca49a2eb7e8a834094e7bbe6e]: #+begin_example Competing risks Model Test for nonparametric terms Test for non-significant effects Supremum-test of significance p-value H_0: B(t)=0 (Intercept) 2.83 0.012 Test for time invariant effects Kolmogorov-Smirnov test p-value H_0:constant effect (Intercept) 0.0101 0 Cramer von Mises test p-value H_0:constant effect (Intercept) 0.00115 0.004 Parametric terms : Coef. SE Robust SE z P-val const(country)Finland 1.140 0.412 0.412 2.77 5.63e-03 const(country)Norway 0.646 0.452 0.452 1.43 1.53e-01 const(country)Sweden 0.785 0.368 0.368 2.14 3.27e-02 const(zyg) 0.916 0.226 0.226 4.05 5.22e-05 Call: comp.risk(Surv(time, status == 0) ~ const(country) + const(zyg), data = data33, data33$status, causeS = 1, cens.model = "aalen", model = "fg", conservative = 1) NULL #+end_example #+BEGIN_SRC R zygeffectll <- comp.risk(Surv(time,status==0)~country+const(zyg), data=data33,data33$status,causeS=1, cens.model="aalen",model="logistic",conservative=1) #+END_SRC #+RESULTS[88eb5af960d328e425fca7e530c12ff3050dbb52]: #+BEGIN_SRC R print(summary(zygeffectll)) #+END_SRC #+RESULTS[5c4d614a2569c779d468a0ea4dfaee563e37f976]: #+begin_example Competing risks Model Test for nonparametric terms Test for non-significant effects Supremum-test of significance p-value H_0: B(t)=0 (Intercept) 75.70 0 countryFinland 441.00 0 countryNorway 6.09 0 countrySweden 703.00 0 Test for time invariant effects Kolmogorov-Smirnov test p-value H_0:constant effect (Intercept) 6.59 0.000 countryFinland 6.24 0.000 countryNorway 1.31 0.574 countrySweden 6.39 0.000 Cramer von Mises test p-value H_0:constant effect (Intercept) 200.0 0.0 countryFinland 1180.0 0.0 countryNorway 17.6 0.4 countrySweden 1300.0 0.0 Parametric terms : Coef. SE Robust SE z P-val const(zyg) 0.939 0.23 0.23 4.08 4.58e-05 WARNING problem with convergence for time points: 64.88587 66.74123 Readjust analyses by removing points Call: comp.risk(Surv(time, status == 0) ~ country + const(zyg), data = data33, data33$status, causeS = 1, cens.model = "aalen", model = "logistic", conservative = 1) NULL #+end_example * Liability model, ignoring censoring #+BEGIN_SRC R :exports none ############################### ## Liability model, ignoring censoring ############################### #+END_SRC #+RESULTS[79d6ea3c279ccbefe06219e2e93330dd564c8160]: #+BEGIN_SRC R (M <- with(prt, table(cancer,zyg))) #+END_SRC #+RESULTS[e2894667fe2c2fb9593c7184f9069f9ff4c27ae7]: : zyg : cancer DZ MZ : 0 17408 10872 : 1 583 359 #+BEGIN_SRC R coef(lm(cancer~-1+zyg,prt)) #+END_SRC #+RESULTS[1fc2a1cec8eed946e93f4499c5bd2ce40cb55c4b]: : zygDZ zygMZ : 0.03240509 0.03196510 #+BEGIN_SRC R ## Saturated model bpmz <- biprobit(cancer~1 + cluster(id), data=subset(prt,zyg=="MZ"), eqmarg=TRUE) logLik(bpmz) # Log-likelihood AIC(bpmz) # AIC coef(bpmz) # Parameter estimates vcov(bpmz) # Asymptotic covariance summary(bpmz) # concordance, case-wise, tetrachoric correlations, ... #+END_SRC R #+RESULTS[31dc25d5c08cc8e94c02d636645330df4012d49b]: #+begin_example 'log Lik.' -1472.972 (df=2) [1] 2949.943 (Intercept) atanh(rho) -1.8539454 0.8756506 (Intercept) atanh(rho) (Intercept) 0.0007089726 0.0003033296 atanh(rho) 0.0003033296 0.0044023587 Estimate Std.Err Z p-value (Intercept) -1.853945 0.026627 -69.627727 0 atanh(rho) 0.875651 0.066350 13.197393 0 n pairs 11231 5473 Score: -3.453e-05 5.123e-06 logLik: -1472.972 Variance of latent residual term = 1 (standard probit link) Estimate 2.5% 97.5% Tetrachoric correlation 0.70423 0.63252 0.76398 Concordance 0.01131 0.00886 0.01443 Case-wise/Conditional 0.35487 0.29391 0.42094 Marginal 0.03187 0.02834 0.03583 #+end_example #+BEGIN_SRC R :exports code bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt) #+END_SRC #+RESULTS[cba00830834c35f753cf4cf64b245caf08303a97]: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R summary(bp0) #+END_SRC #+RESULTS[e5e3737a364b026de5dbf414098405e10fc58c7a]: #+begin_example ------------------------------------------------------------ Strata 'DZ' Estimate Std.Err Z p-value (Intercept) -1.846841 0.019247 -95.955243 0 atanh(rho) 0.418065 0.050421 8.291446 0 n pairs 17991 8749 Score: -0.001841 -0.0006879 logLik: -2536.242 Variance of latent residual term = 1 (standard probit link) Estimate 2.5% 97.5% Tetrachoric correlation 0.39530 0.30882 0.47529 Concordance 0.00486 0.00361 0.00655 Case-wise/Conditional 0.15019 0.11459 0.19443 Marginal 0.03239 0.02976 0.03523 ------------------------------------------------------------ Strata 'MZ' Estimate Std.Err Z p-value (Intercept) -1.853945 0.026627 -69.627727 0 atanh(rho) 0.875651 0.066350 13.197393 0 n pairs 11231 5473 Score: -3.453e-05 5.123e-06 logLik: -1472.972 Variance of latent residual term = 1 (standard probit link) Estimate 2.5% 97.5% Tetrachoric correlation 0.70423 0.63252 0.76398 Concordance 0.01131 0.00886 0.01443 Case-wise/Conditional 0.35487 0.29391 0.42094 Marginal 0.03187 0.02834 0.03583 #+end_example #+BEGIN_SRC R ## Eq. marginals MZ/DZ bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt) summary(bp1) # Components (concordance,cor,...) can be extracted from returned list #+END_SRC #+RESULTS[cf616c979a103f0ee27e572ddbb94cb56851bdf4]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.849284 0.015601 -118.539777 0 atanh(rho) MZ 0.877667 0.065815 13.335456 0 atanh(rho) DZ 0.417475 0.050276 8.303615 0 Total MZ/DZ Complete pairs MZ/DZ 11231/17991 5473/8749 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.70525 0.63436 0.76438 Tetrachoric correlation DZ 0.39480 0.30854 0.47462 MZ: Estimate 2.5% 97.5% Concordance 0.01149 0.00942 0.01400 Probandwise Concordance 0.35672 0.29764 0.42049 Marginal 0.03221 0.03007 0.03449 DZ: Estimate 2.5% 97.5% Concordance 0.00482 0.00363 0.00640 Probandwise Concordance 0.14956 0.11441 0.19315 Marginal 0.03221 0.03007 0.03449 Estimate 2.5% 97.5% Broad-sense Heritability 0.62090 0.40145 0.79997 #+end_example #+BEGIN_SRC R compare(bp0,bp1) # LRT #+END_SRC #+RESULTS[20e744f4568946d8acc1da67d03b4fd25a9e4707]: : : Likelihood ratio test : : data: : chisq = 0.0468, df = 1, p-value = 0.8288 : sample estimates: : log likelihood (model 1) log likelihood (model 2) : -4009.213 -4009.237 Polygenic Libability model via te =bptwin= function (=type= can be a subset of "acde", or "flex" for stratitified, "u" for random effects model with same marginals for MZ and DZ) #+BEGIN_SRC R ## Polygenic model args(bptwin) #+END_SRC R #+RESULTS[881d9a46f5fc9fcf8680ea466e5be3dd178d7ffc]: : function (formula, data, id, zyg, DZ, OS, weight = NULL, biweight = function(x) 1/min(x), : strata = NULL, messages = 1, control = list(trace = 0), type = "ace", : eqmean = TRUE, pairsonly = FALSE, samecens = TRUE, allmarg = samecens & : !is.null(weight), stderr = TRUE, robustvar = TRUE, p, : indiv = FALSE, constrain, bound = FALSE, debug = FALSE, ...) : NULL #+BEGIN_SRC R bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp2) #+END_SRC #+RESULTS[457676d0740f60ff891c1d4eea5db64387cd72bc]: #+begin_example Estimate Std.Err Z p-value (Intercept) -3.40624 0.19032 -17.89736 0.0000 log(var(A)) 0.74503 0.25710 2.89787 0.0038 log(var(C)) -1.25112 1.04238 -1.20024 0.2300 Total MZ/DZ Complete pairs MZ/DZ 11231/17991 5473/8749 Estimate 2.5% 97.5% A 0.62090 0.40145 0.79997 C 0.08435 0.00910 0.48028 E 0.29475 0.23428 0.36343 MZ Tetrachoric Cor 0.70525 0.63436 0.76438 DZ Tetrachoric Cor 0.39480 0.30854 0.47462 MZ: Estimate 2.5% 97.5% Concordance 0.01149 0.00942 0.01400 Probandwise Concordance 0.35672 0.29764 0.42049 Marginal 0.03221 0.03007 0.03449 DZ: Estimate 2.5% 97.5% Concordance 0.00482 0.00363 0.00640 Probandwise Concordance 0.14956 0.11441 0.19315 Marginal 0.03221 0.03007 0.03449 Estimate 2.5% 97.5% Broad-sense Heritability 0.70525 0.63657 0.76572 #+end_example * Liability model, Inverse Probability Weighting #+BEGIN_SRC R :exports none ############################### ## Liability model, IPCW ############################### #+END_SRC #+RESULTS[a7458abca3644831514dc5eacaefdcfc4be850de]: #+BEGIN_SRC R :file ipw.png ## Probability weights based on Aalen's additive model prtw <- ipw(Surv(time,status==0)~country, data=prt, cluster="id",weightname="w") plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") count <- 0 for (l in unique(prtw$country)) { count <- count+1 prtw <- prtw[order(prtw$time),] with(subset(prtw,country==l), lines(time,w,col=count,lwd=2)) } legend("topright",legend=unique(prtw$country),col=1:4,pch=1) #+END_SRC #+RESULTS[561aef2bff0ca8538807fecb42f3fed7ca77963a]: [[file:ipw.png]] #+BEGIN_SRC R bpmzIPW <- biprobit(cancer~1 + cluster(id), data=subset(prtw,zyg=="MZ"), weight="w") (smz <- summary(bpmzIPW)) #+END_SRC #+RESULTS[a9be545d61f59041c45cc4a0ac0c40f4f8d5148a]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.226276 0.043074 -28.469378 0 atanh(rho) 0.912670 0.100316 9.097911 0 n pairs 2722 997 Score: 3.318e-05 -2.252e-05 logLik: -6703.246 Variance of latent residual term = 1 (standard probit link) Estimate 2.5% 97.5% Tetrachoric correlation 0.72241 0.61446 0.80381 Concordance 0.05490 0.04221 0.07113 Case-wise/Conditional 0.49887 0.41321 0.58460 Marginal 0.11005 0.09514 0.12696 #+end_example #+BEGIN_SRC R :file cif2.png ## CIF plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) abline(h=smz$prob["Marginal",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray") #+END_SRC R #+RESULTS[602b617012ad757420b7e1fc22f655f028bb5224]: [[file:cif2.png]] #+BEGIN_SRC R :file conc2.png ## Concordance plot(p33mz,ylim=c(0,0.1)) abline(h=smz$prob["Concordance",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray") #+END_SRC #+RESULTS[c116ced6b8d822fb4a49d794a8b485b139fdbecf]: [[file:conc2.png]] #+BEGIN_SRC R bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp3) #+END_SRC R #+RESULTS[d1eeda8bf7576f03d648b7052c5a778945ddfc31]: #+begin_example Estimate Std.Err Z p-value (Intercept) -2.31618 0.18673 -12.40359 0e+00 log(var(A)) 0.85390 0.22689 3.76347 2e-04 log(var(C)) -29.43218 1.13343 -25.96726 0e+00 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% A 0.70138 0.60090 0.78560 C 0.00000 0.00000 0.00000 E 0.29862 0.21440 0.39910 MZ Tetrachoric Cor 0.70138 0.59586 0.78310 DZ Tetrachoric Cor 0.35069 0.30328 0.39637 MZ: Estimate 2.5% 97.5% Concordance 0.04857 0.03963 0.05940 Probandwise Concordance 0.47238 0.39356 0.55260 Marginal 0.10281 0.09463 0.11161 DZ: Estimate 2.5% 97.5% Concordance 0.02515 0.02131 0.02965 Probandwise Concordance 0.24461 0.21892 0.27226 Marginal 0.10281 0.09463 0.11161 Estimate 2.5% 97.5% Broad-sense Heritability 0.70138 0.60090 0.78560 #+end_example #+BEGIN_SRC R bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp4) #+END_SRC R #+RESULTS[11d7e07eac47a4b69cd26a683e8896afc28c7cdf]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.266427 0.024091 -52.568381 0 atanh(rho) MZ 0.898548 0.098841 9.090866 0 atanh(rho) DZ 0.312574 0.073668 4.243006 0 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.71559 0.60742 0.79771 Tetrachoric correlation DZ 0.30278 0.16662 0.42760 MZ: Estimate 2.5% 97.5% Concordance 0.04974 0.04044 0.06104 Probandwise Concordance 0.48442 0.40185 0.56785 Marginal 0.10268 0.09453 0.11144 DZ: Estimate 2.5% 97.5% Concordance 0.02269 0.01667 0.03081 Probandwise Concordance 0.22097 0.16448 0.29013 Marginal 0.10268 0.09453 0.11144 Estimate 2.5% 97.5% Broad-sense Heritability 0.82563 0.33329 0.97819 #+end_example #+BEGIN_SRC R score(bp4) ## Check convergence #+END_SRC #+RESULTS[7e7a3cdc22554b0e037a60127143f39ed6ab7644]: : [1] 2.729971e-07 -8.463577e-08 -5.014015e-09 #+BEGIN_SRC R bp5 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ade",data=prtw,weight="w") summary(bp5) #+END_SRC #+RESULTS[1ac29f4140a27d60b2657f9a43b50e1b10c8a785]: #+begin_example Estimate Std.Err Z p-value (Intercept) -2.37470 0.20268 -11.71665 0.0000 log(var(A)) 0.55519 0.54480 1.01905 0.3082 log(var(D)) -0.25645 1.36092 -0.18844 0.8505 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% A 0.49552 0.10422 0.89238 D 0.22007 0.01081 0.87931 E 0.28441 0.19987 0.38740 MZ Tetrachoric Cor 0.71559 0.60742 0.79771 DZ Tetrachoric Cor 0.30278 0.16662 0.42760 MZ: Estimate 2.5% 97.5% Concordance 0.04974 0.04044 0.06104 Probandwise Concordance 0.48442 0.40185 0.56785 Marginal 0.10268 0.09453 0.11144 DZ: Estimate 2.5% 97.5% Concordance 0.02269 0.01667 0.03081 Probandwise Concordance 0.22097 0.16448 0.29013 Marginal 0.10268 0.09453 0.11144 Estimate 2.5% 97.5% Broad-sense Heritability 0.71559 0.61260 0.80013 #+end_example * Liability model, adjusting for covariates #+BEGIN_SRC R :exports none ############################### ## Adjusting for covariates ############################### #+END_SRC #+RESULTS[a3b0a6e83da2e17fa9c6d005008baa29b2dd935f]: Main effect of country #+BEGIN_SRC R bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp6) #+END_SRC #+RESULTS[872f7096d70f85e257b9f257d0ed18c2fc529d86]: #+begin_example Warning message: In sqrt(diag(V)) : NaNs produced Estimate Std.Err Z p-value (Intercept) -2.81553 0.23889 -11.78590 0e+00 countryFinland 0.87558 0.16123 5.43061 0e+00 countryNorway 0.68483 0.17762 3.85567 1e-04 countrySweden 0.77248 0.12350 6.25468 0e+00 log(var(A)) 0.77724 0.23186 3.35220 8e-04 log(var(C)) -28.96268 NA NA NA Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% A 0.68509 0.58001 0.77411 C 0.00000 0.00000 0.00000 E 0.31491 0.22589 0.41999 MZ Tetrachoric Cor 0.68509 0.57428 0.77124 DZ Tetrachoric Cor 0.34254 0.29262 0.39060 MZ: Estimate 2.5% 97.5% Concordance 0.02236 0.01588 0.03141 Probandwise Concordance 0.39194 0.30778 0.48305 Marginal 0.05705 0.04654 0.06977 DZ: Estimate 2.5% 97.5% Concordance 0.00989 0.00700 0.01394 Probandwise Concordance 0.17329 0.14505 0.20570 Marginal 0.05705 0.04654 0.06977 Estimate 2.5% 97.5% Broad-sense Heritability 0.68509 0.58001 0.77411 #+end_example Stratified analysis #+BEGIN_SRC R bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp7) #+END_SRC #+RESULTS[41de52429860b59b7751a8d685e1b2019a40fdba]: #+begin_example Estimate Std.Err Z p-value (Intercept) -1.581478 0.051318 -30.817030 0e+00 countryFinland 0.491725 0.081517 6.032155 0e+00 countryNorway 0.385830 0.094254 4.093497 0e+00 countrySweden 0.433789 0.060648 7.152599 0e+00 atanh(rho) MZ 0.884166 0.099366 8.898113 0e+00 atanh(rho) DZ 0.271770 0.073240 3.710668 2e-04 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.70850 0.59760 0.79280 Tetrachoric correlation DZ 0.26527 0.12752 0.39298 MZ: Estimate 2.5% 97.5% Concordance 0.02347 0.01664 0.03300 Probandwise Concordance 0.41255 0.32395 0.50721 Marginal 0.05688 0.04643 0.06953 DZ: Estimate 2.5% 97.5% Concordance 0.00794 0.00489 0.01287 Probandwise Concordance 0.13966 0.09312 0.20421 Marginal 0.05688 0.04643 0.06953 Estimate 2.5% 97.5% Broad-sense Heritability 0.88646 0.22665 0.99521 #+end_example #+BEGIN_SRC R :exports code bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") #+END_SRC #+RESULTS[7fa9adcc3baa465e73acf37b3d3cf5028ce25fe0]: : Strata 'Denmark' : Strata 'Finland' : Strata 'Norway' : Strata 'Sweden' #+BEGIN_SRC R summary(bp8) #+END_SRC #+RESULTS[f31101c27ef10245c1bafef45d4aefbafab0db9c]: #+begin_example ------------------------------------------------------------ Strata 'Denmark' Estimate Std.Err Z p-value (Intercept) -1.583608 0.051241 -30.904856 0.0000 atanh(rho) MZ 0.992896 0.217349 4.568215 0.0000 atanh(rho) DZ 0.070588 0.186956 0.377566 0.7058 Total MZ/DZ Complete pairs MZ/DZ 760/1611 287/589 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.75859 0.51308 0.88937 Tetrachoric correlation DZ 0.07047 -0.28750 0.41117 MZ: Estimate 2.5% 97.5% Concordance 0.02611 0.01584 0.04274 Probandwise Concordance 0.46093 0.28426 0.64799 Marginal 0.05664 0.04623 0.06922 DZ: Estimate 2.5% 97.5% Concordance 0.00420 0.00110 0.01596 Probandwise Concordance 0.07422 0.01888 0.25037 Marginal 0.05664 0.04623 0.06922 Estimate 2.5% 97.5% Broad-sense Heritability 1 NaN NaN ------------------------------------------------------------ Strata 'Finland' Estimate Std.Err Z p-value (Intercept) -1.087902 0.063221 -17.207912 0.0000 atanh(rho) MZ 0.859335 0.302752 2.838410 0.0045 atanh(rho) DZ 0.393145 0.179942 2.184840 0.0289 Total MZ/DZ Complete pairs MZ/DZ 392/1001 134/316 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.69592 0.25985 0.89623 Tetrachoric correlation DZ 0.37407 0.04044 0.63265 MZ: Estimate 2.5% 97.5% Concordance 0.07008 0.03975 0.12064 Probandwise Concordance 0.50666 0.27641 0.73412 Marginal 0.13832 0.11316 0.16801 DZ: Estimate 2.5% 97.5% Concordance 0.04160 0.02237 0.07607 Probandwise Concordance 0.30073 0.16558 0.48242 Marginal 0.13832 0.11316 0.16801 Estimate 2.5% 97.5% Broad-sense Heritability 0.64369 0.04069 0.98717 ------------------------------------------------------------ Strata 'Norway' Estimate Std.Err Z p-value (Intercept) -1.192293 0.079124 -15.068598 0.0000 atanh(rho) MZ 0.916471 0.301133 3.043409 0.0023 atanh(rho) DZ 0.533761 0.252070 2.117509 0.0342 Total MZ/DZ Complete pairs MZ/DZ 387/618 115/155 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.72422 0.31516 0.90635 Tetrachoric correlation DZ 0.48825 0.03969 0.77303 MZ: Estimate 2.5% 97.5% Concordance 0.05918 0.03218 0.10633 Probandwise Concordance 0.50764 0.27633 0.73572 Marginal 0.11657 0.08945 0.15057 DZ: Estimate 2.5% 97.5% Concordance 0.03945 0.01840 0.08257 Probandwise Concordance 0.33842 0.15583 0.58636 Marginal 0.11657 0.08945 0.15057 Estimate 2.5% 97.5% Broad-sense Heritability 0.47195 0.01989 0.97522 ------------------------------------------------------------ Strata 'Sweden' Estimate Std.Err Z p-value (Intercept) -1.149412 0.032155 -35.745836 0.0000 atanh(rho) MZ 0.836864 0.125476 6.669520 0.0000 atanh(rho) DZ 0.199677 0.092907 2.149202 0.0316 Total MZ/DZ Complete pairs MZ/DZ 1183/1987 461/749 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.68414 0.53057 0.79423 Tetrachoric correlation DZ 0.19706 0.01758 0.36425 MZ: Estimate 2.5% 97.5% Concordance 0.06055 0.04659 0.07835 Probandwise Concordance 0.48365 0.38001 0.58872 Marginal 0.12519 0.11277 0.13877 DZ: Estimate 2.5% 97.5% Concordance 0.02515 0.01672 0.03766 Probandwise Concordance 0.20088 0.13541 0.28746 Marginal 0.12519 0.11277 0.13877 Estimate 2.5% 97.5% Broad-sense Heritability 0.97416 0.00000 1.00000 #+end_example #+BEGIN_SRC R ## Wald test B <- (lava::contrmat(3,4))[-(1:3),] compare(bp8,contrast=B) #+END_SRC #+RESULTS[9edfe2c630260ff8b73d31c834163fd28fe0b862]: : : Wald test : : data: : chisq = 3.4972, df = 6, p-value = 0.7443 * Cumulative heritability #+BEGIN_SRC R :exports none ############################### ## Cumulative heritability ############################### #+END_SRC #+RESULTS[ea88384cdfd337305a3a4d37a3e08367283cddf2]: #+BEGIN_SRC R args(cumh) #+END_SRC #+RESULTS[64bc6b411e2b3bec2b118d7b3f47c4cb8d0487a0]: : function (formula, data, ..., time, timestrata = quantile(data[, : time], c(0.25, 0.5, 0.75, 1)), cumulative = TRUE, silent = FALSE) : NULL #+BEGIN_SRC R :exports code ch1 <- cumh(cancer~1,time="time",zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") #+END_SRC R #+RESULTS[1890daf4d97a78df80a124ea5530a4152cf521ba]: : 65.5691955406266 : 76.4446739437236 : 85.8807708995545 : 117.622394945129 #+BEGIN_SRC R summary(ch1) #+END_SRC #+RESULTS[a501b9faea5a7237b247de20e21e66623b18d524]: : time Heritability Std.Err 2.5% 97.5% : 65.5691955406266 65.56920 0.7038286 0.10969626 0.4586422 0.8695520 : 76.4446739437236 76.44467 0.6757445 0.06363443 0.5411756 0.7864218 : 85.8807708995545 85.88077 0.6204174 0.05652481 0.5052219 0.7234726 : 117.622394945129 117.62239 0.7013847 0.04752116 0.6008962 0.7855993 #+BEGIN_SRC R :file cumh.png plot(ch1) #+END_SRC #+RESULTS[db2530ffda6ac40a43b1e74724910f30bbeacf04]: [[file:cumh.png]] ----- mets/inst/misc/obs/workshop.html0000644000176200001440000013130413623061405016461 0ustar liggesusers Analyzing twin data with <code>mets</code>

Analyzing twin data with mets

1 Installation

Set repositories (see also chooseCRANmirror, chooseBioCmirror) and install dependencies (R >=2.14)

setRepositories() ## Choose CRAN and BioC Software (BioConductor)
install.packages(c("mets","cmprsk"))

OBS: At this point you might have to restart R to flush the cache of previously installed versions of the packages. If you have previously installed timereg and lava, make sure that you have the current versions installed (timereg: 1.6-5, lava: 1.0-5).

2 Load simulated data

library(mets)
data(prt)

3 Estimation of cumulative incidence

times <- seq(60,100,by=1)
cifmod <- comp.risk(Surv(time,status>0)~+1+cluster(id),data=prt,prt$status,causeS=2,n.sim=0,
                  times=times,conservative=1,max.clust=NULL,model="fg")

theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status
or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE,
              score.method="fisher.scoring")
summary(or1)
or1$score

pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0)
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE     z    P-val Ratio    SE
factor(zyg)DZ            0.80 0.111  7.23 4.86e-13  2.22 0.246
factor(zyg)MZ            2.09 0.138 15.10 0.00e+00  8.07 1.110
             [,1]
[1,] 1.325225e-06
[2,] 3.458932e-06
plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15))

pcif.png

4 Correcting for country

table(prt$country)

times <- seq(60,100,by=1)
cifmodl <-comp.risk(Surv(time,status>0)~-1+factor(country)+cluster(id),data=prt,
                    prt$status,causeS=2,n.sim=0,times=times,conservative=1,
                    max.clust=NULL,cens.model="aalen")
pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0)
plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2))
legend("topleft",levels(prt$country),col=1:4,lty=1)

pcifl.png

theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status
or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE,
                     theta=c(2.8,6.9),score.method="fisher.scoring")
summary(or.country)
or.country$score
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE     z    P-val Ratio    SE
factor(zyg)DZ           0.754 0.117  6.43 1.26e-10  2.12 0.249
factor(zyg)MZ           1.850 0.139 13.30 0.00e+00  6.36 0.883
              [,1]
[1,] -1.201999e-06
[2,]  1.558011e-06
cifmodlr <-comp.risk(Surv(time,status>0)~+1+const(factor(country))+cluster(id),data=prt,
                    prt$status,causeS=2,n.sim=0,times=times,conservative=1,max.clust=NULL,model="fg",
                    cens.model="aalen",cens.formula=~~factor(country))
pciflr <- predict(cifmodlr,X=rep(1,4),Z=rbind(c(0,0,0),c(1,0,0),c(0,1,0),c(0,0,1)),se=0,uniform=0)
par(mfrow=c(1,2))
plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2))
legend("topleft",levels(prt$country),col=1:4,lty=1)
plot(pciflr,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2))
legend("topleft",levels(prt$country),col=1:4,lty=1)

pcif2.png

or.countryr <- or.cif(cifmodlr,data=prt,cause1=2,cause2=2,theta.des=theta.des,same.cens=TRUE,
                     theta=c(2.8,6.9),score.method="fisher.scoring")
summary(or.countryr)
OR for dependence for competing risks

OR of cumulative incidence for cause1= 2  and cause2= 2
              log-ratio Coef.    SE     z    P-val Ratio    SE
factor(zyg)DZ           0.756 0.117  6.48 9.33e-11  2.13 0.249
factor(zyg)MZ           1.850 0.139 13.40 0.00e+00  6.38 0.886

5 Concordance estimation

### ignoring country 
p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1,robust=1)

p33dz <- p33$model$"DZ"$comp.risk
p33mz <- p33$model$"MZ"$comp.risk
plot(p33dz,se=0,ylim=c(0,0.1))
lines(p33mz$time,p33mz$P1,col=3)
title(main="Concordance Prostate cancer")
lines(pcif$time,pcif$P1^2,col=2)
legend("topleft",c("DZ","MZ","Independence"),lty=rep(1,3),col=c(1,3,2))

p33dz.png

### test for genetic effect 
test.conc(p33dz,p33mz); 

Pepe-Mori type test for H_0: conc_1(t)= conc_2(t)
Assuming independence for estimators
Time.range = 60.9 -- 96.9 

          cum dif.    sd    z     pval
pepe-mori    0.394 0.095 4.15 3.39e-05
data33mz <- p33$model$"MZ"$data
data33mz$zyg <- 1
data33dz <- p33$model$"DZ"$data
data33dz$zyg <- 0
data33 <- rbind(data33mz,data33dz)

library(cmprsk)
ftime <- data33$time
fstatus <- data33$status
table(fstatus)
fstatus
   0    1    2 
9597  106 4519
group <- data33$zyg
graytest <- cuminc(ftime,fstatus,group)
graytest
Tests:
      stat           pv df
1 28.82416 7.925617e-08  1
2 33.79236 6.131919e-09  1
Estimates and Variances:
$est
              20         40           60          80        100
0 1 0.0000000000 0.00000000 0.0001741916 0.006741025 0.01880244
1 1 0.0000000000 0.00000000 0.0006710172 0.017420360 0.05031415
0 2 0.0006970762 0.01974882 0.1141800067 0.504364854 0.93797293
1 2 0.0009363302 0.01655314 0.0948098327 0.443996722 0.90692430

$var
              20           40           60           80          100
0 1 0.000000e+00 0.000000e+00 3.034323e-08 2.115863e-06 9.493584e-06
1 1 0.000000e+00 0.000000e+00 2.250627e-07 9.173278e-06 5.102841e-05
0 2 8.094463e-08 2.487399e-06 1.556735e-05 6.990685e-05 4.769058e-05
1 2 1.752378e-07 3.424511e-06 2.388136e-05 1.271394e-04 1.171775e-04
zygeffect <- comp.risk(Surv(time,status==0)~const(zyg),
                  data=data33,data33$status,causeS=1,
                  cens.model="aalen",model="logistic",conservative=1)
summary(zygeffect)
Competing risks Model 

Test for nonparametric terms 

Test for non-significant effects 
            Supremum-test of significance p-value H_0: B(t)=0
(Intercept)                          25.5                   0

Test for time invariant effects 
                  Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept)                          2.23                           0
                    Cramer von Mises test p-value H_0:constant effect
(Intercept)                          36.2                           0

Parametric terms : 
           Coef.   SE Robust SE    z    P-val
const(zyg) 0.977 0.22      0.22 4.44 9.06e-06
   
  Call: 
comp.risk(Surv(time, status == 0) ~ const(zyg), data = data33, 
    data33$status, causeS = 1, cens.model = "aalen", model = "logistic", 
    conservative = 1)
case33mz <- conc2case(p33mz,pcif)
case33dz <- conc2case(p33dz,pcif)

plot(case33mz$casewise,se=0,col=3)
lines(case33dz$casewise$time,case33dz$casewise$P1)
title(main="Probandwise concordance")
legend("topleft",c("MZ","DZ","Independence"),lty=rep(1,3),col=c(3,1,2))
lines(pcif$time,pcif$P1,col=2)

casewise.png

6 Effect of zygosity correcting for country

p33l <- bicomprisk(Hist(time,status)~country+strata(zyg)+id(id),
                data=prt,cause=c(2,2),return.data=1,robust=1)

data33mz <- p33l$model$"MZ"$data
data33mz$zyg <- 1
data33dz <- p33l$model$"DZ"$data
data33dz$zyg <- 0
data33 <- rbind(data33mz,data33dz)
zygeffectl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg),
                  data=data33,data33$status,causeS=1,
                  cens.model="aalen",model="logistic",conservative=1)
summary(zygeffectl)
Competing risks Model 

Test for nonparametric terms 

Test for non-significant effects 
            Supremum-test of significance p-value H_0: B(t)=0
(Intercept)                          16.1                   0

Test for time invariant effects 
                  Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept)                          2.01                           0
                    Cramer von Mises test p-value H_0:constant effect
(Intercept)                          35.9                           0

Parametric terms : 
                      Coef.    SE Robust SE    z    P-val
const(country)Finland 1.160 0.419     0.419 2.77 5.54e-03
const(country)Norway  0.655 0.458     0.458 1.43 1.53e-01
const(country)Sweden  0.796 0.372     0.372 2.14 3.23e-02
const(zyg)            0.932 0.230     0.230 4.05 5.15e-05
   
  Call: 
comp.risk(Surv(time, status == 0) ~ const(country) + const(zyg), 
    data = data33, data33$status, causeS = 1, cens.model = "aalen", 
    model = "logistic", conservative = 1)
zygeffectpl <- comp.risk(Surv(time,status==0)~const(country)+const(zyg),
                  data=data33,data33$status,causeS=1,
                  cens.model="aalen",model="fg",conservative=1)
print(summary(zygeffectpl))
Competing risks Model 

Test for nonparametric terms 

Test for non-significant effects 
            Supremum-test of significance p-value H_0: B(t)=0
(Intercept)                          2.83               0.012

Test for time invariant effects 
                  Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept)                        0.0101                           0
                    Cramer von Mises test p-value H_0:constant effect
(Intercept)                       0.00115                       0.004

Parametric terms : 
                      Coef.    SE Robust SE    z    P-val
const(country)Finland 1.140 0.412     0.412 2.77 5.63e-03
const(country)Norway  0.646 0.452     0.452 1.43 1.53e-01
const(country)Sweden  0.785 0.368     0.368 2.14 3.27e-02
const(zyg)            0.916 0.226     0.226 4.05 5.22e-05
   
  Call: 
comp.risk(Surv(time, status == 0) ~ const(country) + const(zyg), 
    data = data33, data33$status, causeS = 1, cens.model = "aalen", 
    model = "fg", conservative = 1)

NULL
zygeffectll <- comp.risk(Surv(time,status==0)~country+const(zyg),
                         data=data33,data33$status,causeS=1,
                         cens.model="aalen",model="logistic",conservative=1)
print(summary(zygeffectll))
Competing risks Model 

Test for nonparametric terms 

Test for non-significant effects 
               Supremum-test of significance p-value H_0: B(t)=0
(Intercept)                            75.70                   0
countryFinland                        441.00                   0
countryNorway                           6.09                   0
countrySweden                         703.00                   0

Test for time invariant effects 
                     Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept)                             6.59                       0.000
countryFinland                          6.24                       0.000
countryNorway                           1.31                       0.574
countrySweden                           6.39                       0.000
                       Cramer von Mises test p-value H_0:constant effect
(Intercept)                            200.0                         0.0
countryFinland                        1180.0                         0.0
countryNorway                           17.6                         0.4
countrySweden                         1300.0                         0.0

Parametric terms : 
           Coef.   SE Robust SE    z    P-val
const(zyg) 0.939 0.23      0.23 4.08 4.58e-05
   
WARNING problem with convergence for time points:
64.88587 66.74123
Readjust analyses by removing points

  Call: 
comp.risk(Surv(time, status == 0) ~ country + const(zyg), data = data33, 
    data33$status, causeS = 1, cens.model = "aalen", model = "logistic", 
    conservative = 1)

NULL

7 Liability model, ignoring censoring

(M <- with(prt, table(cancer,zyg)))
      zyg
cancer    DZ    MZ
     0 17408 10872
     1   583   359
coef(lm(cancer~-1+zyg,prt))
     zygDZ      zygMZ 
0.03240509 0.03196510
## Saturated model
bpmz <- 
    biprobit(cancer~1 + cluster(id), 
             data=subset(prt,zyg=="MZ"), eqmarg=TRUE)

logLik(bpmz) # Log-likelihood
AIC(bpmz) # AIC
coef(bpmz) # Parameter estimates
vcov(bpmz) # Asymptotic covariance
summary(bpmz) # concordance, case-wise, tetrachoric correlations, ...
'log Lik.' -1472.972 (df=2)
[1] 2949.943
(Intercept)  atanh(rho) 
 -1.8539454   0.8756506
             (Intercept)   atanh(rho)
(Intercept) 0.0007089726 0.0003033296
atanh(rho)  0.0003033296 0.0044023587

              Estimate    Std.Err          Z p-value
(Intercept)  -1.853945   0.026627 -69.627727       0
atanh(rho)    0.875651   0.066350  13.197393       0

    n pairs 
11231  5473 
Score: -3.453e-05 5.123e-06
logLik: -1472.972 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.70423  0.63252 0.76398
Concordance             0.01131  0.00886 0.01443
Case-wise/Conditional   0.35487  0.29391 0.42094
Marginal                0.03187  0.02834 0.03583
bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt)
summary(bp0)
------------------------------------------------------------
Strata 'DZ'

              Estimate    Std.Err          Z p-value
(Intercept)  -1.846841   0.019247 -95.955243       0
atanh(rho)    0.418065   0.050421   8.291446       0

    n pairs 
17991  8749 
Score: -0.001841 -0.0006879
logLik: -2536.242 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.39530  0.30882 0.47529
Concordance             0.00486  0.00361 0.00655
Case-wise/Conditional   0.15019  0.11459 0.19443
Marginal                0.03239  0.02976 0.03523

------------------------------------------------------------
Strata 'MZ'

              Estimate    Std.Err          Z p-value
(Intercept)  -1.853945   0.026627 -69.627727       0
atanh(rho)    0.875651   0.066350  13.197393       0

    n pairs 
11231  5473 
Score: -3.453e-05 5.123e-06
logLik: -1472.972 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.70423  0.63252 0.76398
Concordance             0.01131  0.00886 0.01443
Case-wise/Conditional   0.35487  0.29391 0.42094
Marginal                0.03187  0.02834 0.03583
## Eq. marginals MZ/DZ
bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt)
summary(bp1) # Components (concordance,cor,...) can be extracted from returned list
                 Estimate     Std.Err           Z p-value
(Intercept)     -1.849284    0.015601 -118.539777       0
atanh(rho) MZ    0.877667    0.065815   13.335456       0
atanh(rho) DZ    0.417475    0.050276    8.303615       0

 Total MZ/DZ Complete pairs MZ/DZ
 11231/17991 5473/8749           

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.70525  0.63436 0.76438
Tetrachoric correlation DZ 0.39480  0.30854 0.47462

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.01149  0.00942 0.01400
Probandwise Concordance 0.35672  0.29764 0.42049
Marginal                0.03221  0.03007 0.03449
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.00482  0.00363 0.00640
Probandwise Concordance 0.14956  0.11441 0.19315
Marginal                0.03221  0.03007 0.03449

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.62090  0.40145 0.79997
compare(bp0,bp1) # LRT

      Likelihood ratio test

data:  
chisq = 0.0468, df = 1, p-value = 0.8288
sample estimates:
log likelihood (model 1) log likelihood (model 2) 
               -4009.213                -4009.237

Polygenic Libability model via te bptwin function (type can be a subset of "acde", or "flex" for stratitified, "u" for random effects model with same marginals for MZ and DZ)

## Polygenic model
args(bptwin)
function (formula, data, id, zyg, DZ, OS, weight = NULL, biweight = function(x) 1/min(x), 
    strata = NULL, messages = 1, control = list(trace = 0), type = "ace", 
    eqmean = TRUE, pairsonly = FALSE, samecens = TRUE, allmarg = samecens & 
        !is.null(weight), stderr = TRUE, robustvar = TRUE, p, 
    indiv = FALSE, constrain, bound = FALSE, debug = FALSE, ...) 
NULL
bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt)
summary(bp2)
             Estimate   Std.Err         Z p-value
(Intercept)  -3.40624   0.19032 -17.89736  0.0000
log(var(A))   0.74503   0.25710   2.89787  0.0038
log(var(C))  -1.25112   1.04238  -1.20024  0.2300

 Total MZ/DZ Complete pairs MZ/DZ
 11231/17991 5473/8749           

                   Estimate 2.5%    97.5%  
A                  0.62090  0.40145 0.79997
C                  0.08435  0.00910 0.48028
E                  0.29475  0.23428 0.36343
MZ Tetrachoric Cor 0.70525  0.63436 0.76438
DZ Tetrachoric Cor 0.39480  0.30854 0.47462

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.01149  0.00942 0.01400
Probandwise Concordance 0.35672  0.29764 0.42049
Marginal                0.03221  0.03007 0.03449
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.00482  0.00363 0.00640
Probandwise Concordance 0.14956  0.11441 0.19315
Marginal                0.03221  0.03007 0.03449

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.70525  0.63657 0.76572

8 Liability model, Inverse Probability Weighting

## Probability weights based on Aalen's additive model 
prtw <- ipw(Surv(time,status==0)~country, data=prt,
            cluster="id",weightname="w") 
plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability")
count <- 0
for (l in unique(prtw$country)) {
    count <- count+1
    prtw <- prtw[order(prtw$time),]
    with(subset(prtw,country==l), 
         lines(time,w,col=count,lwd=2))
}
legend("topright",legend=unique(prtw$country),col=1:4,pch=1)

ipw.png

bpmzIPW <- 
              biprobit(cancer~1 + cluster(id), 
                       data=subset(prtw,zyg=="MZ"), 
                       weight="w")
(smz <- summary(bpmzIPW))
              Estimate    Std.Err          Z p-value
(Intercept)  -1.226276   0.043074 -28.469378       0
atanh(rho)    0.912670   0.100316   9.097911       0

    n pairs 
 2722   997 
Score: 3.318e-05 -2.252e-05
logLik: -6703.246 
Variance of latent residual term = 1 (standard probit link) 

                        Estimate 2.5%    97.5%  
Tetrachoric correlation 0.72241  0.61446 0.80381
Concordance             0.05490  0.04221 0.07113
Case-wise/Conditional   0.49887  0.41321 0.58460
Marginal                0.11005  0.09514 0.12696
## CIF
plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15))
abline(h=smz$prob["Marginal",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray")

cif2.png

## Concordance
plot(p33mz,ylim=c(0,0.1))
abline(h=smz$prob["Concordance",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray")

conc2.png

bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp3)
             Estimate   Std.Err         Z p-value
(Intercept)  -2.31618   0.18673 -12.40359   0e+00
log(var(A))   0.85390   0.22689   3.76347   2e-04
log(var(C)) -29.43218   1.13343 -25.96726   0e+00

 Total MZ/DZ Complete pairs MZ/DZ
 2722/5217   997/1809            

                   Estimate 2.5%    97.5%  
A                  0.70138  0.60090 0.78560
C                  0.00000  0.00000 0.00000
E                  0.29862  0.21440 0.39910
MZ Tetrachoric Cor 0.70138  0.59586 0.78310
DZ Tetrachoric Cor 0.35069  0.30328 0.39637

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.04857  0.03963 0.05940
Probandwise Concordance 0.47238  0.39356 0.55260
Marginal                0.10281  0.09463 0.11161
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02515  0.02131 0.02965
Probandwise Concordance 0.24461  0.21892 0.27226
Marginal                0.10281  0.09463 0.11161

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.70138  0.60090 0.78560
bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp4)
                Estimate    Std.Err          Z p-value
(Intercept)    -1.266427   0.024091 -52.568381       0
atanh(rho) MZ   0.898548   0.098841   9.090866       0
atanh(rho) DZ   0.312574   0.073668   4.243006       0

 Total MZ/DZ Complete pairs MZ/DZ
 2722/5217   997/1809            

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.71559  0.60742 0.79771
Tetrachoric correlation DZ 0.30278  0.16662 0.42760

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.04974  0.04044 0.06104
Probandwise Concordance 0.48442  0.40185 0.56785
Marginal                0.10268  0.09453 0.11144
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02269  0.01667 0.03081
Probandwise Concordance 0.22097  0.16448 0.29013
Marginal                0.10268  0.09453 0.11144

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.82563  0.33329 0.97819
score(bp4) ## Check convergence
[1]  2.729971e-07 -8.463577e-08 -5.014015e-09
bp5 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="ade",data=prtw,weight="w")
summary(bp5)
             Estimate   Std.Err         Z p-value
(Intercept)  -2.37470   0.20268 -11.71665  0.0000
log(var(A))   0.55519   0.54480   1.01905  0.3082
log(var(D))  -0.25645   1.36092  -0.18844  0.8505

 Total MZ/DZ Complete pairs MZ/DZ
 2722/5217   997/1809            

                   Estimate 2.5%    97.5%  
A                  0.49552  0.10422 0.89238
D                  0.22007  0.01081 0.87931
E                  0.28441  0.19987 0.38740
MZ Tetrachoric Cor 0.71559  0.60742 0.79771
DZ Tetrachoric Cor 0.30278  0.16662 0.42760

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.04974  0.04044 0.06104
Probandwise Concordance 0.48442  0.40185 0.56785
Marginal                0.10268  0.09453 0.11144
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02269  0.01667 0.03081
Probandwise Concordance 0.22097  0.16448 0.29013
Marginal                0.10268  0.09453 0.11144

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.71559  0.61260 0.80013

9 Liability model, adjusting for covariates

Main effect of country

bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp6)
Warning message:
In sqrt(diag(V)) : NaNs produced

                Estimate   Std.Err         Z p-value
(Intercept)     -2.81553   0.23889 -11.78590   0e+00
countryFinland   0.87558   0.16123   5.43061   0e+00
countryNorway    0.68483   0.17762   3.85567   1e-04
countrySweden    0.77248   0.12350   6.25468   0e+00
log(var(A))      0.77724   0.23186   3.35220   8e-04
log(var(C))    -28.96268        NA        NA      NA

 Total MZ/DZ Complete pairs MZ/DZ
 2722/5217   997/1809            

                   Estimate 2.5%    97.5%  
A                  0.68509  0.58001 0.77411
C                  0.00000  0.00000 0.00000
E                  0.31491  0.22589 0.41999
MZ Tetrachoric Cor 0.68509  0.57428 0.77124
DZ Tetrachoric Cor 0.34254  0.29262 0.39060

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02236  0.01588 0.03141
Probandwise Concordance 0.39194  0.30778 0.48305
Marginal                0.05705  0.04654 0.06977
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.00989  0.00700 0.01394
Probandwise Concordance 0.17329  0.14505 0.20570
Marginal                0.05705  0.04654 0.06977

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.68509  0.58001 0.77411

Stratified analysis

bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp7)
                 Estimate    Std.Err          Z p-value
(Intercept)     -1.581478   0.051318 -30.817030   0e+00
countryFinland   0.491725   0.081517   6.032155   0e+00
countryNorway    0.385830   0.094254   4.093497   0e+00
countrySweden    0.433789   0.060648   7.152599   0e+00
atanh(rho) MZ    0.884166   0.099366   8.898113   0e+00
atanh(rho) DZ    0.271770   0.073240   3.710668   2e-04

 Total MZ/DZ Complete pairs MZ/DZ
 2722/5217   997/1809            

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.70850  0.59760 0.79280
Tetrachoric correlation DZ 0.26527  0.12752 0.39298

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02347  0.01664 0.03300
Probandwise Concordance 0.41255  0.32395 0.50721
Marginal                0.05688  0.04643 0.06953
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.00794  0.00489 0.01287
Probandwise Concordance 0.13966  0.09312 0.20421
Marginal                0.05688  0.04643 0.06953

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.88646  0.22665 0.99521
bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp8)
------------------------------------------------------------
Strata 'Denmark'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.583608   0.051241 -30.904856  0.0000
atanh(rho) MZ   0.992896   0.217349   4.568215  0.0000
atanh(rho) DZ   0.070588   0.186956   0.377566  0.7058

 Total MZ/DZ Complete pairs MZ/DZ
 760/1611    287/589             

                           Estimate 2.5%     97.5%   
Tetrachoric correlation MZ  0.75859  0.51308  0.88937
Tetrachoric correlation DZ  0.07047 -0.28750  0.41117

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02611  0.01584 0.04274
Probandwise Concordance 0.46093  0.28426 0.64799
Marginal                0.05664  0.04623 0.06922
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.00420  0.00110 0.01596
Probandwise Concordance 0.07422  0.01888 0.25037
Marginal                0.05664  0.04623 0.06922

                         Estimate 2.5% 97.5%
Broad-sense Heritability   1      NaN  NaN  

------------------------------------------------------------
Strata 'Finland'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.087902   0.063221 -17.207912  0.0000
atanh(rho) MZ   0.859335   0.302752   2.838410  0.0045
atanh(rho) DZ   0.393145   0.179942   2.184840  0.0289

 Total MZ/DZ Complete pairs MZ/DZ
 392/1001    134/316             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.69592  0.25985 0.89623
Tetrachoric correlation DZ 0.37407  0.04044 0.63265

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.07008  0.03975 0.12064
Probandwise Concordance 0.50666  0.27641 0.73412
Marginal                0.13832  0.11316 0.16801
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.04160  0.02237 0.07607
Probandwise Concordance 0.30073  0.16558 0.48242
Marginal                0.13832  0.11316 0.16801

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.64369  0.04069 0.98717

------------------------------------------------------------
Strata 'Norway'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.192293   0.079124 -15.068598  0.0000
atanh(rho) MZ   0.916471   0.301133   3.043409  0.0023
atanh(rho) DZ   0.533761   0.252070   2.117509  0.0342

 Total MZ/DZ Complete pairs MZ/DZ
 387/618     115/155             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.72422  0.31516 0.90635
Tetrachoric correlation DZ 0.48825  0.03969 0.77303

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.05918  0.03218 0.10633
Probandwise Concordance 0.50764  0.27633 0.73572
Marginal                0.11657  0.08945 0.15057
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.03945  0.01840 0.08257
Probandwise Concordance 0.33842  0.15583 0.58636
Marginal                0.11657  0.08945 0.15057

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.47195  0.01989 0.97522

------------------------------------------------------------
Strata 'Sweden'

                Estimate    Std.Err          Z p-value
(Intercept)    -1.149412   0.032155 -35.745836  0.0000
atanh(rho) MZ   0.836864   0.125476   6.669520  0.0000
atanh(rho) DZ   0.199677   0.092907   2.149202  0.0316

 Total MZ/DZ Complete pairs MZ/DZ
 1183/1987   461/749             

                           Estimate 2.5%    97.5%  
Tetrachoric correlation MZ 0.68414  0.53057 0.79423
Tetrachoric correlation DZ 0.19706  0.01758 0.36425

MZ:
                        Estimate 2.5%    97.5%  
Concordance             0.06055  0.04659 0.07835
Probandwise Concordance 0.48365  0.38001 0.58872
Marginal                0.12519  0.11277 0.13877
DZ:
                        Estimate 2.5%    97.5%  
Concordance             0.02515  0.01672 0.03766
Probandwise Concordance 0.20088  0.13541 0.28746
Marginal                0.12519  0.11277 0.13877

                         Estimate 2.5%    97.5%  
Broad-sense Heritability 0.97416  0.00000 1.00000
## Wald test
B <- (lava::contrmat(3,4))[-(1:3),]
compare(bp8,contrast=B)

      Wald test

data:  
chisq = 3.4972, df = 6, p-value = 0.7443

10 Cumulative heritability

args(cumh)
function (formula, data, ..., time, timestrata = quantile(data[, 
    time], c(0.25, 0.5, 0.75, 1)), cumulative = TRUE, silent = FALSE) 
NULL
ch1 <- cumh(cancer~1,time="time",zyg="zyg",DZ="DZ",id="id",
            type="ace",data=prtw,weight="w")
summary(ch1)
                      time Heritability    Std.Err      2.5%     97.5%
65.5691955406266  65.56920    0.7038286 0.10969626 0.4586422 0.8695520
76.4446739437236  76.44467    0.6757445 0.06363443 0.5411756 0.7864218
85.8807708995545  85.88077    0.6204174 0.05652481 0.5052219 0.7234726
117.622394945129 117.62239    0.7013847 0.04752116 0.6008962 0.7855993
plot(ch1)

cumh.png


Date: 2012-05-20

Author: Klaus K. Holst and Thomas Scheike

mets/inst/misc/pairwise-twostage.r0000644000176200001440000002154513623061405017002 0ustar liggesusers library(mets) ### set.seed(1000) data <- simClaytonOakes.family.ace(8000,2,1,0,3) head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) out <- ace.family.design(data,member="type",id="cluster") ### 8 random effects with 1/4 * var.gene, and one shared environment 1 * var.env out$pardes head(out$des.rv) ### aa <- phreg(Surv(time,status)~+cluster(cluster),data=data) ## {{{ additive gamma models with and without pair call ### make ace random effects design ### simple random effects call ts0 <- survival.twostage(aa,data=data,clusters=data$cluster, detail=1,var.par=1,var.link=0, theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts0) ### simple random effects call ts1 <- survival.twostage(aa,data=data,clusters=data$cluster, detail=1,var.par=0,var.link=0, theta=c(2,1)/9, random.design=out$des.rv,theta.des=out$pardes) summary(ts1) ### parameters c(2,1)/(2+1)^2 checkderiv=1 if (checkderiv==1) {# {{{ ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,numDeriv=1,Nit=0,var.par=1, theta=log(c(2,1)/9),var.link=1,step=1.0, random.design=out$des.rv,theta.des=out$pardes) ts0$score ts0$score1 ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,numDeriv=1,Nit=0,var.par=1, theta=c(2,1)/9,var.link=0,step=1.0, random.design=out$des.rv,theta.des=out$pardes) ts0$score ts0$score1 ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,numDeriv=1,Nit=0,var.par=0, theta=log(c(2,1)),var.link=1,step=1.0, random.design=out$des.rv,theta.des=out$pardes) ts0$score ts0$score1 ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,numDeriv=1,Nit=0,var.par=0, theta=c(2,1),var.link=0,step=1.0, random.design=out$des.rv,theta.des=out$pardes) ts0$score ts0$score1 }# }}} ### now specify fitting via specific pairs ### first construct all pairs mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) ## make all pairs and pair specific design and pardes ## same as ts0 but pairs specified tsp <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1)/9,var.link=0,step=1.0,var.par=0, random.design=out$des.rv,detail=0, theta.des=out$pardes,pairs=pairs) summary(tsp) tsp1 <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1),var.link=0,step=1.0,var.par=1, random.design=out$des.rv,detail=0, theta.des=out$pardes,pairs=pairs) summary(tsp1) source("../../R/twostage.R") aa <- aalen(Surv(time,status)~+1,data=data,robust=0) tsp2 <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1),var.link=0,step=1.0, random.design=out$des.rv,detail=0, theta.des=out$pardes,pairs=pairs) summary(tsp2) c(tsp1$marginal.surv-tsp2$marginal.surv) ### random sample of pairs ssid <- sort(sample(1:32000,20000)) ### ### take some of all tsd <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$des.rv,iid=1, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) str(aa) aa$id ### same analyses but now gives only data that is used in the relevant pairs ids <- sort(unique(c(pairs[ssid,]))) ### pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) ## this requires that pair.new refers to id's in dataid (survival, status and so forth) ## random.design and theta.des are constructed to be the array 3 dims via individual specfication from ace.family.design dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) ### tsid <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=outid$des.rv,iid=1, theta.des=outid$pardes,pairs=pair.new) summary(tsdid) coef(tsdid) coef(tsd) ### same as tsd ### now direct specification of random.design and theta.design ### rather than taking the rows of the des.rv for the relevant pairs ### can make a pair specific specification of random effects pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new) head(pair.types) ### here makes pairwise design , simpler random.design og pardes, parameters ### stil varg, varc ### mother, child, share half rvm=c(1,1,0) rvc=c(1,0,1), ### thetadesmcf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) ### ### father, child, share half rvf=c(1,1,0) rvc=c(1,0,1), ### thetadescf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) ### ### child, child, share half rvc=c(1,1,0) rvc=c(1,0,1), ### thetadesmf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) ### ### mother, father, share 0 rvm=c(1,0) rvf=c(0,1), ### thetadesmf=rbind(c(1,0),c(1,0),c(0,1)) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) ### random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } ### 3 rvs here random.des[,,7] theta.des[,,7] ### 4 rvs here random.des[,,1] theta.des[,,1] head(rvs) tsdid2 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) tsd$theta tsdid2$theta tsdid$theta ### simpler specification via kinship coefficient for each pair kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) ### 4 rvs here , here independence since shared component has variance 0 ! out$random.des[,,9] out$theta.des[,,9] tsdid3 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) coef(tsdid3) ### same as above tsdid2 ## }}} ##### simple models, test for pairs structure ## {{{ library(mets) source("../R/twostage.R") ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=0,numDeriv=1,Nit=10, theta=c(0.17),var.link=0,step=1.0) summary(ts0) ts0$score; ts0$score1 ts0$Dscore; ts0$hess mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) head(pairs,n=12) tail(pairs,n=12) dim(pairs) # cc <- cluster.index(data$cluster) ### ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=0, theta=ts0$theta,var.link=0,pairs=pairs) summary(ts0) ## {{{ simple models with pair call library(mets) set.seed(100) data <- simClaytonOakes.family.ace(8000,2,1,0,3) head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) ### make ace random effects design out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv) ### makes marginal model (same for all) aa <- aalen(Surv(time,status)~+1,data=data,robust=0) mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) head(pairs,n=12) tail(pairs,n=12) dim(pairs) # ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10, theta=c(0.2),var.link=0,step=1.0) summary(ts0) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10,numDeriv=1, theta=c(0.2),var.link=0,step=1.0,pairs=pairs) summary(ts0) ts0$score ts0$score1 ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10, theta=c(0.2),var.link=0,step=1.0,model="plackett") summary(ts0) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10, theta=c(0.2),var.link=0,step=1.0,model="plackett",pairs=pairs) summary(ts0) theta.des <- model.matrix(~x1,data=data) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10,theta.des=theta.des, theta=c(0.2),var.link=0,step=1.0) summary(ts0) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10,theta.des=theta.des, theta=c(0.2),var.link=0,step=1.0,pairs=pairs) summary(ts0) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10,theta.des=theta.des, theta=c(0.2),var.link=0,step=1.0,model="plackett") summary(ts0) ts0 <- twostage(aa,data=data,clusters=data$cluster, detail=1,Nit=10,theta.des=theta.des, theta=c(0.2),var.link=0,step=1.0,model="plackett",pairs=pairs) summary(ts0) ## }}} ## }}} mets/inst/misc/menalong.rda0000644000176200001440000012220213623061405015421 0ustar liggesusers X](Hdeo{(B_CRJJYJJADQ4I2 IT(S}>9ϲ}<ϲ~7Yδ'g#pzpzE_hس)NONd/o'J47/1$cX2%cX2%cX2%cX2U?όd,Kƒd,KƒX/X2%cX2%cX2%q?$cX2%cX2u Zh?vZu?9OLoShJON>??~r'gh})@lb%7>O@hTx: G>-A8#@r{3K@hPh|U{P?9 ÌCӀ98jtnha44@to@R3 p;RW̿}Y{d_-)A )LWLaFMXx:AU+5^k?Yhz 4_9FMcܺzad5W$g:n(.jb#}S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{( n U?0G{_nܴy틧.wFb\xMGl~]޸.v\l]78=}|u\N=tã{g^X[ ^xs>pz^wOY>qZߴwᶷufYY9t~h6#cþg?=Wo _>[ɑ??)k϶'M|q]츦a8qtc×Wr2uݰ?{ofS&6NY{e=oZ8> ufL 738 _2Mg8e٦diiɉq]츦ƾg]9:g_N>ܰ?>aj8O&>lY_ɟG629qMݰkK|7{KϜ?{[VwΛGoݍLN?q]츦v.؟Ҳ33uᵋ.-;3%Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB Ȅ@&2! LdB >TyKIENDB`mets/inst/misc/twinbmi.R0000644000176200001440000000464513623061405014737 0ustar liggesusers# # BMI data on twin pairs # library(mets) data(twinbmi) str(twinbmi) head(twinbmi) # restrict to data, where response is not missing twinbmi <- twinbmi[!is.na(twinbmi$bmi),] # install.packages("lattice") library(lattice) plot( histogram( ~ bmi| gender, type="density", col="red", xlab="kg/m^2", main="Histogram of BMI", data=twinbmi) ) # BMI is often studied on log-scale. # boxcox(bmi ~ age*gender, data = twinbmi) twinbmi$logbmi <- log(twinbmi$bmi) ## Saturated model a <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="sat",control=list(refit=TRUE)) mean(score(a)^2) aa <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="sat",control=list(method="NR",start=coef(a))) mean(score(aa)^2) mean((coef(a)-coef(aa))^2) ## Ace model ace <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ace") mean(score(ace)^2) ## Convergence? # lnbmi.flex <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="flex") lnbmi.flex$estimate$opt$message mean(score(lnbmi.flex)^2) compare(a,lnbmi.flex) # lnbmi.u <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="u") lnbmi.u$estimate$opt$message lnbmi.u cl <- lnbmi.u$call cl$control <- list(method="NR",start=coef(lnbmi.u)) aa <- eval(cl) compare(lnbmi.u,lnbmi.flex) # lnbmi.ace <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ace") mean(score(lnbmi.ace)^2) lnbmi.ace$estimate$opt lnbmi.ace$estimate$opt$message lnbmi.ace # lnbmi.ade <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ade") lnbmi.ade$estimate$opt AIC(lnbmi.ace,lnbmi.ade) # lnbmi.ae <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ae",control=list(method="NR")) lnbmi.ae$estimate$opt$message lnbmi.ae compare(lnbmi.ace,lnbmi.ae) #CE lnbmi.ce <- twinlm(logbmi~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ce",control=list(method="NR")) lnbmi.ce$estimate$opt$message lnbmi.ce AIC(lnbmi.ace,lnbmi.ce) twinbmi$y <- twinbmi$bmi>25 lnbmi.ae <- twinlm(y~age*gender, id="tvparnr", DZ="DZ", zyg="zyg",data=twinbmi, type="ace",control=list(trace=1)) # GOF-Table? # mx and openmx for same data # reshape wide - twin-twin plot. mets/inst/misc/orgmode2.css0000644000176200001440000000310313623061405015357 0ustar liggesusers/* orgmode.css - CSS Stylesheet for http://www.biostat.ku.dk/~kkho Copyright (C) 2013 Klaus K. Holst Author: Klaus K. Holst This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ @import url("orgmode1.css"); html { background:rgba(215,215,215,1.0); } #box-link { margin-left:-1.7em; border: 1px solid transparent; } body { margin: 0 auto; width: 900px; } pre.src { background-color: rgba(215,215,215,1.0); color: #aaa; background-color: #073642; border: 1px solid rgba(0,0,0,1); } pre.example { color: #222; border: 1px solid rgba(0,0,0,1); background-color: #ccc; } img,table { /* font-family: Monaco, Consolas, "Lucida Console", monospace; */ -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); -moz-box-shadow: 5px 5px 6px rgba(0,0,0,0.23); box-shadow: 5px 5px 6px rgba(0,0,0,0.23); border: 1pt solid rgba(150,150,150,1); border: 1pt solid rgba(0,0,0,1); padding: 0pt; margin: 10pt; } mets/inst/misc/phenotype1.rda0000644000176200001440000002006713623061405015723 0ustar liggesusersZy2#$<۵ ~%_'-LVAu]JקR6Bsxw/޽CFߡhھ`jۯ%+wOgVS=>fjWY3حfH~:xp/OE*LSdE| ~)[+A^kz7ff`ǻ'i@4zpWh{)9v@'>myۏZJ`԰|𛃒>}mP,>aN-#F ׎99}_՗9^}~$מ8 ' nY%uu"e2Ķyjm`/)BȢd\/7 +TRHaC7g@xҥ)F7&ۜ!v`ˉ%!Џ+t ߦ͝IEv֚DUWO"NeqV@a-j"y*}pv C^LN]=Pkurn9g/Tϯʦk‹ !(k{GM^*2Ty[8ѷ!l"̠WCEbmF,.(4HG%\_d&"tG 9#,i8>`4/N>v?!r'M$u3w0/ GV| F捠V툪:ږVn¥rG{hɬP+*LBcޘcM-Lhm77!}(SH]l&LuAsTC7I_V(_03p,^nϯVm<{PNNpo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ggesusers Analyzing twin survival data with 'mets'

Analyzing twin survival data with 'mets'

Installation

Install dependencies (R>=2.15) :

install.packages(c("mets","cmprsk"), dependencies=TRUE)

OBS: At this point you might have to restart R to flush the cache of previously installed versions of the packages. If you have previously installed timereg and lava, make sure that you have the current versions installed (timereg: 1.8.4, lava: 1.2.6).

Load simulated data

library(mets)

The dataset prt contains (simulated) observations on prostate cancer with the following columns

country
Country (Denmark,Finland,Norway,Sweden)
time
exit time (censoring,death or prostate cancer)
status
Status (censoring=0,death=1 or prostate cancer=2)
zyg
Zygosity (DZ,MZ)
id
Twin id number
cancer
cancer indicator (status=2)
data(prt)
head(prt)

Status table

prtwide <- fast.reshape(prt,id="id")
ftable(status1~status2,prtwide)

Estimation of cumulative incidence

times <- seq(40,100,by=2)
cifmod <- comp.risk(Hist(time,status)~+1+cluster(id),data=prt,
                    cause=2,n.sim=0,
                    times=times,conservative=1,max.clust=NULL,model="fg")

theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status
or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des,
              score.method="fisher.scoring",same.cens=TRUE)
summary(or1)
or1$score
pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0)
plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15))

Assumes that the censoring of the two twins are independent (when they are the same):

incorrect.or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des, 
                        theta=c(2.8,8.6),score.method="fisher.scoring")
summary(incorrect.or1)
## not  bad
incorrect.or1$score

Correcting for country

table(prt$country)

times <- seq(40,100,by=2)
cifmodl <-comp.risk(Hist(time,status)~-1+factor(country)+cluster(id),data=prt,
                    cause=2,n.sim=0,times=times,conservative=1,
                    max.clust=NULL,cens.model="aalen")
pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0)
plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2))
legend("topleft",levels(prt$country),col=1:4,lty=1)

Design for MZ/DZ status

theta.des <- model.matrix(~-1+factor(zyg),data=prt) 
or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des,
                     theta=c(0.8,2.1),score.method="fisher.scoring",same.cens=TRUE)

summary(or.country)

Concordance estimation

Ignoring country. Computing casewise, using prodlim. CIF:

outm <- prodlim(Hist(time,status)~+1,data=prt)

times <- 60:100
## cause is 2 (second cause)
cifmz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="MZ"))
cifdz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="DZ"))
### casewise 
pp33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),prodlim=TRUE)
pp33dz <- pp33$model$"DZ"
pp33mz <- pp33$model$"MZ"
concdz <- predict(pp33dz,cause=1,time=times,newdata=data.frame(zyg="DZ"))
concmz <- predict(pp33mz,cause=1,time=times,newdata=data.frame(zyg="MZ"))
par(mfrow=c(1,2))
plot(times,concdz,ylim=c(0,0.1),type="s")
lines(pcif$time,pcif$P1^2,col=2)
title(main="DZ Conc. Prostate cancer")
plot(times,concmz,ylim=c(0,0.1),type="s")
title(main="MZ Conc. Prostate cancer")
lines(pcif$time,pcif$P1^2,col=2)
par(mfrow=c(1,1))
cdz <- casewise(pp33dz,outm,cause.marg=2)
cmz <- casewise(pp33mz,outm,cause.marg=2)             
plot(cmz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE,col=c(3,2,1))
par(new=TRUE)
plot(cdz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE)

Similar analyses using comp.risk for competing risks leads to tests for equal concordance and more correct standard errors

p33 <- bicomprisk(Hist(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1)

p33dz <- p33$model$"DZ"$comp.risk
p33mz <- p33$model$"MZ"$comp.risk
head(cbind(p33mz$time, p33mz$P1, p33mz$se.P1))
head(cbind(p33dz$time, p33dz$P1, p33dz$se.P1))

Test for genetic effect, needs other form of bicomprisk with iid decomp

conc1 <- p33dz
conc2 <- p33mz

test.conc(p33dz,p33mz);

OR expression of difference in concordance functions and Gray test

data33mz <- p33$model$"MZ"$data
data33mz$zyg <- 1
data33dz <- p33$model$"DZ"$data
data33dz$zyg <- 0
data33 <- rbind(data33mz,data33dz)

library(cmprsk)
ftime <- data33$time
fstatus <- data33$status
table(fstatus)
group <- data33$zyg
graytest <- cuminc(ftime,fstatus,group)
graytest
zygeffect <- comp.risk(Hist(time,status)~const(zyg),
                  data=data33,cause=1,
                  cens.model="aalen",model="logistic",conservative=1)
summary(zygeffect)

Liability model, ignoring censoring

(M <- with(prt, table(cancer,zyg)))
coef(lm(cancer~-1+zyg,prt))

Saturated model

bpmz <- biprobit(cancer~1 + cluster(id), 
             data=subset(prt,zyg=="MZ"), eqmarg=TRUE)

logLik(bpmz) # Log-likelihood
AIC(bpmz) # AIC
coef(bpmz) # Parameter estimates
vcov(bpmz) # Asymptotic covariance
summary(bpmz) # concordance, case-wise, tetrachoric correlations, ...
bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt)
summary(bp0)

Equal marginals MZ/DZ

bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt)
(s <- summary(bp1))

Components (concordance,cor,…) can be extracted from returned list

s$all

Likelihood Ratio Test

compare(bp0,bp1)

Polygenic Libability model via te bptwin function (type can be a subset of "acde", or "flex" for stratitified, "u" for random effects model with same marginals for MZ and DZ)

bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt)
summary(bp2)

Liability model, Inverse Probability Weighting

Probability weights based on Aalen's additive model

prtw <- ipw(Surv(time,status==0)~country, data=prt,
            cluster="id",weightname="w") 
plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability")
count <- 0
for (l in unique(prtw$country)) {
    count <- count+1
    prtw <- prtw[order(prtw$time),]
    with(subset(prtw,country==l), 
         lines(time,w,col=count,lwd=2))
}
legend("topright",legend=unique(prtw$country),col=1:4,pch=-1,lty=1)
bpmzIPW <- biprobit(cancer~1 + cluster(id), 
                    data=subset(prtw,zyg=="MZ"), 
                    weight="w")
(smz <- summary(bpmzIPW))

Comparison with CIF

plot(pcif,multiple=1,se=1,uniform=0,ylim=c(0,0.15))
abline(h=smz$prob["Marginal",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray")

Concordance estimates

plot(pp33mz,ylim=c(0,0.1))
abline(h=smz$prob["Concordance",],lwd=c(2,1,1))
## Wrong estimates:
abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray")

ACE model with IPW

bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp3)

Equal marginals but free variance structure between MZ and DZ

bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp4)

Check convergence

mean(score(bp4)^2)

Liability model, adjusting for covariates

Main effect of country

bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="ace",data=prtw,weight="w")
summary(bp6)
bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp7)

Stratified analysis

bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id",
              type="u",data=prtw,weight="w")
summary(bp8)

Wald test (stratified vs main effect)

B <- contr(3,4)[-(1:3),]
compare(bp8,contrast=B)

Created: 2014-05-09 Fri 12:12

mets/inst/misc/run-all.R0000644000176200001440000000006713623061405014632 0ustar liggesuserslibrary(testthat) library(mets) test_packages("mets") mets/inst/misc/pcifl.png0000644000176200001440000003224713623061405014745 0ustar liggesusersPNG  IHDR&T IDATxy\Uual(1t4uʚsi,S-.Y4MVژ+Yai.`"=?n?2#a߻z>rs>_Mޜs{UUdMHB$!r9I$D@" HB$!r9I$D@" HB$!r9I$D@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-baset*exp(xm %*% matrix(beta,3,1)))) } ## }}} ##' @export corsim.prostate <- function(n,theta=1,thetaslope=0,crate=2,test=0,pcens=0,mt=1,same.cens=TRUE) { ## {{{ ###n <- 10; theta <- 1; thetaslope <- 0; mt <- 1 xl <- sample(1:4,n,replace=TRUE) ###xl <- rep(xl,each=2) x<-cbind(xl==2,xl==3,xl==4)*1 tt<-seq(0,mt,length=mt*100) ### ###n=100;theta=1;lam0=0.5;beta=0.3;crate=2 thetat <- exp(log(theta)) F11x<-F1addfg(mt,x=x) F12x<-F1addfg(mt,x=x) ### thetaslut <- exp(log(theta)+thetaslope*(mt-mt/2)) p11 <- thetaslut*F11x*F12x/((1-F11x)+thetaslut*F11x) p12 <- F11x-p11 p21 <- F12x-p11 p22 <- 1-F12x-F11x+p11 ###apply(cbind(p11,p12,p21),1,sum) if (test==1) { ## {{{ for (i in 1:2) { print(x[i,]); F11xt<-F1addfg(tt,x=x[i,]) F12xt<-F1addfg(tt,x=x[i,]) p11t <- thetat* F11xt*F12xt/((1-F11xt)+thetat*F11xt) cortt <- ((p11t)/(F12xt-p11t))/(F11xt/(1-F11xt)) ###plot(tt,log(cortt)) if (i==1) { plot(tt,p11t,type="l",ylim=c(0,0.1),xlim=c(0,mt)) ###lines(tt,F11x[i]-p11t,col=2) ###lines(tt,F12x[i]-p11t,col=2) } else lines(tt,p11t,col=2); ###if (sum(diff(p11t<0))>0) stop("dec\n"); ###p11 <- max(p11t) ###p12 <- F11x[i]-p11 ###p21 <- F12x[i]-p11 ###p22 <- 1- F12x[i]-F11x[i]+p11 ###pnn <- 1- F12x[i]-F11x[i]+p11 } } ## }}} ###apply(cbind(p11,p12,p21,p22),1,sum) ### types <- rep(0,n) causes <- matrix(0,n,2) stime<-matrix(mt+1,n,2); for (i in 1:n) { ptype <- runif(1) if (ptype<=p11[i]) { types[i] <- 1 myhazx<-F1addfg(tt,x=x[i,])/F12x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist\n"); stime[i,2]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) f1<- F1addfg(tt,x=x[i,]) myhazx<- (F12x[i]/p11[i]) * (thetat*f1/((1-f1)+thetat*f1)) ### if (abs(max(myhazx)-1)> 0.001) stop("not dist\n"); stime[i,1]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(1,1) } if ((ptype>p11[i]) & (ptype<=p12[i]+p11[i])) { types[i] <- 2 f1 <- F1addfg(tt,x=x[i,]) myhazx<- ( f1 - thetat*F12x[i]*f1/((1-f1)+thetat*f1))/p12[i]; myhazx <- f1/F11x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist 2 \n"); stime[i,1]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(1,2) stime[i,2] <- runif(1)*mt } if ((ptype>p11[i]+p12[i]) && (ptype<=p21[i]+p12[i]+p11[i])) { types[i] <- 3 f2 <- F1addfg(tt,x=x[i,]) myhazx <- (f2 - (thetat*F11x[i]*f2/((1-F11x[i])+thetat*F11x[i])))/p21[i]; myhazx <- f2/F12x[i] ### if (abs(max(myhazx)-1)> 0.001) stop("not dist3 \n"); stime[i,2]<-Cpred(cbind(myhazx,tt),runif(1))[1,2]+runif(1,0,0.001) causes[i,] <- c(2,1) stime[i,1] <- runif(1)*mt } if (ptype>p11[i]+p12[i]+p21[i] ) { types[i] <- 4 causes[i,] <- c(2,2) stime[i,1:2] <- runif(2)*mt } } ###stime ###causes stime <- c(t(stime)) cause <- c(t(causes)) ###same.cens=TRUE if (same.cens==TRUE) { ctime <- rep(rbinom(n,1,pcens),each=2) ctime[ctime==1] <- rep(runif(sum(ctime==1)/2),each=2)*crate } else { ctime<- rbinom(n,1,pcens) ctime[ctime==1] <- runif(sum(ctime==1))*crate } ctime[ctime==0] <- mt; cens <- (ctime< stime) time <- ifelse(cens,ctime,stime) cause <- ifelse(cens,0,cause) id <- rep(1:n,rep(2,n)) country <- c() country[xl==1] <- "SWE" country[xl==2] <- "DK" country[xl==3] <- "FIN" country[xl==4] <- "NOR" data<-data.frame(time=time,cause=cause,xl=rep(xl,each=2), country=rep(country,each=2),id=id,cens=cens,stime=stime,type=rep(types,each=2), f1=rep(F11x,each=2),p11=rep(p11,each=2),p12=rep(p12,each=2),p21=rep(p21,each=2), p22=rep(p22,each=2)) return(data) } ## }}} ##' @export simnordic2 <- function(n,cordz=2,cormz=3,cratemz=2,cratedz=2,pcensmz=0.8,pcensdz=0.8) { ## {{{ outdz <- corsim.prostate(n,theta=cordz,crate=cratedz,pcens=pcensmz,mt=1,same.cens=TRUE,test=0) outmz <- corsim.prostate(n,theta=cormz,crate=cratemz,pcens=pcensdz,mt=1,same.cens=TRUE,test=0) outdz$zyg <- "DZ" outmz$zyg <- "MZ" outmz$id <- outmz$id+nrow(outdz) ### out <- rbind(outdz,outmz) out$time <- out$time*100 table(out$type,out$country) table(out$type,out$cause) out$country <- relevel(factor(out$country),ref="SWE") table(out$country) outk <- out[,c("country","cause","id","time","zyg","type")] table(outk$cause) table(outk$type,outk$country) table(outk$cause,outk$country) ### return(outk) } ## }}} ###outk <- simnordic(2000) mets/inst/misc/workshop-src.org0000644000176200001440000010015213623061405016303 0ustar liggesusers#+PROPERTY: session *R* # +PROPERTY: cache yes #+PROPERTY: results output #+PROPERTY: exports both #+PROPERTY: width 550 #+PROPERTY: height 450 #+PROPERTY: tangle yes #+PROPERTY: comments yes # +PROPERTY: eval never * Installation Install dependencies (=R>=2.15=) : #+BEGIN_SRC R :exports none palette(c("darkblue","darkred","orange","olivedrab")) #+END_SRC #+RESULTS: #+BEGIN_SRC R :exports code :eval never install.packages(c("mets","cmprsk"), dependencies=TRUE) #+END_SRC /OBS:/ At this point you might have to restart =R= to flush the cache of previously installed versions of the packages. If you have previously installed =timereg= and =lava=, make sure that you have the current versions installed (timereg: =>=1.8.4=, lava: =>=1.2.6=). * Load simulated data #+NAME: Loading #+BEGIN_SRC R :exports code :wrap example library(mets) #+END_SRC The dataset =prt= contains (simulated) observations on prostate cancer with the following columns + =country= :: Country (Denmark,Finland,Norway,Sweden) + =time= :: exit time (censoring,death or prostate cancer) + =status= :: Status (censoring=0,death=1 or prostate cancer=2) + =zyg= :: Zygosity (DZ,MZ) + =id= :: Twin id number + =cancer= :: cancer indicator (status=2) #+NAME: Loading #+BEGIN_SRC R :wrap example data(prt) head(prt) #+END_SRC #+RESULTS: Loading #+BEGIN_example country time status zyg id cancer 31 Denmark 96.98833 1 DZ 1 0 32 Denmark 80.88885 1 DZ 1 0 39 Denmark 68.04498 1 DZ 3 0 40 Denmark 61.45903 1 DZ 3 0 51 Denmark 78.78068 1 DZ 5 0 52 Denmark 90.36252 1 DZ 5 0 #+END_example Status table #+BEGIN_SRC R :wrap example prtwide <- fast.reshape(prt,id="id") ftable(status1~status2,prtwide) #+END_SRC #+RESULTS: #+BEGIN_example status1 0 1 2 status2 0 9278 883 156 1 936 2308 193 2 163 199 106 #+END_example * Estimation of cumulative incidence #+BEGIN_SRC R :wrap example times <- seq(40,100,by=2) cifmod <- comp.risk(Event(time,status)~+1+cluster(id),data=prt, cause=2,n.sim=0, times=times,conservative=1,max.clust=NULL,model="fg") theta.des <- model.matrix(~-1+factor(zyg),data=prt) ## design for MZ/DZ status or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des, score.method="fisher.scoring",same.cens=TRUE) summary(or1) or1$score #+END_SRC #+RESULTS: #+BEGIN_example OR for dependence for competing risks OR of cumulative incidence for cause1= 2 and cause2= 2 log-ratio Coef. SE z P-val Ratio SE factor(zyg)DZ 0.785 0.221 3.55 3.82e-04 2.19 0.485 factor(zyg)MZ 2.100 0.278 7.56 4.11e-14 8.14 2.260 [,1] [1,] 1.246052e-08 [2,] 3.140461e-08 #+END_example #+BEGIN_SRC R :results output graphics :file pcif.png pcif <- predict(cifmod,X=1,resample.iid=0,uniform=0,se=0) plot(pcif,multiple=1,se=0,uniform=0,ylim=c(0,0.15)) #+END_SRC #+RESULTS: [[file:pcif.png]] Assumes that the censoring of the two twins are independent (when they are the same): #+BEGIN_SRC R :wrap example incorrect.or1 <- or.cif(cifmod,data=prt,cause1=2,cause2=2,theta.des=theta.des, theta=c(2.8,8.6),score.method="fisher.scoring") summary(incorrect.or1) ## not bad incorrect.or1$score #+END_SRC * Correcting for country #+BEGIN_SRC R :results output graphics :file pcifl.png table(prt$country) times <- seq(40,100,by=2) cifmodl <-comp.risk(Event(time,status)~-1+factor(country)+cluster(id),data=prt, cause=2,n.sim=0,times=times,conservative=1, max.clust=NULL,cens.model="aalen") pcifl <- predict(cifmodl,X=diag(4),se=0,uniform=0) plot(pcifl,multiple=1,se=0,uniform=0,col=1:4,ylim=c(0,0.2)) legend("topleft",levels(prt$country),col=1:4,lty=1) #+END_SRC #+RESULTS: [[file:pcifl.png]] Design for MZ/DZ status #+BEGIN_SRC R :wrap example theta.des <- model.matrix(~-1+factor(zyg),data=prt) or.country <- or.cif(cifmodl,data=prt,cause1=2,cause2=2,theta.des=theta.des, theta=c(0.8,2.1),score.method="fisher.scoring",same.cens=TRUE) summary(or.country) #+END_SRC #+RESULTS: #+BEGIN_example OR for dependence for competing risks OR of cumulative incidence for cause1= 2 and cause2= 2 log-ratio Coef. SE z P-val Ratio SE factor(zyg)DZ 0.736 0.234 3.15 1.66e-03 2.09 0.488 factor(zyg)MZ 1.860 0.279 6.67 2.54e-11 6.44 1.800 #+END_example * Concordance estimation Ignoring country. Computing casewise, using =prodlim=. CIF: #+BEGIN_SRC R :exports code :wrap example library('prodlim') outm <- prodlim(Hist(time,status)~+1,data=prt) times <- 60:100 ## cause is 2 (second cause) cifmz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="MZ")) cifdz <- predict(outm,cause=2,time=times,newdata=data.frame(zyg="DZ")) #+END_SRC #+RESULTS: #+BEGIN_example #+END_example #+BEGIN_SRC R :exports code ### casewise pp33 <- bicomprisk(Event(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),prodlim=TRUE) pp33dz <- pp33$model$"DZ" pp33mz <- pp33$model$"MZ" concdz <- predict(pp33dz,cause=1,time=times,newdata=data.frame(zyg="DZ")) concmz <- predict(pp33mz,cause=1,time=times,newdata=data.frame(zyg="MZ")) #+END_SRC #+RESULTS: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R :results output graphics :file concordance.png par(mfrow=c(1,2)) plot(times,concdz,ylim=c(0,0.1),type="s") lines(pcif$time,pcif$P1^2,col=2) title(main="DZ Conc. Prostate cancer") plot(times,concmz,ylim=c(0,0.1),type="s") title(main="MZ Conc. Prostate cancer") lines(pcif$time,pcif$P1^2,col=2) #+END_SRC #+RESULTS: [[file:concordance.png]] #+BEGIN_SRC R :results output graphics :file casewisea.png par(mfrow=c(1,1)) cdz <- casewise(pp33dz,outm,cause.marg=2) cmz <- casewise(pp33mz,outm,cause.marg=2) plot(cmz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE,col=c(3,2,1)) par(new=TRUE) plot(cdz,ci=NULL,ylim=c(0,0.5),xlim=c(60,100),legend=TRUE) #+END_SRC #+RESULTS: [[file:casewisea.png]] Similar analyses using =comp.risk= for competing risks leads to tests for equal concordance and more correct standard errors #+BEGIN_SRC R :exports code p33 <- bicomprisk(Event(time,status)~strata(zyg)+id(id),data=prt,cause=c(2,2),return.data=1) p33dz <- p33$model$"DZ"$comp.risk p33mz <- p33$model$"MZ"$comp.risk #+END_SRC #+RESULTS: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R :wrap example head(cbind(p33mz$time, p33mz$P1, p33mz$se.P1)) head(cbind(p33dz$time, p33dz$P1, p33dz$se.P1)) #+END_SRC #+RESULTS: #+BEGIN_example [,1] [,2] [,3] [1,] 60.88384 0.001354486 0.0006759148 [2,] 64.98252 0.001738665 0.0007767791 [3,] 66.34227 0.002145175 0.0008759241 [4,] 67.23626 0.002553690 0.0009656368 [5,] 67.96152 0.002980112 0.0010544136 [6,] 68.37310 0.003852670 0.0012192761 [,1] [,2] [,3] [1,] 58.85519 0.0001741916 0.0001740997 [2,] 67.87387 0.0004044091 0.0002883926 [3,] 69.55123 0.0006488647 0.0003777479 [4,] 70.83183 0.0009069944 0.0004570724 [5,] 71.05738 0.0011672691 0.0005255212 [6,] 71.06602 0.0014276382 0.0005859026 #+END_example Test for genetic effect, needs other form of bicomprisk with iid decomp #+BEGIN_SRC R :wrap example conc1 <- p33dz conc2 <- p33mz test.conc(p33dz,p33mz); #+END_SRC #+RESULTS: #+BEGIN_example $test cum dif. sd z pval pepe-mori 0.3936686 0.09835827 4.002394 6.270472e-05 $mintime [1] 60.88384 $maxtime [1] 96.92463 $same.cluster [1] FALSE attr(,"class") [1] "testconc" #+END_example OR expression of difference in concordance functions and Gray test #+BEGIN_SRC R :wrap example data33mz <- p33$model$"MZ"$data data33mz$zyg <- 1 data33dz <- p33$model$"DZ"$data data33dz$zyg <- 0 data33 <- rbind(data33mz,data33dz) library(cmprsk) ftime <- data33$time fstatus <- data33$status table(fstatus) #+END_SRC #+RESULTS: #+BEGIN_example fstatus 0 1 2 9597 106 4519 #+END_example #+BEGIN_SRC R :wrap example group <- data33$zyg graytest <- cuminc(ftime,fstatus,group) graytest #+END_SRC #+RESULTS: #+BEGIN_example Tests: stat pv df 1 28.82416 7.925617e-08 1 2 33.79236 6.131919e-09 1 Estimates and Variances: $est 20 40 60 80 100 0 1 0.0000000000 0.00000000 0.0001741916 0.006741025 0.01880244 1 1 0.0000000000 0.00000000 0.0006710172 0.017420360 0.05031415 0 2 0.0006970762 0.01974882 0.1141800067 0.504364854 0.93797293 1 2 0.0009363302 0.01655314 0.0948098327 0.443996722 0.90692430 $var 20 40 60 80 100 0 1 0.000000e+00 0.000000e+00 3.034323e-08 2.115863e-06 9.493584e-06 1 1 0.000000e+00 0.000000e+00 2.250627e-07 9.173278e-06 5.102841e-05 0 2 8.094463e-08 2.487399e-06 1.556735e-05 6.990685e-05 4.769058e-05 1 2 1.752378e-07 3.424511e-06 2.388136e-05 1.271394e-04 1.171775e-04 #+END_example #+BEGIN_SRC R :wrap example zygeffect <- comp.risk(Event(time,status)~const(zyg), data=data33,cause=1, cens.model="aalen",model="logistic",conservative=1) summary(zygeffect) #+END_SRC #+RESULTS: #+BEGIN_example Competing risks Model No test for non-parametric terms Parametric terms : Coef. SE Robust SE z P-val const(zyg) 0.944 0.218 0.218 4.335 0 #+END_example * Liability model, ignoring censoring #+BEGIN_SRC R :wrap example (M <- with(prt, table(cancer,zyg))) #+END_SRC #+RESULTS: #+BEGIN_example zyg cancer DZ MZ 0 17408 10872 1 583 359 #+END_example #+BEGIN_SRC R :wrap example coef(lm(cancer~-1+zyg,prt)) #+END_SRC #+RESULTS: #+BEGIN_example zygDZ zygMZ 0.03240509 0.03196510 #+END_example Saturated model #+BEGIN_SRC R :wrap example bpmz <- biprobit(cancer~1 + cluster(id), data=subset(prt,zyg=="MZ"), eqmarg=TRUE) logLik(bpmz) # Log-likelihood AIC(bpmz) # AIC coef(bpmz) # Parameter estimates vcov(bpmz) # Asymptotic covariance summary(bpmz) # concordance, case-wise, tetrachoric correlations, ... #+END_SRC #+RESULTS: #+BEGIN_example 'log Lik.' -1472.972 (df=2) [1] 2949.943 (Intercept) r:(Intercept) -1.8539454 0.8756507 (Intercept) r:(Intercept) (Intercept) 0.0007089727 0.0003033296 r:(Intercept) 0.0003033296 0.0044023587 Estimate Std.Err Z p-value (Intercept) -1.853945 0.026627 -69.627725 0 r:(Intercept) 0.875651 0.066350 13.197393 0 logLik: -1472.972 mean(score^2): 1.667e-12 n pairs 11231 5473 Estimate 2.5% 97.5% Rel.Recur.Risk 11.13385 9.12561 13.14209 OR 25.34928 17.69032 36.32415 Tetrachoric correlation 0.70423 0.63252 0.76398 Concordance 0.01131 0.00886 0.01443 Casewise Concordance 0.35487 0.29391 0.42094 Marginal 0.03187 0.02834 0.03583 #+END_example #+BEGIN_SRC R :exports code bp0 <- biprobit(cancer~1 + cluster(id)+strata(zyg), data=prt) #+END_SRC #+RESULTS: : Strata 'DZ' : Strata 'MZ' #+BEGIN_SRC R :wrap example summary(bp0) #+END_SRC #+RESULTS: #+BEGIN_example ------------------------------------------------------------ Strata 'DZ' Estimate Std.Err Z p-value (Intercept) -1.846842 0.019247 -95.955194 0 r:(Intercept) 0.418063 0.050421 8.291403 0 logLik: -2536.242 mean(score^2): 4.795e-08 n pairs 17991 8749 Estimate 2.5% 97.5% Rel.Recur.Risk 4.63766 3.44436 5.83097 OR 6.03709 4.26005 8.55541 Tetrachoric correlation 0.39530 0.30882 0.47529 Concordance 0.00486 0.00361 0.00655 Casewise Concordance 0.15019 0.11458 0.19443 Marginal 0.03239 0.02976 0.03523 ------------------------------------------------------------ Strata 'MZ' Estimate Std.Err Z p-value (Intercept) -1.853945 0.026627 -69.627725 0 r:(Intercept) 0.875651 0.066350 13.197393 0 logLik: -1472.972 mean(score^2): 1.667e-12 n pairs 11231 5473 Estimate 2.5% 97.5% Rel.Recur.Risk 11.13385 9.12561 13.14209 OR 25.34928 17.69032 36.32415 Tetrachoric correlation 0.70423 0.63252 0.76398 Concordance 0.01131 0.00886 0.01443 Casewise Concordance 0.35487 0.29391 0.42094 Marginal 0.03187 0.02834 0.03583 #+END_example Equal marginals MZ/DZ #+BEGIN_SRC R :wrap example bp1 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="u",data=prt) (s <- summary(bp1)) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -1.849284 0.015601 -118.539777 0 atanh(rho) MZ 0.877667 0.065815 13.335456 0 atanh(rho) DZ 0.417475 0.050276 8.303615 0 Total MZ/DZ Complete pairs MZ/DZ 11231/17991 5473/8749 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.70525 0.63436 0.76438 Tetrachoric correlation DZ 0.39480 0.30854 0.47462 MZ: Estimate 2.5% 97.5% Concordance 0.01149 0.00942 0.01400 Casewise Concordance 0.35672 0.29764 0.42049 Marginal 0.03221 0.03007 0.03449 Rel.Recur.Risk 11.07524 9.15861 12.99187 log(OR) 3.23267 2.87294 3.59240 DZ: Estimate 2.5% 97.5% Concordance 0.00482 0.00363 0.00640 Casewise Concordance 0.14956 0.11441 0.19315 Marginal 0.03221 0.03007 0.03449 Rel.Recur.Risk 4.64343 3.44806 5.83880 log(OR) 1.79800 1.44936 2.14664 Estimate 2.5% 97.5% Broad-sense heritability 0.62090 0.41075 0.83104 #+END_example Components (concordance,cor,...) can be extracted from returned list #+BEGIN_SRC R :wrap example s$all #+END_SRC #+RESULTS: #+BEGIN_example Estimate 2.5% 97.5% Broad-sense heritability 0.620895123 0.410750791 0.831039456 Tetrachoric correlation MZ 0.705248649 0.634356555 0.764377525 Tetrachoric correlation DZ 0.394801088 0.308543841 0.474618274 MZ Concordance 0.011489242 0.009421632 0.014004180 MZ Casewise Concordance 0.356715718 0.297643976 0.420492294 MZ Marginal 0.032208397 0.030073567 0.034489384 MZ Rel.Recur.Risk 11.075239606 9.158610607 12.991868605 MZ log(OR) 3.232669332 2.872936675 3.592401989 DZ Concordance 0.004817009 0.003625030 0.006398416 DZ Casewise Concordance 0.149557552 0.114405844 0.193154114 DZ Marginal 0.032208397 0.030073567 0.034489384 DZ Rel.Recur.Risk 4.643433529 3.448063130 5.838803929 DZ log(OR) 1.798001419 1.449361036 2.146641803 #+END_example Likelihood Ratio Test #+BEGIN_SRC R :wrap example compare(bp0,bp1) #+END_SRC #+RESULTS: #+BEGIN_example - Likelihood ratio test - data: chisq = 0.046769, df = 1, p-value = 0.8288 sample estimates: log likelihood (model 1) log likelihood (model 2) -4009.213 -4009.237 #+END_example Polygenic Libability model via te =bptwin= function (=type= can be a subset of "acde", or "flex" for stratitified, "u" for random effects model with same marginals for MZ and DZ) #+BEGIN_SRC R :wrap example bp2 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id",type="ace",data=prt) summary(bp2) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -3.40624 0.19032 -17.89736 0.0000 log(var(A)) 0.74503 0.25710 2.89787 0.0038 log(var(C)) -1.25112 1.04238 -1.20024 0.2300 Total MZ/DZ Complete pairs MZ/DZ 11231/17991 5473/8749 Estimate 2.5% 97.5% A 0.62090 0.41075 0.83104 C 0.08435 -0.09373 0.26244 E 0.29475 0.22992 0.35959 MZ Tetrachoric Cor 0.70525 0.63436 0.76438 DZ Tetrachoric Cor 0.39480 0.30854 0.47462 MZ: Estimate 2.5% 97.5% Concordance 0.01149 0.00942 0.01400 Casewise Concordance 0.35672 0.29764 0.42049 Marginal 0.03221 0.03007 0.03449 Rel.Recur.Risk 11.07524 9.15861 12.99187 log(OR) 3.23267 2.87294 3.59240 DZ: Estimate 2.5% 97.5% Concordance 0.00482 0.00363 0.00640 Casewise Concordance 0.14956 0.11441 0.19315 Marginal 0.03221 0.03007 0.03449 Rel.Recur.Risk 4.64343 3.44806 5.83880 log(OR) 1.79800 1.44936 2.14664 Estimate 2.5% 97.5% Broad-sense heritability 0.62090 0.41075 0.83104 #+END_example * Liability model, Inverse Probability Weighting Probability weights based on Aalen's additive model #+BEGIN_SRC R :results output graphics :file ipw.png prtw <- ipw(Surv(time,status==0)~country, data=prt, cluster="id",weight.name="w") plot(0,type="n",xlim=range(prtw$time),ylim=c(0,1),xlab="Age",ylab="Probability") count <- 0 for (l in unique(prtw$country)) { count <- count+1 prtw <- prtw[order(prtw$time),] with(subset(prtw,country==l), lines(time,w,col=count,lwd=2)) } legend("topright",legend=unique(prtw$country),col=1:4,pch=-1,lty=1) #+END_SRC #+RESULTS: [[file:ipw.png]] #+BEGIN_SRC R :wrap example bpmzIPW <- biprobit(cancer~1 + cluster(id), data=subset(prtw,zyg=="MZ"), weight="w") (smz <- summary(bpmzIPW)) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -1.226276 0.043074 -28.469378 0 r:(Intercept) 0.912669 0.100316 9.097910 0 logLik: -6703.246 mean(score^2): 8.069e-08 n pairs 2722 997 Estimate 2.5% 97.5% Rel.Recur.Risk 4.53325 3.70162 5.36488 OR 15.06945 9.15935 24.79307 Tetrachoric correlation 0.72241 0.61446 0.80381 Concordance 0.05490 0.04221 0.07113 Casewise Concordance 0.49887 0.41321 0.58460 Marginal 0.11005 0.09514 0.12696 #+END_example Comparison with CIF #+BEGIN_SRC R :results output graphics :file cifMZ.png plot(pcif,multiple=1,se=1,uniform=0,ylim=c(0,0.15)) abline(h=smz$prob["Marginal",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Marginal",],lwd=c(2,1,1),col="lightgray") #+END_SRC #+RESULTS: [[file:cifMZ.png]] Concordance estimates #+BEGIN_SRC R :results output graphics :file conc2.png plot(pp33mz,ylim=c(0,0.1)) abline(h=smz$prob["Concordance",],lwd=c(2,1,1)) ## Wrong estimates: abline(h=summary(bpmz)$prob["Concordance",],lwd=c(2,1,1),col="lightgray") #+END_SRC #+RESULTS: [[file:conc2.png]] ACE model with IPW #+BEGIN_SRC R :wrap example bp3 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp3) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -2.31618 0.18673 -12.40359 0e+00 log(var(A)) 0.85390 0.22689 3.76347 2e-04 log(var(C)) -21.60061 1.29095 -16.73235 0e+00 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% A 0.70138 0.60824 0.79452 C 0.00000 0.00000 0.00000 E 0.29862 0.20548 0.39176 MZ Tetrachoric Cor 0.70138 0.59586 0.78310 DZ Tetrachoric Cor 0.35069 0.30328 0.39637 MZ: Estimate 2.5% 97.5% Concordance 0.04857 0.03963 0.05940 Casewise Concordance 0.47238 0.39356 0.55260 Marginal 0.10281 0.09463 0.11161 Rel.Recur.Risk 4.59457 3.79490 5.39425 log(OR) 2.63276 2.15803 3.10749 DZ: Estimate 2.5% 97.5% Concordance 0.02515 0.02131 0.02965 Casewise Concordance 0.24461 0.21892 0.27226 Marginal 0.10281 0.09463 0.11161 Rel.Recur.Risk 2.37919 2.13966 2.61872 log(OR) 1.22877 1.06721 1.39032 Estimate 2.5% 97.5% Broad-sense heritability 0.70138 0.60824 0.79452 #+END_example Equal marginals but free variance structure between MZ and DZ #+BEGIN_SRC R :wrap example bp4 <- bptwin(cancer~1,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp4) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -1.266427 0.024091 -52.568381 0 atanh(rho) MZ 0.898548 0.098841 9.090866 0 atanh(rho) DZ 0.312574 0.073668 4.243006 0 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.71559 0.60742 0.79771 Tetrachoric correlation DZ 0.30278 0.16662 0.42760 MZ: Estimate 2.5% 97.5% Concordance 0.04974 0.04044 0.06104 Casewise Concordance 0.48442 0.40185 0.56785 Marginal 0.10268 0.09453 0.11144 Rel.Recur.Risk 4.71777 3.88751 5.54802 log(OR) 2.70711 2.20930 3.20492 DZ: Estimate 2.5% 97.5% Concordance 0.02269 0.01667 0.03081 Casewise Concordance 0.22097 0.16448 0.29013 Marginal 0.10268 0.09453 0.11144 Rel.Recur.Risk 2.15203 1.53917 2.76490 log(OR) 1.06411 0.61335 1.51487 Estimate 2.5% 97.5% Broad-sense heritability 0.82563 0.50195 1.14931 #+END_example Check convergence #+BEGIN_SRC R :wrap example mean(score(bp4)^2) #+END_SRC #+RESULTS: #+BEGIN_example [1] 5.902721e-13 #+END_example * Liability model, adjusting for covariates Main effect of country #+BEGIN_SRC R :wrap example bp6 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") summary(bp6) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -2.81553 0.23889 -11.78590 0e+00 countryFinland 0.87558 0.16123 5.43061 0e+00 countryNorway 0.68483 0.17762 3.85567 1e-04 countrySweden 0.77248 0.12350 6.25468 0e+00 log(var(A)) 0.77724 0.23186 3.35220 8e-04 log(var(C)) -33.42341 0.11521 -290.10502 0e+00 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% A 0.68509 0.58704 0.78313 C 0.00000 NaN NaN E 0.31491 0.21687 0.41296 MZ Tetrachoric Cor 0.68509 0.57428 0.77124 DZ Tetrachoric Cor 0.34254 0.29262 0.39060 MZ: Estimate 2.5% 97.5% Concordance 0.02236 0.01588 0.03141 Casewise Concordance 0.39194 0.30778 0.48305 Marginal 0.05705 0.04654 0.06977 Rel.Recur.Risk 6.86967 5.08343 8.65591 log(OR) 2.82584 2.31543 3.33626 DZ: Estimate 2.5% 97.5% Concordance 0.00989 0.00700 0.01394 Casewise Concordance 0.17329 0.14505 0.20570 Marginal 0.05705 0.04654 0.06977 Rel.Recur.Risk 3.03735 2.56114 3.51356 log(OR) 1.38153 1.18508 1.57798 Estimate 2.5% 97.5% Broad-sense heritability 0.68509 0.58704 0.78313 Warning messages: 1: In sqrt(diag(vcovACDE)) : NaNs produced 2: In sqrt(diag(vcovACDE)) : NaNs produced #+END_example #+BEGIN_SRC R :wrap example bp7 <- bptwin(cancer~country,zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") summary(bp7) #+END_SRC #+RESULTS: #+BEGIN_example Estimate Std.Err Z p-value (Intercept) -1.581478 0.051318 -30.817030 0e+00 countryFinland 0.491725 0.081517 6.032155 0e+00 countryNorway 0.385830 0.094254 4.093497 0e+00 countrySweden 0.433789 0.060648 7.152599 0e+00 atanh(rho) MZ 0.884166 0.099366 8.898113 0e+00 atanh(rho) DZ 0.271770 0.073240 3.710668 2e-04 Total MZ/DZ Complete pairs MZ/DZ 2722/5217 997/1809 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.70850 0.59760 0.79280 Tetrachoric correlation DZ 0.26527 0.12752 0.39298 MZ: Estimate 2.5% 97.5% Concordance 0.02347 0.01664 0.03300 Casewise Concordance 0.41255 0.32395 0.50721 Marginal 0.05688 0.04643 0.06953 Rel.Recur.Risk 7.25251 5.40099 9.10403 log(OR) 2.95065 2.42382 3.47748 DZ: Estimate 2.5% 97.5% Concordance 0.00794 0.00489 0.01287 Casewise Concordance 0.13966 0.09312 0.20421 Marginal 0.05688 0.04643 0.06953 Rel.Recur.Risk 2.45511 1.47912 3.43110 log(OR) 1.08717 0.56716 1.60718 Estimate 2.5% 97.5% Broad-sense heritability 0.88646 0.55608 1.21683 #+END_example Stratified analysis #+BEGIN_SRC R :exports code :results value bp8 <- bptwin(cancer~strata(country),zyg="zyg",DZ="DZ",id="id", type="u",data=prtw,weight="w") #+END_SRC #+RESULTS: #+BEGIN_SRC R :wrap example summary(bp8) #+END_SRC #+RESULTS: #+BEGIN_example Strata 'Denmark' Strata 'Finland' Strata 'Norway' Strata 'Sweden' ------------------------------------------------------------ Strata 'Denmark' Estimate Std.Err Z p-value (Intercept) -1.583608 0.051241 -30.904857 0.0000 atanh(rho) MZ 0.992896 0.217349 4.568215 0.0000 atanh(rho) DZ 0.070588 0.186956 0.377566 0.7058 Total MZ/DZ Complete pairs MZ/DZ 760/1611 287/589 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.75859 0.51308 0.88937 Tetrachoric correlation DZ 0.07047 -0.28750 0.41117 MZ: Estimate 2.5% 97.5% Concordance 0.02611 0.01584 0.04274 Casewise Concordance 0.46093 0.28426 0.64799 Marginal 0.05664 0.04623 0.06922 Rel.Recur.Risk 8.13766 4.72047 11.55486 log(OR) 3.24111 2.13448 4.34774 DZ: Estimate 2.5% 97.5% Concordance 0.00420 0.00110 0.01596 Casewise Concordance 0.07422 0.01888 0.25037 Marginal 0.05664 0.04623 0.06922 Rel.Recur.Risk 1.31043 -0.43515 3.05601 log(OR) 0.30910 -1.24175 1.85996 Estimate 2.5% 97.5% Broad-sense heritability 1 NaN NaN ------------------------------------------------------------ Strata 'Finland' Estimate Std.Err Z p-value (Intercept) -1.087902 0.063221 -17.207912 0.0000 atanh(rho) MZ 0.859335 0.302752 2.838410 0.0045 atanh(rho) DZ 0.393145 0.179942 2.184840 0.0289 Total MZ/DZ Complete pairs MZ/DZ 392/1001 134/316 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.69592 0.25985 0.89623 Tetrachoric correlation DZ 0.37407 0.04044 0.63265 MZ: Estimate 2.5% 97.5% Concordance 0.07008 0.03975 0.12064 Casewise Concordance 0.50666 0.27641 0.73412 Marginal 0.13832 0.11316 0.16801 Rel.Recur.Risk 3.66298 1.85349 5.47246 log(OR) 2.48001 0.96954 3.99049 DZ: Estimate 2.5% 97.5% Concordance 0.04160 0.02237 0.07607 Casewise Concordance 0.30073 0.16558 0.48242 Marginal 0.13832 0.11316 0.16801 Rel.Recur.Risk 2.17417 1.00995 3.33838 log(OR) 1.22415 0.21090 2.23739 Estimate 2.5% 97.5% Broad-sense heritability 0.64369 -0.21675 1.50414 ------------------------------------------------------------ Strata 'Norway' Estimate Std.Err Z p-value (Intercept) -1.192293 0.079124 -15.068598 0.0000 atanh(rho) MZ 0.916471 0.301133 3.043409 0.0023 atanh(rho) DZ 0.533761 0.252070 2.117509 0.0342 Total MZ/DZ Complete pairs MZ/DZ 387/618 115/155 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.72422 0.31516 0.90635 Tetrachoric correlation DZ 0.48825 0.03969 0.77303 MZ: Estimate 2.5% 97.5% Concordance 0.05918 0.03218 0.10633 Casewise Concordance 0.50764 0.27633 0.73572 Marginal 0.11657 0.08945 0.15057 Rel.Recur.Risk 4.35466 2.15709 6.55223 log(OR) 2.69720 1.19745 4.19695 DZ: Estimate 2.5% 97.5% Concordance 0.03945 0.01840 0.08257 Casewise Concordance 0.33842 0.15583 0.58636 Marginal 0.11657 0.08945 0.15057 Rel.Recur.Risk 2.90310 0.89710 4.90911 log(OR) 1.67675 0.28373 3.06976 Estimate 2.5% 97.5% Broad-sense heritability 0.47195 -0.47133 1.41522 ------------------------------------------------------------ Strata 'Sweden' Estimate Std.Err Z p-value (Intercept) -1.149412 0.032155 -35.745836 0.0000 atanh(rho) MZ 0.836864 0.125476 6.669520 0.0000 atanh(rho) DZ 0.199677 0.092907 2.149202 0.0316 Total MZ/DZ Complete pairs MZ/DZ 1183/1987 461/749 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.68414 0.53057 0.79423 Tetrachoric correlation DZ 0.19706 0.01758 0.36425 MZ: Estimate 2.5% 97.5% Concordance 0.06055 0.04659 0.07835 Casewise Concordance 0.48365 0.38001 0.58872 Marginal 0.12519 0.11277 0.13877 Rel.Recur.Risk 3.86327 3.00137 4.72517 log(OR) 2.46295 1.83001 3.09590 DZ: Estimate 2.5% 97.5% Concordance 0.02515 0.01672 0.03766 Casewise Concordance 0.20088 0.13541 0.28746 Marginal 0.12519 0.11277 0.13877 Rel.Recur.Risk 1.60452 0.99901 2.21004 log(OR) 0.66610 0.08952 1.24268 Estimate 2.5% 97.5% Broad-sense heritability 0.97416 0.53594 1.41238 #+END_example Wald test (stratified vs main effect) #+BEGIN_SRC R :wrap example B <- contr(3,4)[-(1:3),] compare(bp8,contrast=B) #+END_SRC #+RESULTS: #+BEGIN_example - Wald test - Null Hypothesis: [Denmark.atanh(rho) MZ] - [Finland.atanh(rho) MZ] = 0 [Denmark.atanh(rho) MZ] - [Norway.atanh(rho) MZ] = 0 [Denmark.atanh(rho) MZ] - [Sweden.atanh(rho) MZ] = 0 [Denmark.atanh(rho) DZ] - [Finland.atanh(rho) DZ] = 0 [Denmark.atanh(rho) DZ] - [Norway.atanh(rho) DZ] = 0 [Denmark.atanh(rho) DZ] - [Sweden.atanh(rho) DZ] = 0 data: chisq = 3.4972, df = 6, p-value = 0.7443 sample estimates: Estimate Std.Err [Denmark.atanh(rho) MZ] - [Finland.atanh(rho) MZ] 0.13356056 0.3726923 [Denmark.atanh(rho) MZ] - [Norway.atanh(rho) MZ] 0.07642511 0.3713780 [Denmark.atanh(rho) MZ] - [Sweden.atanh(rho) MZ] 0.15603181 0.2509676 [Denmark.atanh(rho) DZ] - [Finland.atanh(rho) DZ] -0.32255628 0.2594839 [Denmark.atanh(rho) DZ] - [Norway.atanh(rho) DZ] -0.46317298 0.3138347 [Denmark.atanh(rho) DZ] - [Sweden.atanh(rho) DZ] -0.12908846 0.2087690 2.5% 97.5% [Denmark.atanh(rho) MZ] - [Finland.atanh(rho) MZ] -0.5969029 0.8640240 [Denmark.atanh(rho) MZ] - [Norway.atanh(rho) MZ] -0.6514624 0.8043126 [Denmark.atanh(rho) MZ] - [Sweden.atanh(rho) MZ] -0.3358556 0.6479192 [Denmark.atanh(rho) DZ] - [Finland.atanh(rho) DZ] -0.8311353 0.1860227 [Denmark.atanh(rho) DZ] - [Norway.atanh(rho) DZ] -1.0782776 0.1519316 [Denmark.atanh(rho) DZ] - [Sweden.atanh(rho) DZ] -0.5382682 0.2800912 #+END_example * COMMENT Cumulative heritability #+BEGIN_SRC R :wrap example args(cumh) #+END_SRC #+RESULTS: #+BEGIN_example Error in args(cumh) : object 'cumh' not found #+END_example #+BEGIN_SRC R :exports code ch1 <- cumh(cancer~1,time="time",zyg="zyg",DZ="DZ",id="id", type="ace",data=prtw,weight="w") #+END_SRC #+RESULTS: : Error: could not find function "cumh" #+BEGIN_SRC R :wrap example summary(ch1) #+END_SRC #+RESULTS: #+BEGIN_example Error in summary(ch1) : object 'ch1' not found #+END_example #+BEGIN_SRC R :results output graphics :file cumh.png plot(ch1) #+END_SRC #+RESULTS: [[file:cumh.png]] ----- mets/inst/misc/cif2.png0000644000176200001440000003572313623061405014475 0ustar liggesusersPNG  IHDR}Ծ$iCCPICC Profile8UoT>oR? XGůUS[IJ*$:7鶪O{7@Hkk?<kktq݋m6nƶد-mR;`zv x#=\% oYRڱ#&?>ҹЪn_;j;$}*}+(}'}/LtY"$].9⦅%{_a݊]hk5'SN{<_ t jM{-4%TńtY۟R6#v\喊x:'HO3^&0::m,L%3:qVE t]~Iv6Wٯ) |ʸ2]G4(6w‹$"AEv m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j(Gc###0>u-Hxa 3NzB6F60}X|co۶bްaQRR?7nV{'67onũP?0 e7m߾HOOu&M2nF,nܦ1>ޱcl^qoG}sN#99P_ d{w 7O8!2n86mbeͽbvډ_%\"CSB1OxW hiϞ=C&x k`~3ʼyBk N[J Ynݦ[j%dnئ5 /=Cӟ$w ZOcjo;Suĉ< )9Q1!YIiݺurꩧZ{n?3g9uΝ^״iSxE+ucV{NW=nP]abꪫDV[VVf!%,un=n?n7+<"u2c ?u]T[P!^xEJ vC /Xwwr݀޼H T"صko ,sZߞ^SsL֕NRԏ:̞bUqbߤUW:yRtV_4Գ}WxU bٸqu8+Ͳ=my ?>}X_,Tq6(e* I8CIII߱}O՗mGl8A~u!yHx7]ZW˞ޘ| uh u<`1ŠB]dނdg?CE\ue*?0I s0lü|#x Λ jiuEE0@[ Hڍ۴_mn5_ uo݋ 7WA[j?uJBݻw7ðFnnu+RRΛ3{lü0n5/ V6uں*yX%[_+fuK//ni0&X* s_[SomZ]X_͋ O> ٭۴-ǼW0m7~X_Unn/F'lI>'+++|~6uqZݙX?A:x:SCҁTs˹½v6bUnZZZPnܦfA;ر7 8y @ :AT @ 8P $H hA@ Pk@$@N4  (@5   'j@ j@ M5  5x @H @HF@ A$AS  $@ ^# p@@p@H 8AT @ 8P $H hA ^F4I&ҪU+}INO?W(dSe1L ''G^yK-۵kdeeIfx l*/۷o7ʍ7(wymV bͿKE%;{=ٳiFF)  86mT򭨨~,X :tO>D+~X~my[6L>)**t9s0*Ԇn^Er[ %%EjjjoWwzQ\\,' 4\p;DqM6=i+ ˗˪ 8 {^ @8xCր.rdV\juVmm$`~4Pg̘!?C?/=k A@kֺ{h nYԌ{H["CXswMCp ؽ}Kd  5 ^{@4 k94 @$`-!h,@ָsh {H["CXq4@ ۷D XΡi  o @@cƝC@+@vo $`;!W޾%2@?ïI;IENDB`mets/inst/doc/0000755000176200001440000000000013623061747012755 5ustar liggesusersmets/inst/doc/binomial-twin.ltx0000644000176200001440000010207413623061405016252 0ustar liggesusers%\VignetteIndexEntry{Analysis of bivariate binomial data: Twin analysis} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of bivariate binomial data: Twin analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of bivariate binomial data: Twin analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgc699b56} When looking at bivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible in our models. To be concrete about the model structure assume that we have paired binomial data \(Y_1, Y_2, X_1, X_2\) where the responses are \(Y_1, Y_2\) and we have covariates \(X_1, X_2\). We start by giving a brief description of these different models. First we for bivariate data one can specify the marginal probability using logistic regression models \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2. \] These model can be estimated under working independence \cite{zeger-liang-86}. A typical twin analysis will typically consist of looking at both \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \end{itemize} The additive gamma can be used for the same as the bivariate probit model but is more restrictive in terms of dependence structure, but is nevertheless still valuable to have also as a check of results of the bivariate probit model. \subsection*{Biprobit with random effects} \label{sec:org86402a4} For these model we assume that given random effects \(Z\) and a covariate vector \(V_{12}\) we have independent logistic regression models \[ probit(P(Y_i=1|X_i, Z)) = \alpha_i + X_i^T \beta + V_{12}^T Z i=1,2. \] where \(Z\) is a bivariate normal distribution with some covariance \(\Sigma\). The general covariance structure \(\Sigma\) makes the model very flexible. We note that \begin{itemize} \item Paramters \(\beta\) are subject specific \item The \(\Sigma\) will reflect dependence \end{itemize} The more standard link function \(logit\) rather than the \(probit\) link is often used and implemented in for example \cite{mm}. The advantage is that one now gets an odds-ratio interpretation of the subject specific effects, but one then needs numerical integration to fit the model. \#We note that \subsection*{Pairwise odds ratio model} \label{sec:orgf29d361} Now the pairwise odds ratio model the specifies that given \(X_1, X_2\) the marginal models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] The primary object of interest are the odds ratio between \(Y_{1}\) and \(Y_{2}\) \[ \gamma_{12} = \frac{ P( Y_{ki} =1 , Y_{kj} =1) P( Y_{ki} =0 , Y_{kj} =0) }{ P( Y_{ki} =1 , Y_{kj} =0) P( Y_{ki} =0 , Y_{kj} =1) } \] given \(X_{ki}\), \(X_{kj}\), and \(Z_{kji}\). We model the odds ratio with the regression \[ \gamma_{12} = \exp( Z_{12}^T \lambda) \] Where \(Z_{12}\) are some covarites that may influence the odds-ratio between between \(Y_{1}\) and \(Y_{2}\) and contains the marginal covariates, \cite{carey-1993,dale1986global,palmgren1989,molenberghs1994marginal}. This odds-ratio is given covariates as well as marginal covariates. The odds-ratio and marginals specify the joint bivariate distribution via the so-called Placckett-distribution. One way of fitting this model is the ALR algoritm, the alternating logistic regression ahd this has been described in several papers \cite{kuk2004permutation,kuk2007hybrid,qaqish2012orthogonalized}. We here simply estimate the parameters in a two stage-procedure \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} This gives efficient estimates of the dependence parameters because of orthogonality, but some efficiency may be gained for the marginal parameters by using the full likelihood or iterative fitting such as for the ALR. The pairwise odds-ratio model is very useful, but one do not have a random effects model. \subsection*{Additive gamma model} \label{sec:orgdb54e35} Again we operate under marginal logistic regression models are \[ logit(P(Y_i=1|X_i)) = \alpha_i + X_i^T \beta i=1,2 \] First with just one random effect \(Z\) we assume that conditional on \(Z\) the responses are independent and follow the model \[ logit(P(Y_i=1|X_i,Z)) = exp( -Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) \] where \(\Psi\) is the laplace transform of \(Z\) where we assume that \(Z\) is gamma distributed with variance \(\lambda_{\bullet}^{-1}\) and mean 1. In general \(\Psi(\lambda_1,\lambda_2)\) is the laplace transform of a Gamma distributed random effect with \(Z\) with mean \(\lambda_1/\lambda_2\) and variance \(\lambda_1/\lambda_2^2\). We fit this model by \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} To deal with multiple random effects we consider random effects \(Z_i i=1,...,d\) such that \(Z_i\) is gamma distributed with mean \(\lambda_j/\lambda_{\bullet}\) and variance \(\lambda_j/\lambda_{\bullet}^2\), where we define the scalar \(\lambda_{\bullet}\) below. Now given a cluster-specific design vector \(V_{12}\) we assume that \[ V_{12}^T Z \] is gamma distributed with mean 1 and variance \(\lambda_{\bullet}^{-1}\) such that critically the random effect variance is the same for all clusters. That is \[ \lambda_{\bullet} = V_{12}^T (\lambda_1,...,\lambda_d)^T \] We return to some specific models below, and show how to fit the ACE and AE model using this set-up. One last option in the model-specification is to specify how the parameters \(\lambda_1,...,\lambda_d\) are related. We thus can specify a matrix \(M\) of dimension \(p \times d\) such that \[ (\lambda_1,...,\lambda_d)^T = M \theta \] where \(\theta\) is d-dimensional. If \(M\) is diagonal we have no restrictions on parameters. This parametrization is obtained with the var.par=0 option that thus estimates \(\theta\). The DEFAULT parametrization instead estimates the variances of the random effecs (var.par=1) via the parameters \(\nu\) \[ M \nu = ( \lambda_1/\lambda_{\bullet}^2, ...,\lambda_d/\lambda_{\bullet}^2)^T \] The basic modelling assumption is now that given random effects \(Z=(Z_1,...,Z_d)\) we have independent probabilites \[ logit(P(Y_i=1|X_i,Z)) = exp( -V_{12,i}^T Z \cdot \Psi^{-1}(\lambda_{\bullet},\lambda_{\bullet},P(Y_i=1|X_i)) ) i=1,2 \] We fit this model by \begin{itemize} \item Estimating the marginal parameters via GEE \item Using marginal estimates, estimate dependence parameters \end{itemize} Even though the model not formaly in this formulation allows negative correlation in practice the paramters can be negative and this reflects negative correlation. An advanatage is that no numerical integration is needed. \section*{The twin-stutter data} \label{sec:orgf3a7afd} We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinsall <- twinstut twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace tvparnr zyg stutter sex age nr binstut 1 2001005 mz no female 71 1 0 2 2001005 mz no female 71 2 0 3 2001006 dz no female 71 1 0 8 2001012 mz no female 71 1 0 9 2001012 mz no female 71 2 0 11 2001015 dz no male 71 1 0 \end{verbatim} \section*{Pairwise odds ratio model} \label{sec:orgbf74e81} We start by fitting an overall dependence OR for both MZ and DZ even though the dependence is expected to be different across zygosity. The first step is to fit the marginal model adjusting for marginal covariates. We here note that there is a rather strong gender effect in the risk of stuttering. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~factor(sex)+age,data=twinstut,family=binomial()) summary(margbin) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ factor(sex) + age, family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4419 -0.4078 -0.2842 -0.2672 2.6395 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.027625 0.104012 -29.108 < 2e-16 *** factor(sex)male 0.869826 0.062197 13.985 < 2e-16 *** age -0.005983 0.002172 -2.754 0.00588 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9117.0 on 21285 degrees of freedom AIC: 9123 Number of Fisher Scoring iterations: 6 \end{verbatim} Now estimating the OR parameter. We see a strong dependence with an OR at around 8 that is clearly significant. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,detail=0) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dependence1 2.085347 0.1274536 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 8.05 1.03 6.04 10.1 4.3e-15 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now, and more interestingly, we consider an OR that depends on zygosity and note that MZ have a much larger OR than DZ twins. This type of trait is somewhat complicated to interpret, but clearly, one option is that that there is a genetic effect, alternatively there might be a stronger environmental effect for MZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # design for OR dependence theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5221651 0.2401355 factor(zyg)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We now consider further regression modelling of the OR structure by considering possible interactions between sex and zygozsity. We see that MZ has a much higher dependence and that males have a much lower dependence. We tested for interaction in this model and these were not significant. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinstut$cage <- scale(twinstut$age) theta.des <- model.matrix( ~-1+factor(zyg)+factor(sex),data=twinstut) bina <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.8098841 0.3138423 factor(zyg)mz 3.7318076 0.2632250 factor(sex)male -0.4075409 0.3055349 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 2.248 0.705 0.865 3.63 0.001441 factor(zyg)mz 41.755 10.991 20.213 63.30 0.000145 factor(sex)male 0.665 0.203 0.267 1.06 0.001064 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Alternative syntax} \label{sec:org3f01206} We now demonstrate how the models can fitted jointly and with anohter syntax, that ofcourse just fits the marginal model and subsequently fits the pairwise OR model. First noticing as before that MZ twins have a much higher dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's) out <- easy.binomial.twostage(stutter~factor(sex)+age,data=twinstut, response="binstut",id="tvparnr",var.link=1, theta.formula=~-1+factor(zyg1)) summary(out) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg1)dz 0.5221651 0.2401355 factor(zyg1)mz 3.4853933 0.1866076 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg1)dz 1.69 0.405 0.892 2.48 3.12e-05 factor(zyg1)mz 32.64 6.090 20.699 44.57 8.38e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now considering all data and estimating separate effects for the OR for opposite sex DZ twins and same sex twins. We here find that os twins are not markedly different from the same sex DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # refers to zygosity of first subject in eash pair : zyg1 # could also use zyg2 (since zyg2=zyg1 within twinpair's)) desfs<-function(x,num1="zyg1",num2="zyg2") c(x[num1]=="dz",x[num1]=="mz",x[num1]=="os")*1 margbinall <- glm(binstut~factor(sex)+age,data=twinsall,family=binomial()) out3 <- easy.binomial.twostage(binstut~factor(sex)+age, data=twinsall,response="binstut",id="tvparnr",var.link=1, theta.formula=desfs,desnames=c("dz","mz","os")) summary(out3) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se dz 0.5278527 0.2396796 mz 3.4850037 0.1864190 os 0.7802940 0.2894394 $or Estimate Std.Err 2.5% 97.5% P-value dz 1.70 0.406 0.899 2.49 3.02e-05 mz 32.62 6.081 20.703 44.54 8.13e-08 os 2.18 0.632 0.944 3.42 5.50e-04 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \section*{Bivariate Probit model} \label{sec:org1b646d8} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut <- subset(twinstut,zyg%in%c("mz","dz")) twinstut$binstut <- 1*(twinstut$stutter=="yes") head(twinstut) \end{lstlisting} \begin{verbatim} tvparnr zyg stutter sex age nr binstut 1 2001005 mz no female 71 1 0 2 2001005 mz no female 71 2 0 3 2001006 dz no female 71 1 0 8 2001012 mz no female 71 1 0 9 2001012 mz no female 71 2 0 11 2001015 dz no male 71 1 0 \end{verbatim} First testing for same dependence in MZ and DZ that we recommend doing by comparing the correlations of MZ and DZ twins. Apart from regression correction in the mean this is an un-structured model, and the useful concordance and casewise concordance estimates can be reported from this analysis. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="un") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -1.794823 0.023289 -77.066728 0.0000 sexmale 0.401432 0.030179 13.301813 0.0000 atanh(rho) MZ 1.096916 0.073574 14.909087 0.0000 atanh(rho) DZ 0.132458 0.062516 2.118800 0.0341 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% Tetrachoric correlation MZ 0.79939 0.74101 0.84577 Tetrachoric correlation DZ 0.13169 0.00993 0.24960 MZ: Estimate 2.5% 97.5% Concordance 0.01698 0.01411 0.02042 Casewise Concordance 0.46730 0.40383 0.53185 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 12.85882 10.87510 14.84253 log(OR) 3.75632 3.37975 4.13289 DZ: Estimate 2.5% 97.5% Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 Rel.Recur.Risk 1.77662 0.92746 2.62577 log(OR) 0.63527 0.09013 1.18040 Estimate 2.5% 97.5% Broad-sense heritability 1 NaN NaN \end{verbatim} \subsection*{Polygenic modelling} \label{sec:org8788a7d} We now turn attention to specific polygenic modelling where special random effects are used to specify ACE, AE, ADE models and so forth. This is very easy with the bptwin function. The key parts of the output are the sizes of the genetic component A and the environmental component, and we can compare with the results of the unstructed model above. Also formally we can test if this submodel is acceptable by a likelihood ratio test. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ace") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 log(var(C)) -29.99519 NA NA NA Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 C 0.00000 0.00000 0.00000 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b0 <- bptwin(binstut~sex,data=twinstut,id="tvparnr",zyg="zyg",DZ="dz",type="ae") summary(b0) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -3.70371 0.24449 -15.14855 0 sexmale 0.83310 0.08255 10.09201 0 log(var(A)) 1.18278 0.17179 6.88512 0 Total MZ/DZ Complete pairs MZ/DZ 8777/12511 3255/4058 Estimate 2.5% 97.5% A 0.76545 0.70500 0.82590 E 0.23455 0.17410 0.29500 MZ Tetrachoric Cor 0.76545 0.69793 0.81948 DZ Tetrachoric Cor 0.38272 0.35210 0.41253 MZ: Estimate 2.5% 97.5% Concordance 0.01560 0.01273 0.01912 Casewise Concordance 0.42830 0.36248 0.49677 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 11.75741 9.77237 13.74246 log(OR) 3.52382 3.13466 3.91298 DZ: Estimate 2.5% 97.5% Concordance 0.00558 0.00465 0.00670 Casewise Concordance 0.15327 0.13749 0.17050 Marginal 0.03643 0.03294 0.04027 Rel.Recur.Risk 4.20744 3.78588 4.62900 log(OR) 1.69996 1.57262 1.82730 Estimate 2.5% 97.5% Broad-sense heritability 0.76545 0.70500 0.82590 \end{verbatim} \section*{Additive gamma random effects} \label{sec:orgff761d3} Fitting first a model with different size random effects for MZ and DZ. We note that as before in the OR and biprobit model the dependence is much stronger for MZ twins. We also test if these are the same by parametrizing the OR model with an intercept. This clearly shows a significant difference. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) # test for same dependence in MZ and DZ theta.des <- model.matrix( ~factor(zyg),data=twinstut) margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin <- binomial.twostage(margbin,data=twinstut,model="gamma", clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=1, theta.des=theta.des) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se factor(zyg)dz -2.61194495 0.4854454 factor(zyg)mz -0.01817181 0.1030735 $vargam Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 0.0734 0.0356 0.00356 0.143 3.94e-02 factor(zyg)mz 0.9820 0.1012 0.78361 1.180 2.96e-22 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates theta se (Intercept) -2.611945 0.4854454 factor(zyg)mz 2.593773 0.4962675 $vargam Estimate Std.Err 2.5% 97.5% P-value (Intercept) 0.0734 0.0356 0.00356 0.143 0.0394 factor(zyg)mz 13.3802 6.6401 0.36573 26.395 0.0439 $type [1] "gamma" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Polygenic modelling} \label{sec:orgc97abc0} First setting up the random effects design for the random effects and the the relationship between variance parameters. We see that the genetic random effect has size one for MZ and 0.5 for DZ subjects, that have shared and non-shared genetic components with variance 0.5 such that the total genetic variance is the same for all subjects. The shared environmental effect is the samme for all. Thus two parameters with these bands. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ace") head(cbind(out$des.rv,twinstut$tvparnr),10) out$pardes \end{lstlisting} \begin{verbatim} MZ DZ DZns1 DZns2 env 1 1 0 0 0 1 2001005 2 1 0 0 0 1 2001005 3 0 1 1 0 1 2001006 8 1 0 0 0 1 2001012 9 1 0 0 0 1 2001012 11 0 1 1 0 1 2001015 12 0 1 1 0 1 2001016 13 0 1 0 1 1 2001016 15 0 1 1 0 1 2001020 18 0 1 1 0 1 2001022 [,1] [,2] [1,] 1.0 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.5 0 [5,] 0.0 1 \end{verbatim} Now, fitting the ACE model, we see that the variance of the genetic, component, is 1.5 and the environmental variance is -0.5. Thus suggesting that the ACE model does not fit the data. When the random design is given we automatically use the gamma fralty model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~sex,data=twinstut,family=binomial()) bintwin1 <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.5261839 0.2475041 dependence2 -0.5447955 0.1942159 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1.555 0.187 1.189 1.922 9.11e-17 dependence2 -0.555 0.187 -0.922 -0.189 2.99e-03 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.981 0.102 0.781 1.18 8.29e-22 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} For this model we estimate the concordance and casewise concordance as well as the marginal rates of stuttering for females. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} concordanceTwinACE(bintwin1,type="ace") \end{lstlisting} \begin{verbatim} $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0182 0.00147 0.0153 0.0211 2.61e-35 casewise concordance 0.5033 0.03256 0.4395 0.5672 6.49e-54 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00235 0.000589 0.0012 0.00351 6.45e-05 casewise concordance 0.06501 0.015836 0.0340 0.09604 4.04e-05 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 \end{verbatim} The E component was not consistent with the fit of the data and we now consider instead the AE model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.909 0.0954 0.723 1.1 1.47e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Again, the concordance can be computed: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} concordanceTwinACE(bintwin,type="ae") \end{lstlisting} \begin{verbatim} $MZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.0174 0.00143 0.0146 0.0202 5.00e-34 casewise concordance 0.4795 0.03272 0.4154 0.5437 1.20e-48 marginal 0.0362 0.00188 0.0325 0.0399 7.15e-83 $DZ Estimate Std.Err 2.5% 97.5% P-value concordance 0.00477 0.000393 0.0040 0.00554 5.94e-34 casewise concordance 0.13175 0.005417 0.1211 0.14237 1.14e-130 marginal 0.03620 0.001877 0.0325 0.03988 7.15e-83 \end{verbatim} \end{document}mets/inst/doc/twostage-survival.ltx0000644000176200001440000013131313623061405017205 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate survival data} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate survival data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate survival data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org3befec5} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \begin{itemize} \item biprobit model \end{itemize} \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \(T_1, \delta_1, T_2, \delta_2, X_1, X_2\) where the censored survival responses are \(T_1, \delta_1, T_2, \delta_2\) and we have covariates \(X_1, X_2\). The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{s(k,i)}(t) \exp( X_{ki}^T \beta) \] where \(s(k,i)\) is a strata variable. \subsection*{Gamma distributed frailties} \label{sec:org3bb9661} The focus of this vignette is describe how to work on bivariate survival data using the addtive gamma-random effects models. We present two different ways of specifying different dependence structures. \begin{itemize} \item Univariate models with a single random effect for each cluster and with a regression design on the variance. \item Multivariate models with multiple random effects for each cluster. \end{itemize} The univariate models are then given a given cluster random effects \(Z_k\) with parameter \(\theta\) the joint survival function is given by the Clayton copula and on the form \[ \psi(\theta, \psi^{-1}(\theta,S_1(t,X_{k1}) ) + \psi^{-1}(\theta, S_1(t,X_{k1}) ) \] where \(\psi\) is the Laplace transform of a gamma distributed random variable with mean 1 and variance \(\theta\). We then model the variance within clusters by a cluster specific regression design such that \[ \theta = z_j^T \alpha \] where \(z\) is the regression design (specified by theta.des in the software). This model can be fitted using a pairwise likelihood or the pseudo-likelihood using either \begin{itemize} \item twostage \item twostageMLE \end{itemize} To make the twostage approach possible we need a model with specific structure for the marginals. Therefore given the random effect of the clusters the survival distributions within a cluster are independent and on the form \[ P(T_j > t| X_j,Z) = exp( -Z \cdot \Psi^{-1}(\nu^{-1},S(t|X_j)) ) \] with \(\Psi\) the laplace of the gamma distribution with mean 1 and variance \(1/\nu\). \subsection*{Additive Gamma frailties} \label{sec:orge7e6b98} For the multivariate models we are given a multivarite random effect each cluster \(Z=(Z_1,...,Z_d)\) with d random effects. The total random effect for each subject \(j\) in a cluster is then specified using a regression design on these random effects, with a regression vector \(V_j\) such that the total random effect is \(V_j^T (Z_1,...,Z_d)\). The elements of \(V_J\) are 1/0. The random effects \((Z_1,...,Z_d)\) has associated parameters \((\lambda_1,...,\lambda_d)\) and \(Z_j\) is Gamma distributed with \begin{itemize} \item mean \(\lambda_j/V_1^T \lambda\) \item variance \(\lambda_j/(V_1^T \lambda)^2\) \end{itemize} The key assumption to make the two-stage fitting possible is that \[ \nu =V_j^T \lambda \] is constant within clusters. The consequence of this is that the total random effect for each subject within a cluster, \(V_j^T (Z_1,...,Z_d)\) , is gamma distributed with variance \(1/\nu\). The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \[ \theta_j = \lambda_j/\nu^2 \] For alternative parametrizations one can specify that the parameters are \(\theta_j=\lambda_j\) with the argument var.par=0. Finally the parameters \((\theta_1,...,\theta_d)\) are related to the parameters of the model by a regression construction \(M\) (d x k), that links the \(d\) \(\theta\) parameters with the \(k\) underlying \(\alpha\) parameters \[ \theta = M \alpha. \] The default is a diagonal matrix for \(M\). This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. In the software \(M\) is called theta.des Assume that the marginal survival distribution for subject \(i\) within cluster \(k\) is given by \(S_{X_{k,i}}(t)\) given covariates \(X_{k,i}\). Now given the random effects of the cluster \(Z_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) we assume that subjects within the cluster are independent with survival distributions \begin{align*} \exp(- ( V_{k,i} Z_k) \Psi^{-1} (\nu,S_{X_{k,i}}(t)) ). \end{align*} A consequence of this is that the hazards given the covariates \(X_{k,i}\) and the random effects \(Z_k\) are given by \begin{align} \lambda_{k,i}(t;X_{k,i},Z_{k,i}) = ( V_{k,i} V_k) D_3 \Psi^{-1} (\nu,S_{X_{k,i}}(t)) D_t S_{X_{k,i}}(t) \label{eq-cond-haz} \end{align} where \(D_t\) and \(D_3\) denotes the partial derivatives with respect to \(t\) and the third argument, respectively. Further, we can express the multivariate survival distribution as \begin{align} S(t_1,\dots,t_m) & = \exp( -\sum_{i=1}^m (V_i Z) \Psi^{-1}(\eta_l,\nu_l,S_{X_{k,i}}(t_i)) ) \nonumber \\ & = \prod_{l=1}^p \Psi(\eta_l,\eta , \sum_{i=1}^m Q_{k,i} \Psi^{-1}(\eta,\eta,S_{X_{k,i}}(t_i))). \label{eq-multivariate-surv} \end{align} In the case of considering just pairs, we write this function as \(C(S_{k,i}(t),S_{k,j}(t))\). In addition to survival times from this model, we assume that we independent right censoring present \(U_{k,i}\) such that the given \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) \((U_{k,1},\dots,U_{k,n_k})\) of \((T_{k,1},\dots,T_{k,n_k})\), and the conditional censoring distribution do not depend on \(V_k\). One consequence of the model strucure is that the Kendall's can be computed for two-subjects \((i,j)\) across two clusters ``1'' and ``2'' as \begin{align} E( \frac{( V_{1i} Z_1- V_{1j}Z_2)( V_{2i}Z_1 - V_{2j}Z_2 )}{( V_{1i}Z_1 + V_{2i}Z_2 ) ( V_{1j}Z_1 + V_{2j}Z_2 )} ) \end{align} under the assumption that that we compare pairs with equivalent marginals, \(S_{X_{1,i}}(t)= S_{X_{2,i}}(t)\) and \(S_{X_{1,j}}(t)= S_{X_{2,j}}(t)\), and that \(S_{X_{1,i}}(\infty)= S_{X_{1,j}}(\infty)=0\). Here we also use that \(\eta\) is the same across clusters. The Kendall's tau would be the same for \eqref{frailty-model} due to the same additive structure for the frailty terms, and the random effects thus have the same interpretation in terms of Kendall's tau. \subsection*{Univariate gamma (clayton-oakes) model twostage models} \label{sec:org138bf8c} We start by fitting simple Clayton-Oakes models for the data, that is with an overall random effect that is Gamma distrubuted with variance \(\theta\). We can fit the model by a pseudo-MLE (twostageMLE) and a pairwise composite likelihood approach (twostage). The pseudo-liklihood and the composite pairwise likelhood gives quite similar results in this case. In addition the log-parametrization is illustrated with the var.link=1 option. In addition it is specified that we want a "clayton.oakes" model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) # Clayton-Oakes fitco2 <- survival.twostage(margph,data=diabetes,theta=0.0,detail=0, clusters=diabetes$id,var.link=1,model="clayton.oakes") summary(fitco2) fitco3 <- survival.twostage(margph,data=diabetes,theta=1.0,detail=0, clusters=diabetes$id,var.link=0,model="clayton.oakes") summary(fitco3) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava mets version 1.2.4 Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.04849523 0.330665 -0.1466597 0.8834006 0.3226451 0.07226526 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9527 0.315 0.3352 1.57 0.002493 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526619 0.3150119 3.024209 0.002492843 0.3226451 0.07226526 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The marginal models can be either structured Cox model or as here with a baseline for each strata. This gives quite similar results to those before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # without covariates but marginal model stratified marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Piecewise constant Clayton-Oakes model} \label{sec:orgedb6727} Let the cross-hazard ratio (CHR) be defined as \begin{align} \eta(t_1,t_2) = \frac{ \lambda_1(t_1| T_2=t_2)}{ \lambda_1(t_1| T_2 \ge t_2)} = \frac{ \lambda_2(t_2| T_1=t_1)}{ \lambda_2(t_2| T_1 \ge t_1)} \end{align} where \(\lambda_1\) and \(\lambda_2\) are the conditional hazard functions of \(T_1\) and \(T_2\) given covariates. For the Clayton-Oakes model this ratio is \(\eta(t_1,t_2) = 1+\theta\), and as a consequence we see that if the co-twin is dead at any time we would increase our risk assessment on the hazard scale with the constant \(\eta(t_1,t_2)\). The Clayton-Oakes model also has the nice property that Kendall's tau is linked directly to the dependence parameter \(\theta\) and is \(1/(1+2/\theta)\). A very useful extension of the model the constant cross-hazard ratio (CHR) model is the piecewise constant cross-hazard ratio (CHR) for bivariate survival data \cite{nan2006piecewise}, and this model was extended to competing risks in \cite{shih2010modeling}. In the survival setting we let the CHR \begin{align} \eta(t_1,t_2) & = \sum \eta_{i,j} I(t_1 \in I_i, t_2 \in I_j) \end{align} The model lets the CHR by constant in different part of the plane. This can be thought of also as having a separate Clayton-Oakes model for each of the regions specified in the plane here by the cut-points \(c(0,0.5,2)\) thus defining 9 regions. This provides a constructive goodness of fit test for the whether the Clayton-Oakes model is valid. Indeed if valid the parameter should be the same in all regions. First we generate some data from the Clayton-Oakes model with variance \(0.5\) and 2000 pairs. And fit the related model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} d <- simClaytonOakes(2000,2,0.5,0,3) margph <- phreg(Surv(time,status)~x+cluster(cluster),data=d) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=d) summary(fitco1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.01888 0.08970192 22.50654 0 0.5023489 0.01110764 $type NULL attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now we cut the region at the cut-points \(c(0,0.5,2)\) thus defining 9 regions and fit a separate model for each region. We see that the parameter is indeed rather constant over the 9 regions. A formal test can be constructed. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="clayton.oakes",silent=0) summary(udp) \end{lstlisting} \begin{verbatim} Data-set 1 out of 4 Number of joint events: 518 of 2000 Data-set 2 out of 4 Number of joint events: 274 of 1232 Data-set 3 out of 4 Number of joint events: 247 of 1203 Data-set 4 out of 4 Number of joint events: 594 of 953 [1] 1 Dependence parameter for Clayton-Oakes model Score of log-likelihood for parameter estimates (too large?) 0 - 0.5 0.5 - 2 0 - 0.5 0.0019673733 0.001451886 0.5 - 2 0.0007297083 0.003142920 log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.687 (0.069) 0.677 (0.093) 0.5 - 2 0.733 (0.100) 0.718 (0.060) Kendall's tau (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.498 (0.017) 0.496 (0.023) 0.5 - 2 0.51 (0.025) 0.506 (0.015) \end{verbatim} \subsection*{Multivariate gamma twostage models} \label{sec:org1b5ea9b} To illustrate how the multivariate models can be used, we first set up some twin data with ACE structure. That is two shared random effects, one being the genes \(\sigma_g^2\) and one the environmental effect \(\sigma_e^2\). Monozygotic twins share all genes whereas the dizygotic twins only share half the genes. This can be expressed via 5 random effect for each twin pair (for example). We start by setting this up. The pardes matrix tells how the the parameters of the 5 random effects are related, and the matrix her first has one random effect with parameter \(\theta_1\) (here the \(\sigma_g^2\)), then the next 3 random effects have parameters \(0.5 \theta_1\) (here \(0.5 \sigma_g^2\)), and the last random effect that is given by its own parameter \(\theta_2\) (here \(\sigma_e^2\)). \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data <- simClaytonOakes.twin.ace(2000,2,1,0,3) out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes pardes \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1.0 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.5 0 [5,] 0.0 1 \end{verbatim} The last part of the model structure is to decide how the random effects are shared for the different pairs (MZ and DZ), this is specfied by the random effects design (\(V_1\) and \(V_2\)) for each pair. This is here specified by an overall designmatrix for each subject (since they enter all pairs with the same random effects design). For an MZ pair the two share the full gene random effect and the full environmental random effect. In contrast the DZ pairs share the 2nd random effect with half the gene-variance and have both a non-shared gene-random effect with half the variance, and finally a fully shared environmental random effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} des.rv <- out$des.rv # MZ head(des.rv,2) # DZ tail(des.rv,2) \end{lstlisting} \begin{verbatim} MZ DZ DZns1 DZns2 env 1 1 0 0 0 1 2 1 0 0 0 1 MZ DZ DZns1 DZns2 env 3999 0 1 1 0 1 4000 0 1 0 1 1 \end{verbatim} Now we call the twostage function. We see that we essentially recover the true values, and note that the output also compares the sizes of the genetic and environmental random effect. This number is sometimes called the heritability. In addition the total variance for each subject is also computed and is here around \(3\), as we indeed constructed. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aa <- phreg(Surv(time,status)~x+cluster(cluster),data=data) ts <- twostage(aa,data=data,clusters=data$cluster,detail=0, theta=c(2,1),var.link=0,step=0.5, random.design=des.rv,theta.des=pardes) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.2111163 0.2219525 9.962113 0.000000e+00 0.5250665 0.02503201 dependence2 0.7431872 0.1706430 4.355217 1.329349e-05 0.2709211 0.04535315 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.7484 0.05898 0.6328 0.8640 6.669e-37 dependence2 0.2516 0.05898 0.1360 0.3672 1.995e-05 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.954 0.1426 2.675 3.234 2.514e-95 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The estimates can be transformed into Kendall's tau estimates for MZ and DZ twins. The Kendall's tau in the above output reflects how a gamma distributed random effect in the normal Clayton-Oakes model is related to the Kendall's tau. In this setting the Kendall's of MZ and DZ, however, should reflect both random effects. We do this based on simulations. The Kendall's tau of the MZ is around 0.60, and for DZ around 0.33. Both are quite high and this is due to a large shared environmental effect and large genetic effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} kendall.ClaytonOakes.twin.ace(ts$theta[1],ts$theta[2],K=10000) \end{lstlisting} \begin{verbatim} $mz.kendall [1] 0.5984888 $dz.kendall [1] 0.3257834 \end{verbatim} \subsection*{Family data} \label{sec:orga7a0fcf} For family data, things are quite similar since we use only the pairwise structure. We show how the designs are specified. First we simulate data from an ACE model. 2000 families with two-parents that share only the environment, and two-children that share genes with their parents. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) data <- simClaytonOakes.family.ace(2000,2,1,0,3) head(data) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) \end{lstlisting} \begin{verbatim} time status x cluster type mintime lefttime truncated 1 0.26343780 1 1 1 mother 0.26343780 0 0 2 1.14490828 1 1 1 father 0.26343780 0 0 3 0.86649229 1 1 1 child 0.26343780 0 0 4 0.30843425 1 0 1 child 0.26343780 0 0 5 3.00000000 0 0 2 mother 0.07739746 0 0 6 0.07739746 1 0 2 father 0.07739746 0 0 \end{verbatim} To set up the random effects some functions can be used. We here set up the ACE model that has 9 random effects with one shared environmental effect (the last random effect) and 4 genetic random effects for each parent, with variance \(\sigma_g^2/4\). The random effect is again set-up with an overall designmatrix because it is again the same for each subject for all comparisons across family members. We below demonstrate how the model can be specified in various other ways. Each child share 2 genetic random effects with each parent, and also share 2 genetic random effects with his/her sibling. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 \end{verbatim} Then we fit the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pa <- phreg(Surv(time,status)~+1+cluster(cluster),data=data) aa <- aalen(Surv(time,status)~+1,data=data,robust=0) # make ace random effects design ts <- twostage(pa,data=data,clusters=data$cluster, var.par=1,var.link=0,theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.19164670 11.40623 0 0.5222132 0.02187458 dependence2 0.947110 0.07648339 12.38321 0 0.3213691 0.01761183 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.02997 0.6390 0.7564 7.182e-120 dependence2 0.3023 0.02997 0.2436 0.3610 6.359e-24 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1737 2.793 3.474 1.074e-72 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} The model can also be fitted by specifying the pairs that one wants for the pairwise likelhood. This is done by specifying the pairs argument. We start by considering all pairs as we also did before. All pairs can be written up by calling the familycluster.index function. There are 12000 pairs to consider and the last 12 pairs for the last family is written out here. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # now specify fitting via specific pairs # first all pairs mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=10) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) tail(pairs,n=12) \end{lstlisting} \begin{verbatim} [1] 1 2 1 3 1 4 2 3 2 4 [,1] [,2] [11989,] 7993 7994 [11990,] 7993 7995 [11991,] 7993 7996 [11992,] 7994 7995 [11993,] 7994 7996 [11994,] 7995 7996 [11995,] 7997 7998 [11996,] 7997 7999 [11997,] 7997 8000 [11998,] 7998 7999 [11999,] 7998 8000 [12000,] 7999 8000 \end{verbatim} Then fitting the model using only specified pairs \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ts <- twostage(pa,data=data,clusters=data$cluster, theta=c(2,1),var.link=0,step=1.0, random.design=out$des.rv, theta.des=out$pardes,pairs=pairs) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.185967 0.18986604 11.51321 0 0.5222132 0.02167133 dependence2 0.947110 0.07929082 11.94476 0 0.3213691 0.01825829 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.6977 0.03044 0.6381 0.7574 2.659e-116 dependence2 0.3023 0.03044 0.2426 0.3619 3.010e-23 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.133 0.1713 2.797 3.469 1.057e-74 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now we only use a random sample of the pairs by sampling these. The pairs picked still refers to the data given in the data argument, and clusters (families) are also specified as before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ssid <- sort(sample(1:12000,2000)) tsd <- twostage(aa,data=data,clusters=data$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$des.rv,iid=1, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Sometimes one only has the data from the pairs in addition to for example a cohort estimate of the marginal surival models. We now demonstrate how this is dealt with. Everything is essentially as before but need to organize the design differently compared to before we specified the design for everybody in the cohort. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) # this requires that pair.new refers to id's in dataid (survival, status and so forth) # random.design and theta.des are constructed to be the array 3 dims via individual specfication from ace.family.design dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 1 1 0 0 0 0 1 [4,] 0 0 0 0 1 1 1 1 1 [5,] 1 1 0 0 1 1 0 0 1 [6,] 1 0 1 0 1 0 1 0 1 \end{verbatim} Now fitting the model using only the pair data. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=outid$des.rv,iid=1, theta.des=outid$pardes,pairs=pair.new) summary(tsdid) coef(tsdid) coef(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 \end{verbatim} Now we illustrate how one can also directly specify the random.design and theta.design for each pair, rather than taking the rows of the des.rv for the relevant pairs. This can be much simpler in some situations. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new) head(pair.types) # here makes pairwise design , simpler random.design og pardes, parameters # stil varg, varc # mother, child, share half rvm=c(1,1,0) rvc=c(1,0,1), # thetadesmcf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # father, child, share half rvf=c(1,1,0) rvc=c(1,0,1), # thetadescf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # child, child, share half rvc=c(1,1,0) rvc=c(1,0,1), # thetadesmf=rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) # # mother, father, share 0 rvm=c(1,0) rvf=c(0,1), # thetadesmf=rbind(c(1,0),c(1,0),c(0,1)) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } # 3 rvs here random.des[,,7] theta.des[,,7] # 4 rvs here random.des[,,1] theta.des[,,1] head(rvs) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 3 5 [4,] 4 6 [5,] 7 8 [6,] 9 10 [,1] [,2] [1,] "mother" "father" [2,] "mother" "father" [3,] "mother" "child" [4,] "father" "child" [5,] "child" "child" [6,] "child" "child" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [1] 3 3 4 4 4 4 \end{verbatim} And fitting again the same model as before \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid2 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) tsd$theta tsdid2$theta tsdid$theta \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 [,1] dependence1 2.001187 dependence2 1.054030 \end{verbatim} Finally the same model structure can be setup based on a Kinship coefficient. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # simpler specification via kinship coefficient for each pair kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) # 4 rvs here , here independence since shared component has variance 0 ! out$random.des[,,9] out$theta.des[,,9] \end{lstlisting} \begin{verbatim} [1] 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 \end{verbatim} Same same \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid3 <- twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/10,var.link=0,step=1.0, random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) coef(tsdid3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.655 0.05345 0.5502 0.7598 1.606e-34 dependence2 0.345 0.05345 0.2402 0.4498 1.089e-10 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 3.055 0.3253 2.418 3.693 5.923e-21 attr(,"class") [1] "summary.mets.twostage" Coef. SE z P-val Kendall tau SE dependence1 2.001187 0.3400847 5.884378 3.995533e-09 0.5001483 0.04248537 dependence2 1.054030 0.1277271 8.252205 2.220446e-16 0.3451275 0.02738838 \end{verbatim} \subsection*{Univariate plackett model twostage models} \label{sec:org5250adb} The copula known as the Plackett distribution, see \cite{plackett1965,anderson1992time,ghosh2006sjs}, is on the form \begin{align} C(u,v; \theta) = \begin{cases} \frac{ S - (S^2 - 4 u v \theta (\theta-a))}{2 (\theta -1)} & \mbox{ if } \theta \ne 1 \\ u v & \mbox{ if } \theta = 1 \end{cases} \end{align} with \(S=1+(\theta-1) (u + v)\). With marginals \(S_i\) we now define the bivariate survival function as \(C(u_1,u_2)=H(S_1(t_1),S_2(t_2))\) with \(u_i=S_i(t_i)\). The dependence parameter \(\theta\) has the nice interpretation that the it is equivalent to the odds-ratio of all \(2 \times 2\) tables for surviving past any cut of the plane \((t_1,t_2)\), that is $$ \theta = \frac{ P(T_1 > t_1 | T_2 >t_2) P(T_1 \leq t_1 | T_2>t_2) }{P(T_1 > t_1 | T_2 \leq t_2) P(T_1 \leq t_1 | T_2 \leq t_2 ) }. $$ One additional nice feature of the odds-ratio measure it that it is directly linked to the Spearman correlation, \(\rho\), that can be computed as \begin{align} \frac{\theta+1}{\theta -1} - \frac{2 \theta}{(\theta-1)^2} \log(\theta) \end{align} when \(\theta \ne 1\), if \(\theta=1\) then \(\rho=0\). This model has a more free parameter than the Clayton-Oakes model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(diabetes) # Marginal Cox model with treat as covariate margph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) # Clayton-Oakes, MLE fitco1<-twostageMLE(margph,data=diabetes,theta=1.0) summary(fitco1) # Plackett model mph <- phreg(Surv(time,status)~treat+cluster(id),data=diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett") summary(fitp) # without covariates but with stratafied marg <- phreg(Surv(time,status)~+strata(treat)+cluster(id),data=diabetes) fitpa <- survival.twostage(marg,data=diabetes,theta=1.0, clusters=diabetes$id,score.method="optimize") summary(fitpa) fitcoa <- survival.twostage(marg,data=diabetes,theta=1.0,clusters=diabetes$id, model="clayton.oakes") summary(fitcoa) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.9526614 0.3543033 2.68883 0.007170289 0.322645 0.08127892 $type NULL attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. SE dependence1 1.14188 0.2784057 4.101497 4.104867e-05 0.3648217 0.08158643 $or Estimate Std.Err 2.5% 97.5% P-value dependence1 3.133 0.8721 1.423 4.842 0.0003283 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683487 0.3239422 -0.1754476 0.8607279 0.3208252 0.07058583 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9448 0.306 0.3449 1.545 0.002022 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects With log-link $estimates log-Coef. SE z P-val Kendall tau SE dependence1 -0.05683996 0.3322322 -0.171085 0.8641569 0.3208241 0.07239207 $vargam Estimate Std.Err 2.5% 97.5% P-value dependence1 0.9447 0.3139 0.3296 1.56 0.002613 $type [1] "clayton.oakes" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} With a regression design \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} mm <- model.matrix(~-1+factor(adult),diabetes) fitp <- survival.twostage(mph,data=diabetes,theta=3.0,Nit=40, clusters=diabetes$id,var.link=1,model="plackett", theta.des=mm) summary(fitp) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates log-Coef. SE z P-val Spearman Corr. factor(adult)1 1.098333 0.3436264 3.196298 0.001392032 0.3519988 factor(adult)2 1.231962 0.4938132 2.494794 0.012603018 0.3909505 SE factor(adult)1 0.1016635 factor(adult)2 0.1417283 $or Estimate Std.Err 2.5% 97.5% P-value factor(adult)1 2.999 1.031 0.9792 5.019 0.003613 factor(adult)2 3.428 1.693 0.1102 6.746 0.042861 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # Piecewise constant cross hazards ratio modelling d <- subset(simClaytonOakes(2000,2,0.5,0,stoptime=2,left=0),!truncated) udp <- piecewise.twostage(c(0,0.5,2),data=d,score.method="optimize", id="cluster",timevar="time", status="status",model="plackett",silent=0) summary(udp) \end{lstlisting} \begin{verbatim} Data-set 1 out of 4 Number of joint events: 529 of 2000 Data-set 2 out of 4 Number of joint events: 248 of 1212 Data-set 3 out of 4 Number of joint events: 254 of 1219 Data-set 4 out of 4 Number of joint events: 633 of 960 [1] 1 Dependence parameter for Plackett model log-coefficient for dependence parameter (SE) 0 - 0.5 0.5 - 2 0 - 0.5 1.761 (0.083) 1.628 (0.128) 0.5 - 2 1.74 (0.128) 2.017 (0.092) Spearman Correlation (SE) 0 - 0.5 0.5 - 2 0 - 0.5 0.532 (0.020) 0.499 (0.033) 0.5 - 2 0.527 (0.032) 0.593 (0.021) \end{verbatim} \end{document}mets/inst/doc/competing.pdf0000644000176200001440000022200313623061751015427 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3157 /Filter /FlateDecode /N 72 /First 591 >> stream x[[s6~_f'Advj'>mEGR~/E;j;h<@0Ŵ-fP̰H,dB}Ǥ'Lodhc#GDŽfJ(ńaJy ,b*T oH^NJL*10-@3Da:P2ma2;ӄ@} 9f -|l4T,3QdoX("C*q #T0%R&XSG C`S!ms}O$BD[D!Q(Hړ3 BHB@>X|q&(tX!(`@^輨@$!kiAp̠k@Y )=oH AR B Km 3,'I"ɃNI׻mOk5/n*-H1Gt14 5*ǔTzh_ڽ"ٗ{ǎ+OdZ̸QqGI FFc0$b  xRNf4)wNr_u* ?fwtĊa!*dܺ鸸=oC|߷[{̗: ir ꣶH)Zs+SOUs/͡|kw!K}EezL:fxQk^B#bDPwIz}Q^-w.|;>S~_?Ƿw,c~G||~ůR~o׻dS'OyI$*\iFxy /h+,B8f_I+8mw׿Nz)Umt5 i-ZEr+ ט_GBٕݝ˳䢹p:z "1ݚa)pp1ڋ %rWG6h'|Ky4?s?gӄfd$F Rz[ȂlѴɸ4۴k7(k[eRxCg嵯/SP\Eq0:>i.&{{wuj e#{a|lui|c$Hayd|&䥚[xi5I{↞f|xvxaW6ՍZF&2]mA)Y)Ty`c,]BU|Pug œJ&KI|{9tm\CujDSNצIKսw^nN.UۡKTʬCڰbH:d >.Zd7G3K78cyN@&`\#[^8Nٕ::DPέ*+Je-!E]\"~f2 f(eL‚W9h٧ϏV|]AW=iK*Bjp"&r՗iUv-jڵCÑ.!r ɥ m{|8w}kjTBx#EE)ZH*lɵVvup~n pYMU2h3V~4iSnU7[!}\ƣOۿg62t,1oI<[a V68aSfww?cao#::7]!Y\uAkHf| ;7֑Gu2^= m { *f,qM.l&5IדbϏ>n/z Va=?>|;d,|u\a`mStѫ8Cx5[.܏&m+J)\$3S7;i}q˦ҮRt 鎼tU le&p%:Bҭ]+͕P#kEoDn7 eɊr^D]?|xtcL2PHL'Uw{JL*N^J ^^i(#vǞe0qfbU-:F(>zxMt=~lzcUhP+o~6 L}{?`{f5/h4|ڦmt{=}Wp Wwҫ{ oڮҋaρEJ]LhUҋIx|"! ؋ ֺ `tnB(! P~gsnkp60-WGendstream endobj 74 0 obj << /Subtype /XML /Type /Metadata /Length 1635 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:36+01:00 2020-02-18T23:23:36+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of multivariate competing risks dataKlaus Holst & Thomas Scheike endstream endobj 75 0 obj << /Filter /FlateDecode /Length 2210 >> stream xY˒۸BLY.=TUΌUdAQPnԐTt#\ăj8^hv{ej??]Hw_dxk8$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?oxܩOZ㆓esM)/Úv ,sq0䙼sCA`~a^8_3թE|n"z;rVPS-aC^Zh,!bVd:Zp)'[1Z4R>X[GBe삊m!aaqʠr+ܔ^?k(JP K(>~]'zW7ʟHO# X5t5C ӧ30Uendstream endobj 77 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 960 >> stream xURmL[URlc@7)'*a8󃏔tmCm`'l^V 4NtqQ2[ du~]~1L$wB69s7/MP4M ۼ 1a$^hV0R>|?Q?RdȱUdÅ.Å$EbO(z_*,2M )Z_紁bmgR;4IOVnMNxib"-/ƎW|zE%WVGklESp+ vom7}OF$'_ޟ[բթ՝+y*oxfݢaDG.lYg?9_uRwu5y52}%Kׂ7ĸvl\ ]}'CI6yendstream endobj 78 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 7033 >> stream xY xSպ=$9*TlM,4AA2j[22tH۴ڤsNidCi::0ʠ xxīW}"朳q!Ə#\\\܃6n JC#$ W7*ḑoО.qpOCʚB9/%q@d`TFɦͱARyi_d^/g79s b*@L# b%b#1DLl&fALb F$fۉUīD0C s obO:bx#[3DNp 5xH"&l‹ $!#&n$b5&21wr\RGYw᜗8_H''cTF&*'~~zӡ^T̚gF%Goq=[{G?'~zp3O =7z͝[Dvb){#ҷ|=:3SDX2w՞ܺ $td'mҔjI/trOD/ܜyp+|zμSbx^|MFm2;8N>ͱ=c~_]r,{'-=ۡdC7#9ž ++VD '54f^s {s.0_ypZyl';0Є_a}6pR:4W[ c桟$t"#Ӽ-g}NO.Bnb_fqZ&ӓ5))Q>?#99a2RϙXv67 ]]CzfJw0ЫtՃwSs CX1jς:?tAH_I菼DCwaOnH$L!wnPW:+IH%p t|>OϩͰ hX^h ߠT;WL'x'tG\)y(Xo`@F`7\?"gjm {,{@ss  Hqm!TWShN U2]QkU| 8;w3BFm2Fg'*wfH6hC Yb|+e,vЇ#R{r3l *>n9JFi CA4#kW Rbvr6j| Zts<( ~ e]NA %W@BI$qKjK$8ߑӘgjr]7W4\v0(vx ~=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|zsE]RH!}mTН[r1Q:ixXK$/a*R~G/ z79 E-(Ưh9/92 ޚ =TTGzT{?HUd$uM9{]8"8sF?fTYJB UABE{-?sU5+1I!yUT|iTwb:>{#3`ohKG?ј>ʳ~oy[N#NS݁ 1٨`鍁(f~hy__=Юԣ|Sຌzr!a; k$Fo;Dtˠ% >ӱ/ݍ~_} x18$VSDOքԝ1ymE] ?yۛEΪ(Yyhčnzendstream endobj 84 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 542 >> stream xcd`ab`dddw 441 ~H3a!g&VY~'Y)Krnn?& }^=[19(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMU8TB9)槤gf$1002f1I0012,ceb`Aa#ˏ+G~e|{>ŋXx 93~gݕrL++;WUS{蜹WvWVU]^>{<ߏa3P]&:vBniSLm./9%:;'˃L<0៺?Ӿ?]:K]3ĵۧ;z[Զ;ݻ9~3f2Ȟ3o~|wkOtޝ'a_}gz&WB7smbK<yendstream endobj 85 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 394 >> stream x]JAgj 9&!Q A 6Rj]YCLj2!JRD^cGѭ8'Sh7*,g%!ގo%N[ o{e%mE`8%BEΝg1\Oa4mH$wE$BEHb\ rH!I>nrg1*" eྔH YR %d2H,m| e;yfM1ޟofZG1{zA]"Z?t=qnRͨy;μP =ҫ14N4CQUE5-T7 Wt~giȒMq8;mk?o=s/miendstream endobj 86 0 obj << /Filter /FlateDecode /Length 4771 >> stream x\[uv*vj…+%(3%۵3ھO9 @$͞JV/<8\g3?7_Qo͏o˙c-,`bfJ#>iHgLR:SF|vy j|AyI`yJ×XoBjY'R&c6yJt^K^ XE4:s31C}6{GT`mIJwaAIJ{HѽS-?n DLY$#yUQ=_ f!ȫb2E?4~~^ ԃlj_mݷT'ŦD?% t.Tp­f4NT?͑@m_[8F9,bx֗zsK@`v돎3Zlz94j5!&a- RjcnL(cbQhWPԮ%D!GJ-g47@JX u(f! $GN(`Ph,w$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'Roh }Tc]_D[ ;nP 6p1B e7!@Laj⢳ bZnOr^EX,0h*RZM0W70b~5djnVICb2D M O*`2V5A%jS q̜E2cpNx'=3p䍅1GJxɧk-ўgwx]˯^qDO\p"X"']5n.Yk1Q.n$u-a B:!h1Küb #/endstream endobj 99 0 obj << /Filter /FlateDecode /Length 1327 >> stream xYn6+g ԛE. .Bpԍ}lZbDZL b 3R"t[^ Q^ <.mӜ4h_RZHo󪞜)~WLΐ@-ӻRܷCoL ]Қme{WUm'gZ@g.J]5DI~t^zk`kI8~Ӄ]$dI.x<q 5y^Ή*xR}i0`9XPD5UqYԊ2L+#FFHU RI'Zexۨ p(` pSY@%mKDZ,٢`bi1C,{L,yXՏgaCQW͗}S_U]O/ꦞ_~߬v_Ņʁx : /xȓpb `+f"E#b CGxldf}s=SN AL,.wi\rI<ݦ^^NYp/B@s/C(N_)~wa9>uTv-cAxp:o]i2|SV30eOv:b"xRK_CjFqWWb.FZZIj)^s!A>4fPLOzVJXb Vw >{"Rk섮xAIS/p'ZrвmR-w܍MzcbDnv믋߯.'p+NΩWWQk&ڮ;!xouy[4y<5CqF]K kjH'p/wa:׈L椲խ#DC'/7) _r @W~в,\nXJHӋLߔ46SL(3cH)੤ |+܏zӲF A+ѹJ/@68HI_A!ĺ'SC\%CtE}ّ-浙7ዻ 8SAx's`xk&&HBj=GwK$G%>\J_:rB> +0~P/q,(HdK iopRBL; A/r)l {mjx?ץsr]T")> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 101 /ID [<26e1bfc74eed422680e2559263f25be8>] >> stream xcb&F~0 $8J?ϩ@6VPq22 E̾ "7HR0DL@$S9| "߀HVK)fo@h/wf_"y cl !c endstream endobj startxref 74356 %%EOF mets/inst/doc/binomial-family.pdf0000644000176200001440000016071313623061750016523 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 2379 /Filter /FlateDecode /N 53 /First 407 >> stream xZYs8~_V*rڊ5sLM偖`YtH*o7d˶vfhtn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> stream GPL Ghostscript 9.27 2020-02-18T23:23:36+01:00 2020-02-18T23:23:36+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of multivariate binomial data: family analysisKlaus Holst & Thomas Scheike endstream endobj 56 0 obj << /Filter /FlateDecode /Length 1914 >> stream xXnQ_ nFH̃w3E2^<$ߛ"%G66dDN:UaIϢ ~S O1Gф_a nj4i# \0Kr#me}!L0sRgWrTj'Q)Gh8eSWA!?^0*c3yKp$9i\` ]W_G箑KCqV'eDߪCHy <Ͼ _8dyʹbm%ŌPB%4^n "|d1b5i*NI,c)M|x.OR "tJUR4@Sm4g‚j<S՞yhLFŚ C5geHVbxk%hGRX3μa8M!?oEFKrѽ,>kĴD5i!-t뛅X֑ j' +]S:P&˱\5|O3׳. ?Q]Pg@N= ğPH;VAȢdR} MfeugVo Fp +F3tWWJ ;ƵZVuN9#Y[151RLҋ:ny;kw.pU9 $*_+rܖe;eHgd=q*u9){$\AgMY 5&NysG %!s\ .BJyPt'[WaP>s))8G@+_m8Wu9Eʹ6h!Ԇ{ˋ;Rz~ϩ@$KN4< "s骼,;1O[}ovQ.ɱZc/3"̌lu&|LLi{ CHtrߘH0>:kuue3.Zl%0C.P ,o߲'" Zg_5ٺ :š{JSh"n}dYC@@~ Wendstream endobj 57 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 4798 >> stream xXyXSgOĄhђfzNIͶV. .,!@6Jl@ U$, ql;3s|9'8tϽ|˻|.RfΠP];s¢$M"aruYb>5Ăb;52UI[@fՂG6LKP0gf_6OmswOd=5F~)'\V"e|+Vp5p21g %ROxq|T qnڳicly"!'KY,p9.O,=)8{?8\DH9"\ K*.OX̑d"\N~srNHp@*KRX$侈!EeI 9W&*8ƬulTIr͑'K$\eқEU)zy\*,ҐzIQR`\ .HV"ɧ&_q~uT*LߕLA@! K&}9dܟ.#LQ(GV% bR.Rf9BE3?EldQ)Rr((SvSr)y5Ŕ|:zJe eYF&f(mTr%e&θ;erm?=IF̲̺ llќ9s =ܮy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T_6QO'7QQ,ӢP6E58<=3};u? < ٢.ô@~ٙPD E|SB_I㤬Uݮ7+pfmfUDވn1Fhu1!dM?X$dg] B8r w+n. 2.7=ͦ_Ls+"fP4 \ܟXIq-~/6OYOi 鐅pSqK5vUbn i؉#x 9@] 57аJU:Gjb/ae/[xQn_teNM0"tvKO趴q92O[Q5CLx<>F&5 FCxо2fK6j`nD)1O+=bܾbNCt0uK씿>cBSDJ$Sz!' 8^ŨO' WMax6RꡨML9v8M`* sT\ OŌ&X*W@T#p?F 2PAx@DuAX-WQ1RK0/I 8]endstream endobj 73 0 obj << /Filter /FlateDecode /Length 477 >> stream xSMo0WX(RXTvs v*H[ͪϛy ݵL|Z"X^ң՞͉QaQPzexղenXB<a>HK^Wp{} -D8G 'QhePxV:1hr/iCHu]Sj}&J[qw*,Q}Y"QntB ,4ZV1:(̩ ya_s/PHւ=b7X؂U Giaiyen@Rx [v79z(SFN!31㩙O)n!DTgj0q+7,zeXv#6p{މ볳ȩǑvk0d[9'7xܶuTmsH>4 RRendstream endobj 74 0 obj << /Type /XRef /Length 95 /Filter /FlateDecode /DecodeParms << /Columns 4 /Predictor 12 >> /W [ 1 2 1 ] /Info 3 0 R /Root 2 0 R /Size 75 /ID [<6638324d9042b3987fb0aa11fe394d26>] >> stream xcb&F~ cgC0,R@BHL@BH _ J@Hp~qk@ D$o կ endstream endobj startxref 57437 %%EOF mets/inst/doc/twostage-survival-case-control.pdf0000644000176200001440000013071713623061753021553 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 2193 /Filter /FlateDecode /N 35 /First 263 >> stream xY[o۸~?oE*J:($q68bӱJruc80d93iH ˆ$'<& #E4eHBG! Q@8#< Ή uI$pWDAbhChUJDD0aDP!$Hh#4ѱ!,2 %#`0%ꂄ *R]D4FH`&!(ϫW2'eB` JL c+~B,#{{vf9y51 c1=3pI"hg*.PUp?: {`Mn24 )3c zPvKŸD ܹ*CfǢdƵq.q1<cγ.{l<;:#'Ӭ(Qޗ$~)BpˌJ+]Zjj8%㧆x=Mk^O]e*O{?S. s۷6X6/kZW=ƇlY>(5YR ]{UlfE Kߦ1X ov(͢,t 49@_/ANK@g"[#Žʓ.Nz jy66%HWc0< ronYe9Y>Of^^ޒ2_Z[5$)UH?<?xf8^)QbH i^$ǵH@_w0CҚ.gt\N%aٕt?0څJ2@cJМo"JKȠN6\ ` =zL_ӷ^w4E[:l>O:S/tFtA3ӂtIP: 5*dz7uÁ \ VЊ"nTePY<nslǗ7Û7A4I͍2&'mQqOi&? s$T~T2Beˎ")=# 0,~xmRd#3P k1dbQ$m{P O!op$_i#kq,'YVWtx.g3SZRe5NRz8q?5 ɿjDyOPl`̇gF+&en4 Am{eLHw1&?8 h*>fdep 8keUFsꚹ㤘үKSতAۢNQU$ڱݥ=c =9z8x~v~--gCkbhyQYrv^u5AO?uu ?cӯ^k-ݬC5Ul3 g*fǬy2b`k9)rnS6׎3(e.H߀aﳍ)d7qqdؒSX+*+v -jOK\!weqi1T |ld= T`W N6< h͈dyxtpztk7vs3bTMW)51۲㺻2׭ٹOTSѡ+,FiZ"B m~]& "Tg(|eFKp(lQ!v`00|' 7lOOr7S}at ֆ!ﻷiC_Nvg0F"cb9wAzU_2=oaY]p.2eeUuΈ?BjyUV—5~O2F$]*=y&O@zyq}p(0 mO;>\RJt:/cuyߣU7ͦ}jMF['䜩+~{ mw# … P;ς?^ӓ>=yzo04ͥl&״eL\% c=It21 8?sQ,KmDbM;*endstream endobj 37 0 obj << /Subtype /XML /Type /Metadata /Length 1655 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:38+01:00 2020-02-18T23:23:38+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of multivariate survival data based on Case Control DataKlaus Holst & Thomas Scheike endstream endobj 38 0 obj << /Filter /FlateDecode /Length 2073 >> stream xXMQ%@{Xq%ث*fr(hD/E$5!M J#H l{ݯѭ_(g}Y~e%,I1K9D"TIaHnJOm *$NC^ EC)tg<2[~un`QXsSW]UD2HaE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sendstream endobj 49 0 obj << /Filter /FlateDecode /Length 800 >> stream xUKo0 vayUQo  {.|[wp4īؿGi7A2E~Hc g@xkMί-Y '>K%9:K6<ٽpL(ͬ&҇Xbf0ޥ'*"[B,2#,R #~PS1C)E5IJoQ^NA>leqm8p.]z2hb<׮CEѤ8D<Ζ0e8iRFuӲ@*ʟ#2 wiGeO~H%߄]qkX-i!Aٯ/uW7c%"d1?1YB(bt"2endstream endobj 50 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 238 /Subtype /Image /Width 291 /Length 5658 >> stream AdobedC    %,'..+'+*17F;14B4*+=S>BHJNON/;V\UL[FMNKC $$K2+2KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK#" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?Z( ( ( ( ( ( ( ( *+-帝E v=@?f[ONi)D#±mq=<S@VMt"/cQ*R>"xIsm̹6 OӚҢ4P YT2@,Uai:ͮG(1eX~!OԀhEQEQEQEQEQEQEQEQEQE#0E,$g?p?,@h_B~4fg?p?,@h_B~4fg?p?,@h_B~4Y͟*&pv Emfi.$j10@ OSo ?/g?poi{8 ʄAxqV&Ŝ4rKqOYa #><֗hг?cN$I[ƐU]y3}+\ѴTXITA {0v,&hг?YhYƏ ?/*hг?YhYƏ ?/*hг?YhYƏ ?/*hг?Y fMv08Z((* i5U[Adoq+puH~C@((((((((((((((G*"(5?6]OͪQEQEgc;\IMj?/iX=ʷF!T$|DpA-I;-K($|4袊((((((((((Ju,I%77x833ϧosi7,Twc\LZ\RE gb3 88H&T5Y633;=+v((4Pԇ3Oq1=zלgN)Š( %mV*U(u ࿴IYH JJV=cJKyPFv1~_z-P׿׬ {V-e1/Fr8МA[zzТ(((((((((B@@jBKŽ}~{4~v8oώZ,ߋRopr6N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ent-events.pdf0000644000176200001440000050535313623061752016772 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3328 /Filter /FlateDecode /N 80 /First 663 >> stream x[Ys8~_V*rk*U;58-6g$#Rg~~ %t=v44qF eywdSa4 dJ9J(w͎\c̑fϼ@]Ťk&]zHL^R3*` K/dĊ[*@|9P jQ` v]&$MCG#j(瀾ePIoIG(DmPM}.-{ڼfߥ M|s#BqA CQUg&Ż>+ASl78ʓt1{^q\p~⧿qv9?˩n!&P[Nmq%zVv..9 \{}G6ܔ}nnQƯMY3[N'O*ÐN6hcZ+T,߰PfC\g}Vs(׶1<6L4m *8D] kyN N: =‡+gj|muRWSVx0D]M'}fx#mee:?G;/WB?J8..vv =@Fʌ64\]EgK~]ڳovjDD>I ]G#:O͘e`_ȡwYtLQQ倎'lNB5n.ԆXeB} z5f^1Ӳ+rkFPU,@n(3,Rkx.v;Cw۾E4MdJ6*6L6GS^Βyo]|:)坭wdp$#ؿjbi 1&hܰe5I~3P;k~$FWPuqX[ hKJCЛ -"H2Rb-e- sNj˗''< ^60{,/Ѩ=v=uÑT7-IlـL %Q8>(v}A-i6[mʜMm/X{ǀ%÷&[I4볶PPŧ}{jI~?5|{kljpЖRUK-mQkכS_0η1j<,7kJ^W+J]g$ z7>usUbo,[=imn鿔4j+Φ\z9ċl.Mo7Xykϣl/5nI9@7wrgaݔlwa~?mYg}멵G[Z-h6O]ØہgA*A=& 7$`qxz{32NgJ:!pn'.=_Ba~ufӒ^и#Hbd̗EK}Ȧ.gH[@Kl=;^~Şhe;[~ðǗ=0NԡBn>6At`%m":LȊҶ3Y?3mM?9'!2>O# ˾ 7xpSKXm%nvDMG㛃d7뭞 I) x}ܪt]X= y*J=jF]yl5S.2OrVWwDOr 4GJ.HoCPĘ#Md`xFdoX|jgD&7'xWaȏpKG5s.:2PܞSCDK>勻tKÀM%ZtpnOF5C-f_O_endstream endobj 82 0 obj << /Subtype /XML /Type /Metadata /Length 1606 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:37+01:00 2020-02-18T23:23:37+01:00 Emacs 26.1 (Org mode 9.1.14) Recurrent EventsKlaus Holst & Thomas Scheike endstream endobj 83 0 obj << /Filter /FlateDecode /Length 1975 >> stream xYn6_*HJ$З(.PNdU6+?PE^8MaޕFÙ33 $7_]DzzA'oV csnAT@$1V TaQ$)Ru.8M៫J$1*S$X=_BlCkfێZ~dhi-ߨoWCX`FX DdAtyf$Z8f2ЈFZ"Ʃ "X%Ղ qS{=@kI:VoKu7IS1iL,7{+%W6&h \<F1| R0s$އѨ(*.%Aeg$l57W_{1T֝H ssӄT'!Нmj`γS/(.21MT> ::d*5@>ېl_fuܳܣ}(5u-{N&Woєx 3v8S$XB ~lh.8:$3Ъݹ1Uo0n:\'`pڙy9nO*b%x^4TBwqsݕ߫]Ӷ\gz;ؒmq*h\y %X#sS>]݅L\Mߵ~rI0bq&{{M S^؛p(G^|'KX&"b> b7ff8$pO B2:Q-r4LnN+ >>7K(5 ݁tC}nF-8{~Zb x.:޽[Z9 9撙x[oJd8dȺ;M) Zw-RPRTe7zr 9#A hIVI|Lo]{5~׮IڷЗx987쯏o|~m=JŅG%'HzaŐ *B=+5`ώi~2㳜N{CNojɤͶmNͽ{xSuTL~%InTyCh_i֪VSn)nqkf\(R/~.>'@,6!A!{Hf5g^4=@>ݎ /! VI~iQ8v'riPZ)$/33|&ϳ 3#?<ϴ'wyrr'z|-!d\1ixrW^O7SlZqxe[$1ous' K u ḙ'|6.`PS*B]mx30,k#暵y-V^S{ M#bpSA>|7cLt|}F nX1uXrGb2n.Fy=$<Q (qѪ1>m?OI?G7D٥^I:n۹3JL/\..Șҳa.n2±}=IVuVUq}2:eܛRv[;?rz8[SFpL' Ul<ɂI=YY/270atjcb|jE`/g:Q̓C}rTDOq˩}#O t>0G;M-31b/|[endstream endobj 84 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 6315 >> stream xY TSWg֚f|O$S;ֶj77T\A\%@ $! aFw_ ;KnmZci;m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C3,.w"<nj,E;QK>PG2)m6Ecob+}o%]au\0ŀ?M\#0 gB BBf#?>q8}BKx$.F2pR}o2Bʌʻ@2h޼M ıLIocW+MSQUiMNW:󍭍PE^] =}C$*X\C dQY$d\ Hq٠ :nl.Ȍ*;' ?. B,N~$+>APnn8gH΄B"yn &sgVIIka8?:kjN1ۛ 2Dgnj)PyЫƲfb8$/>|{\\s}G $K (a8#?߫VAd';N:gڞhNάØ@?ЫQ FYrjw ,Zob3FNv9)GPE:[t˛xTxZ4^eHJEVHʯk4 A$*wےG@ɨIFasj7\Quͻ($O,H$f6=P> _H땰H8$FѫX\F9 \=+.Rv 5@8q&ޣc _k|.d:̅y1~Y$bs955RkZom{T(CVgw$tF $HtƜ)Ye{9 =>`sbOXL.I $ƀ'(((1KEQekr&7(cjky⹉ftaߵ;ɏy-w &8$ *(` uQ@Q@Q@%-q[[ HWpQ6G=K{nI=;" i"4TɠEQEQEQE636A9 zD`cPA@죍$bf8=?VFo1!GSU-`In =~0G0G\~_.6%,Gs 6AM`}O((endstream endobj 101 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 238 /Subtype /Image /Width 291 /Length 8263 >> stream AdobedC    %,'..+'+*17F;14B4*+=S>BHJNON/;V\UL[FMNKC $$K2+2KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK#" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?Z( ( (` 63@cӵ jQ@1N:qӞ-"Aw|Am$ Rry?\iEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQERXg!Yd3|ϴ8>j?"Boc͏wր OGϔZ$_i8YnWӃ׶k1gE|`c$nC|Se#‚OIigV(k _<:tn= ŢK 3)cO ~{P0Lj_6}xԧSrP.qUk:uQECs+CMPI uj?6}cj}bț$ qy>u$?b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@$,: R-䭒7W*f`10>onIC&$mdm\cO\s}Gww6Cpv6u'pJ 84םěsze-}o2K eg,[rIFEkcRأGYXTn$!pe 8( sI<Ia0''80(((-PFm˷ܢ68qr9%ч~&=x'XH$hQ(QEQEQEPb(ơmo8Wa!]Dl-aVh:$z6pXt$sDq@Pc&EPEPEPEPTWP`䃎=j[xgǝIA=VW4I6dMZ4vylj]tąN1VdT $@d g,,HXqPi|ؗزci)?CS0E-6]>((endstream endobj 102 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 238 /Subtype /Image /Width 291 /Length 7659 >> stream AdobedC    %,'..+'+*17F;14B4*+=S>BHJNON/;V\UL[FMNKC $$K2+2KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK#" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?Z( ( (` 63@cӵ jQ@1N:qӞ-"Aw|Am$ Rry?\iEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQERXg!Yd3|ϴ8>j?"{*êYʔg)7m53 ?Eh? ?EEx[ss4Xf=y#=[sޱ#㯿 f$$yTȠ! o_e53LݪC G&a -÷2ZIE{iRYZR@ E-TͷSsRHŸF`\3ȓ t8)7a7br4/P.O_֭iK`Y#Hcy`c/j"QLaEP},-hV},-hPEPEP] Je|5=sY!eHh9%?SB`mr$bOrI&ܑΧ( Z{_ūKUxv ( (W3ljHd`|?=fl%hT쌰] SI؋ :@0Hƀ/F4U`RC?ʟLJ?>* ͵ Ip< j_/kB53F$6@Q@!JCRT`X.9 #UhJQ =q 5 jo5q\b}h ~w l̬Z~봿1wƦ2Q@Q@?s쵡Y?s쵡@Q@2YkS6cqjKZr!MbxPG|3r(L8_Z[y0$]\tzd(kUT( @t}GS_N( Z{_ūKUxv ( (4}Y23E39p+QTV V>h/Y!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?J\C~aӓ(۞/y>osi 1A@f'S;Q7 O<cA p:J;M9\Tm, 3il?A9$UXHO0EL.9rzeb!qv'L7E1 žtEO+\X%mV(((* =GeMH݋gU>cy=m#zA4b RHͤ} pڬwmghFF\w8ϥC`t)K鶛$trL 8&IU8$pG<*@=*S* ]#'{ӷ)8cH"D@yɁ&[R>h,Ve6Мֆ!|r=]@r49ƪ~k|^4`sOLZ'xϦMVi[ 6d)` }vN\Ero3q:JyH ڠ~t @c+҃1;g ㏧S[ 9-~jX)꧍3g1G,4rҨQRvNHP+@c*:# *s:f4B'r_b\XaEPEP$u:[b_%D8%qjL q(mK>^9&QE[Z1 P%h; JV|qYm=9|8c')?֬QEIRR&LDc)3,W#*JTvWtBig>kcG[Il"P۰#zϰYFFt+%s(c̎~76R`}aW- 6/2;[*zkMM ˅?ҤmlyN̍9c׽^csGC朏֡}7OnVٝ'}F,o!r1V\(*(60mh~i-6ijܞ~@֥s>dU h* 1ߍ'٭Pn.Ȩrs+ :C5= w!6+4ۘ!ӑvû{dGv P~MG\Yҭ๺kٙ IY5EQEwgy- Qg!dw|p}O; 8v0JJH }N3 )1K@0>.qCm'(IcP#lT4D?^>lgC(F-e^BW.H_5IK@Q@څ&)*TIJm1!Xds'5SNmI L_ib[`1`!clbx$fHdMOET<7D̲I* =g,O |th@1,;ZAtp\CbمF~֥(((((((((( z6;vnQN#./b1ȧGbN1#(`hZo9+pdkI!!PC z@=x=3V2I$d&#ۀ W9dg9!puL+,l)68UewK=לpKy*y=9zL Z( ( ( ( ( ( ( (?endstream endobj 106 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 238 /Subtype /Image /Width 291 /Length 5811 >> stream AdobedC    %,'..+'+*17F;14B4*+=S>BHJNON/;V\UL[FMNKC $$K2+2KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK#" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuv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pLq }-DZ(a2"-MM6<a|4酫D2'bBTZK 1GB OǸfsܗpiHgrRћ>=mn6--zbj! Vj`-|}B-@>~8QL]f23];R*r\m4c&@Pj :0(`f3mvBF P'i)$ ۼ!.FZ!z)5MZ7&=&(ޓjTpB jə 5p:H+ L> stream xPN0+hbv׏+ȷCUDh|?( jfwV< QGE%\ƦE%6GPvjxa:G렴j;SHT^4)&ӌ^q}`*5o7F<Ι'$B9ˊ=G_16H9&-aJzxmN,G/gd@yQ:q81VVd^C?t냩8`ݯC/hoAendstream endobj 117 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 450 /Subtype /Image /Width 550 /Length 25090 >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222&" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( }m[ymqe8lҶҟ::M^T{$|-%߰n `VoωK.p2yQ<lg+R6dޫ:յ+auO\3.B^y[Gyrvri<_r8 (⻯uXRG5w@2O-ӨZr@'<3ҟ::M^T{$|-%߰n `^Ey )e."EzYF|;|G/ F?M~_z(#~G%?7& Vҥ ]v*pp@F=Z?elPEPEPP^^su % <09EOYyJ~I V?O~$kfF4U߉?٢1*ѿğMhO&h oJo'G%Z7?(~I V?O~$kfƏz$G' Ў)hO ț>ElPG%?7&J4oMk@haqsV7U< 5n x#xhb((( ZcyI,TxFr͂A'c4)|A! Q淨M~. "M4?)ߢ0?4(CR:~gk X%8˅:O2H.!I:dg hsSiOUHt{iǚ1\N:QO}̡/K 9d@4(C(M~. "M4?)ߢ0?4(C(M~. "MȑU;S}˓qVc_ D~Ri00 zU>a ?QEQEQEs5ZoҺ k"Gm]q=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ms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 119 /ID [<0b0f7c4bbdee898586657f1d220e93f9>] >> stream xcb&F~0 $8JC?oF }(9@$+d2A$+d"l  D2wHދ`qy)D Hn9)RɨĖo|f.j RD HHeBM`6`d?d9%A$c8LY) endstream endobj startxref 166199 %%EOF mets/inst/doc/marginal-cox.ltx0000644000176200001440000003164613623061405016070 0ustar liggesusers%\VignetteIndexEntry{Marginal Cox} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Marginal modelling of clustered survival data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Marginal modelling of clustered survival data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org4291342} A basic component for our modelling is that all these models are build around marginals that on Cox form. The marginal Cox model can be fitted efficiently in the mets package. The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_{s(k,i)}(t) \exp( X_{ki}^T \beta). \] where \(s(k,i)\) gives the strata for the subject. We here discuss the \begin{itemize} \item robust standard errors of \begin{itemize} \item regression parameters \item baseline \end{itemize} \item cumulative residuals score test \end{itemize} First we generate some data from the Clayton-Oakes model, with \(5\) members in each cluster and a variance parameter at \(2\) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) # to control output in simulatins for p-values below. n <- 1000 k <- 5 theta <- 2 data <- simClaytonOakes(n,k,theta,0.3,3) head(data) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.4 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined time status x cluster mintime lefttime truncated 1 0.1406317 1 0 1 0.1406317 0 0 2 0.4593768 1 0 1 0.1406317 0 0 3 1.0952678 1 0 1 0.1406317 0 0 4 0.2057554 1 1 1 0.1406317 0 0 5 0.6776620 1 0 1 0.1406317 0 0 6 1.6093755 1 0 2 0.1092390 0 0 \end{verbatim} Now fitting the and producing robust standard errors for both regression parameters and baseline. Note that \begin{align} \hat A_s(t) - A_s(t) & = \sum_k \sum_i \int_0^t 1/S_{s} dM_{ki}^s - P^s(t) \beta_k \end{align} with \(P^s(t)\) a derivative wrt to \(\beta\), and \begin{align} \hat \beta - \beta & = \sum_k ( \sum_i \int_0^\tau (Z_{ik} - E_{s}) dM_{ik}^s ) \end{align} with \begin{align} M_{ki}(t) & = N_{ki}(t) - \int_0^t Y_{ki}(s) \exp( Z_{ki} \beta) d \Lambda_{s(ki)}(t) \end{align} the basic 0-mean processes, that are martingales in the iid setting. The variance of the baseline of strata s is \begin{align} \sum_{k} ( \sum_i \int_0^t 1/S_{0s(ki)} d\hat M_{ki}^s )^2 \end{align} that can be computed using the particular structure \begin{align} d \hat M_{ik}(t) & = dN_{ik}(t) - 1/S_{0s(i,k)} \exp(Z_{ik} \beta) dN_{s.}(t) \end{align} This robust variance of the baseline and the iid decomposition for \(\beta\) is computed in mets as: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- phreg(Surv(time,status)~x+cluster(cluster),data=data) summary(out) # robust standard errors attached to output rob <- robust.phreg(out) # making iid decomposition of regression parameters betaiid <- iid(out) head(betaiid) # robust standard errors crossprod(betaiid)^.5 # same as \end{lstlisting} \begin{verbatim} n events 5000 4854 1000 clusters Estimate S.E. dU^-1/2 P-value x 0.287859 0.028177 0.028897 0 [,1] 1 -3.461601e-04 2 -1.449189e-03 3 -3.898156e-05 4 4.215605e-04 5 3.425390e-04 6 -7.706668e-05 [,1] [1,] 0.02817714 \end{verbatim} Looking at the plot with robust standard errors \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robcox1.jpg} \end{center} \captionof{figure}{Baseline with robust standard errors.} \label{fig:robcox1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robcox1,caption= ,captionpos=b} \begin{lstlisting} bplot(rob,se=TRUE,robust=TRUE) \end{lstlisting} One can also make survival prediction with robust standard errors using the phreg. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pp <- predict(out,data[1:20,],se=TRUE,robust=TRUE) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robcox2,caption= ,captionpos=b} \begin{lstlisting} plot(pp,se=TRUE,whichx=1:10) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robcox2.jpg} \end{center} \captionof{figure}{Survival predictions with robust standard errors for Cox model} \label{fig:robcox2} \end{marginfigure} Finally, just to check that we can recover the model we also estimate the dependence parameter \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tt <- twostageMLE(out,data=data) summary(tt) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 0.5316753 0.03497789 15.20032 0 0.2100093 0.0109146 $type NULL attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Goodness of fit} \label{sec:orgb08000a} The observed score process is given by \begin{align} U(t,\hat \beta) & = \sum_k \sum_i \int_0^t (Z_{ki} - \hat E_s ) d \hat M_{ki}^s \end{align} where \(s\) is strata, this has as iid decomposition as \begin{align} \hat U(t) = \sum_k \sum_i \int_0^t (Z_{ki} - E_s) dM_{ki}^s - \sum_k I_t \beta_k \end{align} where \(\beta_k\) is the iid decomposition of the score process for the true \(\beta\) \begin{align} \beta_k & = \sum_i \int_0^t (Z_{ki} - E_s ) d M_{ki}^s \end{align} and \(I_t\) is the derivative of the total score with respect to \(\beta\). This observed score can be resampled given it is on iid form in terms of clusters. Now using the cumulative score process for checking proportional hazards \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} gout <- gof(out) gout \end{lstlisting} \begin{verbatim} Cumulative score process test for Proportionality: Sup|U(t)| pval x 30.24353 0.401 \end{verbatim} The p-value reflects wheter the observed score process is consistent with the model. \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{robgofcox1.jpg} \end{center} \captionof{figure}{Goodness of fit for clustered Cox model.} \label{fig:robcgofox1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=robgofcox1,caption= ,captionpos=b} \begin{lstlisting} plot(gout) \end{lstlisting} \subsection*{Cluster stratified Cox models} \label{sec:orgf70f1c5} For clustered data it is possible to estimate the regression coefficient within clusters by using Cox's partial likelihood stratified on clusters. Note, here that the data is generated with a different subject specific structure, so we will not recover the \(\beta\) at 0.3 and the model will not be a proportional Cox model, we we would also expect to reject "proportionality" with the gof-test. The model can be thought of as \[ \lambda_k(t) \exp( X_{ki}^T \beta) \] where \(\lambda_k(t)\) is some cluster specific baseline. The regression coefficient \(\beta\) can be estimated by using the partial likelihood for clusters. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- phreg(Surv(time,status)~x+strata(cluster),data=data) summary(out) \end{lstlisting} \begin{verbatim} n events 5000 4854 Estimate S.E. dU^-1/2 P-value x 0.406307 0.032925 0.039226 0 \end{verbatim} The cumulative score processes can still be used to validate the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} gg <- gof (out) summary(gg) \end{lstlisting} \begin{verbatim} Cumulative score process test for Proportionality: Sup|U(t)| pval x 27.55616 0.195 \end{verbatim} \end{document}mets/inst/doc/quantitative-twin.ltx0000644000176200001440000004342613623061405017203 0ustar liggesusers% Created 2018-11-19 Mon 19:21 %\VignetteIndexEntry{Twin analysis of quantitative outcomes} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \usepackage{units} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Twin analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Twin analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Mets package} \label{sec:orgeaaf733} This document provides a brief tutorial to analyzing twin data using the \textbf{\texttt{mets}} package: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("mets") options(warn=-1) \end{lstlisting} The development version may be installed from \emph{github}, i.e., with the \texttt{devtools} package: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} devtools::install_github("kkholst/lava") devtools::install_github("kkholst/mets") \end{lstlisting} \section*{Twin analysis, continuous traits} \label{sec:org0778a55} In the following we examine the heritability of Body Mass Index\n{}\cite{korkeila_bmi_1991} \cite{hjelmborg_bmi_2008}, based on data on self-reported BMI-values from a random sample of 11,411 same-sex twins. First, we will load data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data("twinbmi") head(twinbmi) \end{lstlisting} \begin{verbatim} tvparnr bmi age gender zyg id num 1 1 26.33289 57.51212 male DZ 1 1 2 1 25.46939 57.51212 male DZ 1 2 3 2 28.65014 56.62696 male MZ 2 1 5 3 28.40909 57.73097 male DZ 3 1 7 4 27.25089 53.68683 male DZ 4 1 8 4 28.07504 53.68683 male DZ 4 2 \end{verbatim} The data is on \emph{long} format with one subject per row. \begin{mnote} \begin{description} \item[{\textbf{\texttt{tvparnr}}}] twin id \item[{\textbf{\texttt{bmi}}}] Body Mass Index (\(\unitfrac{kg}{m^2}\)) \item[{\textbf{\texttt{age}}}] Age (years) \item[{\textbf{\texttt{gender}}}] Gender factor (male,female) \item[{\textbf{\texttt{zyg}}}] zygosity (MZ,DZ) \end{description} \end{mnote} we transpose the data allowing us to do pairwise analyses \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinwide <- fast.reshape(twinbmi, id="tvparnr",varying=c("bmi")) head(twinwide) \end{lstlisting} \begin{verbatim} tvparnr bmi1 age gender zyg id num bmi2 1 1 26.33289 57.51212 male DZ 1 1 25.46939 3 2 28.65014 56.62696 male MZ 2 1 NA 5 3 28.40909 57.73097 male DZ 3 1 NA 7 4 27.25089 53.68683 male DZ 4 1 28.07504 9 5 27.77778 52.55838 male DZ 5 1 NA 11 6 28.04282 52.52231 male DZ 6 1 22.30936 \end{verbatim} Next we plot the association within each zygosity group \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("cowplot") scatterdens <- function(x) { sp <- ggplot(x, aes_string(colnames(x)[1], colnames(x)[2])) + theme_minimal() + geom_point(alpha=0.3) + geom_density_2d() xdens <- ggplot(x, aes_string(colnames(x)[1],fill=1)) + theme_minimal() + geom_density(alpha=.5)+ theme(axis.text.x = element_blank(), legend.position = "none") + labs(x=NULL) ydens <- ggplot(x, aes_string(colnames(x)[2],fill=1)) + theme_minimal() + geom_density(alpha=.5) + theme(axis.text.y = element_blank(), axis.text.x = element_text(angle=90, vjust=0), legend.position = "none") + labs(x=NULL) + coord_flip() g <- plot_grid(xdens,NULL,sp,ydens, ncol=2,nrow=2, rel_widths=c(4,1.4),rel_heights=c(1.4,4)) return(g) } \end{lstlisting} We here show the log-transformed data which is slightly more symmetric and more appropiate for the twin analysis (see Figure \ref{fig:scatter1} and \ref{fig:scatter2}) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=scatter1,caption= ,captionpos=b} \begin{lstlisting} mz <- log(subset(twinwide, zyg=="MZ")[,c("bmi1","bmi2")]) scatterdens(mz) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{scatter1.jpg} \end{center} \captionof{figure}{Scatter plot of logarithmic BMI measurements in MZ twins.} \label{fig:scatter1} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=scatter2,caption= ,captionpos=b} \begin{lstlisting} dz <- log(subset(twinwide, zyg=="DZ")[,c("bmi1","bmi2")]) scatterdens(dz) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{scatter2.jpg} \end{center} \captionof{figure}{Scatter plot of logarithmic BMI measurements in DZ twins.} \label{fig:scatter2} \end{marginfigure} The plots and raw association measures shows considerable stronger dependence in the MZ twins, thus indicating genetic influence of the trait \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cor.test(mz[,1],mz[,2], method="spearman") \end{lstlisting} \begin{verbatim} Spearman's rank correlation rho data: mz[, 1] and mz[, 2] S = 165460000, p-value < 2.2e-16 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.6956209 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cor.test(dz[,1],dz[,2], method="spearman") \end{lstlisting} \begin{verbatim} Spearman's rank correlation rho data: dz[, 1] and dz[, 2] S = 2162500000, p-value < 2.2e-16 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.4012686 \end{verbatim} Ńext we examine the marginal distribution (GEE model with working independence) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l0 <- lm(bmi ~ gender + I(age-40), data=twinbmi) estimate(l0, id=twinbmi$tvparnr) \end{lstlisting} \begin{verbatim} Estimate Std.Err 2.5% 97.5% P-value (Intercept) 23.3687 0.054534 23.2618 23.4756 0.000e+00 gendermale 1.4077 0.073216 1.2642 1.5512 2.230e-82 I(age - 40) 0.1177 0.004787 0.1083 0.1271 1.499e-133 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library("splines") l1 <- lm(bmi ~ gender*ns(age,3), data=twinbmi) marg1 <- estimate(l1, id=twinbmi$tvparnr) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=marg1,caption= ,captionpos=b} \begin{lstlisting} dm <- Expand(twinbmi, bmi=0, gender=c("male"), age=seq(33,61,length.out=50)) df <- Expand(twinbmi, bmi=0, gender=c("female"), age=seq(33,61,length.out=50)) plot(marg1, function(p) model.matrix(l1,data=dm)%*%p, data=dm["age"], ylab="BMI", xlab="Age", ylim=c(22,26.5)) plot(marg1, function(p) model.matrix(l1,data=df)%*%p, data=df["age"], col="red", add=TRUE) legend("bottomright", c("Male","Female"), col=c("black","red"), lty=1, bty="n") \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{marg1.jpg} \end{center} \captionof{figure}{...} \label{fig:marg1} \end{marginfigure} \subsection*{Polygenic model} \label{sec:org336bb16} Decompose outcome into \begin{align*} Y_i = A_i + D_i + C + E_i, \quad i=1,2 \end{align*} \begin{description} \item[{\(A\)}] Additive genetic effects of alleles \item[{\(D\)}] Dominante genetic effects of alleles \item[{\(C\)}] Shared environmental effects \item[{\(E\)}] Unique environmental genetic effects \end{description} Dissimilarity of MZ twins arises from unshared environmental effects only! \(\cor(E_1,E_2)=0\) and \begin{align*} \cor(A_1^{MZ},A_2^{MZ}) = 1, \quad \cor(D_1^{MZ},D_2^{MZ}) = 1, \end{align*} \begin{align*} \cor(A_1^{DZ},A_2^{DZ}) = 0.5, \quad \cor(D_1^{DZ},D_2^{DZ}) = 0.25, \end{align*} \begin{align*} Y_i = A_i + C_i + D_i + E_i \end{align*} \begin{align*} A_i \sim\mathcal{N}(0,\sigma_A^2), C_i \sim\mathcal{N}(0,\sigma_C^2), D_i \sim\mathcal{N}(0,\sigma_D^2), E_i \sim\mathcal{N}(0,\sigma_E^2) \end{align*} \begin{gather*} \cov(Y_{1},Y_{2}) = \\ \begin{pmatrix} \sigma_A^2 & 2\Phi\sigma_A^2 \\ 2\Phi\sigma_A^2 & \sigma_A^2 \end{pmatrix} + \begin{pmatrix} \sigma_C^2 & \sigma_C^2 \\ \sigma_C^2 & \sigma_C^2 \end{pmatrix} + \begin{pmatrix} \sigma_D^2 & \Delta_{7}\sigma_D^2 \\ \Delta_{7}\sigma_D^2 & \sigma_D^2 \end{pmatrix} + \begin{pmatrix} \sigma_E^2 & 0 \\ 0 & \sigma_E^2 \end{pmatrix} \end{gather*} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dd <- na.omit(twinbmi) l0 <- twinlm(bmi ~ age+gender, data=dd, DZ="DZ", zyg="zyg", id="tvparnr", type="sat") \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) \end{lstlisting} \begin{verbatim} ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 \end{verbatim} A formal test of genetic effects can be obtained by comparing the MZ and DZ correlation: \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} estimate(l,contr(5:6,6)) \end{lstlisting} \begin{verbatim} Estimate Std.Err 2.5% 97.5% P-value [atanh(rhoMZ)@1] - [a.... 0.4829 0.04176 0.4011 0.5648 6.325e-31 Null Hypothesis: [atanh(rhoMZ)@1] - [atanh(rhoDZ)@3] = 0 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} l <- twinlm(bmi ~ ns(age,1)+gender, data=twinbmi, DZ="DZ", zyg="zyg", id="tvparnr", type="cor", missing=TRUE) summary(l) \end{lstlisting} \begin{verbatim} ____________________________________________________ Group 1 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoMZ) 0.78217 0.02290 34.16186 <1e-12 ____________________________________________________ Group 2 Estimate Std. Error Z value Pr(>|z|) Regressions: bmi.1~ns(age, 1).1 4.16937 0.16669 25.01334 <1e-12 bmi.1~gendermale.1 1.41160 0.07284 19.37839 <1e-12 Intercepts: bmi.1 22.53618 0.07296 308.87100 <1e-12 Additional Parameters: log(var) 2.44580 0.01425 171.68256 <1e-12 atanh(rhoDZ) 0.29924 0.01848 16.19580 <1e-12 Estimate 2.5% 97.5% Correlation within MZ: 0.65395 0.62751 0.67889 Correlation within DZ: 0.29061 0.25712 0.32341 'log Lik.' -29020.12 (df=6) AIC: 58052.24 BIC: 58093.29 \end{verbatim} \section*{Twin analysis, censored outcomes} \label{sec:org4b5f762} \section*{Twin analysis, binary traits} \label{sec:org4c17447} \section*{Time to event} \label{sec:org843c812} \bibliography{mets} \bibliographystyle{plain} \end{document}mets/inst/doc/marginal-cox.pdf0000644000176200001440000020747113623061751016037 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 2802 /Filter /FlateDecode /N 51 /First 398 >> stream xZr8}߯d+FVUĎcVd;qfjh9CJ|vċd3>m(64 ˆ$E4 &pb#nDp OA>!{@)&\|h}cPOF3Q(@;E"~0CaPAhxD"сON|)HP$=#ArI#}bt"x*4 ,#FiBӀ@> ] ML?14&4!8& t$ ZÄ޼!t4,BPfL(r}zIzGleqf,n'p n P^y3WyswO~UgZ/*x,>}7@, 8]ED^G`!Kajr8w52E䥌0m4ٶ(dmM]<}MiN^0t,.'QF^>͋|1 ?Ia$Z}ZR\f&gbDYu֎\_Xϖw}g}|>*_:LŠ߀oXs{CW,hQD.;qx>Bg .ek@\ׁ>Fa!mqlago$ GpeT@ttt DtW`HyÄЋѐptFlUףUM<߽y=4 $i]]LiC; ,/Ì'Q\?pUaYv|W¸q?AV}ҺޓP?Gga Pʷy#-bXϚbamb}yE'x kr߱5ֶ7HGZ|Nû(W+ݧ-='=gtHKzE L! Q):INiDgt;zOc'M.hJ3ӂ.>o@(+a$C?pya#wW~'~ibr˦fۖcMemf[ ۱DtLg~YNӦɊ43+zӾ\; 0 0FĵC|]xe8a06;@|pHi *b1#>.): R?M?A?97?ceDeMY=s&͟ ˣ5BE>!hVTf S2-mi8O1"dg- llKqhYQiY?K@-(;aXܗ$Rbm ,쵑{Ӱ'6:j?8nu+M4Elr&IW`5ͶM{=}w|ax>xy8Äsd]3-3}CL ݏY][ƴ^_0Նٰz 'kLrM>e Yo}<8jYi2i<6XB7i爚A )P`MOjM 0>fZzBF<~;r04x5 (Tp^i]znE;C=.quYe]{j/o7r7!,Ŏ`1v˰Ac`$](E,gʴ'8cfn~VF2s,b9zVk!>}EeP\Lai9IcrSVM6laIy%#*;޿t}9ـDg!zG)+TY-:lC>k6Ko]wӽ#?QQ(n 9.DMq2}qC(I2/`8[k;hb/'l6yyOlm!I [c7NQ9OaK.+k6H 7p}]a$nyqe;,:C巵m~J4JtOq-җwO+55q+b2rsA8JxXa?Rieָ{tXˆ <4J9U'êj=j+ŀj35LrUUjR1Q> stream GPL Ghostscript 9.27 2020-02-18T23:23:37+01:00 2020-02-18T23:23:37+01:00 Emacs 26.1 (Org mode 9.1.14) Marginal modelling of clustered survival dataKlaus Holst & Thomas Scheike endstream endobj 54 0 obj << /Filter /FlateDecode /Length 2312 >> stream xYioQ@fXXӹgKmvSRmsMHiorxZ'bOO m`IgKpE2"Y,ybsՒڌ'=?Yr[*] ̒]-G2H}_ M[g9LmVx4Ӻ-bk*?6#G>^Jwy 7wEy_ vA)ևc~]hBXY*3&vAKW<-\fP^-~X(%y]X&WqFSœBZi(3ÓjKtbKy[ x 4a EM: e,x7&*wط#'M}xC`_wy ɫ*2xU4EHS&QykMoOI3emd}},mD\ _Con#qX_8U'Ah R]T΁xA&ߏ=ڶUܤ{Vզ9Rr?^wh]FEroۂvJ ēeMz.Љ#iX䛻Qش7ͨxƗs]84-ksQtچb[-7] eKKADsMEAIjqKF1>5A9=r)D G'ygSp3*rTh*RD1F%"XdC;0CTR3tŇsQ蹢C%~FK[&r\gޕ?Pōl0mz %}Ƨ 5:+GZ_S~Jri`#D  G*A]ϕ!bjjBMxQf>e3EQ~>x h̉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^^[_nPYZZTWqr-(-I-ROI-c```e L,?:~^ޏ?տWΙ=~ewlUs/i4\Xy87b^`nendstream endobj 67 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 726 >> stream x}KhAw&}&PhL[[ %)ՓZ*Vf3;QPۤТHP-xЛxSQvhep5U>R/4Q`Vmզr6u_:}Inpf l97W!{ 8y5xwFr:v#I C`Owwwe퉱::NiRL`GRx6 Lߒ5w~+hnM/%[Éo#yWb4.n:va@{Cˁr~DIendstream endobj 68 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 417 >> stream xcd`ab`dddwu041 ~H3a!-=s7,ABnne?DW ~/^,Ș_29(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMU8TB9)槤e敤%d$V2000F10v1012Lc?G ajBo~za,^tuK8.).Ɉ؛xΑu߷]™~{1kN$6u^RߞYU]đz% bwB\Go?]*m[)wUwzwnl2+-Rùy20(endstream endobj 69 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter /DCTDecode /Height 238 /Subtype /Image /Width 291 /Length 4841 >> stream AdobedC    %,'..+'+*17F;14B4*+=S>BHJNON/;V\UL[FMNKC $$K2+2KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK#" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?Z( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (fdڀO >g?P@(o?b? >g?P@(Ə ?/*hг?YhYƏ ?/*hг?YhYƏ ?/*hг?YhYƏ ?/*hг?YhYƏ ?/*hг?YhYƏ ?/*hг?Y fMv08Z((* Ռ}LM? EA`ԜS>'Qo?Z\\$\1qs:UA` Spv]H` M5ݬܓԷ7QL"Ӏ,L΁`Cb88[ZI/>d`I^8yUžIʒ?)ʗv#G'Ja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+,ЇU;Ȋq`!'e/卙8/jH 85B̴z4ϋ &~$A#vCclKhKv>3vl'B@eprJq"”KfZle]X::}#P+XOZ1 H!`{&"L]~⾔89Ik%N:P.62~Lp]ݓXV j*lڈy1XzZŗ#9 5=} 2ԒRaВx, {3`tw]:}B0~ef/# ),7Yq~Z endstream endobj 74 0 obj << /Type /XRef /Length 106 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 75 /ID [<05e9e5bc40f5b5364c5679675aff47b8><26e1bfc74eed422680e2559263f25be8>] >> stream xcb&F~0 $8JEgN?dog ,`R|"m "L` R0"yOIJɬfM`Y) H22'e endstream endobj startxref 69055 %%EOF mets/inst/doc/basic-dutils.ltx0000644000176200001440000010177113623061405016067 0ustar liggesusers%\VignetteIndexEntry{Manipulation of data-frame data with dutility functions} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Manipulation of data-frame data with dutility functions} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Manipulation of data-frame data with dutility functions}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Simple data manipulation for data-frames} \label{sec:orge9cc1d9} \begin{itemize} \item Renaming variables, Deleting variables \item Looking at the data \item Making new variales for the analysis \item Making factors (groupings) \item Working with factors \item Making a factor from existing numeric variable and vice versa \end{itemize} Here are some key data-manipulation steps on a data-frame which is how we typically organize our data in R. After having read the data into R it will typically be a data-frame, if not we can force it to be a data-frame. The basic idea of the utility functions is to get a simple and easy to type way of making simple data-manipulation on a data-frame much like what is possible in SAS or STATA. The functions, say, dcut, dfactor and so on are all functions that basically does what the base R cut, factor do, but are easier to use in the context of data-frames and have additional functionality. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(melanoma) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} is.data.frame(melanoma) \end{lstlisting} \begin{verbatim} [1] TRUE \end{verbatim} Here we work on the melanoma data that is already read into R and is a data-frame. \section*{dUtility functions} \label{sec:org995ef5a} The structure for all functions is \begin{itemize} \item dfunction(dataframe,y\textasciitilde{}x|ifcond,\ldots{}) \end{itemize} to use the function on y in a dataframe grouped by x if condition ifcond is valid. The basic functions are Data processing \begin{itemize} \item dsort \item dreshape \item dcut \item drm, drename, ddrop, dkeep, dsubset \item drelevel \item dlag \item dfactor, dnumeric \end{itemize} Data aggregation \begin{itemize} \item dby, dby2 \item dscalar, deval, daggregate \item dmean, dsd, dsum, dquantile, dcor \item dtable, dcount \end{itemize} Data summaries \begin{itemize} \item dhead, dtail, \item dsummary, \item dprint, dlist, dlevels, dunique \end{itemize} A generic function daggregate, daggr, can be called with a function as the argument \begin{itemize} \item daggregate(dataframe,y\textasciitilde{}x|ifcond,fun=function,\ldots{}) \end{itemize} without the grouping variable (x) \begin{itemize} \item daggregate(dataframe,\textasciitilde{}y|ifcond,fun=function,\ldots{}) \end{itemize} A useful feature is that y and x as well as the subset condition can be specified using regular-expressions or by wildcards (default). Here to illustrate this, we compute the means of certain variables. First just oveall \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,~thick+I(log(thick))) \end{lstlisting} \begin{verbatim} thick I(log(thick)) 291.985366 5.223341 \end{verbatim} now only when days>500 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,~thick+I(log(thick))|I(days>500)) \end{lstlisting} \begin{verbatim} thick I(log(thick)) 271.582011 5.168691 \end{verbatim} and now after sex but only when days>500 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,thick+I(log(thick))~sex|I(days>500)) \end{lstlisting} \begin{verbatim} sex thick I(log(thick)) 1 0 242.9580 5.060086 2 1 320.2429 5.353321 \end{verbatim} and finally after quartiles of days (via the dcut function) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,thick+I(log(thick))~I(dcut(days))) \end{lstlisting} \begin{verbatim} I(dcut(days)) thick I(log(thick)) 1 [10,1.52e+03] 482.1731 5.799525 2 (1.52e+03,2e+03] 208.5490 4.987652 3 (2e+03,3.04e+03] 223.2941 4.974759 4 (3.04e+03,5.56e+03] 250.1961 5.120129 \end{verbatim} or summary of all variables starting with "s" and that contains "a" \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dmean(melanoma,"s*"+"*a*"~sex|I(days>500)) \end{lstlisting} \begin{verbatim} sex status days 1 0 1.831933 2399.143 2 1 1.714286 2169.800 \end{verbatim} \section*{Renaming, deleting, keeping, dropping variables} \label{sec:orgb2de04c} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=drename(melanoma,tykkelse~thick) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" "tykkelse" "sex" \end{verbatim} Deleting variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=drm(melanoma,~thick+sex) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} or sas style \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=ddrop(melanoma,~thick+sex) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} alternatively we can also keep certain variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma=dkeep(melanoma,~thick+sex+status+days) names(melanoma) \end{lstlisting} \begin{verbatim} [1] "thick" "sex" "status" "days" \end{verbatim} This can also be done with direct asignment \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) ddrop(melanoma) <- ~thick+sex names(melanoma) \end{lstlisting} \begin{verbatim} [1] "no" "status" "days" "ulc" \end{verbatim} \section*{Looking at the data} \label{sec:orgae42906} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dstr(melanoma) \end{lstlisting} \begin{verbatim} 'data.frame': 205 obs. of 6 variables: $ no : int 789 13 97 16 21 469 685 7 932 944 ... $ status: int 3 3 2 3 1 1 1 1 3 1 ... $ days : int 10 30 35 99 185 204 210 232 232 279 ... $ ulc : int 1 0 0 0 1 1 1 1 1 1 ... $ thick : int 676 65 134 290 1208 484 516 1288 322 741 ... $ sex : int 1 1 1 0 1 1 1 1 0 0 ... \end{verbatim} The data can in Rstudio be seen as a data-table but to list certain parts of the data in output window \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 --- 201 317 2 4492 1 706 1 202 798 2 4668 0 612 0 203 806 2 4688 0 48 0 204 606 2 4926 0 226 0 205 328 2 5565 0 290 0 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma, ~.|sex==1) \end{lstlisting} \begin{verbatim} no status days ulc thick 1 789 3 10 1 676 2 13 3 30 0 65 3 97 2 35 0 134 5 21 1 185 1 1208 6 469 1 204 1 484 --- 191 445 2 3909 1 806 195 415 2 4119 0 65 197 175 2 4207 0 65 198 493 2 4310 0 210 201 317 2 4492 1 706 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlist(melanoma, ~ulc+days+thick+sex|sex==1) \end{lstlisting} \begin{verbatim} ulc days thick sex 1 1 10 676 1 2 0 30 65 1 3 0 35 134 1 5 1 185 1208 1 6 1 204 484 1 --- 191 1 3909 806 1 195 0 4119 65 1 197 0 4207 65 1 198 0 4310 210 1 201 1 4492 706 1 \end{verbatim} Getting summaries \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick Min. : 2.0 Min. :1.00 Min. : 10 Min. :0.000 Min. : 10 1st Qu.:222.0 1st Qu.:1.00 1st Qu.:1525 1st Qu.:0.000 1st Qu.: 97 Median :469.0 Median :2.00 Median :2005 Median :0.000 Median : 194 Mean :463.9 Mean :1.79 Mean :2153 Mean :0.439 Mean : 292 3rd Qu.:731.0 3rd Qu.:2.00 3rd Qu.:3042 3rd Qu.:1.000 3rd Qu.: 356 Max. :992.0 Max. :3.00 Max. :5565 Max. :1.000 Max. :1742 sex Min. :0.0000 1st Qu.:0.0000 Median :0.0000 Mean :0.3854 3rd Qu.:1.0000 Max. :1.0000 \end{verbatim} or for specfic variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,~thick+status+sex) \end{lstlisting} \begin{verbatim} thick status sex Min. : 10 Min. :1.00 Min. :0.0000 1st Qu.: 97 1st Qu.:1.00 1st Qu.:0.0000 Median : 194 Median :2.00 Median :0.0000 Mean : 292 Mean :1.79 Mean :0.3854 3rd Qu.: 356 3rd Qu.:2.00 3rd Qu.:1.0000 Max. :1742 Max. :3.00 Max. :1.0000 \end{verbatim} Summaries in different groups (sex) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex) \end{lstlisting} \begin{verbatim} sex: 0 thick days status Min. : 10.0 Min. : 99 Min. :1.000 1st Qu.: 97.0 1st Qu.:1636 1st Qu.:2.000 Median : 162.0 Median :2059 Median :2.000 Mean : 248.6 Mean :2283 Mean :1.833 3rd Qu.: 306.0 3rd Qu.:3131 3rd Qu.:2.000 Max. :1742.0 Max. :5565 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. : 16.0 Min. : 10 Min. :1.000 1st Qu.: 105.0 1st Qu.:1052 1st Qu.:1.000 Median : 258.0 Median :1860 Median :2.000 Mean : 361.1 Mean :1946 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2784 3rd Qu.:2.000 Max. :1466.0 Max. :4492 Max. :3.000 \end{verbatim} and only among those with thin-tumours or only females (sex==1) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex|thick<97) \end{lstlisting} \begin{verbatim} sex: 0 thick days status Min. :10.00 Min. : 355 Min. :1.000 1st Qu.:32.00 1st Qu.:1762 1st Qu.:2.000 Median :64.00 Median :2227 Median :2.000 Mean :51.48 Mean :2425 Mean :2.034 3rd Qu.:65.00 3rd Qu.:3185 3rd Qu.:2.000 Max. :81.00 Max. :4688 Max. :3.000 ------------------------------------------------------------ sex: 1 thick days status Min. :16.00 Min. : 30 Min. :1.000 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 Median :65.00 Median :2886 Median :2.000 Mean :55.75 Mean :2632 Mean :1.875 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 Max. :81.00 Max. :4207 Max. :3.000 \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+status~+1|sex==1) \end{lstlisting} \begin{verbatim} thick status Min. : 16.0 Min. :1.000 1st Qu.: 105.0 1st Qu.:1.000 Median : 258.0 Median :2.000 Mean : 361.1 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2.000 Max. :1466.0 Max. :3.000 \end{verbatim} or \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,~thick+status|sex==1) \end{lstlisting} \begin{verbatim} thick status Min. : 16.0 Min. :1.000 1st Qu.: 105.0 1st Qu.:1.000 Median : 258.0 Median :2.000 Mean : 361.1 Mean :1.722 3rd Qu.: 484.0 3rd Qu.:2.000 Max. :1466.0 Max. :3.000 \end{verbatim} To make more complex conditions need to use the I() \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsummary(melanoma,thick+days+status~sex|I(thick<97 & sex==1)) \end{lstlisting} \begin{verbatim} sex: 1 thick days status Min. :16.00 Min. : 30 Min. :1.000 1st Qu.:30.00 1st Qu.:1820 1st Qu.:2.000 Median :65.00 Median :2886 Median :2.000 Mean :55.75 Mean :2632 Mean :1.875 3rd Qu.:81.00 3rd Qu.:3328 3rd Qu.:2.000 Max. :81.00 Max. :4207 Max. :3.000 \end{verbatim} Tables between variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex) \end{lstlisting} \begin{verbatim} sex 0 1 status 1 28 29 2 91 43 3 7 7 \end{verbatim} All bivariate tables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc,level=2) \end{lstlisting} \begin{verbatim} status sex 1 2 3 0 28 91 7 1 29 43 7 status ulc 1 2 3 0 16 92 7 1 41 42 7 sex ulc 0 1 0 79 36 1 47 43 \end{verbatim} All univariate tables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc,level=1) \end{lstlisting} \begin{verbatim} status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 \end{verbatim} and with new variables \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~status+sex+ulc+dcut(days)+I(days>300),level=1) \end{lstlisting} \begin{verbatim} status 1 2 3 57 134 14 sex 0 1 126 79 ulc 0 1 115 90 dcut(days) [10,1.52e+03] (1.52e+03,2e+03] (2e+03,3.04e+03] (3.04e+03,5.56e+03] 52 51 51 51 I(days > 300) FALSE TRUE 11 194 \end{verbatim} \section*{Sorting the data} \label{sec:org4adbc9e} To sort the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) mel= dsort(melanoma,~days) dsort(melanoma) <- ~days head(mel) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 6 469 1 204 1 484 1 \end{verbatim} and to sort after multiple variables increasing and decreasing \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dsort(melanoma) <- ~days-status head(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex 1 789 3 10 1 676 1 2 13 3 30 0 65 1 3 97 2 35 0 134 1 4 16 3 99 0 290 0 5 21 1 185 1 1208 1 6 469 1 204 1 484 1 \end{verbatim} \section*{Making new variales for the analysis} \label{sec:orgb492e14} To define a bunch of new covariates within a data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma= transform(melanoma, thick2=thick^2, lthick=log(thick) ) dhead(melanoma) \end{lstlisting} \begin{verbatim} no status days ulc thick sex thick2 lthick 1 789 3 10 1 676 1 456976 6.516193 2 13 3 30 0 65 1 4225 4.174387 3 97 2 35 0 134 1 17956 4.897840 4 16 3 99 0 290 0 84100 5.669881 5 21 1 185 1 1208 1 1459264 7.096721 6 469 1 204 1 484 1 234256 6.182085 \end{verbatim} When the above definitions are done using a condition this can be achieved using the dtransform function that extends transform with a possible condition \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=dtransform(melanoma,ll=thick*1.05^ulc,sex==1) melanoma=dtransform(melanoma,ll=thick,sex!=1) dmean(melanoma,ll~sex+ulc) \end{lstlisting} \begin{verbatim} sex ulc ll 1 0 0 173.7342 2 1 0 197.3611 3 0 1 374.5532 4 1 1 523.1198 \end{verbatim} \section*{Making factors (groupings)} \label{sec:orgca893e7} On the melanoma data the variable thick gives the thickness of the melanom tumour. For some analyses we would like to make a factor depending on the thickness. This can be done in several different ways \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=dcut(melanoma,~thick,breaks=c(0,200,500,800,2000)) \end{lstlisting} New variable is named thickcat.0 by default. To see levels of factors in data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- \end{verbatim} Checking group sizes \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~thickcat.0) \end{lstlisting} \begin{verbatim} thickcat.0 [0,200] (200,500] (500,800] (800,2e+03] 109 64 20 12 \end{verbatim} With adding to the data-frame directly \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dcut(melanoma,breaks=c(0,200,500,800,2000)) <- gr.thick1~thick dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- gr.thick1 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- \end{verbatim} new variable is named thickcat.0 (after first cut-point), or to get quartiles with default names thick.cat.4 \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dcut(melanoma) <- ~ thick # new variable is thickcat.4 dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.0 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- gr.thick1 #levels=:4 [1] "[0,200]" "(200,500]" "(500,800]" "(800,2e+03]" ----------------------------------------- thickcat.4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or median groups, here starting again with the original data, \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=2) <- ~ thick # new variable is thick.2 dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat.2 #levels=:2 [1] "[10,194]" "(194,1.74e+03]" ----------------------------------------- \end{verbatim} to control new names \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) mela= dcut(melanoma,thickcat4+dayscat4~thick+days,breaks=4) dlevels(mela) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- dayscat4 #levels=:4 [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" [4] "(3.04e+03,5.56e+03]" ----------------------------------------- \end{verbatim} or \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=4) <- thickcat4+dayscat4~thick+days dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- dayscat4 #levels=:4 [1] "[10,1.52e+03]" "(1.52e+03,2e+03]" "(2e+03,3.04e+03]" [4] "(3.04e+03,5.56e+03]" ----------------------------------------- \end{verbatim} This can also be typed out more specifically \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma$gthick = cut(melanoma$thick,breaks=c(0,200,500,800,2000)) melanoma$gthick = cut(melanoma$thick,breaks=quantile(melanoma$thick),include.lowest=TRUE) \end{lstlisting} \section*{Working with factors} \label{sec:orgb002bf7} To see levels of covariates in data-frame \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) dcut(melanoma,breaks=4) <- thickcat4~thick dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} To relevel the factor \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dtable(melanoma,~thickcat4) melanoma = drelevel(melanoma,~thickcat4,ref="(194,356]") dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 [10,97] (97,194] (194,356] (356,1.74e+03] 56 53 45 51 thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or to take the third level in the list of levels, same as above, \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = drelevel(melanoma,~thickcat4,ref=2) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} To combine levels of a factor (first combinining first 3 groups into one) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = drelevel(melanoma,~thickcat4,newlevels=1:3) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.(194,356] #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(97,194]" "[10,97]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.1:3 #levels=:2 [1] "[10,97]-(194,356]" "(356,1.74e+03]" ----------------------------------------- \end{verbatim} or to combine groups 1 and 2 into one group and 3 and 4 into another \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dkeep(melanoma) <- ~thick+thickcat4 melanoma = drelevel(melanoma,gthick2~thickcat4,newlevels=list(1:2,3:4)) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- gthick2 #levels=:2 [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" ----------------------------------------- \end{verbatim} Changing order of factor levels \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} dfactor(melanoma,levels=c(3,1,2,4)) <- thickcat4.2~thickcat4 dlevel(melanoma,~ "thickcat4*") dtable(melanoma,~thickcat4+thickcat4.2) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- thickcat4.2 (194,356] [10,97] (97,194] (356,1.74e+03] thickcat4 [10,97] 0 56 0 0 (97,194] 0 0 53 0 (194,356] 45 0 0 0 (356,1.74e+03] 0 0 0 51 \end{verbatim} Combine levels but now control factor-level names \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma=drelevel(melanoma,gthick3~thickcat4,newlevels=list(group1.2=1:2,group3.4=3:4)) dlevels(melanoma) \end{lstlisting} \begin{verbatim} thickcat4 #levels=:4 [1] "[10,97]" "(97,194]" "(194,356]" "(356,1.74e+03]" ----------------------------------------- gthick2 #levels=:2 [1] "[10,97]-(97,194]" "(194,356]-(356,1.74e+03]" ----------------------------------------- thickcat4.2 #levels=:4 [1] "(194,356]" "[10,97]" "(97,194]" "(356,1.74e+03]" ----------------------------------------- gthick3 #levels=:2 [1] "group1.2" "group3.4" ----------------------------------------- \end{verbatim} \section*{Making a factor from existing numeric variable and vice versa} \label{sec:orgdcd4633} A numeric variable "status" with values 1,2,3 into a factor by \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} data(melanoma) melanoma = dfactor(melanoma,~status, labels=c("malignant-melanoma","censoring","dead-other")) melanoma = dfactor(melanoma,sexl~sex,labels=c("females","males")) dtable(melanoma,~sexl+status.f) \end{lstlisting} \begin{verbatim} status.f malignant-melanoma censoring dead-other sexl females 28 91 7 males 29 43 7 \end{verbatim} A gender factor with values "M", "F" can be converted into numerics by \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} melanoma = dnumeric(melanoma,~sexl) dstr(melanoma,"sex*") dtable(melanoma,~'sex*',level=2) \end{lstlisting} \begin{verbatim} 'data.frame': 205 obs. of 3 variables: $ sex : int 1 1 1 0 1 1 1 1 0 0 ... $ sexl : Factor w/ 2 levels "females","males": 2 2 2 1 2 2 2 2 1 1 ... $ sexl.n: num 2 2 2 1 2 2 2 2 1 1 ... sex sexl 0 1 females 126 0 males 0 79 sex sexl.n 0 1 1 126 0 2 0 79 sexl sexl.n females males 1 126 0 2 0 79 \end{verbatim} \end{document}mets/inst/doc/binomial-family.ltx0000644000176200001440000005721713623061405016562 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate binomial data: family analysis} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate binomial data: family analysis} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate binomial data: family analysis}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org413d47e} When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. \section*{Simulated family data} \label{sec:org9bae582} We start by simulating family data with and additive gamma structure on ACE form. Here 40000 families consisting of two parents and two children. The response is ybin and there is one covariate x. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(100) data <- simbinClaytonOakes.family.ace(40000,2,1,beta=NULL,alpha=NULL) data$number <- c(1,2,3,4) data$child <- 1*(data$number==3) head(data) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace ybin x type cluster number child 1 1 0 mother 1 1 0 2 1 1 father 1 2 0 3 1 1 child 1 3 1 4 1 1 child 1 4 0 5 0 0 mother 2 1 0 6 1 1 father 2 2 0 \end{verbatim} We fit the marginal models, and here find a covariate effect at 0.3 for x. The marginals can be specified excatly as one wants. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aa <- margbin <- glm(ybin~x,data=data,family=binomial()) summary(aa) \end{lstlisting} \begin{verbatim} Call: glm(formula = ybin ~ x, family = binomial(), data = data) Deviance Residuals: Min 1Q Median 3Q Max -1.5283 -1.3910 0.8632 0.9779 0.9779 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.489258 0.007291 67.1 <2e-16 *** x 0.306070 0.010553 29.0 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 206272 on 159999 degrees of freedom Residual deviance: 205428 on 159998 degrees of freedom AIC: 205432 Number of Fisher Scoring iterations: 4 \end{verbatim} \section*{Additive gamma model} \label{sec:org85bea3a} For the additive gamma of this type we set-up the random effects included in such a family to make the ACE valid using some special functions for this. The model is constructe with one enviromental effect shared by all in the family and 8 genetic random effects with size (1/4) genetic variance. Looking at the first family we see that the mother and father both share half the genes with the children and that the two children also share half their genes with this specification. Below we also show an alternative specification of this model using all pairs. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # make ace random effects design out <- ace.family.design(data,member="type",id="cluster") out$pardes head(out$des.rv,4) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 \end{verbatim} We can now fit the model calling the two-stage function \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # fitting ace model for family structure ts <- binomial.twostage(margbin,data=data,clusters=data$cluster, theta=c(2,1), random.design=out$des.rv,theta.des=out$pardes) summary(ts) # true variance parameters c(2,1) # total variance 3 \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.2425610 0.03747680 dependence2 0.1255742 0.01607478 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.659 0.0611 0.539 0.779 4.25e-27 dependence2 0.341 0.0611 0.221 0.461 2.39e-08 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.368 0.0252 0.319 0.418 3.31e-48 attr(,"class") [1] "summary.mets.twostage" [1] 0.2222222 0.1111111 [1] 0.3333333 \end{verbatim} \subsection*{Pairwise fitting} \label{sec:orged91ad8} We now specify the same model via extracting all pairs. The random effecs structure is simpler when just looking at pairs. A special function writes up all combinations of pairs. There are 6 pairs within each family, and we keep track of who belongs to the different families. We first simply give the pairs and we then should get the same result as before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} mm <- familycluster.index(data$cluster) head(mm$familypairindex,n=20) pairs <- mm$pairs dim(pairs) head(pairs,12) \end{lstlisting} \begin{verbatim} [1] 1 2 1 3 1 4 2 3 2 4 3 4 5 6 5 7 5 8 6 7 [1] 240000 2 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 1 4 [4,] 2 3 [5,] 2 4 [6,] 3 4 [7,] 5 6 [8,] 5 7 [9,] 5 8 [10,] 6 7 [11,] 6 8 [12,] 7 8 \end{verbatim} Now with the pairs we fit the model \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsp <- binomial.twostage(margbin,data=data, clusters=data$cluster, theta=c(2,1),detail=0, random.design=out$des.rv,theta.des=out$pardes,pairs=pairs) summary(tsp) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} Here a random sample of pairs are given instead and we get other estimates. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} set.seed(100) ssid <- sort(sample(1:nrow(pairs),nrow(pairs)/2)) tsd <- binomial.twostage(aa,data=data,clusters=data$cluster, theta=c(2,1),step=1.0, random.design=out$des.rv,iid=1,Nit=10, theta.des=out$pardes,pairs=pairs[ssid,]) summary(tsd) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} To specify such a model when only the pairs are availble we show how to specify the model. We here use the same marginal "aa" to make the results comparable. The marginal can also be fitted based on available data. We start by selecting the data related to the pairs, and sets up new id's and to start we specify the model using the full design with 9 random effects. Below we show how one can use with only the random effects needed for each pair, which is typically simpler. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} head(pairs[ssid,]) ids <- sort(unique(c(pairs[ssid,]))) pairsids <- c(pairs[ssid,]) pair.new <- matrix(fast.approx(ids,c(pairs[ssid,])),ncol=2) head(pair.new) dataid <- dsort(data[ids,],"cluster") outid <- ace.family.design(dataid,member="type",id="cluster") outid$pardes head(outid$des.rv) \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [,1] [,2] [1,] 0.25 0 [2,] 0.25 0 [3,] 0.25 0 [4,] 0.25 0 [5,] 0.25 0 [6,] 0.25 0 [7,] 0.25 0 [8,] 0.25 0 [9,] 0.00 1 m1 m2 m3 m4 f1 f2 f3 f4 env [1,] 1 1 1 1 0 0 0 0 1 [2,] 0 0 0 0 1 1 1 1 1 [3,] 1 1 0 0 1 1 0 0 1 [4,] 1 0 1 0 1 0 1 0 1 [5,] 1 1 1 1 0 0 0 0 1 [6,] 0 0 0 0 1 1 1 1 1 \end{verbatim} Now fitting the model with the data set up \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=outid$des.rv,theta.des=outid$pardes,pairs=pair.new) summary(tsdid) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} We now specify the design specifically using the pairs. The random.design and design on the parameters are now given for each pair, as a 3 dimensional matrix. with a direct specification of random.design and the design on the parameters theta.design. In addition we need also to give the number of random effects for each pair. These basic things are constructed by certain functions for the ACE design. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} pair.types <- matrix(dataid[c(t(pair.new)),"type"],byrow=T,ncol=2) head(pair.new,7) head(pair.types,7) theta.des <- array(0,c(4,2,nrow(pair.new))) random.des <- array(0,c(2,4,nrow(pair.new))) # random variables in each pair rvs <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") { theta.des[,,i] <- rbind(c(1,0),c(1,0),c(0,1),c(0,0)) random.des[,,i] <- rbind(c(1,0,1,0),c(0,1,1,0)) rvs <- c(rvs,3) } else { theta.des[,,i] <- rbind(c(0.5,0),c(0.5,0),c(0.5,0),c(0,1)) random.des[,,i] <- rbind(c(1,1,0,1),c(1,0,1,1)) rvs <- c(rvs,4) } } \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 4 [4,] 3 4 [5,] 5 6 [6,] 5 7 [7,] 5 8 [,1] [,2] [1,] "mother" "father" [2,] "mother" "child" [3,] "father" "child" [4,] "child" "child" [5,] "mother" "father" [6,] "mother" "child" [7,] "mother" "child" \end{verbatim} For pair 1 that is a mother/farther pair, we see that they share 1 environmental random effect of size 1. There are also two genetic effects that are unshared between the two. So a total of 3 random effects are needed here. The theta.des relates the 3 random effects to possible relationships in the parameters. Here the genetic effects are full and so is the environmental effect. In contrast we also consider a mother/child pair that share half the genes, now with random effects with (1/2) gene variance. We there need 4 random effects, 2 non-shared half-gene, 1 shared half-gene, and one shared full environmental effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # 3 rvs here random.des[,,1] theta.des[,,1] # 4 rvs here random.des[,,2] theta.des[,,2] head(rvs) \end{lstlisting} \begin{verbatim} [,1] [,2] [,3] [,4] [1,] 1 0 1 0 [2,] 0 1 1 0 [,1] [,2] [1,] 1 0 [2,] 1 0 [3,] 0 1 [4,] 0 0 [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0.5 0 [2,] 0.5 0 [3,] 0.5 0 [4,] 0.0 1 [1] 3 4 4 4 3 4 \end{verbatim} Now fitting the model, and we see that it is a lot quicker due to the fewer random effects needed for pairs. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid2 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1), random.design=random.des, theta.des=theta.des,pairs=pair.new,pairs.rvs=rvs) summary(tsdid2) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} The same model can be specifed even simpler via the kinship coefficient. For this speicification there are 4 random effects for each pair, but some have variance 0. The mother-father pair, here shares a random effect with variance 0, and have two non-shared genetic effects with full variance, in addition to a fully shared environmental effect. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} kinship <- c() for (i in 1:nrow(pair.new)) { if (pair.types[i,1]=="mother" & pair.types[i,2]=="father") pk1 <- 0 else pk1 <- 0.5 kinship <- c(kinship,pk1) } head(kinship,n=10) out <- make.pairwise.design(pair.new,kinship,type="ace") names(out) out$random.des[,,1] out$theta.des[,,1] \end{lstlisting} \begin{verbatim} [1] 0.0 0.5 0.5 0.5 0.0 0.5 0.5 0.5 0.5 0.5 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [,4] [1,] 1 1 0 1 [2,] 1 0 1 1 [,1] [,2] [1,] 0 0 [2,] 1 0 [3,] 1 0 [4,] 0 1 \end{verbatim} Now, fitting the model we get the results from before. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tsdid3 <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta=c(2,1)/9,random.design=out$random.design, theta.des=out$theta.des,pairs=pair.new,pairs.rvs=out$ant.rvs) summary(tsdid3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects Error in theta.des %*% theta : non-conformable arguments \end{verbatim} \section*{Pairwise odds ratio model} \label{sec:org2ddc2cf} To fit the pairwise odds-ratio model in the case of a pair-specification there are two options for fitting the model. \begin{enumerate} \item One option is to set up some artificial data similar to twin data with \begin{itemize} \item a pair-cluster-id (clusters) \item with a cluster-id to get GEE type standard errors (se.cluster) \end{itemize} \item We can also use the specify the design via the theta.des that is also a matrix of dimension pairs x design with the design for POR model. \end{enumerate} Starting by the second option. We need to start by specify the design of the odds-ratio of each pair. We set up the data and find all combinations within the pairs. Subsequently, we remove all the empty groups, by grouping together the factor levels 4:9, and then we construct the design. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tdp <-cbind( dataid[pair.new[,1],],dataid[pair.new[,2],]) names(tdp) <- c(paste(names(dataid),"1",sep=""), paste(names(dataid),"2",sep="")) tdp <-transform(tdp,tt=interaction(type1,type2)) dlevel(tdp) drelevel(tdp,newlevels=list(mother.father=4:9)) <- obs.types~tt dtable(tdp,~tt+obs.types) tdp <- model.matrix(~-1+factor(obs.types),tdp) \end{lstlisting} \begin{verbatim} type1 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- type2 #levels=:3 [1] "child" "father" "mother" ----------------------------------------- tt #levels=:9 [1] "child.child" "father.child" "mother.child" "child.father" [5] "father.father" "mother.father" "child.mother" "father.mother" [9] "mother.mother" ----------------------------------------- obs.types mother.father child.child father.child mother.child tt child.child 0 19991 0 0 father.child 0 0 39837 0 mother.child 0 0 0 40212 child.father 0 0 0 0 father.father 0 0 0 0 mother.father 19960 0 0 0 child.mother 0 0 0 0 father.mother 0 0 0 0 mother.mother 0 0 0 0 \end{verbatim} We then can fit the pairwise model using the pairs and the pair-design for descrbing the OR. The results are consistent with the the ACE model as the mother-father have a lower dependence as is due only the environmental effects. All other combinations should have the same dependence as also seem to be the case. To fit the OR model it is generally recommended to use the var.link to use the parmetrization with log-odd-ratio regression. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} porpair <- binomial.twostage(aa,data=dataid,clusters=dataid$cluster, theta.des=tdp,pairs=pair.new,model="or",var.link=1) summary(porpair) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(obs.types)mother.father 0.1269881 0.03132228 factor(obs.types)child.child 0.3819107 0.03108233 factor(obs.types)father.child 0.3046284 0.02239909 factor(obs.types)mother.child 0.3293741 0.02233648 $or Estimate Std.Err 2.5% 97.5% P-value factor(obs.types)moth.... 1.14 0.0356 1.07 1.21 1.16e-223 factor(obs.types)chil.... 1.47 0.0455 1.38 1.55 4.26e-227 factor(obs.types)fath.... 1.36 0.0304 1.30 1.42 0.00e+00 factor(obs.types)moth.....1 1.39 0.0310 1.33 1.45 0.00e+00 $type [1] "or" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \end{document}mets/inst/doc/binomial-case-control-ascertainment.ltx0000644000176200001440000007154713623061405022527 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate binomial data: case control or ascertainment sampling} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate binomial data: case control or ascertainment sampling} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate binomial data: case control or ascertainment sampling}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgad14f2c} When looking at multivariate binomial data with the aim of learning about the dependence that is present, possibly after correcting for some covariates many models are available. \begin{itemize} \item Random-effects models logistic regression covered elsewhere (glmer in lme4). \end{itemize} in the mets package you can fit the \begin{itemize} \item Pairwise odds ratio model \item Bivariate Probit model \begin{itemize} \item With random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Additive gamma random effects model \begin{itemize} \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \end{itemize} These last three models are all fitted in the mets package using composite likelihoods for pairs of data. The models can be fitted specifically based on specifying which pairs one wants to use for the composite score. The models are described in futher details in the binomial-twin vignette. \subsection*{Case-Control Sampling} \label{sec:org93e2d83} Sometimes, pairs are recruited after a case-proband is selected. This proband, can be either a \begin{itemize} \item case: must be representative of cases \end{itemize} or a \begin{itemize} \item control: must be representative of controls \end{itemize} First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{P(j)} \] the probailty of seeing \((i,j)\) for the pair, given that the proband was observed as \((j)\). We note that if the marginal is known, or possibly estimated from the full cohort. Then we can estimate dependence parameters using just the terms \(P(i,j)\) for the pairs. We can thus ignore the special sampling for models with marginal specification. If the marginal can not be obtained from other sources we need to maximize the full-pairwise-likelihood in all parameters, that is both dependence and marginal parameters. Similary, one can select a whole family based on having selected a proband, that is selected a representative member of either cases or controls. In this case we fit the models by using composited likelihoods, considering all pairs that involves the probands. This will give some lacking efficiency compared to looking at the full likelihood of the family given the proband. \subsection*{Ascertainment Sampling} \label{sec:org6773872} Similarly, in the setting of pairs we can select all pairs where there is at least one event of interest. First thinking about pairs, we estimate parameters using the conditional likelihood given sampling wich for a binary 2 x 2 table can be written as \[ \frac{P(i,j)}{1-P(0,0)} \] the probailty of seeing \((i,j)\) for the pair, given that it is sampled. If the marginal can estimated from a full sample we can then estimate the dependence parameter using the ascertainment likelihood. Generally, when whole families are ascertained the computation of the true truncation probability can be hard to the fact that families are hard to define in the real world. Nevertheless, if a random sample of such family is at hand. We suggest to in these families take out all pairs that satisfies the ascertainment criterion. With a family, with given size \(n\) we have binary observations \((Y_1,...,Y_n)\). The family is sampled or a random sample of families such that \[ \sum_{i=1}^n Y_i \geq 1. \] We let the conditional distribution given sampling, be denoted as \[ P^O(\cdot) = P(\cdot | \sum_{i=1}^n Y_i \geq 1) \] Now, we note that all pairs within these family that satisfies that \(Y_i+Y_j \geq 1\), will have distribution \begin{align*} P^O(Y_i=o_1, Y_j=o_2 | Y_i+Y_j \geq 1) & = \frac{P^O(o_1,o_2)}{P^O( Y_i+Y_j \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2, \sum_{i=1}^n Y_i \geq 1)}{ P( Y_i+Y_j \geq 1, \sum_{i=1}^n Y_i \geq 1)} \\ & = \frac{P(Y_i=o_1,Y_j=o_2) }{ P( Y_i+Y_j \geq 1)} = \frac{P(o_1,o_2)}{1 - P(0,0)} \end{align*} since we only consider the probabilities where \(o_1+o_2 \geq 1\). Also here we could condition on covariates. So considering these pairs, or a random sample of them should yield valid inference. When standard errors are computed we need to rely on GEE type arguments. An advantage of this is that the ascertainment probability is much easier to get for the pairs. Again using the pairwise structure will lead to loss of efficiency compared to using the full likelihood of the ascertained families. In addition we note that when looking at one pair that has been ascertained then \begin{align*} P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j \geq 1) & = \sum_{k=1}^2 P(Y_i=o_1,Y_j=o_2 | Y_i+Y_j = k ) P( Y_i + Y_j =k | Y_i + Y_j \geq 1 ). \end{align*} where \(o_1+ o_2 \geq 1\). Note that the dependence will affect the probabilities \(P(Y_i+Y_j=2)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1))\) and \(P(Y_i+Y_j=1)/( P(Y_i+Y_j=2)+ P(Y_i+Y_j=1))\). In particular when the marginal parameters are known the dependence parameters can be estimated using the proportion of concordant pairs compared to the non-concordant pairs with respect to the outcome. When considering the pairs with different responses we learn "only" (up to model specification) about covariate effects. For example when \(\mbox{logit}(P(Y_i=1 | \alpha_k )) = \alpha_{k} + \beta X_i\) for \(i=1,2\) with \(\alpha_k\) a pair (cluster) specific effect and subject specific covariates \(X_i\) for \(i=1,2\), then \(P(Y_i=1,Y_j=0)/P(Y_i+Y_j=1) = \mbox{expit}((X_i - X_j) \beta)\), and with the standard definitions \(\mbox{logit}(p) = \log(p/(1-p))\) and \(\mbox{expit}(x) = \exp(x)/(1+\exp(x))\). \section*{The twin-stutter data} \label{sec:org51abefd} We consider the twin-stutter where for pairs of twins that are either dizygotic or monozygotic we have recorded whether the twins are stuttering \cite{twinstut-ref} We here consider MZ and same sex DZ twins. Looking at the data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) head(twinstut) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6 mets version 1.2.3 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined tvparnr zyg stutter sex age nr binstut 1 1 mz no female 71 1 0 2 1 mz no female 71 2 0 3 2 dz no female 71 1 0 8 5 mz no female 71 1 0 9 5 mz no female 71 2 0 11 7 dz no male 71 1 0 \end{verbatim} \begin{itemize} \item First, we select an ascertaiment sample of the data, thus selecting a random sample of all ascertained pairs. \item Secondly, we select a case-control sample of this data to illustrate the use of the methods. \end{itemize} \section*{Ascertaiment Sampling} \label{sec:orgaa08da8} Selecting the ascertained pairs \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twina <- subset(twinstut,n==2 & stuttot>=1) \end{lstlisting} Selecting on the pairs where there is stuttering at taking a look at the tables of discordance and concordance for the twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} twinda <- fast.reshape(twina,id="tvparnr") twind <- fast.reshape(twinstut,id="tvparnr") dtable(twind,"binst*"~I(stuttot1>=1)) dtable(twinda,~"binst*") \end{lstlisting} \begin{verbatim} I(stuttot1 >= 1): FALSE binstut2 0 binstut1 0 6632 ------------------------------------------------------------ I(stuttot1 >= 1): TRUE binstut2 0 1 binstut1 0 0 289 1 281 111 binstut2 0 1 binstut1 0 0 289 1 281 111 \end{verbatim} Now doing the analyses \subsection*{Biprobit model} \label{sec:orgb7a66bb} Looking at the full data for comparison. We estimate an unstructured probit model with different correlations for MZ and DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} b1 <- biprobit(binstut~sex,~-1+binzyg,data=twinstut,id="tvparnr") summary(b1) \end{lstlisting} \begin{verbatim} Estimate Std.Err Z p-value (Intercept) -1.794821 0.023289 -77.066826 0.0000 sexmale 0.401430 0.030179 13.301756 0.0000 r:binzygDZ 0.132458 0.062516 2.118802 0.0341 r:binzygMZ 1.096915 0.073574 14.909085 0.0000 logLik: -4400.536 mean(score^2): 1.022e-06 n pairs 21288 7313 Contrast: Dependence [binzygDZ] Mean [(Intercept)] Estimate 2.5% 97.5% Rel.Recur.Risk 1.77662 0.92746 2.62577 OR 1.88752 1.09432 3.25566 Tetrachoric correlation 0.13169 0.00993 0.24960 Concordance 0.00235 0.00140 0.00393 Casewise Concordance 0.06456 0.03937 0.10413 Marginal 0.03634 0.03287 0.04016 \end{verbatim} Note, that the Casewise Concordance is a consistently estimated under complete ascertainment, i.e., when we consider a random sample of affected twins (at least on of the twins must have the event). \subsection*{Odd-Ratio modelling} \label{sec:org1c452c4} First looking at the marginal model based on the full data we find the overall level of stuttering and also that males have a much higher stuttering risk. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} margbin <- glm(binstut~factor(sex),data=twinstut,family=binomial()) summary(margbin) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ factor(sex), family = binomial(), data = twinstut) Deviance Residuals: Min 1Q Median 3Q Max -0.4127 -0.4127 -0.2716 -0.2716 2.5763 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -3.28191 0.05000 -65.64 <2e-16 *** factor(sex)male 0.86171 0.06211 13.87 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 9328.6 on 21287 degrees of freedom Residual deviance: 9124.7 on 21286 degrees of freedom AIC: 9128.7 Number of Fisher Scoring iterations: 6 \end{verbatim} First, fitting the OR model for MZ and DZ for the full data, we find that MZ have a much higher dependence than DZ twins. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twinstut) bin <- binomial.twostage(margbin,data=twinstut,var.link=1, clusters=twinstut$tvparnr,theta.des=theta.des) summary(bin) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.5238541 0.2400861 factor(zyg)mz 3.4930902 0.1865567 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.689 0.4054 0.894 2.483 3.111e-05 factor(zyg)mz 32.887 6.1354 20.862 44.913 8.308e-08 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Now, using the overall marginal we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} theta.des <- model.matrix( ~-1+factor(zyg),data=twina) bina <- binomial.twostage(margbin,data=twina,var.link=1, clusters=twina$tvparnr,theta.des=theta.des, pair.ascertained=1) summary(bina) \end{lstlisting} \begin{verbatim} Dependence parameter for Odds-Ratio (Plackett) model With log-link $estimates theta se factor(zyg)dz 0.4874213 0.2472523 factor(zyg)mz 3.4753766 0.1985974 $or Estimate Std.Err 2.5% 97.5% P-value factor(zyg)dz 1.628 0.4026 0.8391 2.417 5.245e-05 factor(zyg)mz 32.310 6.4167 19.7335 44.886 4.771e-07 $type [1] "plackett" attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \subsection*{Additive gamma modelling} \label{sec:org524055f} First, again for comparision fitting the full data for the AE model. We get the size of the genetic variance in this model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} out <- twin.polygen.design(twinstut,id="tvparnr",zygname="zyg",zyg="dz",type="ae") bintwin <- binomial.twostage(margbin,data=twinstut, clusters=twinstut$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=out$des.rv,theta.des=out$pardes) summary(bintwin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9094847 0.09536268 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9095 0.09536 0.7226 1.096 1.469e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We first here take at the look at the marginal model for the ascertained sample, and note as expected that this sample give highly biased estimated for the marginal model. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} outa <- twin.polygen.design(twina,id="tvparnr",zygname="zyg",zyg="dz",type="ae") marga <- glm(binstut~sex,data=twina,family=binomial()) summary(marga) \end{lstlisting} \begin{verbatim} Call: glm(formula = binstut ~ sex, family = binomial(), data = twina) Deviance Residuals: Min 1Q Median 3Q Max -1.334 -1.298 1.028 1.028 1.061 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.27895 0.08739 3.192 0.00141 ** sexmale 0.08242 0.11237 0.733 0.46328 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1851.8 on 1361 degrees of freedom Residual deviance: 1851.2 on 1360 degrees of freedom AIC: 1855.2 Number of Fisher Scoring iterations: 4 \end{verbatim} Now, using the overall marginal model we look at the adjusted likelihood and find very similar results on the ascertained sample. Note, that the marginals are crucial for this analysis to give useful results. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} abintwin1 <- binomial.twostage(margbin,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1) summary(abintwin1) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8920274 0.09732786 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.892 0.09733 0.7013 1.083 4.946e-20 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} In fact for this model we can also do a full-MLE fitting jointly the dependence parameters and the marginal model. This is based on the twostage option (twostage=0 is MLE). Here the starting value is given at the marginal model for the ascertained model. This gives quite similar results to the previous analyses with a genetic variance around 1. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} aabintwin1 <- binomial.twostage(marga,data=twina, clusters=twina$tvparnr,detail=0,theta=c(0.1)/1,var.link=0, random.design=outa$des.rv,theta.des=outa$pardes,pair.ascertained=1,twostage=0) summary(aabintwin1) coef(marga) coef(margbin) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 1.014398 0.1045593 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 1.014 0.1046 0.8095 1.219 2.967e-22 attr(,"class") [1] "summary.mets.twostage" (Intercept) sexmale 0.2789484 0.0824214 (Intercept) factor(sex)male -3.2819072 0.8617053 \end{verbatim} \section*{Case Control Sampling} \label{sec:org56e8f5e} First, taking out all cases and one control for each case, we establish the pairs of these probands. This is based on keeping track of the twin related to the proband. Here using some utility functions in the mets packages. Then we write up the random design vectors and the parameter design for each pair using the kinship coefficient. When specifying the pairs in the case-control setup the second column should be the probands. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) data(twinstut) twinstut$binstut <- 1*(twinstut$stutter=="yes") twinstut <- subset(twinstut,zyg%in%c("mz","dz")) dnumeric(twinstut) <- ~. dfactor(twinstut,labels=c("DZ","MZ")) <- binzyg~zyg.n ddrop(twinstut) <- ~"*.n" twinstut <- dby(twinstut,binstut~tvparnr,stuttot=sum,nn=seq_along,n=length) twinstut <- subset(twinstut,n==2) twinstut <- dtransform(twinstut,nnrow=1:nrow(twinstut)) twinstut <- dby(twinstut,binstut~tvparnr,nnn=seq_along) twinstut <- dby2(twinstut,nnrow~tvparnr,pairnr=rev) cases <- which(twinstut$binstut==1) controls <- sample(which(twinstut$binstut==0),1217) rowsca <- with(twinstut,nnrow[cases]) rowsco <- with(twinstut,nnrow[controls]) rpairs <- c(rowsca,rowsco) cc.pairs <- cbind( with(twinstut,pairnr.nnrow[rpairs]),rpairs) ids <- sort(unique(c(cc.pairs))) pairsids <- c(cc.pairs) pair.new <- matrix(fast.approx(ids,pairsids),ncol=2) head(pair.new) dataid <- dsort(twinstut[ids,],"tvparnr") dataid=dtransform(dataid,kinship=0.5) dataid=dtransform(dataid,kinship=1,binzyg=="MZ") kinship <- dataid$kinship[pair.new[,2]] out <- make.pairwise.design(pair.new,kinship,type="ae") names(out) out$random.des[,,1] out$theta.des[,,1] \end{lstlisting} \begin{verbatim} [,1] [,2] [1,] 4 3 [2,] 16 15 [3,] 18 17 [4,] 32 31 [5,] 38 37 [6,] 44 43 [1] "random.design" "theta.des" "ant.rvs" [,1] [,2] [,3] [1,] 1 1 0 [2,] 1 0 1 [1] 0.5 0.5 0.5 \end{verbatim} Now doing the analyses, first with know marginals, that is marginals from the full data. For this analysis, since marginals do not contain dependence parameters we do not need to specify that this is case-control sampling. Having a correct is crucial for this to work, but this is certainly often possible in register based studies where a full cohort is also available. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cc <- binomial.twostage(margbin,data=dataid,clusters=dataid$tvparnr,pairs=pair.new, random.design=out$random.design,theta.des=out$theta.des, pairs.rvs=out$ant.rvs,case.control=0,twostage=1) summary(cc) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} We now do the same analysis specifying the case-control sampling. This should result in the same dependence parameters as is also the case. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} cc3 <- binomial.twostage(margbin,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=1) summary(cc3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.8791843 0.09707036 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.8792 0.09707 0.6889 1.069 1.339e-19 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} This model can also be fitted using a full likelhood of both dependence parameters and marginal parameters. Here there is no need to have a correctly specified marginal. We here use the marginal fitting from the case-control data as as starting values. Again we find a genetic variance around 1. The marginal parameters are also consistent with the results from the full analyses for the marginal parameters. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} marga <- glm(binstut~sex,data=dataid,family=binomial()) cc3 <- binomial.twostage(marga,data=dataid, clusters=dataid$tvparnr, pairs=pair.new, random.design=out$random.design, theta.des=out$theta.des, pairs.rvs=out$ant.rvs, case.control=1,twostage=0) summary(cc3) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates theta se dependence1 0.9222504 0.09729347 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 1 0 1 1 0 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 0.9223 0.09729 0.7316 1.113 2.566e-21 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} When probands are related, here we may choose both case and controls from the same twin-pair then we need to adjust standard errors by grouping together contribution from related probands. This can be done using the se.cluster option that specifies how to cluster in the computation of the standard errors. In this case, however, this will be same as the clusters since these also are identical across pairs. \section*{Combining Case Control and Ascertainment Sampling} \label{sec:orgff68ee7} When specifying such models based on the pairs, it is in fact possible to combine ascertained pairs with case-control sampling by specifing vectors as the case.control=c(1,0,1,0) and pair.ascertained=c(0,1,0,1) arguments. Here with two case-control pairs, and two ascertained pairs. \end{document}mets/inst/doc/binomial-case-control-ascertainment.pdf0000644000176200001440000020540213623061750022461 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 2807 /Filter /FlateDecode /N 67 /First 537 >> stream xZ[s6~_f'@dƱco:NhEWҤ~MRDd84@\K2 Y,d)fX a1˂PX`B Td,ULI+X2ZcS΄,0L  0ķc:r""b(X `BBj YY|fΕZ-sHm2*``PI8(G*l`8 ZU 4Ro GZ@}:`.2Z XfNXߜr:b.DZ&8 9x; Bk 5u0y"B4XK`B@q$*'tBf1D! GE8@60Q'Og'IO"f8[ $ ewseoYg mr{+L(īcElC|zʹ_ Uqx9Y$qfHؓH"+T*|*պasRD~6pĹ{"|{ W]־UDfiΞl)|t9I1;",ǂe˛%ûJY"HJ*҈ݮ$ϸLiH!QZg*ȊA5Wj%2ל>bE\F+x-X}[NJUFբ\OԴ^=y?[ rru q77+F)t`Ͼ)>SBҼV'ϋd^,*i"$h$t8{y:/<[.&G^~(. R2C'["\& C|(6f5b/N?`kV,I9?:雋x6iv짂@Oi:c:8Ly/;{Ra%+q\- 2£B5^% 鴸'QF, Ϭjto?n*-I5zu*V0V+GNDK}zito/w Ff-!rt&:x91t />?? ~ɯ[+y,x>7|',Ç<ɜw>|3<_O":dg]NۋR%oa:Kpv6do~g)`^iCۼvxa"y$ePٯhL3U"ؔ7tQՎYDqS݃;~˷%4YllPhm$,'Czt}4\;jSd:XK>:~WxYeѾ~_c^+¬W>O׼ u+?)y ܶ1ϱ[JINWX]צ6UT5M63T}T.nYɈT ~SRꝆԆ~!h|6. խh~Z-jvJniGGm7%GKBC"4 9oInI{خ8_Rqܱ]Sڿr2 O<#o@M)gؒ (#R"z%QY]pZ֟H6[}qUPwGI̗vT+eΰ&]a#sendstream endobj 69 0 obj << /Subtype /XML /Type /Metadata /Length 1668 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:35+01:00 2020-02-18T23:23:35+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of multivariate binomial data: case control or ascertainment samplingKlaus Holst & Thomas Scheike endstream endobj 70 0 obj << /Filter /FlateDecode /Length 1827 >> stream xX͎OSB+E$%mY'p xi W?cIyySHQ]@`UU_U}U_,QfUetwYt=)!,%,hZ ݏ讓Ө8!%O3LQ4e*A'9h9ղqdr Q%G+O}7 16R9G}fA %<G^Er0IݵkF>4;ϭ{8E1'RA _T7џ#Esmt_ku.rx 2"#!/ ‰%ZXJ1؉dF~#D2# c%-)K3ivʦ`'/KOjգ3D(#|F\xp}V &20 ?/D䟱˜bO!!:@ؤO,tV^+CRu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P1D9!Y~j=4wCaDנnB`b45;}R՛[l M$;f 1T1 {< JK- iT$̷qJendstream endobj 78 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 482 >> stream x5N]kPwZb焈2 F֩(X6ݵ,I N7b,e"y/|1nbXp8p; l.?7'/ IAN{w 1c1Z9 XYbib@)4\F +c\%#2K(ذ͒aTn̘)J.Z42F =:jxW=dGeUR5r"֔媴@t9<70Ň˿7 OC>-꽞([C Ml$%][rbB"i݃}h߱X-b6IE0Qq?pk'-qNϽlDc]O{!;!1kխft LJ5R?X8э{#ި0ž}Nz9.)˺endstream endobj 79 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 597 >> stream x}Mk@3v[mm %TO^Z+ ŗ&@62+TeMki/7,Vo^#?#!k:F8P4wT>7~+D}ܿOD7)t}D/PaB/ oi0UV{*{sl0{b{-z6 ѱ0L48wT*VK_U&XE^V< u"$]N3 .1q4'%s m/&u8e|^ˁzP&jN&`@MQiPobqpSNAkkmRGz_qIyYO7݊2H:K? \nzi/pmSMmcM-%H~J(2 FRiޯFѐ_Onf進ZJ < ˝뫰SO뷖+ OQ.V2щ\XvnԷg)+:_B'AɍYRjfrs=ɗ n|y+C{ƇO7eyoS>,Iendstream endobj 80 0 obj << /Filter /FlateDecode /Length 4277 >> stream x\KsN{-:KSq\I9Ǫrm ILcf%։kK{5nd⓿mqn/ Yr3% |rvysQHf1 %L2dUjaaqzeX=:(ʏAV} 2!`7Ct3_(߬IvgJ9U3ILzJqົ'Hulk >xߗBH THX.Wo߶AU,rUT'X8:cR7X?pd߃pV?f J;YMVocG𚷰`& D-P,9 "f (ƁdBYL#y r ~=_D UIN2jm9 wm G_DGnmHj$ f%X_4K Q6FG9Xe~]6c4r^"M 룕g㚛Q %βp^of![aq.#88"O\jQ>(`9)uV: ƁRA5a?θ55-b*F{eMZSlsRL$<҆f&: cc24(DUq*%U4GImHH?$Tf Pk5 )(D1e$2 7TS^(Sg ژQf0ԑq$Wrޥˋ.X_\P*̨2 n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 ; PbyRS eK2YW<4{ my nI]0Ԁv X3 /ֻ&[@R "ԦŤ;v56 փm#t3aР~!3Ve`vm$$8Hw8hƻr j~WA]}xQE8d6Uw<2* JO1c`BV?kc /9QKT NM L&W!c$yhi/ZFI9&#Łت^0;60t3rܸMU.9[Y9T!frׄN\.@0#;6>hM?Sh]ҋ_gҼCUcٴGo.x:Kr$xLm}xšeH (P8 8iAn g +949u Cs{) XY|pGӬf&Ԃ%yD Y)Grp!@*Ʈ.>0\/sZ0*8h 0fѻE.AoVd/Ȁ'5ef]L>ak!QF"O=/#k!r We<F3#TaQ +$y,,*9Mx>?zoWӷ1endstream endobj 93 0 obj << /Type /XRef /Length 117 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 94 /ID [<6638324d9042b3987fb0aa11fe394d26>] >> stream xcb&F~0 $8J ?w> (^s@s" ""@$ ܊ ,D z"ARU"9)  $9\AlP~E endstream endobj startxref 67965 %%EOF mets/inst/doc/binomial-twin.pdf0000644000176200001440000022335713623061750016227 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3046 /Filter /FlateDecode /N 73 /First 596 >> stream x[[s۶~?o͙L AL&3;;Q}KNhJ#Ri_H&tá b/.,`> < XEL3<2c$ B%'g|<=&S233ԖA0? =ixAȼ)E)mB& ƕ |ALPEL*(j@ f$6PJJjҢH1DلhLn({|i2IK(РP)BR 4A!GT:@ʃ #{#P_aSSO"E;e|$9Pf_ο%~ݰgl6[5tx%C@"#|vu-T]Wm&e/ &_փ& 4<7$.l~ {t?I]I_~,eA=Ѯ'ЮvKCy̋d{BT)Q@iN<[.ƠG^|) tCCmϒ$_ |Y o,2nt<4zÊ2ZףU]<__]|||q~O$͎*ԋ8ߧ&Ԅh{2Ionي: sKw|9G+ylw6'[~6S>s;9//+b Yz"{~8orxl翻tPF,:o\,s "J C T$h}yp1{||h!D00Ww uƠhVy6OxWƿ%iHΎH4-S [( 1cƨk{ٵe{˲,R. :fqÌa[WƓ}nB4xZ [^MStb^詅Ԯe ?vTک]|Ȉ=eDٹђZe,|Sa#Ri;S( 3oGnQP=)V1Cª}~_ W 6^6^tkkiOcS~=i"tzCAQ0M WZXFO drR7Z>[irUz.a֚HYt} 0}1GlojuIݻۊfI$Nl"ANiK#S֍+i$Q# %Sסء3_MAѯ}|Uݩ-tԙ"х& &{t2qŨbԲ9]Rm׽֙|X0hQ e mkx]klV@{4gON k]q"{UoV Zٜ{mdt<*j?[ҮO :&]lC64n^ǖŠ֒"bhMꗸka\кU*3K˜ϖ"~-S",6FWcc{8?y-ɗI"ٶ'EpkWڤ= 6ֹ ^+oq˗fMXzX&@t{I].{6u}Qjӻ9ҽn96G]-r҇g׸ > stream GPL Ghostscript 9.27 2020-02-18T23:23:36+01:00 2020-02-18T23:23:36+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of bivariate binomial data: Twin analysisKlaus Holst & Thomas Scheike endstream endobj 76 0 obj << /Filter /FlateDecode /Length 2256 >> stream xY[8x_'p+w^JhTU+;&i˱vUb5S!3;<xe&W.Ts !h IDT7x<\I ȌKl%x$9\).FU@ݹ"%ۍQɧl1[OfK-lJsE6!p3O3!D1^$f \t,jҮ$uUgؿmnY!TSg)Jj"0@f1GƃEdS@> /~| P}_p8OT8>Uq9̴ΩHgraXӯ~VQזZk1˸Q97w } 0+SBžLu o])a72n&A@`^xbq ݨ9 `̀*T30<ÄX?tg 5CKR9:OdC~yd8"Ҙ嶈VKi媵{9LT;~k.Ϝ϶_su53<>E g2osC+` )Ԅ])o &oL$dlY:koQ @n#~u}y p\$&,VFjgq>0I|9 Պa3+jw1B(s"̑NߙMmV K:$i/=X`**)`̧DvtIh&?Dm(͂,j fK*kS> stream xXwx[՗q$ߐ`^H*P @Rwa-˲lY5-K5{mYWG<HI$$@SFRJ[f_7}]9Ӵ|IgDw -)))mYy"Q^PM6+c6LjNHr %GYF"Ȅ"+Vp5Okr@}$RXwUBfG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JS^dYMoQ-%B^<+~lG&B@+Nr1\̪S:t֚R^%O臇ދ-sJ!ݵtepv@+Qz 5bk$b>5H}Ԓ=w5k 7 IhQw/I˺{kN-}~P/V'lK2G@?bCYH=w֕Xl6mpU7l[Bf4A/ɉWRJ^h^m4 Nɑ%>OTP=NW7kPA8Iey#Q%kxB *-:F^r%% UKT APK^%EE~Qɯ v\8U_shSa'0o^eRVfNbߋQ(gjwc_{mf~dlu MyBBq#c>|g|,|<6s>6[ f`$D0sBΛ~Jk7uBڒw:~JUqˢF^EwIuWΟo _-;/1 b?:U9Q|=={3ck"aqGKƪ*Q7ְ}e^^*^zWendstream endobj 81 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 448 >> stream xRAkSAM>[試IR S)q޼^ xW(}6z7}3-g 㜯| )EJwW˴>,6xqR4V&xZw76ZI2Zc^/YX[{ڌ-:}t+(mx~D{yvЅf /)%nA-Rk#3<> H.d<xG?u`YLu2*¼ /u)9#8*ciȑʗ- Jtsr+௩1r<UWʬZ1G4p^]Ixy]?Q{7=ߙ^?9:E4/Fݒendstream endobj 82 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 566 >> stream xMKLQtڡԡ&.KR4ֈj01 mRE*BlZ!%`n1э 1qA\@ea99''99Gq s0g^6quHq߶DDss&rFs\bt:J}3 c@@$A{#jTGZKtTUGNuthGJrLkbjɣrCWj;_ Wr #O!M+n{̈́wg[k^y {#70;š^l~¦'K0 }>g:/Mfd<k5e sxu7|y v]'>M=e0SJ{ޱd`gȚL ٹ\agl Aea\W|mp›85p](BI :[c- HslW0X( R3a b}(nb!endstream endobj 83 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 539 >> stream x%OKkQ7&DŨvr-B[(i kDVؤ83qf0d6NN|tH@Rw>{8|wAvw,51Q 5c]<,v{},?c}}")\ 9פ\VA!K&ox4DyNeJ,ǧGBb&)UUU#i^ܝa,zɜEEAAO> stream x}}le6^Nc;:`QA!Eqm^u{Cnco] +k8Ȼ/Q00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en\S2HҰvu@M=*<0 C[,½aVZcCRV>"8럯^aj;}&%wB~Q 5f_ǕYGϾQ$Af}=TX3^GE4vR YAٶw10Z6ɻpeM pq#C}kx{o:HCOx(;}ηu-?M׎ys*NJӐJى`tޤ mlτV;=ŗ{78Aqd'FINxGVnAiWkY$<ܠFQSmr%ҬJuT7fg h' ΡDfKI'h2hVn&./]nOL<ƋLΜAYJ4>'S- u>f3-Ƒn%DU Dy6ϟ:=0xv@,7K\ D, 1=+, E.i08FSyb}Ĥ$^ IctА"Az>]BP#bc'0endstream endobj 101 0 obj << /Type /XRef /Length 120 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 102 /ID [<6638324d9042b3987fb0aa11fe394d26>] >> stream xcb&F~0 $8J?O }(8%Axd~H3 ,fH`.B"HG RX 4 &@s} ,e[Y endstream endobj startxref 75109 %%EOF mets/inst/doc/basic-dutils.pdf0000644000176200001440000015746513623061747016055 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 2378 /Filter /FlateDecode /N 60 /First 464 >> stream xZYs8~_V*AVU$>╓d恖(ItH*q<$R,٣M(@F݀`3if] , dI!ҰIg% 4Jɔ(SI&=IA<+10--Ơ1#a2豖4S;$3*L`}T| uì eV ;G[ "ԐE0kZ㘧P:0A> ’AYfcN (=)"bZ1I(9c5s&9aEI6G!`1vܷ6iC U~@0e !Pw,4>JM  @c$W?p!v1~F4\T>|?@8e{{ŐY>JRj B!l4 O%mXQeeiP5͠_5(WcN ,cMyL5듵 |{ŷ#TEH7sWȯy]ftox$!#>~7_7~ϿɐZʁqxQ,4q"Sq<F¼/Iwߟ± +2[a%<5 azj۴~/xK{]{b콶R涻*lkDѰsa#E#OϿ%(M$ZHEF+MVYV\exཥ٢,2Պ;98jQ/ 5by<՝ZvVȼSn6j+ܞ2`sg2Q+|\IgPΉ|rVR\ң"Lgik4MQt#vEJ!RڣٳU4rE%P-ֶR/mdCxԷO+Zxլy<Dp7aofq=hzvR _wtQ!{ rذ-7ⷲpwq 7qB/UYU09 Y֙_-PH(Ns<:xE;v*4'z#ީx)3;y=3SKAu)ϣ?n6=~]d:'O/DR~u۟fL'\ΥsՁhՑi.>T[5f ijCs]ieڼk#48bOjC2S+Vn'3:ts8]a _P4L4?L4SQy a_asĜ)sy;ۚp?rendstream endobj 62 0 obj << /Subtype /XML /Type /Metadata /Length 1645 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:35+01:00 2020-02-18T23:23:35+01:00 Emacs 26.1 (Org mode 9.1.14) Manipulation of data-frame data with dutility functionsKlaus Holst & Thomas Scheike endstream endobj 63 0 obj << /Filter /FlateDecode /Length 1746 >> stream xXr6)xj Gw6&`@QŚLo $+I [Z''_A4y,X{ eT)_&<)wKeqWe}lK&iWi*uՅ]ڰ3<}eUqEdΔx}[h4a$F4LYw,~%TٮyT]o_)>r4u֍:Qro.%v2@ ːl+P,:RhxL-f\9e[X"{ŀ͓ 5B( \V*;N< UƝ7eXYg),R8@nZK &,EʕuϿe4!6=J)@̖U]"N^Uѻݑݭvp?Ez꾷M0 'Y?>Í/_:.{@H- 1hdGF2AmV?o^&o{%=.p8Hv?Tk'i"1/鶳d<ܻTU,Ukk$sM%]]e٪ ە2/pph;L ԿdlRzM:<+*P6vMm@~sȇcE Aվw,F6eqii&3$˧ fpUeU&8}R{0 f:qc()סjs& t ܊OE2Nwq^GATVƎd+.Ѕkۦw#HmHoIH^L 5vJ%0n2LU9%N=x<)JXwܺ i2en~Tԡ5BIZUgz8Y\LꙷJӆIVǦ Κ)@]^$`U cb^S&U8/k6ctu˩ƤAH9{ j^vl" &M^#xҶ эjnSX4 8ǵSˏ:תAX,wqD@htu(`s=fϨlkh \c]DVF<Ɇ"@񍉯RP!Z$"TgJ0>硒@e[{ܐiRDu\Ьn Q`僴(LΌ+4uӠ|ofYPEه 1AG'*- w.zʹl EmvoP}IH)mOma"z&O;큙cw+4 `3Adxܱ+XPP9(G@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`x[.sQD?[{`CCBj=IJ(,⪼7ɝ"i"oP}x^O!F9i !'GMs<{0W(vץPMZ7$'uV$MYtQ֝ @g=LiwMŷ/m?1,NNe0OHEUlDy5WiaŹ}q٨/Tmwc[4!MSz$R[ld"օx0) V!]Bː} J5NRO3#3.yO%oPațvB$:Mo"wNߓx=y \endstream endobj 83 0 obj << /Type /XRef /Length 103 /Filter /FlateDecode /DecodeParms << /Columns 4 /Predictor 12 >> /W [ 1 2 1 ] /Info 3 0 R /Root 2 0 R /Size 84 /ID [<120499356cb63a0252b38fd60b23ba2a>] >> stream xcb&F~ c%9eb` 0vi !$X$AvqHrd >o Y6 @-H~q'g  $;H032;E endstream endobj startxref 56766 %%EOF mets/inst/doc/recurrent-events.ltx0000644000176200001440000007247713623061405017031 0ustar liggesusers%\VignetteIndexEntry{Recurrent Events} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Recurrent Events} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Recurrent Events}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org01ebcd2} For recurrent events data it is often of interest to compute basis descriptive quantities as a first go at getting some basic understanding of the phenonmenon studied. We here demonstrate how one can compute \begin{itemize} \item the marginal mean \item the variance \item the probability of exceeding k events \end{itemize} In addition several tools can be used for simulating recurrent events and bivariate recurrent events data, in the case with a possible terminating event. We start by simulating some recurrent events data with two type of events with cumulative hazards \begin{itemize} \item \(\Lambda_1(t)\) \item \(\Lambda_2(t)\) \item \(\Lambda_D(t)\) \end{itemize} where we consider types 1 and 4 and with a rate of the terminal event given by \(\Lambda_D(t)\). We let the events be independent, but could also specify a random effects structure to generate dependence. When simulating data we can impose various random-effects structures to generate dependence \begin{itemize} \item We can draw normally distributed random effects \(Z_1,Z_2,Z_d\) were the variance (var.z) and correlation can be specified (cor.mat) (dependence=2). Then the intensities are \begin{itemize} \item \(\exp(Z_1) \lambda_1(t)\) \item \(\exp(Z_2) \lambda_2(t)\) \item \(\exp(Z_3) \lambda_D(t)\) \end{itemize} \item We can one gamma distributed random effects \(Z\). Then the intensities are (dependence=1) \begin{itemize} \item \(Z \lambda_1(t)\) \item \(Z \lambda_2(t)\) \item \(Z \lambda_D(t)\) \end{itemize} \item We can draw gamma distributed random effects \(Z_1,Z_2,Z_d\) were the sum-structure can be speicifed via a matrix cor.mat. Then we compute \(\tilde Z_j = \sum_k Z_k^{cor.mat(j,k)}\) for \(j=1,2,3\) (dependence=3) Then the intensities are \begin{itemize} \item \(\tilde Z_1 \lambda_1(t)\) \item \(\tilde Z_2 \lambda_2(t)\) \item \(\tilde Z_3 \lambda_D(t)\) \end{itemize} \item The intensities can be independent (dependence=0) \end{itemize} We return to how to run the different set-ups later and start by simulating independent processes. \subsection*{Utility functions} \label{sec:org9be05a8} We here mention two utility functions \begin{itemize} \item tie.breaker for breaking ties among jump-times which is expected in the functions below. \item count.history that counts the number of jumps previous for each subject that is \(N_1(t-)\) and \(N_2(t-)\). \end{itemize} \subsection*{Marginal Mean} \label{sec:orga8b27b9} We start by estimating the marginal mean \(E(N_1(t \wedge D))\) where \(D\) is the timing of the terminal event. This is based on a rate model for \begin{itemize} \item the type 1 events \item the terminal event \end{itemize} and is defined as \(\mu_1(t)=E(N_1^*(t))\) \begin{align} \int_0^t S(u) d R_1(u) \end{align} where \(S(t)=P(D \geq t)\) and \(dR_1(t) = E(dN_1^*(t) | D \geq t)\) and can therefore be estimated by a \begin{itemize} \item Kaplan-Meier estimator, \(\hat S(u)\) \item Nelson-Aalen estimator for \(R_1(t)\) \end{itemize} \begin{align} \hat R_1(t) & = \sum_i \int_0^t \frac{1}{Y_\bullet (s)} dN_{1i}(s) \end{align} where \(Y_{\bullet}(t)= \sum_i Y_i(t)\) such that the estimator is \begin{align} \hat \mu_1(t) & = \int_0^t \hat S(u) d\hat R_1(u). \end{align} Cook \& Lawless (1997), and developed further in Gosh \& Lin (2000). The variance can be estimated based on the asymptotic expansion of \(\hat \mu_1(t) - \mu_1(t)\) \begin{align*} & \sum_i \int_0^t \frac{S(s)}{\pi(s)} dM_{i1} - \mu_1(t) \int_0^t \frac{1}{\pi(s)} dM_i^d + \int_0^t \frac{\mu_1(s) }{\pi(s)} dM_i^d, \end{align*} with mean-zero processes \begin{itemize} \item \(M_i^d(t) = N_i^D(t)- \int_0^t Y_i(s) d \Lambda^D(s)\), \item \(M_{i1}(t) = N_{i1}(t) - \int_0^t Y_{i}(s) dR_1(s)\). \end{itemize} as in Gosh \& Lin (2000) \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(1000) # to control output in simulatins for p-values below. data(base1cumhaz) data(base4cumhaz) data(drcumhaz) ddr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz rr <- simRecurrent(1000,base1,death.cumhaz=ddr) rr$x <- rnorm(nrow(rr)) rr$strata <- floor((rr$id-0.01)/500) dlist(rr,.~id| id %in% c(1,7,9)) \end{lstlisting} \begin{verbatim} id: 1 entry time status rr dtime fdeath death start stop x strata 1 0 133.1 0 1 133.1 1 1 0 133.1 1.185 0 ------------------------------------------------------------ id: 7 entry time status rr dtime fdeath death start stop x strata 7 0.0 813.3 1 1 1729 1 0 0.0 813.3 1.5495 0 1004 813.3 1288.4 1 1 1729 1 0 813.3 1288.4 1.0535 0 1658 1288.4 1315.4 1 1 1729 1 0 1288.4 1315.4 1.5330 0 2150 1315.4 1449.4 1 1 1729 1 0 1315.4 1449.4 0.8944 0 2539 1449.4 1726.1 1 1 1729 1 0 1449.4 1726.1 -0.1931 0 2851 1726.1 1729.4 0 1 1729 1 1 1726.1 1729.4 0.4081 0 ------------------------------------------------------------ id: 9 entry time status rr dtime fdeath death start stop x strata 9 0.0 433.5 1 1 5110 0 0 0.0 433.5 -0.4660 0 1006 433.5 2451.1 1 1 5110 0 0 433.5 2451.1 1.0647 0 1659 2451.1 3629.7 1 1 5110 0 0 2451.1 3629.7 -0.2506 0 2151 3629.7 3644.7 1 1 5110 0 0 3629.7 3644.7 -0.6748 0 2540 3644.7 3695.8 1 1 5110 0 0 3644.7 3695.8 0.6510 0 2852 3695.8 3890.7 1 1 5110 0 0 3695.8 3890.7 -0.2033 0 3112 3890.7 5110.0 0 1 5110 0 0 3890.7 5110.0 -1.6981 0 \end{verbatim} The status variable keeps track of the recurrent evnts and their type, and death the timing of death. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec1,caption= ,captionpos=b} \begin{lstlisting} # to fit non-parametric models with just a baseline xr <- phreg(Surv(entry,time,status)~cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) # robust standard errors rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=4) # marginal mean of expected number of recurrent events out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec1.jpg} \end{center} \captionof{figure}{Marginal mean for number of type 1 events, rate for death (panel (a)), rate for type 1 among survivors (panel (b)), and marginal mean (panel (c)).} \label{fig:rec} \end{marginfigure} We can do the same with strata \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec2,caption= ,captionpos=b} \begin{lstlisting} xr <- phreg(Surv(entry,time,status)~strata(strata)+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~strata(strata)+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr,fixbeta=1) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec2.jpg} \end{center} \captionof{figure}{Recurrent events} \label{fig:rec2} \end{marginfigure} Furhter, if we adjust for covariates for the two rates we can still do predictions of marginal mean, what can be plotted is the baseline marginal mean, that is for the covariates equal to 0 for both models. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec3,caption= ,captionpos=b} \begin{lstlisting} # cox case xr <- phreg(Surv(entry,time,status)~x+cluster(id),data=rr) dr <- phreg(Surv(entry,time,death)~x+cluster(id),data=rr) par(mfrow=c(1,3)) bplot(dr,se=TRUE) title(main="death") bplot(xr,se=TRUE) rxr <- robust.phreg(xr) bplot(rxr,se=TRUE,robust=TRUE,add=TRUE,col=1:2) out <- recurrentMarginal(xr,dr) bplot(out,se=TRUE,ylab="marginal mean",col=1:2) # predictions witout se's outX <- recmarg(xr,dr,Xr=1,Xd=1) bplot(outX,add=TRUE,col=3) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec3.jpg} \end{center} \captionof{figure}{Recurrent events with cox models for rates.} \label{fig:rec3} \end{marginfigure} \subsection*{Other marginal properties} \label{sec:org2fcaab7} \begin{itemize} \item \(P(N_1^*(t) \ge k)\) \begin{itemize} \item cumulative incidence of \(T_{k} = \inf \{ t: N_1^*(t)=k \}\) with competing \(D\). \end{itemize} \end{itemize} We note also that \(N_1^*(t)^2\) can be written as \begin{align*} \sum_{k=0}^K \int_0^t I(D > s) I(N_1^*(s-)=k) f(k) dN_1^*(s) \end{align*} with \(f(k)=(k+1)^2 - k^2\), such that its mean can be written as \begin{align*} \sum_{k=0}^K \int_0^t S(s) f(k) P(N_1^*(s-)= k | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k, D> s) \end{align*} and estimated by \begin{align*} \hat \mu_{1,2}(t) & = \sum_{k=0}^K \int_0^t \hat S(s) f(k) \frac{Y_{1\bullet}^k(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^k(s)} d N_{1\bullet}^k(s)= \sum_{i=1}^n \int_0^t \hat S(s) f(N_{i1}(s-)) \frac{1}{Y_\bullet (s)} d N_{i1}(s), \end{align*} Compared to "product-limit" estimator for \(E( (N_1^*(t))^2 )\) \begin{align} \hat \mu_{1,2}(t) & = \sum_{k=0}^K k^2 ( \hat F_{k}(t) - \hat F_{k+1}(t) ). \end{align} Probabilty of exceeding "k" Note also that \(I(N_1^*(t) \geq k)\) is \begin{align*} \int_0^t I(D > s) I(N_1^*(s-)=k-1) dN_1^*(s), \end{align*} suggesting that its mean can be computed as \begin{align*} \int_0^t S(s) P(N_1^*(s-)= k-1 | D \geq s) E( dN_1^*(s) | N_1^*(s-)=k-1, D> s) \end{align*} and estimated by \begin{align*} \tilde F_k(t) = \int_0^t \hat S(s) \frac{Y_{1\bullet}^{k-1}(s)}{Y_\bullet (s)} \frac{1}{Y_{1\bullet}^{k-1}(s)} d N_{1\bullet}^{k-1}(s). \end{align*} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4,caption= ,captionpos=b} \begin{lstlisting} cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4} \end{marginfigure} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4,caption= ,captionpos=b} \begin{lstlisting} cor.mat <- corM <- rbind(c(1.0, 0.6, 0.9), c(0.6, 1.0, 0.5), c(0.9, 0.5, 1.0)) rr <- simRecurrent(1000,base1,cumhaz2=base4,death.cumhaz=ddr) rr <- count.history(rr) dtable(rr,~death+status) oo <- prob.exceedRecurrent(rr,1) bplot(oo) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4MV.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4MV} \end{marginfigure} Mean and variance of number of recurrent events \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4MV,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(1,2)) with(oo,plot(time,mu,col=2,type="l")) # with(oo,plot(time,varN,type="l")) \end{lstlisting} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec4Bi,caption= ,captionpos=b} \begin{lstlisting} # Bivariate probability of exceeding oo <- prob.exceedBiRecurrent(rr,1,2,exceed1=c(1,5,10),exceed2=c(1,2,3)) with(oo, matplot(time,pe1e2,type="s")) nc <- ncol(oo$pe1e2) legend("topleft",legend=colnames(oo$pe1e2),lty=1:nc,col=1:nc) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec4Bi.jpg} \end{center} \captionof{figure}{Recurrent events: probability of exceeding k events} \label{fig:rec4Bi} \end{marginfigure} \subsection*{Dependence between events: Covariance} \label{sec:org0e76a6d} Covariance among two types of events \begin{align} \rho(t) & = \frac{ E(N_1^*(t) N_2^*(t) ) - \mu_1(t) \mu_2(t) }{ \mbox{sd}(N_1^*(t)) \mbox{sd}(N_2^*(t)) } \end{align} where \begin{itemize} \item \(E(N_1^*(t) N_2^*(t))\). \end{itemize} \begin{align*} E(N_1^*(t) N_2^*(t)) & = E( \int_0^t N_1^*(s-) dN_2^*(s) ) + E( \int_0^t N_2^*(s-) dN_1^*(s) ) \end{align*} Recall that \(N_1^*(t \wedge D)\) and \(N_2^*(t \wedge D)\). \begin{align*} E(\int_0^t N_1^*(s-) dN_2^*(s) ) & = \sum_k E( \int_0^t k I(N_1^*(s-)=k) I(D \geq s) dN_2^*(s) ) \end{align*} \begin{align*} = \sum_k \int_0^t S(s) k P(N_1^*(s-)= k | D \geq s) E( dN_2^*(s) | N_1^*(s-)=k, D \geq s) \end{align*} estimated by \begin{align*} & \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s), \end{align*} \begin{itemize} \item \(Y_j^k(t) = \sum Y_i(t) I( N_{ji}^*(s-)=k)\) for \(j=1,2\), \item \(\tilde N_{j,k}(t) = \sum_i \int_0^t I(N_{ij^o}(s-)=k) dN_{ij}(s)\) \end{itemize} Estimate of \$ E(N\(_{\text{1}}^{\text{*}}\)(t) N\(_{\text{2}}^{\text{*}}\)(t))\$ \begin{align*} \sum_k \int_0^t \hat S(s) k \frac{Y_1^k(s)}{Y_\bullet (s)} \frac{1}{Y_1^k(s)} d \tilde N_{2,k}(s) + \sum_k \int_0^t \hat S(s) k \frac{Y_2^k(s)}{Y_\bullet (s)} \frac{1}{Y_2^k(s)} d \tilde N_{1,k}(s). \end{align*} \begin{itemize} \item Without terminating event covariance is useful nonpar measure \item With terminating event dependence generated by terminating event. \item In reality what is of interest would be independence among survivors \begin{itemize} \item if \(N_1\) not predicitive for \(N_2\) \end{itemize} \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} \begin{itemize} \item if \(N_2\) not predicitive for \(N_1\) \end{itemize} \begin{align} E( dN_1^*(t) | N_2^*(t-)=k, D \geq t) = E( dN_1^*(t) | D \geq t) \end{align} \end{itemize} If the two processes are independent among survivors then \begin{align} E( dN_2^*(t) | N_1^*(t-)=k, D \geq t) = E( dN_2^*(t) | D \geq t) \end{align} so \begin{align*} E( \int_0^t N_1^*(s-) dN_2^*(s) ) & = \int_0^t S(s) E(N_1^*(s-) | D \geq s) E( dN_2^*(s) | D \geq s) \end{align*} and \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s), \end{align*} where \(N_{j\bullet}(t) = \sum_i \int_0^t dN_{j,i}(s)\). Under the independence \(E(N_1^*(t) N_2^*(t))\) is estimated \begin{align*} \int_0^t \hat S(s) \{ \sum_k k \frac{Y_1^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{2\bullet}(s) + \int_0^t \hat S(s) \{ \sum_k k \frac{Y_2^k(s)}{Y_\bullet (s)} \} \frac{1}{Y_\bullet (s)} dN_{1\bullet}(s). \end{align*} Both estimators, \(\hat E(N_1^*(t) N_2^*(t))\) and \(\hat E_I(N_1^*(t) N_2^*(t))\), as well as \(\hat E(N_1^*(t))\) and \(\hat E(N_2^*(t))\), have asymptotic expansions that can be written as a sum of iid processes, similarly to the arguments of Ghosh \& Lin 2000, \(\sum_i \Psi_i(t)\). We can thus estimate the standard errors and of the estimators and their difference \(\hat E(N_1^*(t) N_2^*(t))- \hat E_I(N_1^*(t) N_2^*(t))\). Terms for \begin{itemize} \item N1 -> N2 : \(E( \int_0^t N_1^*(s-) dN_2^*(s) )\) \item N2 -> N1 : \(E( \int_0^t N_2^*(s-) dN_1^*(s) )\) \end{itemize} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec5,caption= ,captionpos=b} \begin{lstlisting} rr$strata <- 1 dtable(rr,~death+status) covrp <- covarianceRecurrent(rr,1,2,status="status",death="death", start="entry",stop="time",id="id",names.count="Count") par(mfrow=c(1,3)) plot(covrp) # with strata, each strata in matrix column, provides basis for fast Bootstrap covrpS <- covarianceRecurrentS(rr,1,2,status="status",death="death", start="entry",stop="time",strata="strata",id="id",names.count="Count") \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec5.jpg} \end{center} \captionof{figure}{Covariance between events} \label{fig:rec5} \end{marginfigure} \subsection*{Bootstrap standard errors for terms} \label{sec:orgc567a4f} First fitting the model again to get our estimates of interst, and then computing them for some specific time-points \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} times <- seq(500,5000,500) coo1 <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") # mug <- Cpred(cbind(coo1$time,coo1$EN1N2),times)[,2] mui <- Cpred(cbind(coo1$time,coo1$EIN1N2),times)[,2] mu2.1 <- Cpred(cbind(coo1$time,coo1$mu2.1),times)[,2] mu2.i <- Cpred(cbind(coo1$time,coo1$mu2.i),times)[,2] mu1.2 <- Cpred(cbind(coo1$time,coo1$mu1.2),times)[,2] mu1.i <- Cpred(cbind(coo1$time,coo1$mu1.i),times)[,2] cbind(mu2.1,mu2.i) cbind(mu1.2,mu1.i) \end{lstlisting} \begin{verbatim} mu2.1 mu2.i [1,] 0.04101096 0.03656491 [2,] 0.09303668 0.08572694 [3,] 0.22613687 0.21906324 [4,] 0.35727148 0.34562539 [5,] 0.60258982 0.59071900 [6,] 0.80089841 0.79020220 [7,] 1.03031183 1.03424672 [8,] 1.16860632 1.16686717 [9,] 1.25782175 1.25105963 [10,] 1.38716306 1.40250244 mu1.2 mu1.i [1,] 0.03501045 0.03259566 [2,] 0.08803686 0.08526834 [3,] 0.16709531 0.16634828 [4,] 0.27720710 0.29485672 [5,] 0.38034407 0.41985665 [6,] 0.53057410 0.56459585 [7,] 0.69387628 0.72234676 [8,] 0.87226707 0.88771625 [9,] 0.96949736 0.99728527 [10,] 1.06074066 1.06854228 \end{verbatim} To get the bootstrap standard errors there is a quick memory demanding function (with S for speed and strata) BootcovariancerecurrenceS and slow function that goes through the loops in R Bootcovariancerecurrence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} bt1 <- BootcovariancerecurrenceS(rr,1,2,status="status",start="entry",stop="time",K=100,times=times) #bt1 <- BootcovariancerecurrenceS(rr,1,2,status="status",start="entry",stop="time",K=K,times=times) output <- list(bt1=bt1,mug=mug,mui=mui, bse.mug=bt1$se.mug,bse.mui=bt1$se.mui, dmugi=mug-mui, bse.dmugi=apply(bt1$EN1N2-bt1$EIN1N2,1,sd), mu2.1 = mu2.1 , mu2.i = mu2.i , dmu2.i=mu2.1-mu2.i, mu1.2 = mu1.2 , mu1.i = mu1.i , dmu1.i=mu1.2-mu1.i, bse.mu2.1=apply(bt1$mu2.i,1,sd), bse.mu2.1=apply(bt1$mu2.1,1,sd), bse.dmu2.i=apply(bt1$mu2.1-bt1$mu2.i,1,sd), bse.mu1.2=apply(bt1$mu1.2,1,sd), bse.mu1.i=apply(bt1$mu1.i,1,sd), bse.dmu1.i=apply(bt1$mu1.2-bt1$mu1.i,1,sd) ) \end{lstlisting} We then look at the test for overall dependence in the different time-points. We here have no suggestion of dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} tt <- output$dmugi/output$bse.dmugi cbind(times,2*(1-pnorm(abs(tt)))) \end{lstlisting} \begin{verbatim} times [1,] 500 0.3572253 [2,] 1000 0.4577012 [3,] 1500 0.7136132 [4,] 2000 0.7956959 [5,] 2500 0.3837459 [6,] 3000 0.5134406 [7,] 3500 0.4209237 [8,] 4000 0.7632914 [9,] 4500 0.6836682 [10,] 5000 0.6598813 \end{verbatim} We can also take out the specific components for whether \(N_1\) is predictive for \(N_2\) and vice versa. We here have no suggestion of dependence. \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} t21 <- output$dmu1.i/output$bse.dmu1.i t12 <- output$dmu2.i/output$bse.dmu2.i cbind(times,2*(1-pnorm(abs(t21))),2*(1-pnorm(abs(t12)))) \end{lstlisting} \begin{verbatim} times [1,] 500 0.71706002 0.3918872 [2,] 1000 0.81454942 0.3202626 [3,] 1500 0.95715638 0.6006314 [4,] 2000 0.21300406 0.4942293 [5,] 2500 0.02182129 0.6086128 [6,] 3000 0.11688970 0.6805457 [7,] 3500 0.25587816 0.8965495 [8,] 4000 0.63373150 0.9578608 [9,] 4500 0.41743073 0.8548733 [10,] 5000 0.83041113 0.6805618 \end{verbatim} We finally plot the boostrap samples \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec6,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(1,2)) matplot(bt1$time,bt1$EN1N2,type="l",lwd=0.3) matplot(bt1$time,bt1$EIN1N2,type="l",lwd=0.3) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{rec6.jpg} \end{center} \captionof{figure}{Bootstrap samples} \label{fig:rec6} \end{marginfigure} \subsection*{Looking at other simulations with dependence} \label{sec:orga99167a} Using the normally distributed random effects we plot 4 different settings. We have variance \(0.5\) for all random effects and change the correlation. We let the correlation between the random effect associated with \(N_1\) and \(N_2\) be denoted \(\rho_{12}\) and the correlation between the random effects associated between \(N_j\) and \(D\) the terminal event be denoted as \(\rho_{j3}\), and organize all correlation in a vector \(\rho=(\rho_{12},\rho_{13},\rho_{23})\). \begin{itemize} \item Scenario I \(\rho=(0,0.0,0.0)\) Independence among all efects. \item Scenario II \(\rho=(0,0.5,0.5)\) Independence among survivors but dependence on terminal event \item Scenario III \(\rho=(0.5,0.5,0.5)\) Positive dependence among survivors and dependence on terminal event \item Scenario IV \(\rho=(-0.4,0.5,0.5)\) Negative dependence among survivors and positive dependence on terminal event \end{itemize} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=rec7,caption= ,captionpos=b} \begin{lstlisting} par(mfrow=c(2,2)) data(base1cumhaz) data(base4cumhaz) data(drcumhaz) dr <- drcumhaz base1 <- base1cumhaz base4 <- base4cumhaz var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.0), c(0.0, 1.0, 0.0), c(0.0, 0.0, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr,var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) cor(attr(rr,"z")) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") par(mfrow=c(2,2)) with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (a)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario I") var.z <- c(0.5,0.5,0.5) # death related to both causes in same way cor.mat <- corM <- rbind(c(1.0, 0.0, 0.5), c(0.0, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (b)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario II") var.z <- c(0.5,0.5,0.5) # positive dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, 0.5, 0.5), c(0.5, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (d)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario III") var.z <- c(0.5,0.5,0.5) # negative dependence for N1 and N2 all related in same way cor.mat <- corM <- rbind(c(1.0, -0.4, 0.5), c(-0.4, 1.0, 0.5), c(0.5, 0.5, 1.0)) rr <- simRecurrentII(3000,base1,base4,death.cumhaz=dr, var.z=var.z,cor.mat=cor.mat,dependence=2) rr <- count.history(rr,types=1:2) coo <- covarianceRecurrent(rr,1,2,status="status",start="entry",stop="time") with(coo, { plot(time, EN1N2, type = "l", lwd = 2,lty=1,ylab="",xlab="time (d)") lines(time, EN1EN2, col = 2, lwd = 2,lty=2) lines(time, EIN1N2, col = 3, lwd = 2,lty=3) }) legend("topleft", c("E(N1N2)", "E(N1) E(N2) ", "E_I(N1 N2)-independence"),lty = 1:3, col = 1:3) title(main ="Scenario IV") \end{lstlisting} \begin{figure} \begin{center} \includegraphics[width=\textwidth]{rec7.jpg} \end{center} \captionof{figure}{Bootstrap samples} \label{fig:rec7} \end{figure} \end{document}mets/inst/doc/competing.ltx0000644000176200001440000006502313623061405015470 0ustar liggesusers%\VignetteIndexEntry{Analysis of multivariate competing riks data} %\VignetteEngine{R.rsp::tex} %\VignetteKeyword{R} %\VignetteKeyword{package} %\VignetteKeyword{vignette} %\VignetteKeyword{LaTeX} \PassOptionsToPackage{usenames}{xcolor} \PassOptionsToPackage{hidelinks,colorlinks,linkcolor={blue!50!black},urlcolor={blue!50!black},citecolor={blue!50!black}}{hyperref} \documentclass[a4paper]{tufte-handout} \usepackage{etex} \usepackage{etoolbox} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathtools} \usepackage[strict=true]{csquotes} \usepackage{xcolor} \usepackage{natbib} \usepackage{amsmath,amssymb,textcomp} \usepackage{bm} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{rotating} \usepackage{capt-of} \usepackage{listings} \usepackage{booktabs} \usepackage{multicol} \usepackage{longtable} \usepackage{zlmtt} \usepackage{float} \usepackage{fancyvrb} \usepackage{verbatim} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{environ} \NewEnviron{mnote}{\marginnote{\BODY}} \NewEnviron{snote}{\sidenote{\BODY}} \usepackage{xspace} \usepackage{url} \usepackage{amsthm} \newtheorem{thm}{Theorem.} \newtheorem{prop}{Proposition.} \theoremstyle{definition} \newtheorem{defn}[thm]{Definition.} \newtheorem{exa}[thm]{Example} \newcommand{\R}{\ensuremath{\mathbb{R}}} \newcommand{\Real}{\ensuremath{\mathbb{R}}} \newcommand{\Complex}{\ensuremath{\mathbb{C}}} \newcommand{\Z}{\ensuremath{\mathbb{Z}}} \newcommand{\N}{\ensuremath{\mathbb{N}}} \newcommand{\norm}[1]{\ensuremath{\left\Vert#1\right\Vert}} \newcommand{\var}{\ensuremath{\mathbb{V}\text{ar}}} \newcommand{\cov}{\ensuremath{\mathbb{C}\text{ov}}} \newcommand{\cor}{\ensuremath{\mathbb{C}\text{or}}} \newcommand{\E}{\ensuremath{\mathbb{E}}} \newcommand{\pr}{\ensuremath{\mathbb{P}}} \newcommand{\from}{\leftarrow} \newcommand{\To}[2]{\ensuremath{#1\!\to\!#2}} \newcommand{\From}[2]{\ensuremath{#1\!\from\!#2}} \newcommand{\chain}[3]{\ensuremath{#1\!\to\!#2\to\!#3}} \newcommand{\ichain}[3]{\ensuremath{#1\!\from\!#2\from\!#3}} \newcommand{\fork}[3]{\ensuremath{#1\!\from\!#2\to\!#3}} \newcommand{\ifork}[3]{\ensuremath{#1\!\to\!#2\from\!#3}} \newcommand{\pa}{\text{pa}} \newcommand{\abs}[1]{\ensuremath{\left\vert#1\right\vert}} \newcommand{\ipr}[1]{\langle#1\rangle} \newcommand{\set}[1]{\left{#1\right}} \newcommand{\seq}[1]{\left<#1\right>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate competing risks data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate competing risks data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:orgbe56752} \begin{itemize} \item marginal modelling with standard errors cif, \item cause specific hazards \item cumulative incidence modelling \begin{itemize} \item random effects simple cif \item Luise model \end{itemize} \end{itemize} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} Typically it can be hard or impossible to specify random effects models with special structure among the parameters of the random effects. This is possible for our specification of the random effects models. To be concrete about the model structure assume that we have paired binomial data \(T_1, \delta_1, T_2, \delta_2, X_1, X_2\) where the censored survival responses are \(T_1, \delta_1, T_2, \delta_2\) and we have covariates \(X_1, X_2\). The focus of this vignette is describe how to work on bivariate survival data using the addtive gamma-random effects models. We present two different ways of specifying different dependence structures. The basic models assumes that each subject has a marginal on Cox-form \[ \lambda_0(t) \exp( X_{ki}^T \beta) \] then two types of models can be considered. \begin{itemize} \item Univariate models with a single random effect for each cluster and with a regression design on the varince. \item Multivariate models with multiple random effects for each cluster. \end{itemize} The univariate models are then given a given cluster random effects \(Z_k\) with parameter \(\theta\) the joint survival function is given by the Clayton copula and on the form \[ \psi(\theta, \psi^{-1}(\theta,S_1(t,X_{k1}) ) + \psi^{-1}(\theta, S_1(t,X_{k1}) ) \] where \(\psi\) is the Laplace transform of a gamma distributed random variable with mean 1 and variance \(\theta\). We then model the variance within clusters by a cluster specific regression design such that \[ \theta = z_j^T \alpha \] where \(z\) is the regression design (specified by theta.des in the software). This model can be fitted using a pairwise likelihood or the pseudo-likelihood using either \begin{itemize} \item twostage \item twostageMLE \end{itemize} For the Multivariate models we are given a multivarite random effect each subject \((Z_1,...,Z_d)\) with d random effects. The total random effect for each subject is then specified using a regression design on these random effects, with a regression vector \(v_j\) such that the total random effect is \{v\(_{\text{1}}^{\text{T}}\) (Z\(_{\text{1,\ldots{},Z}}\)\(_{\text{d}}\))\}. Each random effect has an associated parameter \((\lambda_1,...,\lambda_d)\) and \(Z_j\) is Gamma distributed with \begin{itemize} \item mean \(lambda_j/v_1^T \lambda\) \item variance $\backslash$( \(\lambda_{\text{j}}\)/(v\(_{\text{1}}^{\text{T}}\) \(\lambda\))\(^{\text{2}}\)\}. \end{itemize} The key assumption to make the two-stage fitting possible is that \[ lamtot=v_j^T \lambda \] with clusters. The DEFAULT parametrization (var.par=1) uses the variances of the random effecs \[ \theta_j = \lambda_j/(v_1^T \lambda)^2 \] For alternative parametrizations one can specify how the parameters relate to \(\lambda_j\) with the argument var.par=0. For both types of models the basic model assumptions are that given the random effects of the clusters the survival distributions within a cluster are independent and ' on the form \[ P(T > t| x,z) = exp( -Z \cdot Laplace^{-1}(lamtot^{-1},S(t|x)) ) \] with the inverse laplace of the gamma distribution with mean 1 and variance 1/lamtot. Finally the parameters \((\lambda_1,...,\lambda_d)\) are related to the parameters of the model by a regression construction \(M\) (d x k), that links the \(d\) \(\lambda\) parameters with the \(k\) underlying \(\alpha\) parameters \[ \lambda = M \alpha \] here using theta.des to specify these low-dimension association. Default is a diagonal matrix. This can be used to make structural assumptions about the variances of the random-effects as is needed for the ACE model for example. In software \(M\) is called theta.des We consider \(K\) independent clusters, with \(n_k\) subject within each cluster. For each cluster we are given a set of independent random effects \(V = (V_1,\dots , V_m)^T\). We let \((V_1,\dots,V_m)^T\) be independent Gamma distributed with \(V_l \sim \Gamma(\eta_l , \nu_l), l = 1,\dots,p\) independent gamma distributed random variables such that \(E(V_l) = \eta_l /\nu\) and \(Var(V_l ) = \eta_l /\nu^2\). \%\%Let \(\nu =(\nu_1,\dots,\nu_p)\). The \(\eta=(\eta_1,\dots,\eta_m)\) parameters are given such that \(\eta=D \theta\). Letting the rows in the matrix be denoted as \(Q_i,\dots,Q_m\). \%\%\%As is commonly done \cite{korsgaard1998additive,petersen1998additive} To facilitate our two-stage construction we also assume that \(\nu=Q_i^T \eta\) for all \(i=1,\dots,n_k\) such that \(Q_i^T V\) is also Gamma distributed with \(\Gamma(1, \nu)\), that is has variance \(\nu^{-1}\) and mean 1. We get back to specific models where this is the case, but this assumption is often reasonable and needed \cite{korsgaard1998additive,petersen1998additive} Let \(\Psi(\eta_l,\nu,\cdot)\) denote the Laplace transform of the Gamma distribution \(\Gamma(\eta_l,\nu)\), and let its inverse be \(\Psi^{-1}(\eta_l,\nu,\cdot)\). For simplicity we also assume that \(\eta\) is the same across clusters. Assume that the marginal survival distribution for subject \(i\) within cluster \(k\) is given by \(S_{X_{k,i}}(t)\) given covariates \(X_{k,i}\). Now given the random effects of the cluster \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) we assume that subjects within the cluster are independent with survival distributions \begin{align*} \exp(- ( Q_{k,i} V_k) \Psi^{-1} (\nu,\nu,S_{X_{k,i}}(t)) ). \end{align*} A consequence of this is that the hazards given the covariates \(X_{k,i}\) and the random effects \(V_k\) are given by \begin{align} \lambda_{k,i}(t;X_{k,i},V_{k,i}) = ( Q_{k,i} V_k) D_3 \Psi^{-1} (\nu,\nu,S_{X_{k,i}}(t)) D_t S_{X_{k,i}}(t) \label{eq-cond-haz} \end{align} where \(D_t\) and \(D_3\) denotes the partial derivatives with respect to \(t\) and the third argument, respectively. Further, we can express the multivariate survival distribution as \begin{align} S(t_1,\dots,t_m) & = \exp( -\sum_{i=1}^m (Q_i V) \Psi^{-1}(\eta_l,\nu_l,S_{X_{k,i}}(t_i)) ) \nonumber \\ & = \prod_{l=1}^p \Psi(\eta_l,\eta , \sum_{i=1}^m Q_{k,i} \Psi^{-1}(\eta,\eta,S_{X_{k,i}}(t_i))). \label{eq-multivariate-surv} \end{align} In the case of considering just pairs, we write this function as \(C(S_{k,i}(t),S_{k,j}(t))\). In addition to survival times from this model, we assume that we independent right censoring present \(U_{k,i}\) such that the given \(V_k\) and the covariates\(X_{k,i}\) \(i=1,\dots,n_k\) \((U_{k,1},\dots,U_{k,n_k})\) of \((T_{k,1},\dots,T_{k,n_k})\), and the conditional censoring distribution do not depend on \(V_k\). We can also express this via counting processes \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̔Ow2 kwP }Kҷbcq Z=֍pᭌ}jRtbOzYSAiXDMf]{YO6۽)VJY<?a3O/l+2{+bD.!-tL"9 =h:Z$E髝!š9Ư*I+lO P˳~Z] `?lֻǕ K}8& Z·DocGg+*N-!Z;m ۩_rti=H'wqL\M>Qh5oDOd1!促7雫u@]m oNQ$Ցu#F]E׽t2EXzl|GU`C?$MZkMDO>]).-6tJ ,G44Lݦuq{eM)4|/o l\ >S}Z5e`kՇ<}K|5YkM/ d쏤M7W"zUQ: E  f\ Lc-P{y:Z>@Dr=7endstream endobj 61 0 obj << /Subtype /XML /Type /Metadata /Length 1603 >> stream GPL Ghostscript 9.27 2020-02-18T23:23:37+01:00 2020-02-18T23:23:37+01:00 Emacs 26.1 (Org mode 9.1.14) Twin analysisKlaus Holst & Thomas Scheike endstream endobj 62 0 obj << /Filter /FlateDecode /Length 3163 >> stream xZ[s6~7 MЎw }Hoi6~jCKZ"Ur=T(;5<&spy^'tTZ)ci8 n?){,h]ۢvB[T+u_R(޿l}W7e C]m3x_VF]4a'y1e$ow EM'6r3-B5}G`XB=<Ɛ@Ih1$ c`TK T]XTdfdž/BXG o2,(F"6%PG@F*chCMb+%Oi mS^6PI(j7S8$٧o}*b1G3 K~OSҧ=Vﺲ .o/U !sX"17IV;6+jZ1qf VBŠC)[,lҌWДM %sM>yִ`j6_0w$%,j|)֡Ht*Q')x"0cu//{ ?n> ;`0f ހ`K׬s loriPbEpp]Wà0ihau'$@*:Nf4-Q.6wD5L-%҂?>'S4l%lP8;R?}5]'T s9y N>ʠJ>UG?2fv„0_O1]G%36gUfDڪfՃ`+;Wi$*)r#%3O.2VuՕվkkCkU UV M1#~r[@3"PX *̷e+SEv"uh$DIOfrgXxe߄ϰrOaߢ˼KHDt^5=iղY(GŮn^JI˻su1\09^l #`mmcBğ>!)dLx a%sC1@@s,- -o ed(mٴ`M3:1!ԆD  pT@BNr*c"OxưuiNRi#8$fFD?ܖ'8LNs%cUBYn|}Y VAk$%0c{W3B9B&m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| ϖj.(FEY\ `aɒṛU*@?~ӑ> Ջ$<峲]db: aVOuM`/+p^endstream endobj 64 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 961 >> stream xURoLe61@7*a8RBҵ \{wwm%0I BmasqQ2[ duI0}pQL$dCy}~DqAd[O,E#bL(:Tn'grQZf鏁 %[ R?sVm[_$ y E;e3ҺҵY][[ ‰hryr=.|P,r͚%;GILm'/_38[z~1?xdĜeӡS=)<LM)RTfncZwS-ƪsMPЄCePT;l_f܉&dcRS-YG.~u.$gI-`/zxL >W-C)Źendstream endobj 65 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 6945 >> stream xY TS>s*Zԓ$^:tj'Dqd 0C0%'!a sAAĪUk[[kzAk{_{+.W8?bwJepBfuL0ǃ;3UV &.,a8%`'S=ibonh~:w̙cSZټ BRdȖ5l(Wcc*l\Jlk6M_!@J+eBP"Tg2?djUBP4eid2M@D{yY%^f{B# }L9)kI'?2y| 7Hi.mF/wD^v[deg7)ҷqhnȌLURJQnĐ%>Z @H*%(?T{uF} .ԁ^Yi]zm4~;+,qYUFH^G/5o%9F"m,o1P#(c\(=7&<17%w礨J_=10c[DC殑r $r=3_lfZ-lh,w$(??օ;^b^{0̉nv![oL7|2lj,7j1'5C2^'P1da0IFT$$deZR4%|)R(3QYO>7v]w>yܥ(y6d/qPuđCGrskbѶ,A>ɞX=ҚmR1"Tone0wqTR/PRãY6Inė3FF>3nr)Q_|đۗf*7fKT9Зu3{E qs BnY -`L I Δb :QKs1Ax]JFjF Mg$''[LT9%eV\goH¼ђ5y3>\]a8t%#"SNDI=TC%Tc~UGێw/w0" m|8."W_,ӎ}}>]ᰕf^ÀWF'P4Yd:}MFuʑ)(^X `7(q6ʋ=5)vܠGaؓ|^c rxo/\ƻQd$m_?RngD_ ׅD)nhBmUa'4V tN q聓gTuIy)R~ j;Ky7XuG- aQA,1|qXqDG4Oe,pv~ӌ}:eF>% M\?'R*:HP/BNX{*Fh9a Q)$ۊKp N,vpzpYx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cļ ćP鼭O*=kT0%ˀZ錨sF\h1>H틮Z(`!DZ JWL~d v8-[ElrV:c3( u:~P4/ӫ"W\uq(zϮZ`et^Lڥ,Bj1~b7E2`[/3].&X!iw$1SBh:OFJ^ mZDpTGzJ+*~j1_c6O pݿ%B&V8k6NwБendstream endobj 80 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 548 >> stream xCMSY10/nYfB@舗  snjouCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMSY10.CMSY10Computer ModernsimilarN/YW@>M,v}'^a~ogsB];hklTl[V"kp兟wnso-p[|ywdq{vYslw˾!I)-fx+ITEL[ZXWGP0kַȋʋ``]]ϋs?  f C`endstream endobj 81 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 618 >> stream x}QMLAݡ+?& 5H<D4QScBgA!,7$d>xZ#Z*Ad H}? ^Cԝ64mL q(}0 g.h_-|R!swC;ȷ]̫UM5xHt1f\ZOn2 ttO*8idF fql]E__KMw'H6Nr9(ѭJ[Cm o:WKO?7r.;;{}& 2/ 3sO/6T~OV*GƵWrEМɫ,uZ( Hs!?5cܬ0~Mendstream endobj 82 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 547 >> stream xM?laڞWJ4>B#I;hiB $*Ak Z>"Nb\]>i8yg{^ a`­q76#ﵔ*T-l$faZPLex4&cgd|^x|\BprLH.b$.Y<ԉL&'nQG]8c,(&e|9{b"5/ L%!9'ܕhtvv!dG2 Czz۽/X2~0)I'a*84nB?8a# ~' i̮‚BŮ+zgzN4^+LjR۟sE%aW+d>e7aswt+ypQ,-jo~C ؠm vNyERX&vJ^jDOP@=*LLZ_9SV4[GKfendstream endobj 83 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 759 >> stream x}Q[HQ;նÚby)ȮKD`[#J 3Vѥ,*Z2z"(3tfz _;\EtF? lqxgMXNllvh |!Ib}_U\T7̤T1Poe@1 -C#]k4Ȳ (XH\ 2yOzUUBAD qF-a ưf)]e!/հ4 `؍}$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;,CA3=ĩXܲU])=_u-0bHa"34ŢCVMY?N yՈz8 ( "GB?0n(M9xOArL^[) z̘@I[ד˘˻ɥG!9N> QȊk O^8b-_o2RvFA49ܳIj2q{Uy+(:;VXdm:7 m@@oD`:6;?v4AKiD- vB0)`C7dX`3ց#MH?LVendstream endobj 85 0 obj << /Type /XRef /Length 117 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 86 /ID [<47305700e82363b70a8d5bb800577469><26e1bfc74eed422680e2559263f25be8>] >> stream xcb&F~0 $8J҄>} \renewcommand{\subset}{\subseteq} \renewcommand{\supset}{\supseteq} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\mvec}{vec} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\im}{im} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\bias}{bias} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\logit}{logit} \DeclareMathOperator{\expit}{expit} \makeatletter \def\mathcolor#1#{\@mathcolor{#1}} \def\@mathcolor#1#2#3{% \protect\leavevmode \begingroup \color#1{#2}#3% \endgroup } \newcommand{\Dto}{\overset{\mathcal{D}}{\longrightarrow}} \newcommand{\Pto}{\overset{P}{\longrightarrow}} \newcommand{\Wto}{\overset{W}{\longrightarrow}} \newcommand{\VV}{\bm{\Omega}_\theta} \newcommand{\independenT}[2]{\mathrel{\setbox0\hbox{$#1#2$}\copy0\kern-\wd0\mkern4mu\box0}} \newcommand{\indep}{\protect\mathpalette{\protect\independenT}{\perp}} \DefineVerbatimEnvironment{verbatim}{Verbatim}{xleftmargin=0.5em,xrightmargin=0em,numbers=none,frame=none,fontsize=\footnotesize,formatcom={\color[rgb]{0.2,0.2,0.2}}} \setlength{\parindent}{0pt} % Kills annoying indents. \let\iint\relax \let\iiint\relax \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=r,label= ,caption= ,captionpos=b} \lstset{basicstyle=\ttfamily\small,keywordstyle=\color{black},commentstyle=\color{gray}\ttfamily\itshape,stringstyle=\color[rgb]{0,0,0.5},columns=fullflexible,alsoletter=.,texcl=true,escapeinside={*@}{@*)},escapebegin=\lst@commentstyle\,,breaklines=true,breakatwhitespace=false,numbers=left,numberstyle=\ttfamily\tiny\color{gray},stepnumber=1,numbersep=10pt,backgroundcolor=\color{white},tabsize=4,showspaces=false,showstringspaces=false,xleftmargin=.23in,frame=lines ,rulesepcolor=\color[rgb]{0.85,0.85,0.85},basewidth={0.5em,0.42em},language=python,label= ,caption= ,captionpos=b} \setlength{\parindent}{0pt} % Kills annoying indents. \newcommand{\n}{} \author{Klaus Holst \& Thomas Scheike} \date{\today} \title{Analysis of multivariate survival data based on Case Control Data} \hypersetup{ pdfauthor={Klaus Holst \& Thomas Scheike}, pdftitle={Analysis of multivariate survival data based on Case Control Data}, pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 26.1 (Org mode 9.1.14)}, pdflang={English}} \begin{document} \maketitle \noindent\rule{\textwidth}{0.5pt} \section*{Overview} \label{sec:org37fdee6} When looking at multivariate survival data with the aim of learning about the dependence that is present, possibly after correcting for some covariates different approaches are available in the mets package \begin{itemize} \item Binary models and adjust for censoring with inverse probabilty of censoring weighting \begin{itemize} \item biprobit model \end{itemize} \item Bivariate surival models of Clayton-Oakes type \begin{itemize} \item With regression structure on dependence parameter \item With additive gamma distributed random effects \item Special functionality for polygenic random effects modelling such as ACE, ADE ,AE and so forth. \end{itemize} \item Plackett OR model model \begin{itemize} \item With regression structure on OR dependence parameter \end{itemize} \item Cluster stratified Cox \end{itemize} We have discussed how to fit such models in the vignette about twostage survival modelling. Here we show what can be done if one has data available from case-control sampling. First we set up some case-control data \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} library(mets) set.seed(100) ncases <- 2000 ncontrols <- ncases*5 data <- simClaytonOakes.twin.ace(100000,1,2,0,3,Cvar=1) theta <- c(1,2) cens.prob <- mean(data$status==0) # data2 <- fast.reshape(data,id="cluster") with(data2,table(status1,status2)) controls <- which(data2$status2==0) cases <- which(data2$status2==1) cases <- sample(cases,min(ncases,length(cases))) controls <- sample(controls,min(ncontrols,length(controls))) nccc <- c(length(cases),length(controls)) clustco <- data2$cluster[controls] clustca <- data2$cluster[cases] # med <- data$cluster %in% c(clustco,clustca) datacc <- data[med,] datacc2 <- fast.reshape(datacc,id="cluster") dd <- with(datacc2,table(status1,status2)) # # out <- twin.polygen.design(data,id="cluster") pardes <- out$pardes des.rv <- out$des.rv aa <- phreg(Surv(time,status)~+cluster(cluster),data=data) out <- twin.polygen.design(datacc,id="cluster") pardes <- out$pardes des.rv <- out$des.rv # # # needs to use pair structure to profile out # baseline mm <- familycluster.index(datacc$cluster) pairs <- matrix(mm$familypairindex,ncol=2,byrow=TRUE) # kinship <- rep(1,nrow(pairs)) kinship[datacc$zyg[pairs[,1]]=="DZ"] <- 0.5 table(kinship) # dout <- make.pairwise.design(pairs,kinship,type="ace") des.rv <- dout$random.design pardes <- dout$theta.des # cr.models <- list(Surv(time,status)~+1) tscce <- survival.twostage(NULL,data=datacc, clusters=datacc$cluster, theta=theta,var.link=0,step=1.0, random.design=des.rv,theta.des=pardes, pairs.rvs=dout$ant.rvs,var.par=1, pairs=pairs, case.control=1,marginal.status=datacc$status, cr.models=cr.models) summary(tscce) \end{lstlisting} \begin{verbatim} Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.6.3 mets version 1.2.4 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined status2 status1 0 1 0 16121 15661 1 15828 52390 kinship 0.5 1 5963 6037 Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 1.006966 0.08370828 12.02947 0 0.3348778 0.01851575 dependence2 1.838534 0.08963533 20.51127 0 0.4789678 0.01216686 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.3539 0.02812 0.2988 0.4090 2.496e-36 dependence2 0.6461 0.02812 0.5910 0.7012 7.193e-117 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.846 0.06515 2.718 2.973 0 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label= ,caption= ,captionpos=b} \begin{lstlisting} # known baseline from cohort aa <- aalen(Surv(time,status)~+1,data=data,robust=0) ts <- survival.twostage(aa,data=datacc, clusters=datacc$cluster, theta=theta,var.link=0,step=1.0, random.design=des.rv,theta.des=pardes, pairs.rvs=dout$ant.rvs,var.par=1, pairs=pairs, case.control=1, marginal.status=datacc$status, cr.models=cr.models) summary(ts) \end{lstlisting} \begin{verbatim} Dependence parameter for Clayton-Oakes model Variance of Gamma distributed random effects $estimates Coef. SE z P-val Kendall tau SE dependence1 1.032045 0.07944442 12.99078 0 0.3403792 0.017283117 dependence2 1.897001 0.06795064 27.91734 0 0.4867849 0.008948751 $type [1] "clayton.oakes" $h Estimate Std.Err 2.5% 97.5% P-value dependence1 0.3523 0.02247 0.3083 0.3964 2.030e-55 dependence2 0.6477 0.02247 0.6036 0.6917 1.079e-182 $vare NULL $vartot Estimate Std.Err 2.5% 97.5% P-value p1 2.929 0.07785 2.776 3.082 0 attr(,"class") [1] "summary.mets.twostage" \end{verbatim} Figure \ref{fig:surv-cc-base} shows the baseline \lstset{numbers=left,numberstyle=\ttfamily\tiny\color{gray},language=r,label=surv-cc-base,caption= ,captionpos=b} \begin{lstlisting} plot(aa) lines(tscce$baseline,col=2) \end{lstlisting} \begin{marginfigure} \begin{center} \includegraphics[width=\textwidth]{surv-cc-base.jpg} \end{center} \captionof{figure}{Baseline with robust standard errors. Black based on cohort data, red based on profiling for case-control data.} \label{fig:robcox1} \end{marginfigure} \end{document}mets/inst/doc/twostage-survival.pdf0000644000176200001440000030125113623061753017155 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3599 /Filter /FlateDecode /N 96 /First 808 >> stream x[[s6~_f'ӂw:Iqb%/qNh4M;LY"H8 y,d"t$CX%~b+-1?V,D:PYz}Y( /bD(\3IОbk бPybMý` d2_1a@3$LxzL =qVaTDא)zڋXbqiA51AEz x! X hL=Ij cTcj ~$hxȾCtԇ k-"ȱGDO45`% G( thL j"e&Px. 2h$A&$ O 9 !5ɆȡbU$&91 5c:r21]d 4 T$o=IZ"2b1A Pdq0:(Ĩ#$'dk_e|$)*͡9MOW3骸^,ٯ ϓc|!&*d @Y'/;z}H{3ci®Ɍq5$^f7 :. 4+5B)-Q#r=o4KTU(ɒAIn|WjX3?egd  .Hs<+]Eڋ\'8iWYBQ=mϏp[y_/u^"g1ɒg/X5%_HI #^.iX-ǀG)O _BxrVіIZ2?r/@>y⮬ZسY2eшUZV IL?lQ2&lqAANjI6b Z_.<{hlK"oݾCމ,2{\S{ė8@t+[4Dᠵiӗ~t%xaXH/͋4-='3> ~oHea[KZ_|??C@ &W9a3,?O>k&>{4(hd&ί`M'o*"*{ SJ@UkO?1b+].\N"-)!qyXĀlor6|q_cybY m;g[<|Ӻ/fǸ4mM $"ml'4~~Ǭ20aIv  "BRƈiq*c-kJ=(10u&y Kj2o5&[Gr졦9bFdL# ![b@҂<4A{eWDDi`8 6Y ⇰¯>.b5EV2gd h6̤F>[L'i(t0=mzβb|021-K荩|z6FVCDlXi)uŇeaZFW-^m{!¬&HlCHV]cn7g>!Jsjn'pݎn-0MaiOaBn|8~srQbץws=b '-MAB3@B$DA2m\@Fҍյk횉--`)~5MfW&z vێ@Qԍ/%"fds{292ytv1Afr3Q}yLաJ?ԫѨۍZGݯLWy}4=TTFj69V+f2>YWMIlk*69Ժ&{S iZZޝxWOvÍSG<񑾿V5WQI)EZu*pqՂ23sYuee7HΆ^ٗVnk>YĦQ:͒WuIx+3ފu[:߽xfT䷚1+/Ŷ $z$5)]O M׳C(|؇}{{di:CO~Eti4sۚeUgiLyze6m)MZJ^oqN mCzz{ bAo_/5@5$UF;Zk%\r]'8uWu*S?;;=?9XqEM6oqFE}G=b=T-k9NVSnUifL,l:fjmr۷M ||ͱ7. >U8lUwUϥ]u=wH /m1SjUw@|ܚtzKhTU_JMז5`ەmtxVG%R"b6LuZӥ7Zl =᷵U[vq7l~{+12)L!xb J}wN j OqtI QjtRm&SJɬ[I)5E/QlԺ[/+uץa7{o^ޖ{+ަE+qwiWowi}u> stream GPL Ghostscript 9.27 2020-02-18T23:23:39+01:00 2020-02-18T23:23:39+01:00 Emacs 26.1 (Org mode 9.1.14) Analysis of multivariate survival dataKlaus Holst & Thomas Scheike endstream endobj 99 0 obj << /Filter /FlateDecode /Length 2289 >> stream xY˒R_UFx2q*vInq"evH j8T/Z>_)& ?}H_=\5PKa \-Rj3,5YOmWm&+*N C͝,OUW>2L=*ͻ<=k5=k5>KSJGֻf"Δ1p^?,Пxʏ/X bItJAvJ֟/dspMbJE`F(!Ԟz^ȰV'pw Rl*X~$8/5WE2JppbUãAPK*k4Bs`M jN3ͦ-z9V+ ^fz)&> 5C`F8 =̜ CNZg܃c-z oMvSѝ^<As*1ͨ &=)$Q@>-Ars6xXi҄Mŀx0ECS 鮁F잃'@dMt¿裧\V*Ǣ֞(%Co߽8z!yI`iAn%. 麑߇BA:ov\8ԣAfI:dD/zW̎g١9No+2}M,':Ѷ恘M8T.VKӍվs3 F'W۞wq֢"+,,m9mC7`Cp!+#󦬛^y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.}ʭe|o޽S 9jբV}!פi -o viq{w|c'yА$H$|;h6 tms1%%TJustTRJ6+{$oLb^$od$kw|<H^{ꚦCzwRZӳGS c1S5)H^6*5.P-qk=?Աzn7_KӤJN[r\$x1q:NljC4P95?=F\3l>뽤ˀⅴ/imJŨdd5IᐩGhu;I!>3endstream endobj 110 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 332 >> stream xcd`ab`dddw441H3a!ܝVY~'0{Sonn }=I19(3=DA#YS\GR17(391O7$#57QOL-Tа())///K-/JQ(,PJ-N-*KMQp+QKMU8SB9)槤100010301297e{ 'tOsD>xendstream endobj 111 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1149 >> stream x}QoLg+; VwY!`DeL2 0rڻu nBۗ d, T18 :2aX{4ے7yIdZ$7:V?6[zKtVSqGe]b#-23~zZ-=E&Q@Α C>Jܥr>B> 8m۶uuY`[H< {8 (~mIl/sį(+pLJW6Wr])-dYРݜ@/"',weXTVyw yx`FǠr RA 42ƤGpSX@S(5D [ɐ^$J'bpyl@:VXW*23'1Oʞ[q^CCID权N'Jd,XƱjLTy9ԚֺϨGپDr>P)ߜ`&Q2S6 &jaB#C),p75g_OC/_v0d즉ޯ hCgTb~fفLD]XC 7"~WODXdvg&;ޚ7 F Ǩ4*<Fֽs()RLg|L[@gcQ:I5TBG''ǧGŏOS/Ijo4kGQz *HSH=Ij L̨+5&7uO=h{^CE)+ }86څ:]&g?/-r'/-3Sn|# Sˈ7WkV<-WWtC}gp;7w-uyͯ#ڧg ⒕_ߚ:[7syL/WgqF^RY}@)LU =gt@8OF݇i$~.I3>pE FѷS8yoGw2;^}bf5{QDtMAʸn}L3Qԛ^taZ=Dm\۴ecۆmmĖM endstream endobj 112 0 obj << /Filter /FlateDecode /Length 4394 >> stream x\ۖ۶|JCmuMiLL@43u뒱= )j<ۮxU6A>QsdDM. ; j2~˩,a3I~e?s]%2vzq-~ ueXSh P6 vUô>_5,;X d#ٳ[Vf!]1̈V( L5]lWm۵77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Sb*"rq>|{_۸7C-jljKjM|"dNq.FؠyYmvi9g&Պ[\Y$M}E݈5o㉗q 3/{>.1끃 0lDˍ5=Q.kpb3h s`A%$`ՎZFWk5xnR@P犿n}VU;ns3ӪBgS<-b: Cۥ-enQ9JZ}*&ݎ昐13Pec^Reb4Pib!hb"֑@#_FS]$TۑmtNJ}-&G1U5\Hg ,E M #Z@5B0 M>nJeGNqaee=m)-VeHVWv_jr?3Ī;D(7>Wъ}Lh蹥C%NG_I~MU Rnv/mLgcl34efe0eg0f-qoHu~kAjd3 UUKL+ܧcR# :8FWf ]shRVd JVrfm:>T c:ʌd240D|&O'cCu6jgلK*B F)FnptyDαpTr#$- /8Ր rHjsqU! )"n"j-!K]~E S F? Y m<Hk3g ,Z0&2B*'=endstream endobj 133 0 obj << /Type /XRef /Length 154 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 134 /ID [<90c879e602f3c69511ee0d2bea753fda><33c9643d24d5e4886743b0d3a07d8651>] >> stream xcb&F~0 $8J$Z@ DJHi)"7H<0{  Q~ dZ"YoHm"%Ax$q`Ӓo/d|&z|1Dqe$+ endstream endobj startxref 98557 %%EOF mets/inst/documentation/0000755000176200001440000000000013623061753015056 5ustar liggesusersmets/inst/documentation/dutils.org0000644000176200001440000003036313623061405017072 0ustar liggesusers* preample :ignore: #+TITLE: Utility functions #+AUTHOR: Klaus K. Holst and Thomas Scheike #+email: k.k.holst@biostat.ku.dk #+LATEX_CLASS: tufte-handout+listings #+LATEX_CLASS_OPTIONS: [a4paper] #+PROPERTY: header-args:R :session *R* :cache yes :width 550 :height 450 #+PROPERTY: header-args :eval never-export :exports both :results output :tangle yes :comments yes #+PROPERTY: header-args:R+ :colnames yes :rownames no :hlines yes #+OPTIONS: timestamp:t title:t date:t author:t creator:nil toc:nil #+OPTIONS: h:4 num:t tags:nil d:t ^:{} #+LATEX_HEADER: \lstset{language=R,keywords={},morekeywords={}} #+LATEX_HEADER: \usepackage{zlmtt} #+LATEX_HEADER: \setlength{\parindent}{0em} #+LATEX_HEADER: %%\setlength{\parindent}{default} #+LaTeX: \setlength{\parindent}{0em} %\setlength{\parindent}{default} #+BEGIN_SRC emacs-lisp :results silent :exports results :eval (setq org-latex-listings t) (setq org-latex-compiler-file-string "%%\\VignetteIndexEntry{dutils overview}\n%%\\VignetteEngine{R.rsp::tex}\n%%\\VignetteKeyword{R}\n%%\\VignetteKeyword{package}\n%%\\VignetteKeyword{vignette}\n%%\\VignetteKeyword{LaTeX}\n") #+END_SRC * Introduction Data summaries | =dhead= | a | | =dtail= | a | | =dsummary= | | | =dprint,dlist= | | | =dlevels= | | | =dunique= | | | =dstr= | | Data processing | =dsort= | a | | =dreshape= | | | =dcut= | | | =drm= | | | =dkeep= | | | =dnames=, =drename= | | | =ddrop= | | | =dfactor=, =dnumeric= | | | =dsubset= | | | =dlag= | | | =drelevel= | | | =dsample= | | Aggregation | =dby= | | | =daggregate= | | | =deval= | | | =deval2= | | | =dscalar= | | | =dmean=, =dsum=, =dsd=, =dquantile= | | | =dcor= | | | =dcount= | | | =dtable= | | #+BEGIN_SRC R :cache no library(mets) #+END_SRC #+RESULTS: #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5.1 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined Warning message: failed to assign RegisteredNativeSymbol for cor to cor since cor is already defined in the ‘mets’ namespace #+end_example <<<<<<< HEAD #+begin_example Loading required package: timereg Loading required package: survival Loading required package: lava lava version 1.5 mets version 1.2.1.2 Attaching package: ‘mets’ The following object is masked _by_ ‘.GlobalEnv’: object.defined #+end_example ======= >>>>>>> a0fca72dd6d410529ed706d9ac0e8261178e266c * Data summary We will use a subset of the TRACE data available in the =timereg= package, which consists of a random sub-sample of 300 patients out of the full cohort consisting of approximately 6000 patients. It contains data relating survival of patients after myocardial infarction to various risk factors. #+BEGIN_SRC R data(sTRACE, package="timereg") dhead(sTRACE) #+END_SRC #+RESULTS[01b4952643bb968b9b1e194a2056b925ff7c5052]: : no wmi status chf age sex diabetes time vf : X1944 1944 1.5 9 0 84.924 1 1 1.345000 0 : X5783 5783 1.9 0 1 74.193 0 0 6.910000 0 : X784 784 0.8 9 0 78.081 0 1 0.196000 0 : X3763 3763 1.3 0 0 55.479 1 0 7.543000 0 : X2927 2927 1.6 0 1 62.997 0 0 7.126000 0 : X4511 4511 1.0 9 1 67.644 1 0 4.532606 0 \citet{TRACE} This data frame contains the following columns: - id :: Patient code (numeric). - wmi :: Measure of heart pumping effect based on ultrasound measurements where 2 is normal and 0 is worst. - status :: Survival status. 9: dead from myocardial infarction, 0: alive, 7: dead from other causes. - time :: Survival time in years. - chf :: Clinical heart pump failure, 1: present, 0: absent. - diabetes :: Diabetes, 1: present, 0: absent. - vf ::e. Ventricular fibrillation, 1: present, 0: absent. - sex :: Gender, 1: female, 0: male. - age :: Age of patient. #+BEGIN_mnote Here a margin note #+END_mnote ** a #+BEGIN_SRC R n <- 20 m <- lava::lvm(letters) d <- lava::sim(m,n) dlist(d,~a+b+c | a>0) dlist(d, a+b~c>0 | a>0) #+END_SRC #+RESULTS[84fda9ca89b2ebc100e10fa6305cd1c85694c607]: #+begin_example a b c 1 0.2931 0.08600 -1.523897 3 0.7401 -1.52052 0.602183 7 0.9079 -0.50419 0.001286 10 0.3768 0.42186 -0.824860 11 1.3748 -0.09775 1.386935 14 0.7545 -1.80065 1.494348 15 0.4461 0.54516 -0.337498 17 0.5001 -0.23887 -0.562333 20 0.7586 1.66598 0.482238 c > 0: FALSE a b 1 0.2931 0.0860 10 0.3768 0.4219 15 0.4461 0.5452 17 0.5001 -0.2389 ------------------------------------------------------------ c > 0: TRUE a b 3 0.7401 -1.52052 7 0.9079 -0.50419 11 1.3748 -0.09775 14 0.7545 -1.80065 20 0.7586 1.66598 #+end_example #+BEGIN_SRC R dmean('Petal' ~ Species, data=iris, regex=TRUE) #+END_SRC #+RESULTS[62e576971a5c3a003bbb36ab4ea834eb293e063d]: : Species Petal.Length Petal.Width : 1 setosa 1.462 0.246 : 2 versicolor 4.260 1.326 : 3 virginica 5.552 2.026 #+NAME: fig1 #+BEGIN_SRC R :exports both :file figs/fig1.png :results output graphics plot(1) #+END_SRC #+RESULTS[e3904b17cae30c3ef0f5d112eb46725fac469094]: fig1 [[file:figs/fig1.png]] #+ATTR_LaTeX: :width \textwidth :center t #+CAPTION: Important figure. label:fig1 \vspace*{1em} #+BEGIN_marginfigure #+ATTR_LATEX: :width 2cm :float nil :center t #+CAPTION: Important margin figure. label:fig2 #+END_marginfigure * Tables #+BEGIN_SRC R data(sTRACE, package="timereg") dhead(sTRACE) dcut(sTRACE) <- wmicat~wmi dtable(sTRACE, sex+diabetes+wmicat~vf | age<60) dby(sTRACE, wmi ~ diabetes+sex, m=mean, q50=median, sd=sd, REDUCE=T) dhead(sTRACE, 'wmi*' ~ sex) #+END_SRC #+RESULTS[b5f8d7f29e1ed8fbda4349938306044b44e90c62]: #+begin_example no wmi status chf age sex diabetes time vf X1944 1944 1.5 9 0 84.924 1 1 1.345000 0 X5783 5783 1.9 0 1 74.193 0 0 6.910000 0 X784 784 0.8 9 0 78.081 0 1 0.196000 0 X3763 3763 1.3 0 0 55.479 1 0 7.543000 0 X2927 2927 1.6 0 1 62.997 0 0 7.126000 0 X4511 4511 1.0 9 1 67.644 1 0 4.532606 0 vf: 0 wmicat [0.4,1.1] (1.1,1.4] (1.4,1.8] (1.8,2.7] sex diabetes 0 0 4 2 3 5 1 0 2 1 1 1 0 15 17 37 24 1 0 3 2 1 ------------------------------------------------------------ vf: 1 wmicat [0.4,1.1] (1.1,1.4] (1.4,1.8] (1.8,2.7] sex diabetes 0 0 1 1 0 1 1 0 1 2 2 0 diabetes sex m q50 sd 1 0 0 1.437762 1.50 0.3810298 2 1 0 1.384211 1.30 0.4272173 3 0 1 1.434839 1.45 0.4017105 4 1 1 1.150000 1.15 0.4299009 sex: 0 wmi wmicat X5783 1.9 (1.8,2.7] X784 0.8 [0.4,1.1] X2927 1.6 (1.4,1.8] X1085 0.9 [0.4,1.1] X5249 1.7 (1.4,1.8] X6311 0.7 [0.4,1.1] ------------------------------------------------------------ sex: 1 wmi wmicat X1944 1.5 (1.4,1.8] X3763 1.3 (1.1,1.4] X4511 1.0 [0.4,1.1] X3122 1.9 (1.8,2.7] X5441 1.4 (1.1,1.4] X1280 1.1 [0.4,1.1] #+end_example #+BEGIN_SRC R library("magrittr") library("mets") op <- par(mfrow=c(1,3)) l <- iris %>% dsubset('*Length'~Species | Sepal.Width>mean(Sepal.Width)) %>% lapply(function(x,...) lm(Sepal.Length~Petal.Length,x)) %>% lapply(plotConf) par(op) dtable(iris, Species+dcut(Petal.Width,4)~1) dtable(iris, Species+dcut(Petal.Width,4)~1|Sepal.Width>median(Sepal.Width)) dtable(iris, Species+dcut(Petal.Width,4)~ dcut(Petal.Length,breaks=2)| Sepal.Width>mean(Sepal.Width)) #+END_SRC #+RESULTS[14a09cf4e6531704516d9d76305b8cb3355e7a04]: #+begin_example dcut(Petal.Width, 4) [0.1,0.3] (0.3,1.3] (1.3,1.8] (1.8,2.5] Species setosa 41 9 0 0 versicolor 0 28 22 0 virginica 0 0 16 34 dcut(Petal.Width, 4) [0.1,0.2] (0.2,0.4] (0.4,1.8] (1.8,2.5] Species setosa 28 12 2 0 versicolor 0 0 8 0 virginica 0 0 2 15 dcut(Petal.Length, breaks = 2): [1,1.6] dcut(Petal.Width, 4) [0.1,0.2] (0.2,0.4] (0.4,1.8] (1.8,2.5] Species setosa 26 9 1 0 versicolor 0 0 0 0 virginica 0 0 0 0 ------------------------------------------------------------ dcut(Petal.Length, breaks = 2): (1.6,6.7] dcut(Petal.Width, 4) [0.1,0.2] (0.2,0.4] (0.4,1.8] (1.8,2.5] Species setosa 2 3 1 0 versicolor 0 0 8 0 virginica 0 0 2 15 #+end_example * dby #+BEGIN_SRC R library(magrittr) sTRACE %>% dby2(chf+vf~1, mean, median) %>% dhead #+END_SRC #+RESULTS[66b2d4af5d5a7bb11ea96d4d0101df9819e74cc2]: #+begin_example no wmi status chf age sex diabetes time vf wmicat mean.chf X1944 1944 1.5 9 0 84.924 1 1 1.345000 0 (1.4,1.8] 0.522 X5783 5783 1.9 0 1 74.193 0 0 6.910000 0 (1.8,2.7] 0.522 X784 784 0.8 9 0 78.081 0 1 0.196000 0 [0.4,1.1] 0.522 X3763 3763 1.3 0 0 55.479 1 0 7.543000 0 (1.1,1.4] 0.522 X2927 2927 1.6 0 1 62.997 0 0 7.126000 0 (1.4,1.8] 0.522 X4511 4511 1.0 9 1 67.644 1 0 4.532606 0 [0.4,1.1] 0.522 mean.vf median.chf median.vf X1944 0.058 1 0 X5783 0.058 1 0 X784 0.058 1 0 X3763 0.058 1 0 X2927 0.058 1 0 X4511 0.058 1 0 #+end_example #+BEGIN_SRC R library(magrittr) sTRACE %>% dby(chf+vf~1, mean, median,REDUCE=TRUE) #+END_SRC #+RESULTS[1f8eaa03cb32b30d5b54c3910cbb531355aef819]: : mean median : 0.29 0 #+BEGIN_SRC R :eval never dby(iris, 'Length' ~ Species, mean, REGEX=T, COLUMN=T, REDUCE=T) dby(iris, 'Length' ~ Species, mean, REGEX=T, COLUMN=T, REDUCE=T) dby(iris, '*Length' ~ Species, mean, COLUMN=T, REDUCE=T) dby(iris, '*Length' ~ Species, mean) dby(iris, 'Length' ~ Species, mean, REGEX=T) dby(iris, 'Length' ~ Species, mean, COLUMN=T, REGEX=T, REDUCE=T) dby(iris, 'Length' ~ Species, mean, REGEX=T, REDUCE=1) dby(iris, 'Length' ~ Species, mean, REGEX=T, REDUCE=1, COLUMN=T) dby(iris, 'Length' ~ Species, mean, REGEX=T, REDUCE=1, COLUMN=T) #+END_SRC #+BEGIN_SRC R lapply(list(median, mean), function(f) dscalar(sTRACE, chf+vf~sex, fun=f)) #+END_SRC #+RESULTS[e727cd7a1e3e789e19c8941719fef4e5d47c3172]: : [[1]] : sex chf vf : 1 0 1 0 : 2 1 0 0 : : [[2]] : sex chf vf : 1 0 0.6172840 0.07407407 : 2 1 0.4763314 0.05029586 #+BEGIN_SRC R dbyr(sTRACE, wmi ~ vf+sex|age>80, mean(x^2), mean(log(x)), mean, n=length) #+END_SRC #+RESULTS[cb7e817a19236a46a94c2b2ebd27d49dce7be1cb]: : vf sex mean(x^2) mean(log(x)) mean n : 1 0 0 2.344286 0.33534719 1.471429 21 : 2 1 0 1.370000 0.02439508 1.100000 2 : 3 0 1 2.212162 0.33285730 1.445946 37 : 4 1 1 0.745000 -0.17833747 0.850000 2 * backmatter :ignore: bibliography:mets.bib bibliographystyle:plain mets/inst/include/0000755000176200001440000000000013623061405013622 5ustar liggesusersmets/inst/include/mets.h0000644000176200001440000000035613623061405014747 0ustar liggesusers// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #ifndef RCPP_mets_H_GEN_ #define RCPP_mets_H_GEN_ #include "mets_RcppExports.h" #endif // RCPP_mets_H_GEN_ mets/inst/include/mets_RcppExports.h0000644000176200001440000001507613623061405017325 0ustar liggesusers// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #ifndef RCPP_mets_RCPPEXPORTS_H_GEN_ #define RCPP_mets_RCPPEXPORTS_H_GEN_ #include #include namespace mets { using namespace Rcpp; namespace { void validateSignature(const char* sig) { Rcpp::Function require = Rcpp::Environment::base_env()["require"]; require("mets", Rcpp::Named("quietly") = true); typedef int(*Ptr_validate)(const char*); static Ptr_validate p_validate = (Ptr_validate) R_GetCCallable("mets", "_mets_RcppExport_validate"); if (!p_validate(sig)) { throw Rcpp::function_not_exported( "C++ function with signature '" + std::string(sig) + "' not found in mets"); } } } inline arma::mat _loglikMVN(arma::mat Yl, SEXP yu, SEXP status, arma::mat Mu, SEXP dmu, arma::mat S, SEXP ds, SEXP z, SEXP su, SEXP dsu, SEXP threshold, SEXP dthreshold, bool Score) { typedef SEXP(*Ptr__loglikMVN)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP); static Ptr__loglikMVN p__loglikMVN = NULL; if (p__loglikMVN == NULL) { validateSignature("arma::mat(*_loglikMVN)(arma::mat,SEXP,SEXP,arma::mat,SEXP,arma::mat,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,bool)"); p__loglikMVN = (Ptr__loglikMVN)R_GetCCallable("mets", "_mets__loglikMVN"); } RObject rcpp_result_gen; { RNGScope RCPP_rngScope_gen; rcpp_result_gen = p__loglikMVN(Shield(Rcpp::wrap(Yl)), Shield(Rcpp::wrap(yu)), Shield(Rcpp::wrap(status)), Shield(Rcpp::wrap(Mu)), Shield(Rcpp::wrap(dmu)), Shield(Rcpp::wrap(S)), Shield(Rcpp::wrap(ds)), Shield(Rcpp::wrap(z)), Shield(Rcpp::wrap(su)), Shield(Rcpp::wrap(dsu)), Shield(Rcpp::wrap(threshold)), Shield(Rcpp::wrap(dthreshold)), Shield(Rcpp::wrap(Score))); } if (rcpp_result_gen.inherits("interrupted-error")) throw Rcpp::internal::InterruptedException(); if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen)) throw Rcpp::LongjumpException(rcpp_result_gen); if (rcpp_result_gen.inherits("try-error")) throw Rcpp::exception(Rcpp::as(rcpp_result_gen).c_str()); return Rcpp::as(rcpp_result_gen); } inline NumericVector _dmvn(arma::mat u, arma::mat mu, arma::mat rho) { typedef SEXP(*Ptr__dmvn)(SEXP,SEXP,SEXP); static Ptr__dmvn p__dmvn = NULL; if (p__dmvn == NULL) { validateSignature("NumericVector(*_dmvn)(arma::mat,arma::mat,arma::mat)"); p__dmvn = (Ptr__dmvn)R_GetCCallable("mets", "_mets__dmvn"); } RObject rcpp_result_gen; { RNGScope RCPP_rngScope_gen; rcpp_result_gen = p__dmvn(Shield(Rcpp::wrap(u)), Shield(Rcpp::wrap(mu)), Shield(Rcpp::wrap(rho))); } if (rcpp_result_gen.inherits("interrupted-error")) throw Rcpp::internal::InterruptedException(); if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen)) throw Rcpp::LongjumpException(rcpp_result_gen); if (rcpp_result_gen.inherits("try-error")) throw Rcpp::exception(Rcpp::as(rcpp_result_gen).c_str()); return Rcpp::as(rcpp_result_gen); } inline arma::mat _rmvn(unsigned n, arma::mat mu, arma::mat rho) { typedef SEXP(*Ptr__rmvn)(SEXP,SEXP,SEXP); static Ptr__rmvn p__rmvn = NULL; if (p__rmvn == NULL) { validateSignature("arma::mat(*_rmvn)(unsigned,arma::mat,arma::mat)"); p__rmvn = (Ptr__rmvn)R_GetCCallable("mets", "_mets__rmvn"); } RObject rcpp_result_gen; { RNGScope RCPP_rngScope_gen; rcpp_result_gen = p__rmvn(Shield(Rcpp::wrap(n)), Shield(Rcpp::wrap(mu)), Shield(Rcpp::wrap(rho))); } if (rcpp_result_gen.inherits("interrupted-error")) throw Rcpp::internal::InterruptedException(); if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen)) throw Rcpp::LongjumpException(rcpp_result_gen); if (rcpp_result_gen.inherits("try-error")) throw Rcpp::exception(Rcpp::as(rcpp_result_gen).c_str()); return Rcpp::as(rcpp_result_gen); } inline arma::vec _rpch(unsigned n, std::vector lambda, std::vector time) { typedef SEXP(*Ptr__rpch)(SEXP,SEXP,SEXP); static Ptr__rpch p__rpch = NULL; if (p__rpch == NULL) { validateSignature("arma::vec(*_rpch)(unsigned,std::vector,std::vector)"); p__rpch = (Ptr__rpch)R_GetCCallable("mets", "_mets__rpch"); } RObject rcpp_result_gen; { RNGScope RCPP_rngScope_gen; rcpp_result_gen = p__rpch(Shield(Rcpp::wrap(n)), Shield(Rcpp::wrap(lambda)), Shield(Rcpp::wrap(time))); } if (rcpp_result_gen.inherits("interrupted-error")) throw Rcpp::internal::InterruptedException(); if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen)) throw Rcpp::LongjumpException(rcpp_result_gen); if (rcpp_result_gen.inherits("try-error")) throw Rcpp::exception(Rcpp::as(rcpp_result_gen).c_str()); return Rcpp::as(rcpp_result_gen); } inline arma::vec _cpch(arma::vec& x, std::vector lambda, std::vector time) { typedef SEXP(*Ptr__cpch)(SEXP,SEXP,SEXP); static Ptr__cpch p__cpch = NULL; if (p__cpch == NULL) { validateSignature("arma::vec(*_cpch)(arma::vec&,std::vector,std::vector)"); p__cpch = (Ptr__cpch)R_GetCCallable("mets", "_mets__cpch"); } RObject rcpp_result_gen; { RNGScope RCPP_rngScope_gen; rcpp_result_gen = p__cpch(Shield(Rcpp::wrap(x)), Shield(Rcpp::wrap(lambda)), Shield(Rcpp::wrap(time))); } if (rcpp_result_gen.inherits("interrupted-error")) throw Rcpp::internal::InterruptedException(); if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen)) throw Rcpp::LongjumpException(rcpp_result_gen); if (rcpp_result_gen.inherits("try-error")) throw Rcpp::exception(Rcpp::as(rcpp_result_gen).c_str()); return Rcpp::as(rcpp_result_gen); } } #endif // RCPP_mets_RCPPEXPORTS_H_GEN_ mets/inst/CITATION0000644000176200001440000000267613623061405013347 0ustar liggesusersauthor1 <- "Klaus K. Holst and Thomas H. Scheike and Jacob B. Hjelmborg" year1 <- 2016 journal1 <- "Computational Statistics and Data Analysis" title1 <- "The Liability Threshold Model for Censored Twin Data" doi1 <- "10.1016/j.csda.2015.01.014" volume1 <- 93 pages1 <- "324-335" textver1 <- paste(author1, " (", year1, "). ", title1, ". ", journal1, " ", volume1, ", pp. ", pages1, ". doi: ", doi1, sep="") author2 <- "Thomas H. Scheike and Klaus K. Holst and Jacob B. Hjelmborg" year2 <- 2014 journal2 <- "Lifetime Data Analysis" title2 <- "Estimating heritability for cause specific mortality based on twin studies" doi2 <- "10.1007/s10985-013-9244-x" volume2 <- 20 number2 <- 2 pages2 <- "210-233" textver2 <- paste(author2, " (", year2, "). ", title2, ". ", journal2, " ", volume2, " (", number2 ,"), pp. ", pages2, ". doi: ", doi2, sep="") citHeader("To cite 'mets' in publications use:") citEntry(entry="Article", title = title1, author = author1, year = year1, volume = volume1, pages = pages1, journal = journal1, doi = doi1, textVersion = textver1) citEntry(entry="Article", title = title2, author = author2, year = year2, volume = volume2, number = number2, pages = pages2, journal = journal2, doi = doi2, textVersion = textver2) mets/inst/devel/0000755000176200001440000000000013623061405013276 5ustar liggesusersmets/inst/devel/dreg.R0000644000176200001440000001773713623061405014361 0ustar liggesusers dreg <- function(data,y,x=NULL,z=NULL,...,x.oneatatime=TRUE, x.base.names=NULL,z.arg=c("clever","base","group","condition"), fun=lm,summary=NULL,regex=FALSE,convert=NULL, special=NULL,equal=TRUE) {# {{{ ### z.arg=clever, if z is logical then condition ### if z is factor then group variable ### if z is numeric then baseline covariate ### ... further arguments to fun ### funn <- as.character(substitute(fun)) ### if (is.character(fun)) ### fun <- get(fun) ### if (!is.null(convert) && is.logical(convert)) { ### if (convert) ### convert <- as.matrix ### else convert <- NULL ### } ### if (!is.null(convert)) { ### fun_ <- fun ### fun <- function(x, ...) fun_(convert(x, ...)) ### } yxzf <- mets:::procform(y,x=x,z=z,data=data,do.filter=FALSE,regex=regex) yxz <- mets:::procformdata(y,x=x,z=z,data=data,do.filter=FALSE,regex=regex) ## remove blank, to able to use also +1 on right hand side if (any(yxzf$predictor=="")) yxzf$predictor <- yxzf$predictor[-which(yxzf$predictor=="")] yy <- yxz$response xx <- yxz$predictor ### group is list, so zz is data.frame if ((length(yxzf$filter))==0) zz <- NULL else if ((length(yxzf$filter[[1]])==1 & yxzf$filter[[1]][1]=="1")) zz <- NULL else zz <- yxz$group[[1]] if (!is.null(zz)) {# {{{ if (z.arg[1]=="clever") { if ((ncol(zz)==1) & is.logical(zz[1,1])) z.arg[1] <- "condition" else if ((ncol(zz)==1) & is.factor(zz[,1])) z.arg[1] <- "group" else z.arg[1] <- "base" } }# }}} ### print(z.arg) basen <- NULL if (z.arg[1]=="base") basen <- yxzf$filter[[1]] if (z.arg[1]=="condition") data <- subset(data,eval(yxzf$filter.expression)) if (z.arg[1]=="group") group <- interaction(zz) else group <- rep(1,nrow(data)) if (z.arg[1]=="group") levell <- levels(group) else levell <-1 res <- sum <- list() if (is.null(summary)) sum <- NULL for (g in levell) {# {{{ if (equal==TRUE) datal <- subset(data,group==g) else datal <- subset(data,group!=g) for (y in yxzf$response) {# {{{ if (x.oneatatime) { for (x in yxzf$predictor) { if (length(c(x,basen))>1) basel <- paste(c(x,basen),collapse="+") else basel <- c(x,basen) form <- as.formula(paste(y,"~",basel)) if (!is.null(special)) form <- timereg:::timereg.formula(form,special=special) ### val <- with(data,do.call(fun,c(list(formula=form),list(...)))) capture.output( val <- do.call(fun,c(list(formula=form),list(data=datal),list(...)))) val$call <- paste(y,"~",basel) val <- list(val) nn <- paste(y,"~",basel) if (z.arg[1]=="group") { if (equal==TRUE) nn <- paste(nn,"|",g) else nn <- paste(nn,"| not",g); } names(val) <- nn res <- c(res, val) if (!is.null(summary)) { sval <- list(do.call(summary,list(val[[1]]))) names(sval) <- nn sum <- c(sum, sval) } } } else { basel <- paste(c(yxzf$predictor,basen),collapse="+") form <- as.formula(paste(y,"~",basel)) if (!is.null(special)) form <- timereg:::timereg.formula(form,special=special) capture.output( val <- do.call(fun,c(list(formula=form),list(data=datal),list(...)))) nn <- paste(y,"~",basel) if (z.arg[1]=="group") { if (equal==TRUE) nn <- paste(nn,"|",g) else nn <- paste(nn,"| not",g); } val$call <- nn val <- list(val) names(val) <- paste(y,"~",basel) res <- c(res, val) if (!is.null(summary)) { sval <- list(do.call(summary,list(val[[1]]))) names(sval) <- nn sum <- c(sum, sval) } } }# }}} }# }}} res <- list(reg=res,summary=sum) ### res <- list(setNames(res,funn),summary=sum,...) class(res) <- "dreg" res ### structure(res,ngrouvar=0,class="dreg") ### return(res) }# }}} print.dreg <- function(x,sep="-",...) {# {{{ sep <- paste(rep(sep,50,sep=""),collapse="") sep <- paste(sep,"\n") nn <- names(x$reg) for (i in seq_along(x$reg)) { cat(paste("Model=",nn[i],"\n")) print(x$reg[[i]],...) cat(sep) } }# }}} summary.dreg <- function(x,sep="-",...) {# {{{ sep <- paste(rep(sep,50,sep=""),collapse="") sep <- paste(sep,"\n") ### cat(sep) ### if (inherits(x$lm, c("lm"))) { ### print(x$lm) ### if (!is.null(x$summary)) print(x$summary) ### return(invisible(x)) ### } if (!is.null(x$summary)) { nn <- names(x$summary) for (i in seq_along(x$summary)) { cat(paste("Model=",nn[i],"\n")) if (!is.null(x$summary)) print(x$summary[[i]],...) else print(x$reg[[i]],...) cat(sep) } } }# }}} stop() library(mets) data(iris) data=iris drename(iris) <- ~. names(iris) iris$time <- runif(nrow(iris)) iris$time1 <- runif(nrow(iris)) iris$status <- rbinom(nrow(iris),1,0.5) iris$S1 <- with(iris,Surv(time,status)) iris$S2 <- with(iris,Surv(time1,status)) iris$id <- 1:nrow(iris) mm <- dreg(iris,"*.length"~"*.width"|I(species=="setosa" & status==1)) mm <- dreg(iris,"*.length"~"*.width"|species+status) mm <- dreg(iris,"*.length"~"*.width"|species) mm <- dreg(iris,"*.length"~"*.width"|species+status,z.arg="group") zz <- dsubset(iris,~species+factor(status)) zzf <- apply(zz,1,interaction) paste("ts","|","g") zz <- interaction(zz) levels(zz) ###with(iris,split(iris,species,lm(sepal.length~sepal.width,data=x) )) dmean(iris,"*.length"~species+status) x=NULL;z=NULL;level=1; base=NULL; z.arg=c("clever","base","group","condition"); fun=lm;summary=summary;regex=FALSE ### data=iris x=NULL;z=NULL; x.oneatatime=TRUE x.base.names=NULL;z.arg=c("clever","base","group","condition"); fun=lm;summ=TRUE;regex=FALSE regex=FALSE z.arg="base" z.arg="clever" convert = NULL ### testing forskellige calls y <- "S*"~"*.width" xs <- dreg(iris,y,fun=phreg) xs <- dreg(iris,y,fun=survdiff) ### testing forskellige calls y <- "S*"~"*.width" xs <- dreg(iris,y,x.oneatatime=FALSE,fun=phreg) ## under condition y <- S1~"*.width"|I(species=="setosa" & sepal.width>3) xs <- dreg(iris,y,z.arg="condition",fun=phreg) xs <- dreg(iris,y,fun=phreg) ## under condition y <- S1~"*.width"|species=="setosa" xs <- dreg(iris,y,z.arg="condition",fun=phreg) xs <- dreg(iris,y,fun=phreg) ## with baseline after | y <- S1~"*.width"|sepal.length xs <- dreg(iris,y,fun=phreg) ## by group by species, not working y <- S1~"*.width"|species ss <- split(iris,paste(iris$species,iris$status)) xs <- dreg(iris,y,fun=phreg) ## species as base, species is factor so assumes that this is grouping y <- S1~"*.width"|species xs <- dreg(iris,y,z.arg="base",fun=phreg) ## background var after | and then one of x's at at time y <- S1~"*.width"|status+"sepal*" xs <- dreg(iris,y,fun=phreg) ## background var after | and then one of x's at at time y <- S1~"*.width"|status+"sepal*" xs <- dreg(iris,y,x.oneatatime=FALSE,fun=phreg) xs <- dreg(iris,y,fun=phreg) ## background var after | and then one of x's at at time y <- S1~"*.width"+factor(species) xs <- dreg(iris,y,fun=phreg) xs <- dreg(iris,y,fun=phreg,x.oneatatime=FALSE) y <- S1~"*.width"|factor(species) xs <- dreg(iris,y,z.arg="base",fun=phreg) y <- S1~"*.width"|cluster(id)+factor(species) xs <- dreg(iris,y,z.arg="base",fun=phreg) xs <- dreg(iris,y,z.arg="base",fun=coxph) ## under condition with groups y <- S1~"*.width"|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun=phreg) ## under condition with groups y <- S1~"*.width"+I(log(sepal.length))|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun=phreg) y <- S1~"*.width"+I(dcut(sepal.length))|I(sepal.length>4) xs <- dreg(subset(iris,species=="setosa"),y,z.arg="group",fun=phreg) ff <- function(formula,data,...) { ss <- survfit(formula,data,...) kmplot(ss,...) return(ss) } dcut(iris) <- ~"*.width" y <- S1~"*.4"|I(sepal.length>4) par(mfrow=c(1,2)) xs <- dreg(iris,y,fun=ff) ######################################### mets/inst/devel/bptwin2.R0000644000176200001440000004675513623061405015027 0ustar liggesusersbptwin2 <- function(formula, data, id, zyg, DZ, group=NULL, num=NULL, weight=NULL, biweight=function(x) 1/min(x), strata=NULL, messages=1, control=list(trace=0), type="ace", eqmean=TRUE, pairsonly=FALSE, samecens=TRUE, allmarg=samecens&!is.null(weight), stderr=TRUE, robustvar=TRUE, p, indiv=FALSE, constrain, bound=FALSE, varlink, ...) { ###{{{ setup OSon <- FALSE idx2 <- NULL mycall <- match.call() formulaId <- unlist(Specials(formula,"cluster")) formulaStrata <- unlist(Specials(formula,"strata")) formulaSt <- paste("~.-cluster(",formulaId,")-strata(",paste(formulaStrata,collapse="+"),")") formula <- update(formula,formulaSt) if (!is.null(formulaId)) { id <- formulaId mycall$id <- id } if (!is.null(formulaStrata)) strata <- formulaStrata mycall$formula <- formula if (!is.null(strata)) { dd <- split(data,interaction(data[,strata])) nn <- unlist(lapply(dd,nrow)) dd[which(nn==0)] <- NULL if (length(dd)>1) { fit <- lapply(seq(length(dd)),function(i) { if (messages>0) message("Strata '",names(dd)[i],"'") mycall$data <- dd[[i]] eval(mycall) }) res <- list(model=fit) res$strata <- names(res$model) <- names(dd) class(res) <- c("twinlm.strata","biprobit") res$coef <- unlist(lapply(res$model,coef)) res$vcov <- blockdiag(lapply(res$model,vcov.biprobit)) res$N <- length(dd) res$idx <- seq(length(coef(res$model[[1]]))) rownames(res$vcov) <- colnames(res$vcov) <- names(res$coef) return(res) } } ################################################## ### No strata if (is.null(control$method)) { if (!samecens & !is.null(weight)) { control$method <- "bhhh" } else { if (requireNamespace("ucminf",quietly=TRUE)) { control$method <- "gradient" } else control$method <- "nlminb" } } if (length(grep("flex",tolower(type)))>0) { type <- "u"; eqmean <- FALSE } yvar <- paste(deparse(formula[[2]]),collapse="") data <- data[order(data[,id]),] idtab <- table(data[,id]) if (sum(idtab>2)) stop("More than two individuals with the same id ") if (pairsonly) { data <- data[as.character(data[,id])%in%names(idtab)[idtab==2],] idtab <- table(data[,id]) } if (is.logical(data[,yvar])) data[,yvar] <- data[,yvar]*1 if (is.factor(data[,yvar])) data[,yvar] <- as.numeric(data[,yvar])-1 if (missing(DZ)) { DZ <- levels(as.factor(data[,zyg]))[1] message("Using '",DZ,"' as DZ",sep="") } idx1 <- which(data[,zyg]%in%DZ) ## DZ if (length(idx1)==0) stop("No DZ twins found") idx0 <- which(!(data[,zyg]%in%DZ)) ## MZ if (length(idx1)==0) stop("No MZ twins found") zyg2 <- rep(1,nrow(data)); zyg2[idx0] <- 0; data[,zyg] <- zyg2 ## MZ=0, DZ=1 if (!is.null(group)) data[,group] <- as.factor(data[,group]) ff <- paste(as.character(formula)[3],"+", paste(c(id,zyg,weight,num),collapse="+")) ff <- paste("~",yvar,"+",ff) formula0 <- as.formula(ff) opt <- options(na.action="na.pass") Data <- model.matrix(formula0,data) options(opt) rnames1 <- setdiff(colnames(Data),c(yvar,id,weight,zyg,num)) nx <- length(rnames1) if (nx==0) stop("Zero design not allowed") bidx0 <- seq(nx) midx0 <- bidx0; midx1 <- midx0+nx dS0. <- rbind(rep(1,4),rep(1,4),rep(1,4)) ## MZ dS1. <- rbind(c(1,.5,.5,1),rep(1,4),c(1,.25,.25,1)) ## DZ dS2. <- rbind(c(1,0,0,1),rep(1,4),c(1,0,0,1),c(0,1,1,0)) ##mytr <- function(x) x; dmytr <- function(x) 1 ##mytr <- function(x) x^2; dmytr <- function(x) 2*x ##mytr <- function(z) 1/(1+exp(-z)); dmytr <- function(z) exp(-z)/(1+exp(-z))^2 ACDU <- sapply(c("a","c","d","e","u"),function(x) length(grep(x,tolower(type)))>0) ACDU <- c(ACDU) if (missing(varlink) || !is.null(varlink)) { mytr <- exp; dmytr <- exp; myinvtr <- log trname <- "exp"; invtrname <- "log" } else { mytr <- myinvtr <- identity; dmytr <- function(x) rep(1,length(x)) trname <- ""; invtrname <- "" } dmytr2 <- function(z) 4*exp(2*z)/(exp(2*z)+1)^2 mytr2 <- tanh; myinvtr2 <- atanh trname2 <- "tanh"; invtrname2 <- "atanh" if (!is.null(group)) { mytr <- function(x) c(exp(x[-length(x)]),mytr2(x[length(x)])) myinvtr <- function(z) c(log(z[-length(z)]),myinvtr2(z[length(z)])) dmytr <- function(x) c(exp(x[-length(x)]),dmytr2(x[length(x)])) } if (ACDU["u"]) { ## datanh <- function(r) 1/(1-r^2) dmytr <- dmytr2 mytr <- mytr2; myinvtr <- myinvtr2 trname <- trname2; invtrname <- invtrname2 dS0 <- rbind(c(0,1,1,0)) vidx0 <- 1 vidx1 <- 2 vidx2 <- 3 dS2 <- dS1 <- dS0 nvar <- length(vidx0)+length(vidx1) if (OSon) nvar <- nvar+length(vidx2) } else { nvar <- sum(ACDU[1:3]) vidx0 <- vidx1 <- seq(nvar); vidx2 <- seq(nvar+1) if (OSon) nvar <- nvar+1 dS0 <- dS0.[ACDU[1:3],,drop=FALSE] dS1 <- dS1.[ACDU[1:3],,drop=FALSE] dS2 <- dS2.[which(c(ACDU[1:3],TRUE)),,drop=FALSE] } if (eqmean) { bidx2 <- bidx1 <- bidx0 } else { bidx1 <- bidx0+nx bidx2 <- bidx1+nx if (OSon) nx <- 3*nx else nx <- 2*nx; } vidx0 <- vidx0+nx; vidx1 <- vidx1+nx; vidx2 <- vidx2+nx vidx <- nx+seq_len(nvar) midx <- seq_len(nx) plen <- nx+nvar Am <- matrix(c(1,.5,.5,1),ncol=2) Dm <- matrix(c(1,.25,.25,1),ncol=2) Vm <- matrix(c(1,0,0,1),ncol=2) Rm <- matrix(c(0,1,1,0),ncol=2) ################################################## ## system.time(Wide <- reshape(as.data.frame(Data),idvar=c(id,zyg),timevar=time,direction="wide")) ## system.time(Wide <- as.data.frame(fast.reshape(Data,id=c(id),sep="."))) Wide <- as.data.frame(fast.reshape(Data,id=c(id,zyg),sep=".",idcombine=FALSE,labelnum=TRUE)) yidx <- paste(yvar,1:2,sep=".") rmidx <- c(id,yidx,zyg) W0 <- W1 <- W2 <- NULL if (!is.null(weight)) { widx <- paste(weight,1:2,sep=".") rmidx <- c(rmidx,widx) W0 <- as.matrix(Wide[which(Wide[,zyg]==0),widx,drop=FALSE]) W1 <- as.matrix(Wide[which(Wide[,zyg]==1),widx,drop=FALSE]) W2 <- as.matrix(Wide[which(Wide[,zyg]==2),widx,drop=FALSE]) } XX <- as.matrix(Wide[,setdiff(colnames(Wide),rmidx)]) XX[is.na(XX)] <- 0 Y0 <- as.matrix(Wide[which(Wide[,zyg]==0),yidx,drop=FALSE]) Y1 <- as.matrix(Wide[which(Wide[,zyg]==1),yidx,drop=FALSE]) Y2 <- as.matrix(Wide[which(Wide[,zyg]==2),yidx,drop=FALSE]) XX0 <- XX[which(Wide[,zyg]==0),,drop=FALSE] XX1 <- XX[which(Wide[,zyg]==1),,drop=FALSE] XX2 <- XX[which(Wide[,zyg]==2),,drop=FALSE] ################################################## ###}}} setup ###{{{ Mean/Var function ##Marginals etc. MyData0 <- ExMarg(Y0,XX0,W0,dS0,eqmarg=TRUE,allmarg=allmarg) MyData1 <- ExMarg(Y1,XX1,W1,dS1,eqmarg=TRUE,allmarg=allmarg) MyData2 <- ExMarg(Y2,XX2,W2,dS2,eqmarg=TRUE,allmarg=allmarg) N <- cbind(length(idx0),length(idx1),length(idx2)); N <- cbind(N, 2*nrow(MyData0$Y0)+if (!pairsonly) NROW(MyData0$Y0_marg) else 0, 2*nrow(MyData1$Y0)+if (!pairsonly) NROW(MyData1$Y0_marg) else 0, 2*nrow(MyData2$Y0)+if (!pairsonly) NROW(MyData2$Y0_marg) else 0, NROW(MyData0$Y0),NROW(MyData1$Y0),NROW(MyData2$Y0)) colnames(N) <- c("Total.MZ","Total.DZ","Total.OS","Complete.MZ","Complete.DZ","Complete.OS","Complete pairs.MZ","Complete pairs.DZ","Complete pairs.OS") rownames(N) <- rep("",nrow(N)) if (!OSon) N <- N[,-c(3,6,9),drop=FALSE] if (samecens & !is.null(weight)) { MyData0$W0 <- cbind(apply(MyData0$W0,1,biweight)) if (!is.null(MyData0$Y0_marg)) MyData0$W0_marg <- cbind(apply(MyData0$W0_marg,1,biweight)) } if (samecens & !is.null(weight)) { MyData1$W0 <- cbind(apply(MyData1$W0,1,biweight)) if (!is.null(MyData1$Y0_marg)) MyData1$W0_marg <- cbind(apply(MyData1$W0_marg,1,biweight)) } if (samecens & !is.null(weight)) { MyData2$W0 <- cbind(apply(MyData2$W0,1,biweight)) if (!is.null(MyData2$Y0_marg)) MyData2$W0_marg <- cbind(apply(MyData2$W0_marg,1,biweight)) } rm(Y0,XX0,W0,Y1,XX1,W1,Y2,XX2,W2) Sigma <- function(p0) { Sigma2 <- NULL p0[vidx] <- mytr(p0[vidx]) if (ACDU["u"]) { pos0 <- ifelse(OSon, plen-2, plen-1) Sigma0 <- diag(2) + p0[pos0]*Rm Sigma1 <- diag(2) + p0[pos0+1]*Rm if (OSon) Sigma2 <- diag(2) + p0[pos0+2]*Rm } else { ii <- ACDU; ii[4:5] <- FALSE pv <- ACDU*1; pv[ii] <- p0[vidx] Sigma0 <- Vm*pv["e"] + pv["a"] + pv["c"] + pv["d"] Sigma1 <- Vm*pv["e"] + pv["a"]*Am + pv["c"] + pv["d"]*Dm Sigma2 <- Vm*pv["e"] + pv["c"] + (pv["a"] + pv["d"])*Vm + pv["os"]*(pv["a"] + pv["d"])*Rm if (OSon) { dS2 <- dS2. dS2[c(1,3),2:3] <- pv["os"] dS2[4,2:3] <- pv["a"]+pv["d"] dS2 <- dS2[which(c(ACDU[1:3],TRUE)),] } } return(list(Sigma0=Sigma0,Sigma1=Sigma1,Sigma2=Sigma2,dS2=dS2)) } ## p0 <- op$par ## ff <- function(p) as.vector(Sigma(p)$Sigma2) ## numDeriv::jacobian(ff,p0) ## Sigma(p0)$dS2 ## dmytr(p0[vidx]) ## Sigma(p0)$dS2[1,]*dmytr(p0[vidx])[1] ## Sigma(p0)$dS2[2,]*dmytr(p0[vidx])[2] ## Sigma(p0)$dS2[3,]*dmytr(p0[vidx])[3] ###}}} Mean/Var function ###{{{ U p0 <- rep(-1,plen); ##p0[vidx] <- 0 if (!missing(varlink) && is.null(varlink)) p0 <- rep(0.5,plen) if (OSon) p0[length(p0)] <- 0.3 if (type=="u") p0[vidx] <- 0.3 if (!is.null(control$start)) { p0 <- control$start control$start <- NULL } else { X <- rbind(MyData0$XX0[,midx0,drop=FALSE],MyData0$XX0[,midx1,drop=FALSE]) Y <- rbind(MyData0$Y0[,1,drop=FALSE],MyData0$Y0[,2,drop=FALSE]) g <- suppressWarnings(glm(Y~-1+X,family=binomial(probit))) p0[midx] <- coef(g) } U <- function(p,indiv=FALSE) { b0 <- cbind(p[bidx0]) b1 <- cbind(p[bidx1]) b2 <- cbind(p[bidx2]) b00 <- b0; b11 <- b1; b22 <- b2 if (bound) p[vidx] <- min(p[vidx],20) S <- Sigma(p) lambda <- eigen(S$Sigma0)$values if (any(lambda<1e-12 | lambda>1e9)) stop("Variance matrix out of bounds") Mu0 <- with(MyData0, cbind(XX0[,midx0,drop=FALSE]%*%b00, XX0[,midx1,drop=FALSE]%*%b00)) U0 <- with(MyData0, .Call("biprobit0", Mu0, S$Sigma0,dS0,Y0,XX0,W0,!is.null(W0),samecens)) if (!is.null(MyData0$Y0_marg) &&!pairsonly) { mum <- with(MyData0, XX0_marg%*%b00) dSmarg <- dS0[,1,drop=FALSE] U_marg <- with(MyData0, .Call("uniprobit", mum,XX0_marg, S$Sigma0[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE)) U0$score <- rbind(U0$score,U_marg$score) U0$loglik <- c(U0$loglik,U_marg$loglik) } Mu1 <- with(MyData1, cbind(XX0[,midx0,drop=FALSE]%*%b11, XX0[,midx1,drop=FALSE]%*%b11)) U1 <- with(MyData1, .Call("biprobit0", Mu1, S$Sigma1,dS1,Y0,XX0,W0,!is.null(W0),samecens)) if (!is.null(MyData1$Y0_marg) &&!pairsonly) { mum <- with(MyData1, XX0_marg%*%b11) dSmarg <- dS1[,1,drop=FALSE] U_marg <- with(MyData1, .Call("uniprobit", mum,XX0_marg, S$Sigma1[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE)) U1$score <- rbind(U1$score,U_marg$score) U1$loglik <- c(U1$loglik,U_marg$loglik) } U2 <- val2 <- NULL if (OSon) { Mu2 <- with(MyData2, cbind(XX0[,midx0,drop=FALSE]%*%b22, XX0[,midx1,drop=FALSE]%*%b22)) U2 <- with(MyData2, .Call("biprobit0", Mu2, S$Sigma2,S$dS2,Y0,XX0,W0,!is.null(W0),samecens)) if (!is.null(MyData2$Y0_marg) &&!pairsonly) { mum <- with(MyData2, XX0_marg%*%b22) dSmarg <- S$dS2[,1,drop=FALSE] U_marg <- with(MyData2, .Call("uniprobit", mum,XX0_marg, S$Sigma2[1,1],t(dSmarg),Y0_marg, W0_marg,!is.null(W0_marg),TRUE)) U2$score <- rbind(U2$score,U_marg$score) U2$loglik <- c(U2$loglik,U_marg$loglik) } } if (indiv) { ll0 <- U0$loglik ll1 <- U1$loglik val0 <- U0$score[MyData0$id,,drop=FALSE] val1 <- U1$score[MyData1$id,,drop=FALSE] N0 <- length(MyData0$id) idxs0 <- seq_len(N0) if (length(MyData0$margidx)>0) { for (i in seq_len(N0)) { idx0 <- which((MyData0$idmarg)==(MyData0$id[i]))+N0 idxs0 <- c(idxs0,idx0) val0[i,] <- val0[i,]+colSums(U0$score[idx0,,drop=FALSE]) } val0 <- rbind(val0, U0$score[-idxs0,,drop=FALSE]) ll0 <- c(ll0,ll0[-idxs0]) } N1 <- length(MyData1$id) idxs1 <- seq_len(N1) if (length(MyData1$margidx)>0) { for (i in seq_len(N1)) { idx1 <- which((MyData1$idmarg)==(MyData1$id[i]))+N1 idxs1 <- c(idxs1,idx1) val1[i,] <- val1[i,]+colSums(U1$score[idx1,,drop=FALSE]) } val1 <- rbind(val1, U1$score[-idxs1,,drop=FALSE]) ll1 <- c(ll1,ll1[-idxs1]) } if (OSon) { ll2 <- U2$loglik val2 <- U2$score[MyData2$id,,drop=FALSE] N2 <- length(MyData2$id) idxs2 <- seq_len(N2) if (length(MyData2$margidx)>0) { for (i in seq_len(N2)) { idx2 <- which((MyData2$idmarg)==(MyData2$id[i]))+N2 idxs2 <- c(idxs2,idx2) val2[i,] <- val2[i,]+colSums(U2$score[idx2,,drop=FALSE]) } val2 <- rbind(val2, U2$score[-idxs2,,drop=FALSE]) ll2 <- c(ll2,ll2[-idxs2]) } } val <- matrix(0,ncol=plen,nrow=nrow(val0)+nrow(val1) + NROW(val2)) val[seq_len(nrow(val0)),c(bidx0,vidx0)] <- val0 val[nrow(val0)+seq_len(nrow(val1)),c(bidx1,vidx1)] <- val1 if (OSon) { val[nrow(val0)+nrow(val1)+seq_len(nrow(val2)),c(bidx2,vidx2)] <- val2 } trp <- dmytr(p[vidx]) for (i in seq(length(vidx))) { val[,vidx[i]] <- val[,vidx[i]]*trp[i] } attributes(val)$logLik <- c(U0$loglik,U1$loglik,U2$loglik) return(val) } val <- numeric(plen) val[c(bidx0,vidx0)] <- colSums(U0$score) val[c(bidx1,vidx1)] <- val[c(bidx1,vidx1)]+colSums(U1$score) if (OSon) val[c(bidx2,vidx2)] <- val[c(bidx2,vidx2)]+colSums(U2$score) val[vidx] <- val[vidx]*dmytr(p[vidx]) attributes(val)$logLik <- sum(U0$loglik)+sum(U1$loglik)+sum(U2$loglik) return(val) } ###}}} U ###{{{ optim if (!missing(p)) return(U(p,indiv=indiv)) f <- function(p) crossprod(U(p))[1] f0 <- function(p) -sum(attributes(U(p))$logLik) g0 <- function(p) -as.numeric(U(p)) h0 <- function(p) crossprod(U(p,indiv=TRUE)) if (!missing(constrain)) { freeidx <- is.na(constrain) f <- function(p) { p1 <- constrain; p1[freeidx] <- p res <- U(p1)[freeidx] crossprod(res)[1] } f0 <- function(p) { p1 <- constrain; p1[freeidx] <- p -sum(attributes(U(p1))$logLik) } g0 <- function(p) { p1 <- constrain; p1[freeidx] <- p -as.numeric(U(p1)[freeidx]) } p0 <- p0[is.na(constrain)] } ## Derivatives, Sanity check ## ff <- function(p) attributes(U(p,indiv=FALSE))$logLik ## pp <- c(0,-.1,.1,0.5) ## numDeriv::grad(ff,pp) ## U(pp,indiv=FALSE) controlstd <- list(hessian=0) controlstd[names(control)] <- control control <- controlstd nlminbopt <- intersect(names(control),c("eval.max","iter.max","trace","abs.tol","rel.tol","x.tol","step.min")) ucminfopt <- intersect(names(control),c("trace","grtol","xtol","stepmax","maxeval","grad","gradstep","invhessian.lt")) optimopt <- names(control) op <- switch(tolower(control$method), nlminb=nlminb(p0,f0,gradient=g0,control=control[nlminbopt]), optim=optim(p0,fn=f0,gr=g0,control=control[ucminfopt]), ucminf=, quasi=, gradient=ucminf::ucminf(p0,fn=f0,gr=g0,control=control[ucminfopt],hessian=0), ## , ## bhhh={ ## controlnr <- list(stabil=FALSE, ## gamma=0.1, ## gamma2=1, ## ngamma=5, ## iter.max=200, ## epsilon=1e-12, ## tol=1e-9, ## trace=1, ## stabil=FALSE) ## controlnr[names(control)] <- control ## lava:::NR(start=p0,NULL,g0, h0,control=controlnr) ## }, ## op <- switch(mycontrol$method, ## ucminf=ucminf(p0,f,control=mycontrol[ucminfopt],hessian=F), ## optim=optim(p0,f,control=mycontrol[ucminfopt],...), nlminb(p0,f,control=control[nlminbopt])) if (stderr) { UU <- U(op$par,indiv=TRUE) I <- -numDeriv::jacobian(U,op$par) tol <- 1e-15 V <- Inverse(I,tol) sqrteig <- attributes(V)$sqrteig J <- NULL if (robustvar) { J <- crossprod(UU) V <- V%*%J%*%V } if (any(sqrteig