[R] RPART: Including the expense of predictor variables

2013-01-10 Thread Lee Frederick Schroeder
I know that rpart has a complexity parameter that adjusts the number of nodes in a model. I also know that a loss function allows one to weight misclassifications of different types. However, some of my predictor variables are much more expensive dollar-wise to use than others. Is there a way to

[R] Fitting a predefined classification tree

2012-12-19 Thread Lee Frederick Schroeder
Hi, I've searched R-help and haven't found an answer. I have a set of data from which I can create a classification tree using rpart. However, what I'd like to do is predefine the blank structure of the binary tree (i.e., which nodes to include) and then use a package like rpart to fit for the