additive.pls {timereg}R Documentation

Fits PLS for additive hazards model

Description

Fits the partial least squares estimator for the additive risk model. Time dependent variables and counting process data (multiple events per subject) are possible.

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

Covariates Z_1,...,Z_p, fixed covariates F(t). Algorithm : 1) For pls components X_1,...,X_K, fits

λ_0(t) + α^T(t) F(t) + sum_{j=1}^K X_j(t) gamma_j(t) + Z_i(t) β_i^{K+1}

for i=1,...,p 2) compute new pls components X_{K+1} = sum β_i^{K+1} Z_i(t) and iterate.

Usage

additive.pls(formula = formula(data), data =
sys.parent(), start.time=0,max.time=NULL,id=NULL, pls.dim=1, 
scale=FALSE, weighted.pls=0,silent=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.
The const terms are kept as fixed covariates that are not involved in the pls variable reduction. This may be covariates that are know to be of clinical importance.
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.
id For timevarying covariates the variable must associate each record with the id of a subject.
pls.dim number of pls components
scale to center and scale the covariates
weighted.pls Gartwaith weights if 1.
silent set to 1 to avoid printing of warnings for non-inverible design-matrices for different timepoints, default is 0.

Details

const() specifies the F(t) covariates in the above model.

Value

returns an object with the following arguments:

baseline baseline of the semparametric additive risk model
pls.comp the pls components, i.e. the covariates multipled on the beta coefficients.
beta risk regression coefficients related to the pls components.
beta.pls regression coefficients that defines the pls componets.
tbeta.pls the combined regression coefficients from the pls components and the regression coefficients, these leads to risk predictions when applied to new covariates.

Author(s)

Thomas Scheike

References

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

Martinussen and Scheike, The Aalen additive hazards model with high-dimensional regressors, (2009), Lifetime Data Anal.

Examples

data(mypbc)
pbc<-mypbc
pbc$time<-pbc$time+runif(418)*0.1; pbc$time<-pbc$time/365
pbc<-subset(pbc,complete.cases(pbc));
covs<-as.matrix(pbc[,-c(1:3,6)])
covs<-cbind(covs[,c(1:6,16)],log(covs[,7:15]))
covs<-scale(covs);

### 5 PLS components for the 16 covariates 
### based on Gui-Li approach with constant effects
out<-additive.pls(Surv(time,status>=1)~covs,pbc,max.time=7,pls.dim=5)

### survival predictions
par(mfrow=c(1,3))
pout=predict.pls(out,Z=covs)
matplot(pout$times,t(pout$surv[1:20,]),type="l",ylim=c(0,1),xlab="time",ylab="survival")

### cross-validated number of pls components

outcv<-pls.surv.cv(Surv(time,status>=1)~covs,pbc,max.time=7,pls.dims=0:2)
plot(outcv$pls.dims,outcv$cv,type="l")

out2<-additive.pls(Surv(time,status>=1)~covs,pbc,max.time=7,
pls.dim=outcv$cv.dim)

pout=predict.pls(out2, Z= covs)
matplot(pout$times,t(pout$surv[1:20,]),type="l",ylim=c(0,1),
xlab="time",ylab="survival")

### 2 PLS components for the 3 covariates 
### age and sex are fixed covariates 
data(sTRACE)
out<-additive.pls(Surv(time,status==9)~const(age)+const(sex)+
vf+diabetes+chf,sTRACE,max.time=7,pls.dim=2,silent=1)

[Package timereg version 1.2-2 Index]