[R] ctree for suvival analysis problem
ofraam
ofraam at bgu.ac.il
Thu May 17 13:46:46 CEST 2012
Hi All,
I'm using the party package to grow conditional inference trees for survival
analysis.
When I used party version party_0.9-9991 everything worked well, but when I
update to party_1.0-2 (due to using 64bit R), I get an error. For simplicity
I will show the error I get for the example in the party documentation:
### survival analysis
if (require("ipred")) {
data("GBSG2", package = "ipred")
GBSG2ct <- ctree(Surv(time, cens) ~ .,data = GBSG2)
plot(GBSG2ct)
treeresponse(GBSG2ct, newdata = GBSG2[1:2,])
}
for the plot(GBSG2ct) line I get the following error:
Error in Summary.Surv(c(1814, 2018, 712, 1807, 772, 448, 2172, 2161, 471, :
Invalid operation on a survival time
and for treeresponse(GBSG2ct, newdata = GBSG2[1:2,]) I get this error:
Error: extends(class(y), "Surv") is not TRUE
(I care more about treeresponse but assume it is related).
Any help would be highly appreciated!
Thanks,
Ofra
--
View this message in context: http://r.789695.n4.nabble.com/ctree-for-suvival-analysis-problem-tp4630362.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list