Beruflich Dokumente
Kultur Dokumente
library(mice)
library(VIM)
library(lattice)
data(nhanes)
str(nhanes)
nhanes$age=as.factor(nhanes$age)
md.pattern(nhanes)
mice_imputes$method
mice_imputes$imp$chl
#Imputed dataset
Imputed_data=complete(mice_imputes,5)
densityplot(mice_imputes)
lm_5_model=with(mice_imputes,lm(chl~age+bmi+hyp))
#Use the pool() function to combine the results of all the models
library(mice)
library(VIM)
library(lattice)
data(nhanes)
# First look at the data
str(nhanes)
nhanes$age=as.factor(nhanes$age)
md.pattern(nhanes)
mice_imputes$method
mice_imputes$imp$chl
#Imputed dataset
Imputed_data=complete(mice_imputes,5)
densityplot(mice_imputes)
lm_5_model=with(mice_imputes,lm(chl~age+bmi+hyp))
#Use the pool() function to combine the results of all the models
combo_5_model=pool(lm_5_model)