Re: [R] rpart package: why does predict.rpart require values for "unused" predictors?

2012-08-02 Thread Jason Roberts
Jean, Thanks for your quick reply and suggestions! > In the help file for predict.rpart it says, "The predictors referred to in > the right side of formula(object) must be present by name in newdata." I was aware of that statement from the help file. I wondered about the reason for that require

[R] rpart package: why does predict.rpart require values for "unused" predictors?

2012-08-01 Thread Jason Roberts
After fitting and pruning an rpart model, it is often the case that one or more of the original predictors is not used by any of the splits of the final tree. It seems logical, therefore, that values for these "unused" predictors would not be needed for prediction. But when predict() is called on s

[R] Party package: varimp(..., conditional=TRUE) error: term 1 would require 9e+12 columns

2011-10-14 Thread Jason Roberts
I would like to build a forest of regression trees to see how well some covariates predict a response variable and to examine the importance of the covariates. I have a small number of covariates (8) and large number of records (27368). The response and all of the covariates are continuous variable

[R] How to fit model in function using passed-in formula, then predict from another function

2011-08-03 Thread Jason Roberts
Hello R experts, I am trying to fit an lme model within a function, using a formula that I passed into the function, and then predict that model from a different function. Could you please advise me on how to do this? The following code illustrates the essence of what I'm trying to do. The actu