knitr::opts_chunk$set(comment = NA, prompt = TRUE, collapse = TRUE)
The qris package implements estimation procedures for a regression model of the quantiles of residual life, remaining lifetime at a specific time, subject to right censoring. For estimation of regression parameters, we consider an induced smoothed method that solves smoothed weighted estimating equations. We also consider the estimation method that solves the original non-smooth weighted estimating equations via a L1 minimization method. To handle data subject to right censoring, inverse probabilities of censoring are incorporated as weights. For standard errors estimation, a robust sandwich-type covariance estimator aided by an efficient resampling method, and a full multiplier bootstrap approach are considered for the induced smoothed estimator (“smooth”) and non-smooth estimator (“nonsmooth”), respectively. Furthermore, an iterative procedure that simultaneously estimates regression parameters and their standard errors is implemented.
You can install the released version of qris from GitHub with:
## install.packages("devtools") devtools::install_github("Kyuhyun07/qris") library(qris)
library(qris)
There are two examples to get started. Here is a simulated data.
data.gen <- function(n) { r0 <- .2 * sqrt(log(2)) r1 <- .1 * sqrt(log(2)) dat <- data.frame(censoring = runif(n, 0, 24.35), Time0 = sqrt(-log(1 - runif(n))), X = rbinom(n, 1, .5)) dat$Time0 <- ifelse(dat$X > 0, dat$Time0 / r1, dat$Time0 / r0) dat$Time <- pmin(dat$Time0, dat$censoring) dat$status <- 1 * (dat$Time0 < dat$censoring) subset(dat, select = c(Time, status, X)) } library(survival) set.seed(1) dat <- data.gen(200) fm <- Surv(Time, status) ~ X fit1 <- qris(fm, data = dat, t0 = 1, Q = 0.5, nB = 200, "smooth", "pmb", c(1,1)) fit2 <- qris(fm, data = dat, t0 = 1, Q = 0.5, nB = 200, "nonsmooth", "fmb", "rq") fit3 <- qris(fm, data = dat, t0 = 1, Q = 0.5, nB = 200, "iterative", "fmb", "rq", control = qris.control(maxit = 20, tol = 1e-3, trace = TRUE)) summary(fit1) summary(fit2) summary(fit3) coef(fit1) summary(fit2) vcov(fit3) plot(fit1, Qs = 4:6 / 10)
Here is a real data application.
## Load "retinopathy" data from R survival package library(survival) ## Real data application data(cancer, package = "survival") lung2 <- subset(lung, select = c(time, status, age, sex)) ## tidy up the data lung2$status <- lung2$status - 1 lung2$sex <- lung2$sex - 1 fm <- Surv(time, status) ~ age + sex fit1 <- qris(fm, data = lung2, t0 = 0, Q = 0.5, nB = 200, "iterative", "pmb", "rq") fit2 <- qris(fm, data = lung2, t0 = 30, Q = 0.5, nB = 200, "nonsmooth", "fmb", c(1, 0, 1)) fit3 <- qris(fm, data = lung2, t0 = 100, Q = 0.5, nB = 200,"smooth", "pmb", "rq") summary(fit1) summary(fit2) summary(fit3) plot(fit2, Qs = 4:6 / 10)
Kim, K., and Kang, S., (2022). "Smoothed quantile regression for censored residual life". Upcoming
Chiou, S., Kang, S., and Yan, J. (2014). "Fitting accelerated failure time model in routine survival analysis with R package aftgee". Journal of Statistical Software, 61(11): 1--23.
Li, R., Huang, X., & Cortes, J. (2016). "Quantile residual life regression with longitudinal biomarker measurements for dynamic prediction". Journal of the Royal Statistical Society. Series C (Applied Statistics), 755-773.
Jung, S. H., Jeong, J. H., & Bandos, H. (2009). "Regression on quantile residual life". Biometrics, 65(4), 1203-1212.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.