[R] What does the function treeresponse from the praty package do exactly?

Verena Hoffmann hoffmann at ibe.med.uni-muenchen.de
Mon Aug 16 18:17:15 CEST 2010


Hello R-list!

I'm developing a prognostic model  for a medical problem (event yes/no).

So I used the patrty package and did a Random Forest:
ctrl <- cforest_unbiased(ntree=1000, mtry=3, minsplit=100)
set.seed(675)
rf <- cforest( ph ~. , data=train, controls=ctrl)
print(rf)
and calculated the individual remissionprobabilities:
wktrf <- treeresponse(rf)

Now my questions:
1. What does treeresponse exactly do here?
Does it calculate the arithmetic mean of the class probabilities of the 
end nodes the patient belongs to for all trees in the forest for each 
patient?
2. As I want only two risk groups I used ctree on the probability for 
the event which I got from treeresponse to get the optimal cutpoint. Is 
this a good approach?

Maybe someone can help?

Thanks a lot,
Verena Hoffmann


More information about the R-help mailing list