Description Usage Arguments Details Value References See Also Examples
Returns an object of class "aareg"
that
represents an Aalen model.
1 2 3 4 
formula 
a formula object, with the response on the left of a ‘~’ operator and
the terms,
separated by 
data 
data frame in which to interpret the variables named in the

weights 
vector of observation weights. If supplied, the fitting algorithm
minimizes the sum of the weights multiplied by the squared residuals
(see below for additional technical details). The length of

subset 
expression specifying which subset of observations should be used in the fit. Th is can be a logical vector (which is replicated to have length equal to the numb er of observations), a numeric vector indicating the observation numbers to be included, or a character vector of the observation names that should be included. All observations are included by default. 
na.action 
a function to filter missing data. This is applied to the

qrtol 
tolerance for detection of singularity in the QR decomposition 
nmin 
minimum number of observations for an estimate; defaults to 3 times the number of covariates. This essentially truncates the computations near the tail of the data set, when n is small and the calculations can become numerically unstable. 
dfbeta 
should the array of dfbeta residuals be computed. This implies computation
of the sandwich variance estimate.
The residuals will always be computed if there is a

taper 
allows for a smoothed variance estimate.
Var(x), where x is the set of covariates, is an important component of the
calculations for the Aalen regression model.
At any given time point t, it is computed over all subjects who are still
at risk at time t.
The tape argument allows smoothing these estimates,
for example 
test 
selects the weighting to be used, for computing an overall “average” coefficient vector over time and the subsequent test for equality to zero. 
model, x, y 
should copies of the model frame, the x matrix of predictors, or the response vector y be included in the saved result. 
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 timedependent intercept term, X is the vector of covariates for the subject (possibly timedependent), and B(t) is a timedependent matrix of coefficients. The estimates are inherently nonparametric; 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.
The taper
argument can also be used to smooth
out the tail of the curve.
In practice, the addition of a taper such as 1:10 appears to have little
effect on death times when n is still reasonably large, but can considerably
dampen wild occilations in the tail of the plot.
an object of class "aareg"
representing the fit, with the following components:
n 
vector containing the number of observations in the data set, the number of event times, and the number of event times used in the computation 
times 
vector of sorted event times, which may contain duplicates 
nrisk 
vector containing the number of subjects at risk, of the
same length as 
coefficient 
matrix of coefficients, with one row per event and one column per covariate 
test.statistic 
the value of the test statistic, a vector with one element per covariate 
test.var 
variancecovariance matrix for the test 
test 
the type of test; a copy of the 
tweight 
matrix of weights used in the computation, one row per event 
call 
a copy of the call that produced this result 
Aalen, O.O. (1989). A linear regression model for the analysis of life times. Statistics in Medicine, 8:907925.
Aalen, O.O (1993). Further results on the nonparametric linear model in survival analysis. Statistics in Medicine. 12:15691588.
print.aareg, summary.aareg, plot.aareg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  # Fit a model to the lung cancer data set
lfit < aareg(Surv(time, status) ~ age + sex + ph.ecog, data=lung,
nmin=1)
## Not run:
lfit
Call:
aareg(formula = Surv(time, status) ~ age + sex + ph.ecog, data = lung, nmin = 1
)
n=227 (1 observations deleted due to missing values)
138 out of 138 unique event times used
slope coef se(coef) z p
Intercept 5.26e03 5.99e03 4.74e03 1.26 0.207000
age 4.26e05 7.02e05 7.23e05 0.97 0.332000
sex 3.29e03 4.02e03 1.22e03 3.30 0.000976
ph.ecog 3.14e03 3.80e03 1.03e03 3.70 0.000214
Chisq=26.73 on 3 df, p=6.7e06; test weights=aalen
plot(lfit[4], ylim=c(4,4)) # Draw a plot of the function for ph.ecog
## End(Not run)
lfit2 < aareg(Surv(time, status) ~ age + sex + ph.ecog, data=lung,
nmin=1, taper=1:10)
## Not run: lines(lfit2[4], col=2) # Nearly the same, until the last point
# A fit to the mulitpleinfection data set of children with
# Chronic Granuomatous Disease. See section 8.5 of Therneau and Grambsch.
fita2 < aareg(Surv(tstart, tstop, status) ~ treat + age + inherit +
steroids + cluster(id), data=cgd)
## Not run:
n= 203
69 out of 70 unique event times used
slope coef se(coef) robust se z p
Intercept 0.004670 0.017800 0.002780 0.003910 4.55 5.30e06
treatrIFNg 0.002520 0.010100 0.002290 0.003020 3.36 7.87e04
age 0.000101 0.000317 0.000115 0.000117 2.70 6.84e03
inheritautosomal 0.001330 0.003830 0.002800 0.002420 1.58 1.14e01
steroids 0.004620 0.013200 0.010600 0.009700 1.36 1.73e01
Chisq=16.74 on 4 df, p=0.0022; test weights=aalen
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.