Closed statunizaga closed 3 years ago
Hi, im gonna show you what i was talking about. Try this: require(miceRanger) require(dplyr)
data(iris) set.seed(1) ampIris <- amputeData(iris,perc=0.25)
ampIris$id <- 1:150 miceObj <- miceRanger(ampIris,verbose=FALSE,returnModels = TRUE) set.seed(1) i1 = impute(ampIris,miceObj)
set.seed(1) ampIris2 <- ampIris %>% filter(id==1) %>% bind_rows(ampIris %>% filter(id!=1) %>% head(15)) i2 = impute(ampIris2,miceObj)
ampIris %>% filter(id==1)
i1$imputedData$Dataset_3 %>% filter(id==1)
i2$imputedData$Dataset_3 %>% filter(id==1)
you can see that for the same observation has different imputed values in petal.length and even setting the seed.
Hi, im gonna show you what i was talking about. Try this: require(miceRanger) require(dplyr)
Creating 2 data sets with the same observation
data(iris) set.seed(1) ampIris <- amputeData(iris,perc=0.25)
ampIris$id <- 1:150 miceObj <- miceRanger(ampIris,verbose=FALSE,returnModels = TRUE) set.seed(1) i1 = impute(ampIris,miceObj)
set.seed(1) ampIris2 <- ampIris %>% filter(id==1) %>% bind_rows(ampIris %>% filter(id!=1) %>% head(15)) i2 = impute(ampIris2,miceObj)
Selecting the id =1
ampIris %>% filter(id==1)
i1$imputedData$Dataset_3 %>% filter(id==1)
i2$imputedData$Dataset_3 %>% filter(id==1)
you can see that for the same observation has different imputed values in petal.length and even setting the seed.