cox.aalen {timereg}R Documentation

Fit Cox-Aalen survival model

Description

Fits an Cox-Aalen survival model. Time dependent variables and counting process data (multiple events per subject) are possible.

λ_{i}(t) = Y_i(t) ( X_{i}^T(t) α(t) ) exp(Z_{i}^T β )

The model thus contains the Cox's regression model as special case.

Resampling is used for computing p-values for tests of time-varying effects. Test for proportionality is considered by considering the score processes for the proportional effects of model.

The modelling formula uses the standard survival modelling given in the survival package.

Usage

cox.aalen(formula=formula(data),data=sys.parent(),beta=0,Nit=10,detail=0,
start.time=0,max.time=NULL,id=NULL,clusters=NULL,n.sim=500,residuals=0,
robust=1,weighted.test=0,covariance=0,resample.iid=0,weights=NULL,rate.sim=1,
beta.fixed=0)

Arguments

formula a formula object with the response on the left of a '~' operator, and the independent terms on the right as regressors. The response must be a survival object as returned by the `Surv' function. Terms with a proportional effect are specified by the wrapper prop(), and cluster variables (for computing robust variances) by the wrapper cluster().
data a data.frame with the variables.
start.time start of observation period where estimates are computed.
max.time end of observation period where estimates are computed. Estimates thus computed from [start.time, max.time]. Default is max of data.
robust to compute robust variances and construct processes for resampling. May be set to 0 to save memory.
id For timevarying covariates the variable must associate each record with the id of a subject.
clusters cluster variable for computation of robust variances.
n.sim number of simulations in resampling.
weighted.test to compute a variance weighted version of the test-processes used for testing time-varying effects.
residuals to returns residuals that can be used for model validation in the function cum.residuals. Estimated martingale increments (dM) and corresponding time vector (time).
covariance to compute covariance estimates for nonparametric terms rather than just the variances.
resample.iid to return i.i.d. representation for nonparametric and parametric terms.
beta starting value for relative risk estimates
Nit number of iterations for Newton-Raphson algorithm.
detail if 0 no details is printed during iterations, if 1 details are given.
weights weights for weighted analysis.
rate.sim rate.sim=1 such that resampling of residuals is based on estimated martingales and thus valid in rate case, rate.sim=0 means that resampling is based on counting processes and thus only valid in intensity case.
beta.fixed option for computing score process for fixed relative risk parameter

Details

The data for a subject is presented as multiple rows or 'observations', each of which applies to an interval of observation (start, stop]. For counting process data with the )start,stop] notation is used the 'id' variable is needed to identify the records for each subject. The program assumes that there are no ties, and if such are present random noise is added to break the ties.

Value

returns an object of type "cox.aalen". With the following arguments:

cum cumulative timevarying regression coefficient estimates are computed within the estimation interval.
var.cum the martingale based pointwise variance estimates.
robvar.cum robust pointwise variances estimates.
gamma estimate of parametric components of model.
var.gamma variance for gamma.
robvar.gamma robust variance for gamma.
residuals list with residuals.
obs.testBeq0 observed absolute value of supremum of cumulative components scaled with the variance.
pval.testBeq0 p-value for covariate effects based on supremum test.
sim.testBeq0 resampled supremum values.
obs.testBeqC observed absolute value of supremum of difference between observed cumulative process and estimate under null of constant effect.
pval.testBeqC p-value based on resampling.
sim.testBeqC resampled supremum values.
obs.testBeqC.is observed integrated squared differences between observed cumulative and estimate under null of constant effect.
pval.testBeqC.is p-value based on resampling.
sim.testBeqC.is resampled supremum values.
conf.band resampling based constant to construct robust 95% uniform confidence bands.
test.procBeqC observed test-process of difference between observed cumulative process and estimate under null of constant effect over time.
sim.test.procBeqC list of 50 random realizations of test-processes under null based on resampling.
covariance covariances for nonparametric terms of model.
B.iid Resample processes for nonparametric terms of model.
gamma.iid Resample processes for parametric terms of model.
loglike approximate log-likelihood for model, similar to Cox's partial likelihood. Only computed when robust=1.
D2linv inverse of the derivative of the score function.
score value of score for final estimates.
test.procProp observed score process for proportional part of model.
var.score variance of score process (optional variation estimator for beta.fixed=1 and robust estimator otherwise).
pval.Prop p-value based on resampling.
sim.supProp re-sampled absolute supremum values.
sim.test.procProp list of 50 random realizations of test-processes for proportionality under the model based on resampling.

Author(s)

Thomas Scheike

References

Martinussen and Scheike, Dynamic Regression Models for Survival Data, Springer (2006).

Examples

library(survival)
data(sTRACE)
# Fits Cox model 
out<-cox.aalen(Surv(time,status==9)~prop(age)+prop(sex)+
prop(vf)+prop(chf)+prop(diabetes),sTRACE,max.time=7,n.sim=500)

# makes Lin, Wei, Ying test for proportionality
summary(out)
par(mfrow=c(2,3))
plot(out,score=1) 

# Fits Cox-Aalen model 
out<-cox.aalen(Surv(time,status==9)~prop(age)+prop(sex)+
vf+chf+prop(diabetes),sTRACE,max.time=7,n.sim=500)

summary(out)
par(mfrow=c(2,3))
plot(out)

[Package timereg version 1.1-7 Index]