"aareg"
that
represents an Aalen model.
aareg(formula, data=<<see below>>, weights=<<see below>>, subset=<<see below>>, na.action, qrtol=1e-07, nmin, dfbeta=F, test = c('aalen', 'nrisk'), model=F, x=F, y=F)
~
operator and
the terms,
separated by
+
operators, on the right.
The response must be a
Surv
object.
Due to a particular computational approach that is used, the model
MUST include an intercept term. If "-1" is used in the model
formula the program will ignore it.
formula
,
subset
, and
weights
arguments. This may also be a single number to handle
some special cases -- see below for details. If
data
is missing, the variables in the
model formula should be in the search path.
weights
must be the same as the number of
observations. The weights must be nonnegative and it is recommended
that they be strictly positive, since zero weights are ambiguous. To
exclude particular observations from the model, use the
subset
argument instead of zero weights.
model.frame
after any
subset
argument has been applied. The
default is
na.fail
, which returns an
error if any missing values are found. An alternative is
na.exclude
, which deletes observations
that contain one or more missing values.
cluster
term in the model formula.
"aareg"
representing the fit.
The Aalen model assumes that the cumulative hazard H(t) for a subject can be expressed as a(t) + X B(t), where a(t) is a time-dependent intercept term, X is the vector of covariates for the subject (possibly time-dependent), and B(t) is a time-dependent matrix of coefficients. The estimates are inherently non-parametric; a fit of the model will normally be followed by one or more plots of the estimates. The estimates may become unstable near the tail of a data set, since the increment to B at time t is based on the subjects still at risk at time t. The tolerance and/or nmin parameters may act to truncate the estimate before the last death.
Aalen, O. O. (1989). A linear regression model for the analysis of life times. Statistics in Medicine 8, 907-925.
Aalen, O. O. (1993). Further results on the non-parametric linear model in survival analysis. Statistics in Medicine 12, 1569-1588.
Therneau, T. and Grambsch, P. (2000). Modeling Survival Data: Extending the Cox Model. New York: Springer.
# Fit a model to the lung cancer data set lfit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, data=lung, action=na.omit) lfit # Prints: # n=227 (1 observations deleted due to missing values) # 136 out of 138 unique event times used # # slope coef se(coef) z p # Intercept 5.05e-03 5.87e-03 4.74e-03 1.240 0.216000 # age 4.01e-05 7.15e-05 7.23e-05 0.989 0.323000 # sex -3.16e-03 -4.03e-03 1.22e-03 -3.310 0.000935 # ph.ecog 3.01e-03 3.67e-03 1.02e-03 3.610 0.000303 # # Chisq=26.18 on 3 df, p=8.7e-06; test weights=aalen plot(lfit[4]) # Draw a plot of the function for ph.ecog
# A fit to the multiple-infection data set of children with # Chronic Granuomatous Disease. See section 8.5 of # Therneau and Grambsch (2000). fita2 <- aareg(Surv(tstart, tstop, status) ~ rx + age + inherit + steroids + cluster(id), data=cgd1) fit2a # Prints: # n= 203 # 69 out of 70 unique event times used # # slope coef se(coef) robust se z p # Intercept 0.012800 0.040600 0.021300 0.019600 2.08 0.037800 # rx -0.002520 -0.010100 0.002290 0.003020 -3.36 0.000787 # age -0.000101 -0.000317 0.000115 0.000117 -2.70 0.006840 # inherit 0.001330 0.003830 0.002800 0.002420 1.58 0.114000 # steroids -0.004620 -0.013200 0.010600 0.009700 -1.36 0.173000 # # Chisq=16.74 on 4 df, p=0.0022; test weights=aalen