[R] ctree (party) - select a specific variable in the first split

Achim Zeileis Achim.Zeileis at uibk.ac.at
Tue Apr 2 09:01:50 CEST 2013

On Mon, 1 Apr 2013, Salvatore Loguercio wrote:

> Hello,
> My question is related to ctree() function from the library 'party'.

See fortune(58).

> Is there a way to force ctree() to use a specific variable in the first 
> split?

No way that does this automatically.

> I am asking because the first split contains two variables with very 
> similar scores, and choosing the alternative variable would induce a 
> tree somewhat easier to interpret.

If both variables are closely correlated and you believe one of the 
variables to be more meaningful for partitioning, then omit the other from
tree construction.

Alternatively, you can grow two trees in the two subsets based on the 
first variable.


> Thanks,
> Sal
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list