ahaz {ahaz}R Documentation

Fit semiparametric additive hazards model

Description

Fit a semiparametric additive hazards regression model. Right-censored and left-truncated survival data are supported.

Usage

ahaz(surv, X, weights, univariate=FALSE, robust=FALSE)  

Arguments

surv

Response in the form of a survival object, as returned by the function Surv() in the package survival. Right-censoring and left-truncation is supported. Tied survival times are not supported.

X

Design matrix. Missing values are not supported.

weights

Optional vector of observation weights. Default is 1 for each observation.

univariate

Fit all univariate models instead of the joint model. Default is univar = FALSE.

robust

Robust calculation of variance. Default is robust = FALSE.

Details

The semiparametric additive hazards model specifies a hazard function of the form:

h(t) = h_0(t) + \beta' Z_i

for i=1,\ldots,n where Z_i is the vector of covariates, \beta the vector of regression coefficients and h_0 is an unspecified baseline hazard. The semiparametric additive hazards model can be viewed as an additive analogue of the well-known Cox proportional hazards regression model.

Estimation is based on the estimating equations of Lin & Ying (1994).

The option univariate is intended for screening purposes in data sets with a large number of covariates. It is substantially faster than the standard approach of combining ahaz with apply, see the examples.

Value

An object with S3 class "ahaz".

call

The call that produced this object.

nobs

Number of observations.

nvars

Number of covariates.

D

A nvars x nvars matrix (or vector of length nvars if univar = TRUE).

d

A vector of length nvars; the regression coefficients equal solve(D,d).

B

An nvars x nvars matrix such that D^{-1} B D^{-1} estimates the covariance matrix of the regression coefficients. If robust=FALSE then B is estimated using an asymptotic approximation; if robust=TRUE then B is estimated from residuals, see residuals.

univariate

Is univariate=TRUE?

data

Formatted version of original data (for internal use).

robust

Is robust=TRUE?

References

Lin, D.Y. & Ying, Z. (1994). Semiparametric analysis of the additive risk model. Biometrika; 81:61-71.

See Also

summary.ahaz, predict.ahaz, plot.ahaz. The functions coef, vcov, residuals.

Examples

data(sorlie)

# Break ties
set.seed(10101)
time <- sorlie$time+runif(nrow(sorlie))*1e-2

# Survival data + covariates
surv <- Surv(time,sorlie$status)
X <- as.matrix(sorlie[,15:24])

# Fit additive hazards model
fit1 <- ahaz(surv, X)
summary(fit1)

# Univariate models
X <- as.matrix(sorlie[,3:ncol(sorlie)])
fit2 <- ahaz(surv, X, univariate = TRUE)
# Equivalent to the following (slower) solution
beta <- apply(X,2,function(x){coef(ahaz(surv,x))})
plot(beta,coef(fit2))


[Package ahaz version 1.15 Index]