Re: [R] How to deal with missing values when using Random Forrest

2012-03-01 Thread Kevin Corry
Hi, Thanks for your help, This worked very well: na.action=na.roughfix Kevin On Sun, Feb 26, 2012 at 3:10 PM, Weidong Gu wrote: > Hi, > > You can set na.action=na.roughfix which fills NAs with the mean or > mode of the missing variable. > > Other option is to impute missing values using rfIm

Re: [R] How to deal with missing values when using Random Forrest

2012-02-26 Thread Weidong Gu
Hi, You can set na.action=na.roughfix which fills NAs with the mean or mode of the missing variable. Other option is to impute missing values using rfImpute, then run randomForest on the complete data set. Weidong Gu On Sat, Feb 25, 2012 at 6:24 PM, kevin123 wrote: > I am using the package Ran

Re: [R] How to deal with missing values when using Random Forrest

2012-02-25 Thread David Winsemius
On Feb 25, 2012, at 6:24 PM, kevin123 wrote: I am using the package Random Forrest to test and train a model, I aim to predict (LengthOfStay.days),: library(randomForest) model <- randomForest( LengthOfStay.days~.,data = training, + importance=TRUE, + keep.forest=TRUE + ) *This is a small