Learn R Programming

coxrt (version 1.0.3)

coxph.RT: Fits Cox Regression Model Using Right Truncated Data

Description

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.

Usage

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

Arguments

formula

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

right

a right truncation variable.

data

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.

bs

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.

nbs.rep

number of bootstrap replications. The default number is 500.

conf.int

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

Value

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:
  • coef a vector of coefficients

  • exp.coef exponent of regression coefficients (=hazard ratio)

  • SE asymptotic standard error estimate based on the analytic formula derived in Vakulenko-Lagun et al. (2018)

  • CI.L lower confidence limit for two-sided hypothesis \(\beta\) = 0

  • CI.U upper confidence limit for two-sided hypothesis \(\beta\) = 0

  • pvalue p-value from a Wald test for a two-sided hypothesis \(\beta\) = 0

  • pvalue.H1.b.gr0 p-value from the Wald test for a one-sided partial hypothesis \(\beta\)\(\le 0\) based on the analytical asymptotic standard error estimate

  • pvalue.H1.b.le0 p-value from the Wald test a for one-sided partial hypothesis \(\beta\)\(\ge 0\) based on the analytical asymptotic standard error estimate

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:

  • num.bs.rep number of bootsrap replications used to obtain the sample distribution

  • var estimated variance

  • summary a data frame with a summary of bootstrap distribution that includes: SE, a bootstrap estimated standard error; CI.L, a quantile estimated lower confidence limit for two-sided hypothesis \(\beta\) = 0; CI.U, a quantile estimated upper confidence limit for two-sided hypothesis \(\beta\) = 0; CI.L.H1.b.gr0, a quantile estimated the limit for one-sided hypothesis \(\beta\)\(\le 0\); CI.U.H1.b.le0, a quantile estimated the limit for one-sided hypothesis \(\beta\)\(\ge 0\).

Details

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.

See Also

coxph.RT.a0, coxrt, coxph

Examples

Run this code
# NOT RUN {
# loading AIDS data set
library(gss)
data(aids)
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
sol$summary # print the summary of fit based on the analytic Asymptotic Standard Error estimate

# }

Run the code above in your browser using DataLab