Learn R Programming

mets (version 1.3.11)

aalenMets: Fast Additive Hazards Model with Robust Standard Errors

Description

Fits a fast Lin-Ying additive hazards model with a possibly stratified baseline. Robust variance is the default variance estimate in the summary.

Usage

aalenMets(formula, data = data, no.baseline = FALSE, ...)

Value

An object of class "aalenMets" (extends "phreg") containing:

coef

Estimated coefficients.

var

Robust variance-covariance matrix.

iid

Influence functions.

intZHZ

Integrated ZHZ matrix.

gamma

Coefficient estimates.

Arguments

formula

Formula with a 'Surv' outcome (similar to coxph).

data

Data frame.

no.baseline

Logical; if TRUE, fits the model without baseline hazard estimation.

...

Additional arguments passed to phreg.

Author

Thomas Scheike

Details

Influence functions (IID) follow the numerical order of the given cluster variable. Ordering by $id aligns the IID terms with the dataset order.

Examples

Run this code
data(bmt)
bmt$time <- bmt$time + runif(408) * 0.001
out <- aalenMets(Surv(time, cause == 1) ~ tcell + platelet + age, data = bmt)
summary(out)

## Comparison with timereg::aalen
## out2 <- timereg::aalen(
##   Surv(time, cause == 1) ~ const(tcell) + const(platelet) + const(age),
##   data = bmt
## )
## summary(out2)

Run the code above in your browser using DataLab