coxph.RT {coxrt}R Documentation

Fits Cox Regression Model Using Right Truncated Data


Estimates covariate effects in a Cox proportional hazard regression from right-truncated survival data assuming positivity, that is P(lifetime>max(right) | Z=0)=0.


coxph.RT(formula, right, data, bs = FALSE, nbs.rep = 500, = 0.95)



a formula object, with the response on the left of a ~ operator, and covariates on the right. The response is a target lifetime variable.


a right truncation variable.


a data frame that includes the variables used in both sides of formula and in right. The observations with missing values in one of the variables are dropped.


logical value: if TRUE, the bootstrap esimator of standard error, confidence interval, and confidence upper and lower limits for one-sided confidence intervals based on the bootstrap distribution are calculated. The default value is FALSE.


number of bootstrap replications. The default number is 500.

The confidence level for confidence intervals and hypotheses tests. The default level is 0.95.


When positivity does not hold, the estimator of regression coefficients will be biased. But if all the covariates are independent in the population, the Wald test performed by this function is still valid and can be used for testing partial hypotheses about regression coefficients even in the absence of positivity. If the covariates are not independent and positivity does not hold, the partial tests cannot guarantee the correct level of type I error.


A list with components:

coef an estimate of regression coefficients
var covariance matrix of estimates of regression coefficients based on the analytic formula
n the number of observations used to fit the model
summary a data frame with a summary of fit:
bs if the input argument bs was TRUE, then an output list also includes an element bs with
statistics from the bootstrap distribution of estimated coefficients:

See Also

coxph.RT.a0, coxrt, coxph


# loading AIDS data set
all <- data.frame(age=aids$age, ageg=as.numeric(aids$age<=59), T=aids$incu,
R=aids$infe, hiv.mon =102-aids$infe)
all$T[all$T==0] <- 0.5 # as in Kalbfeisch and Lawless (1989)
s <- all[all$hiv.mon>60,] # select those who were infected in 1983 or later
# analysis assuming positivity
# we request bootstrap SE estimate as well:
sol <- coxph.RT(T~ageg, right=R, data=s, bs=FALSE)
sol$summary # print the summary of fit based on the analytic Asymptotic Standard Error estimate

[Package coxrt version 1.0.3 Index]