Re: [R] predict() an rpart() model: how to ignore missing levels in a factor

2010-11-19 Thread jamessc
many thanks - that's perfect, excluding records on a rep-by-rep basis is what I was just hoping for but I probably didn't explain myself that well! James -- View this message in context:

[R] predict() an rpart() model: how to ignore missing levels in a factor

2010-11-18 Thread jamessc
I am using an algorigm to split my data set into two random sections repeatedly and constuct a model using rpart() on one, test on the other and average out the results. One of my variables is a factor(crop) where each crop type has a code. Some crop types occur infrequently or singly. when the

[R] best predictive model for mixed catagorical/continuous variables

2010-10-24 Thread jamessc
Would anybody be able to advise on which package would offer the best approach for producing a model able to predict the probability of species occupation based upon a range of variables, some of them catagorical (eg. ten soil types where the numbers assigned are not related to any