Dear
S users:
I
ran into a minor question recently when I used RPART library (http://www.stats.ox.ac.uk/pub/S/S+6/)
to develop survival trees. My Splus
is version 6.2 based on Linux.
My
understanding is that the “where” variable in the fitted model
should contain the #code of the terminal nodes, but it does not (see below). Did
I miss anything in the documentation? Many thanks!
>
fit2<-rpart(Surv(t, cen)~……,
data="" cp=0.01)
> print(fit2)
1) root 1309
956.22140 1.0000000
2) c>=554.35
956 495.65270 0.6112466
4) g<
54.5 438 151.44680 0.3263974
8) d< 0.6375 414 111.40080 0.2362070 *
9) d>=0.6375 24
26.99685 1.6767380 *
5) g>=54.5
518 327.74550 0.8840053
10) d< 0.2975 189
70.41894 0.4046790 *
11) d>=0.2975 329 244.85950 1.1946230 *
3) c<
554.35 353 401.67170 2.0416440
6) p<
27.65625 312 316.47580 1.7135160
12) c>=506.4 277 247.53830 1.4669180 *
13) c< 506.4 35
59.02539 3.5131440 *
7) p>=27.65625
41 71.36904 4.0764780 *
> sort(unique(fit2$where))
[1] 4 5
7 8 11 12 13
>
Feng Gao, Ph.D.
Division of Biostatistics, Washington University School of Medicine
Campus Box 8067, 660 S. Euclid Av.
St. Louis, MO 63110-1093
Phone: 314-362-3682
Fax: 314-362-3728
The materials contained in this e-mail are private and confidential and are the
property of the sender. If you are not the intended recipient, be advised
that any unauthorized use, disclosure, copying, distribution, or the taking of
any action in reliance on the contents of this information is strictly
prohibited. If you have received this e-mail transmission in error,
please immediately notify the sender.