I'm using decision trees in R, with

    ctree.dt <- ctree(Pasillo_Ataque_2T ~ Dist_Col_1T + Dist_1T_2T, data=dt)

This produces:

enter image description here

It's correct, but I'd like ctree to start with the root node Dist_Col_1T, not Dist_1T_2T like in the image.

In SPSS, I can force start a tree with a specific node variable.


1 Answer 1


In the party package (or its recommended reimplementation in the partykit package) this is not directly possible. You would have to first estimate the root stump with only the desired variable and maxdepth = 1. And then you would have to make separate ctree() calls in the resulting subsamples.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.