This R package implements a semi-parametric estimation method for theCox model introduced in the paperA Pairwise LikelihoodAugmented Cox Estimator for Left-truncated data by Wu etal. (2018). It gives more efficient estimate for left-truncatedsurvival data using the marginal survival information up to the start offollow-up (when the subject enters the risk set). The independencebetween the underlying truncation time distribution and the covariatesis the only additional assumption, which holds true for mostapplications of length-biased sampling problem and beyond.
The package can be installed from CRAN:
install.packages("plac")You can also install the development version of it fromGitHub with:
# install.packages("devtools")devtools::install_github("942kid/plac")The main wrapper functionPLAC() calls the appropriateworking function according to the covariate types in the dataset. Forexample,
library(plac)#> Loading required package: survival# When only time-invariant covariates are involveddat1<-sim.ltrc(n =50)$datPLAC(ltrc.formula =Surv(As, Ys, Ds)~ Z1+ Z2,ltrc.data = dat1,td.type ="none")#> Calling PLAC_TI()...#> 12 Iterations#> Coefficient Estimates:#> est.Cox se.Cox p.Cox est.PLAC se.PLAC p.PLAC#> Z1 2.055 0.431 0.000 1.804 0.357 0.000#> Z2 0.919 0.347 0.008 0.804 0.259 0.002# When there is a time-dependent covariate that is independent of the truncation timedat2<-sim.ltrc(n =50,time.dep =TRUE,distr.A ="binomial",p.A =0.8,Cmax =5)$datPLAC(ltrc.formula =Surv(As, Ys, Ds)~ Z,ltrc.data = dat2,td.type ="independent",td.var ="Zv",t.jump ="zeta")#> Calling PLAC_TD()...#> 100 Iterations#>#> Coefficient Estimates:#> est.Cox se.Cox p.Cox est.PLAC se.PLAC p.PLAC#> Z 0.866 0.330 0.009 0.795 0.224 0#> Zv 0.877 0.355 0.014 0.864 0.214 0# When there is a time-dependent covariate that depends on the truncation timedat3<-sim.ltrc(n =50,time.dep =TRUE,Zv.depA =TRUE,Cmax =5)$datPLAC(ltrc.formula =Surv(As, Ys, Ds)~ Z,ltrc.data = dat3,td.type ="post-trunc",td.var ="Zv",t.jump ="zeta")#> Calling PLAC_TDR()...#> 8 Iterations#>#> Coefficient Estimates:#> est.Cox se.Cox p.Cox est.PLAC se.PLAC p.PLAC#> Z 0.668 0.301 0.027 0.487 0.246 0.047#> Zv 0.915 0.327 0.005 0.938 0.301 0.002For computation details, please refer to the document of the mainwrapper function:
help(PLAC)Wu, F., Kim, S., Qin, J., Saran, R., & Li, Y. (2018). A pairwiselikelihood augmented Cox estimator for left‐truncated data.Biometrics, 74(1), 100-108.