ahaz.adjust {ahaz}R Documentation

Adjusted univariate association measures from ahaz

Description

Fast calculation of univariate association measures in the semiparametric additive risk model, adjusted for user-specified covariates

Usage

ahaz.adjust(surv, X, weights, idx, method=c("coef", "z", "crit"))

Arguments

surv

Response in the form of a survival object, as returned by the function Surv() in the package survival. Right-censored and counting process format (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.

idx

Vector specifying the indices of the covariates to adjust for.

method

The type of adjusted association measure to calculate. See details.

Details

The function is intended mainly for programming use and screening purposes, when a very large number of covariates are considered and direct application of ahaz is unfeasible.

Running this function is equivalent to running ahaz with design matrix cbind(X[,i],X[,idx]) for each column X[,i] in X. By utilizing basic matrix identities, ahaz.adjust runs many times faster.

The following univariate association measures are currently implemented:

Value

A list containing the following elements:

call

The call that produced this object.

idx

A copy of the argument idx.

adj

Adjusted association statistic, as specified by method. Entries with index in idx are set to NA.

See Also

ahaz, ahaz.partial, ahazisis.

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[,3:ncol(sorlie)])

# Adjust for first 10 covariates
idx <- 1:10
a <- ahaz.adjust(surv,X,idx=idx)

# Compare with (slower) solution
b <- apply(X[,-idx],2,function(x){coef(ahaz(surv,cbind(x,X[,idx])))[1]})
plot(b,a$adj[-idx])

[Package ahaz version 1.15 Index]