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

Description Usage Arguments Details Value See Also Examples

View source: R/coxrt_functions.R

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

1
2
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.

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.

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:
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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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

coxrt documentation built on Jan. 11, 2020, 9:39 a.m.