[R] Conditional distribution plot using Model-based Recursive Partitioning

From: Alan Fernihough <alan.fernihough_at_gmail.com>
Date: Thu, 05 May 2011 15:59:37 +0100


I am using the party module to estimate the relationship between the probability of being a student and number of siblings (alive). However, I need to include a number of relevant covariates. My code is below:

fm3 <- mob(Student ~ age + alive + sex2 + cwa + cha + cym | Religion+Servant + Literacy, control = ctrl, data = samp2, model = glinearModel, family =binomial())
plot(fm3, tp_args = list(which = "alive"),tnex = 2, type = "simple" )

Which works fine. However, the plots generated do not show the conditional relationship between the dependent and independent variable at each node. Basically, there are spinogram leafs at nodes where the unconditional relationship is the opposite to the conditional relationship -- as given in the summary tables.

I have tried playing around with the plot function arguements, yet to no avail.

Can anybody suggest to me a way which I would be able to plot the tree and have either a conditional spinogram in the leaf or even just text with a number showing a marginal effect or coefficient please?



Alan Fernihough
IRCHSS Scholar
UCD School of Economics

	[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 05 May 2011 - 15:04:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 May 2011 - 15:15:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive