| Aareg {tram} | R Documentation |
Aalen Additive Hazards Model
Description
Aalen model with fully parameterised hazard function
Usage
Aareg(formula, data, subset, weights, offset, cluster, na.action = na.omit, ...)
Arguments
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of weights to be used in the fitting
process. Should be |
offset |
this can be used to specify an _a priori_ known component to
be included in the linear predictor during fitting. This
should be |
cluster |
optional factor with a cluster ID employed for computing clustered covariances. |
na.action |
a function which indicates what should happen when the data
contain |
... |
additional arguments to |
Details
This function allows simultaneous estimation of the cumulative hazard parameterised by a Bernstein polynomial. The model is typically fitted with time-varying coefficients, all types of random censoring and trunction are allowed.
The responses is bounded (bounds = c(0, Inf)) when specified as a
Surv object. Otherwise, bounds can be specified via
....
Value
An object of class Aareg, with corresponding coef,
vcov, logLik, estfun, summary,
print, plot and predict methods.
References
Torsten Hothorn, Lisa Moest, Peter Buehlmann (2018), Most Likely Transformations, Scandinavian Journal of Statistics, 45(1), 110–134, doi:10.1111/sjos.12291.
Examples
data("GBSG2", package = "TH.data")
library("survival")
GBSG2$time <- as.numeric(GBSG2$time)
GBSG2$y <- with(GBSG2, Surv(time, cens))
### Cox proportional hazards model
m1 <- Coxph(y ~ horTh, data = GBSG2, support = c(1, 1500))
logLik(m1)
### Aalen additive hazards model with time-varying effects
m2 <- Aareg(y | horTh ~ 1, data = GBSG2, support = c(1, 1500))
logLik(m2)
### compare the hazard functions
nd <- data.frame(horTh = unique(GBSG2$horTh))
col <- 1:2
lty <- 1:2
plot(as.mlt(m1), newdata = nd, type = "hazard",
col = col, lty = lty[1], xlab = "time")
plot(as.mlt(m2), newdata = nd, type = "hazard",
col = col, lty = 2, add = TRUE)
legend("topright", col = rep(col, each = 2),
lty = rep(1:2), bty = "n",
legend = paste(rep(paste("horTh:",
levels(nd$horTh)), each = 2),
rep(c("Cox", "Aalen"), 2)))