Questions tagged [r-mice]

Multiple imputation using Fully Conditional Specification (FCS) implemented by the MICE algorithm. Each variable has its own imputation model. Built-in imputation models are provided for continuous data (predictive mean matching, normal), binary data (logistic regression), unordered categorical data (polytomous logistic regression) and ordered categorical data (proportional odds).

mice is an package for R, written by Stef van Buuren. The mice package implements a method to deal with [tag: missing data].

Repositories

Vignettes (Overview)

Further reading

Other resources

Related packages

Related tags

551 questions
4
votes
1 answer

Imputation methods in mice - correlation in data set. R

Im struggling with an imputation using mice. The main objective is to impute NAs (if possible by group). As the sample is a bit large to simple post here it is downloadable: https://drive.google.com/open?id=1InGJ_M7r5jwQZZRdXBO1MEbKB48gafbP My…
Juan
  • 171
  • 1
  • 12
4
votes
3 answers

mice: glm.fit: algorithm did not converge

I have a dataset with about 12 categorical variables with levels ranging from 2 - 10, as well as other numerical variables. About 280 records. I'm using the mice package in r to perform imputation on the missing data with all default settings.…
ayePete
  • 411
  • 1
  • 7
  • 23
4
votes
2 answers

Multiple imputation in R (mice) - How do I test imputation runs?

I work with a data set of 171 observations of 55 variables with 35 variables having NA's that I want to impute with the mice function: imp_Data <- mice(Data,m=5,maxit=50,meth='pmm',seed=500) imp_Data$imp Now, having the 5 imputation runs, I don't…
Marie-Lu
  • 41
  • 2
4
votes
2 answers

Stripplot in MICE does not show categorical variables

I´m using the mice package in R to do multiple imputation. I´ve done several imputations with only numerical variables, the imputation method is predictive mean matching, and when I use stripplot(imp) I get to see the observed and imputed values of…
4
votes
2 answers

Can I pool imputed random effect model estimates using the mi package?

It appears that the mi package has had a pretty big rewrite at some point within the past couple of years. The "old" way of doing things is well-outlined in the following tutorial: http://thomasleeper.com/Rcourse/Tutorials/mi.html The "new" way of…
joemienko
  • 2,220
  • 18
  • 27
4
votes
1 answer

Creating training dataset with .mids object in R

I have data with missing components, so I've run the mice algorithm (from package mice). The function returns a .mids object, which I want to split into a training and a test dataset to assess model fit. I want the training and test data to be of…
hodgenovice
  • 624
  • 3
  • 14
4
votes
1 answer

recode mice mids object

I have a mids object created from mice. I would like to recode some imputed variables and retain the mids object. I know that I could convert the mids object to "long" with complete(), but I want to keep the mids object since it has some additional…
Eric Green
  • 7,385
  • 11
  • 56
  • 102
4
votes
1 answer

How to find RMSE by using loop in R

If I have a data frame contain 3 variables : origdata <- data.frame( age <- c(22, 45, 50, 80, 55, 45, 60, 24, 18, 15), bmi <- c(22, 24, 26, 27, 28, 30, 27, 25.5, 18, 25), hyp <- c(1, 2, 4, 3, 1, 2, 1, 5, 4, 5) ) I created MCAR…
zhyan
  • 261
  • 4
  • 14
4
votes
2 answers

Pooling glmers of imputed datasets

The problem: I have a dataset, with some missing predictor values. I'd like to pool glmer models together which have been applied to these imputation sets. I'm using the mice package to create the imputations (I've also used amelia and mi too with…
4
votes
1 answer

R - How to run prcomp on imputed data from MICE package

I'm uncertain on how I would run a PCA analysis via prcomp after running the mice function in R If I run: imp <- mice(Data, maxit = 20, m = 5) It is my understanding that I now have 5 imputations of the data. In the JSS Buuren paper they then…
Michael
  • 41
  • 3
4
votes
0 answers

Mice pool() function and coxph(): in mice.df (...) : large sample assumed?

I used the coxph() function from the survival package in multiply imputed dataset and encountered a warning when trying to pool the results. The warning message states: "In mice.df(m, lambda, dfcom, method) : Large sample assumed. A reproducible…
Jeroen Hoogland
  • 133
  • 1
  • 9
4
votes
1 answer

Using mice in R changes dummy coding

I'm trying to use the mice package in R for a project and discovered that the pooled results seemed to change the dummy code I had for one of the variables in the output. To elaborate, let's say I have a factor, foo, with two levels: 0 and 1. Using…
dmartin
  • 643
  • 1
  • 6
  • 14
4
votes
1 answer

'Leading minor of order % is not positive definite' error in MICE

When running mice in R with a rather large set of data (30 categorical predictors and predicted variables, n = 1000), I get the following error: Error in chol.default(fit.sum$cov.unscaled) : the leading minor of order 17 is not positive definite I…
tomka
  • 2,516
  • 7
  • 31
  • 45
3
votes
2 answers

AUC of logistic and ordinal model following multiple imputation using MICE (with R)

I am asking a question concerning the additive predictive benefit of the inclusion of a variable to a logistic and an ordinal model. I am using mice to impute missing covariates and am having difficulty finding ways to calculate the AUC and R…
DW1310
  • 147
  • 7
3
votes
1 answer

R - Combine two mice mids objects when data frames have different columns

I'm using the mice package on two different but related data frames. While the large majority of the variables are the same for both data frames, a small number of variables are unique to each data frame and the imputation happens for both data…
Rasul89
  • 588
  • 2
  • 5
  • 14
1 2
3
36 37