survival
survival copied to clipboard
FR: More documentation on `aareg`
Dear Terry,
I was trying to understand aareg
output/inputs through survival
documentation beyond ?aareg
, coming to
The
timereg
package is a much more comprehensive implementation of the Aalen model, so this document will say little aboutaareg
in survival
vignette. Unfortunately, the output of timereg::aalen
does not seem to have much to do with that of aareg
and after a quite deep search on the web for comparisons between the 2 functions I couldn't find anything. For example,
- where I can found the outputs of both functions in the other ones?
- how
dfbeta
relates to the input (as Chisq and other values change ifdfbeta = FALSE
) and is this option available somehow intimereg::aalen
? - does
Chisq
correspond to some value oftimereg::aalen
? Which test is it evaluating? (I mean, in the Aalen's book Survival and Event History Analysis I found many test statistics "chi-squared distributed", with which of them would it correspond?) - should I look maybe to the
test.statistic
value ofaareg
?
library(survival)
afit <- aareg(
Surv(time, status) ~ age + sex + ph.ecog,
data = lung,
dfbeta = TRUE
)
afit
Call:
aareg(formula = Surv(time, status) ~ age + sex + ph.ecog, data = lung,
dfbeta = TRUE)
n=227 (1 observation deleted due to missingness)
136 out of 138 unique event times used
slope coef se(coef) robust se z p
Intercept 5.05e-03 5.87e-03 4.74e-03 0.00477 1.23 0.219000
age 4.01e-05 7.15e-05 7.23e-05 0.00007 1.02 0.307000
sex -3.16e-03 -4.03e-03 1.22e-03 0.00123 -3.28 0.001030
ph.ecog 3.01e-03 3.67e-03 1.02e-03 0.00102 3.62 0.000299
Chisq=22.84 on 3 df, p=4.36e-05; test weights=aalen
summary(afit)
$table
slope coef se(coef) robust se z p
Intercept 5.048983e-03 5.868616e-03 4.739162e-03 4.771021e-03 1.230055 0.2186766165
age 4.005089e-05 7.149015e-05 7.228889e-05 6.996847e-05 1.021748 0.3069001400
sex -3.164485e-03 -4.030555e-03 1.217949e-03 1.227954e-03 -3.282333 0.0010295209
ph.ecog 3.009913e-03 3.673470e-03 1.016785e-03 1.015845e-03 3.616171 0.0002989931
$test
[1] "aalen"
$test.statistic
Intercept age sex ph.ecog
1.901744 108.155068 -19.531696 33.158152
$test.var
b0
b0 2.358499 -151.80330 -3.715147 2.157013
-151.803299 11960.36511 16.697824 -277.142084
-3.715147 16.69782 34.834385 -5.183630
2.157013 -277.14208 -5.183630 84.233750
$test.var2
[,1] [,2] [,3] [,4]
[1,] 2.390315 -149.43604 -4.237668 1.406427
[2,] -149.436042 11204.85060 69.078254 -169.293859
[3,] -4.237668 69.07825 35.409086 -12.726907
[4,] 1.406427 -169.29386 -12.726907 84.078078
$chisq
[,1]
[1,] 22.84047
$n
[1] 227 136 138
attr(,"class")
[1] "summary.aareg"
out <- aalen(
Surv(time, status) ~ age + sex + ph.ecog,
data = lung
)
summary(out)
Additive Aalen Model
Test for nonparametric terms
Test for non-significant effects
Supremum-test of significance p-value H_0: B(t)=0
(Intercept) Inf 0
age Inf 0
sex Inf 0
ph.ecog Inf 0
Test for time invariant effects
Kolmogorov-Smirnov test p-value H_0:constant effect
(Intercept) 2.5200 0.338
age 0.0468 0.205
sex 0.6830 0.358
ph.ecog 0.4970 0.401
Cramer von Mises test p-value H_0:constant effect
(Intercept) 436.000 0.536
age 0.212 0.278
sex 84.600 0.221
ph.ecog 40.100 0.337
Call:
aalen(formula = Surv(time, status) ~ age + sex + ph.ecog, data = lung)
Many thanks!
By the way, as you can see in the summary(afit)
output, it seems that S3method(print, summary.aareg)
should be included in the NAMESPACE file.
Thanks!