Re: [R] Specifying Splits WhenUusing rpart

From: Terry Therneau <therneau_at_mayo.edu>
Date: Fri, 20 May 2011 08:06:07 -0500


> I'd like to force rpart to use a specific variable, namely "spec" as
> the first split and then allow it to proceed as usual. Is there a way
> to do this?

  You can often get this effect by using the "cost" argument. Make the variable in question have very low cost.

Terry Therneau



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 20 May 2011 - 13:08:45 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 20 May 2011 - 13:20:07 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