About "Tutorial on 5 Powerful R Packages used for imputing missing values"


#1

Hi!

I was trying to run MICE package, explained here.

In one of the last sections of MICE package explanation, I think I found a code error.

You can read:

"Since there are 5 imputed data sets, you can select any using complete() function.

#get complete data ( 2nd out of 5)
> completeData <- complete(imputed_Data,2)

Also, if you wish to build models on all 5 datasets, you can do it in one go using with() command. You can also combine the result from these models and obtain a consolidated output using pool() command.

#build predictive model
> fit <- with(data = iris.mis, exp = lm(Sepal.Width ~ Sepal.Length + Petal.Width))

#combine results of all 5 models
> combine <- pool(fit)> summary(combine)"
and you should read:

"Since there are 5 imputed data sets, you can select any using complete() function.

#get complete data ( 2nd out of 5)
> completeData <- complete(imputed_Data,2)

Also, if you wish to build models on all 5 datasets, you can do it in one go using with() command. You can also combine the result from these models and obtain a consolidated output using pool() command.

#build predictive model HERE
> fit <- with(data = imputed_Data, exp = lm(Sepal.Width ~ Sepal.Length + Petal.Width))

#combine results of all 5 models
`> combine <- pool(fit)

summary(combine)`"

Am I right? I tried with Iris dataset in one and other way, and I think last way is the correct way.

Thank you.

Regards.