Re: [R] Mean or mode imputation fro missing values

2011-10-12 Thread Petr PIKAL
Hi > > Yes thank you Gu… > I am just trying to do this as a rough step and will try other > imputation methods which are more appropriate later. > I am just learning R, and was trying to do the for loop and > f-statement by hand but something is going wrong… > > This is what I have until now: >

Re: [R] Mean or mode imputation fro missing values

2011-10-11 Thread francesca casalino
Yes thank you Gu… I am just trying to do this as a rough step and will try other imputation methods which are more appropriate later. I am just learning R, and was trying to do the for loop and f-statement by hand but something is going wrong… This is what I have until now: *fake array: age<-

Re: [R] Mean or mode imputation fro missing values

2011-10-11 Thread Weidong Gu
In your case, it may not be sensible to simply fill missing values by mean or mode as multiple imputation becomes the norm this day. For your specific question, na.roughfix in randomForest package would do the work. Weidong Gu On Tue, Oct 11, 2011 at 8:11 AM, francesca casalino wrote: > Dear R e

[R] Mean or mode imputation fro missing values

2011-10-11 Thread francesca casalino
Dear R experts, I have a large database made up of mixed data types (numeric, character, factor, ordinal factor) with missing values, and I am looking for a package that would help me impute the missing values using  either the mean if numerical or the mode if character/factor. I maybe could use