Last chance! 50% off unlimited learning
Sale ends in
"aareg"
that
represents an Aalen model.aareg(formula, data, weights, subset, na.action,
qrtol=1e-07, nmin, dfbeta=FALSE, taper=1,
test = c('aalen', 'variance', 'nrisk'),
model=FALSE, x=FALSE, y=FALSE)
+
operators, on the right.
The response must be a Surv
object.
Due to a particular computational approach that is used, the model
MUformula
,
subset
, and weights
arguments.
This may also be a single number to handle
some speci al cases -- see below for details. If
data
is misweights
must be the same as the number of
obsermodel.fr ame
after any
subset
argument has be en applied. The
default is na.fail
, which returns a n
error if any missing values are found. An alternative is
<cluster
term in the model formula."aareg"
representing the fit, with the following components:times
test
argument
aboveAalen, O.O (1993). Further results on the non-parametric linear model in survival analysis. Statistics in Medicine. 12:1569-1588.
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.
# Fit a model to the lung cancer data set
lfit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, data=lung,
nmin=1)
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.26e-03 5.99e-03 4.74e-03 1.26 0.207000
age 4.26e-05 7.02e-05 7.23e-05 0.97 0.332000
sex -3.29e-03 -4.02e-03 1.22e-03 -3.30 0.000976
ph.ecog 3.14e-03 3.80e-03 1.03e-03 3.70 0.000214
Chisq=26.73 on 3 df, p=6.7e-06; test weights=aalen
plot(lfit[4], ylim=c(-4,4)) # Draw a plot of the function for ph.ecog
lfit2 <- aareg(Surv(time, status) ~ age + sex + ph.ecog, data=lung,
nmin=1, taper=1:10)
lines(lfit2[4], col=2) # Nearly the same, until the last point
# A fit to the mulitple-infection 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)
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.30e-06
treatrIFN-g -0.002520 -0.010100 0.002290 0.003020 -3.36 7.87e-04
age -0.000101 -0.000317 0.000115 0.000117 -2.70 6.84e-03
inheritautosomal 0.001330 0.003830 0.002800 0.002420 1.58 1.14e-01
steroids 0.004620 0.013200 0.010600 0.009700 1.36 1.73e-01
Chisq=16.74 on 4 df, p=0.0022; test weights=aalen
Run the code above in your browser using DataLab