Re: [R] controlling for number of elements in each node of the tree in mvpart

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Fri, 29 Feb 2008 22:21:06 +0000

On Fri, 2008-02-29 at 16:48 -0500, shu zhang wrote:
> Still about the mvpart.
> Is there any way I can control for the number of elements in each node
> in the function mvpart? Specifically, how can I ask partition to
> ignore node with elements less than 10?

mvpart is just a wrapper to (a modified version of) rpart so you control these aspects of the fit in the same way as univariate trees. In this case, look at ?rpart.control and argument minsplit. It won't ignore those nodes, but it won't split a node with fewer than minsplit observations in it.

HTH G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
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.
Received on Fri 29 Feb 2008 - 22:29:02 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 Fri 29 Feb 2008 - 22:30:17 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