[R] Proportion of 1's in terminal nodes of CTREE()

Preetam Pal lordpreetam at gmail.com
Thu May 26 21:33:05 CEST 2016


Hi R-users,

I have created a Conditional Tree using the ctree function ( in package
partykit). The data had a factor - the y variable - and a host  of
categorical x-variables.
Now, I want to find the proportion of cases where y = 1 in each of the
terminal nodes.

Is it possible to do so programmatically?


*Tree <- ctree( y~., data = mydata, ctree_control = c(maxdepth = 4))*

Regards,
Preetam

	[[alternative HTML version deleted]]



More information about the R-help mailing list