coxph.RT {coxrt} | R Documentation |
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 |
bs |
logical value: if |
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: |
coef
a vector of coefficientsexp.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 H0:\beta
i = 0CI.U
upper confidence limit for two-sided hypothesis H0:\beta
i = 0pvalue
p-value from a Wald test for a two-sided hypothesis H0:\beta
i = 0pvalue.H1.b.gr0
p-value from the Wald test for a one-sided partial hypothesis H0:\beta
i\le 0
based on the analytical asymptotic standard error estimatepvalue.H1.b.le0
p-value from the Wald test a for one-sided partial hypothesis H0:\beta
i\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 distributionvar
estimated variancesummary
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 H0:\beta
i = 0;CI.U
, a quantile estimated upper confidence limit for two-sided hypothesis H0:\beta
i = 0;CI.L.H1.b.gr0
, a quantile estimated the limit for one-sided hypothesis H0:\beta
i\le 0
;CI.U.H1.b.le0
, a quantile estimated the limit for one-sided hypothesis H0:\beta
i\ge 0
.
See Also
Examples
# 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