Re: [R] Problems using rfImpute

2008-05-05 Thread Birgit Lemcke
Thank you James that you saved me from a huge mistake using NA as level. I specified now na.strings="NA" $ Sex: Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ... $ outLatTep_like_other : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 1 2 2

Re: [R] Problems using rfImpute

2008-05-05 Thread James Reilly
The values NA and "NA" are different. The first is treated as missing; the second is not. For example, > table(factor(c(NA,"0","1","NA","NA"))) 0 1 NA 1 1 2 I suspect you have "NA" where you want NA, and this is causing your problem. James -- James Reilly Department of Statistics, Unive

[R] Problems using rfImpute

2008-05-05 Thread Birgit Lemcke
Hello R-user! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) I tried rfImpute (randomForest) and as far as I understood should it replace NA`s using a proximity matrix: > set.seed(10) > Subset5Imputed<-rfImpute(Sex~., data=Subset5) ntree OOB