Hi, there: I have a question on predict() function. I built a set of trees using rpart and when I do prediction, I got the following error: Error in model.frame.default(Terms, newdata, na.action = act, xlev = attr(object , : factor V19 has new level(s) 45 Execution halted
I think the problem is caused by a new level (which is not used in building trees) for V19. I am wondering if there is an argument in predict() which can help suppress this error by just ignoring this special observation in validation sample. If not, I can do some pre-treatment to remove the obs with new level out for the time being. Thanks, -- Weiwei Shi, Ph.D "Did you always know?" "No, I did not. But I believed..." ---Matrix III ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html