search for: c2001

Displaying 1 result from an estimated 1 matches for "c2001".

Did you mean: 2001
2010 Nov 18
1
predict() an rpart() model: how to ignore missing levels in a factor
...infrequently or singly. when the data set is randomly split, it may be that the first data set has a crop type which is not present in the second and so using predict() I get the error: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = attr(object, : factor 'factor(c2001)' has new level(s) 13, 24, 35 where c2001 is the crop. I would like the predict function to ignore these records. is there a command which will allow this as part of the predict() function? With those with a small number of records (eg. 3-4), I would hope some of the models would have the righ...