survaalen function

Fit an additive hazards model

Fit an additive hazards model

Fits the Aalen additive hazard model. The function can be used for multi-state model data (as in the package mstate; class msdata) by supplying the start and stop times in the Surv object and adding a strata(trans) object in the formula (where trans denotes the transition in the multi-state model).

survaalen(formula, data, variance = FALSE, var_estimator = "dN")

Arguments

  • formula: a formula object, with the response as a Surv object on the left of a ~ operator, and, if desired, terms separated by the + operator on the right.
  • data: a data.frame in which to interpret the variables named in the formula.
  • variance: a logical value indicating whether the variances of the hazards should be computed. Default is FALSE.
  • var_estimator: Choose variance estimator. The default option 'dN' uses dN(t) in the variance formula, see formula 4.63 in Aalen et al. (2008). Option 'XdB' uses X*dB(t), see formula 4.64 in Aalen et al. (2008).

Returns

An object of class aalen.model.

Examples

# Survival: data(rdata) mod <- survaalen(Surv(time, cens)~sex+age, data=rdata) head(mod$coefficients) tail(mod$coefficients) # Multi-state model: data(ebmt1wide) mod <- survaalen(Surv(Tstart, Tstop, status)~age.1+age.2+age.3+strata(trans), data=ebmt1wide) head(mod$coefficients$trans1) head(mod$coefficients$trans2) head(mod$coefficients$trans3)

See Also

rsaalen

Author(s)

Damjan Manevski

  • Maintainer: Damjan Manevski
  • License: GPL (>= 2)
  • Last published: 2025-01-28

Useful links