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
6
votes
2 answers

What does MICE LoggedEvents mean?

I am trying to run a multiple imputation using the mice function (from the package of the same name) in R. I get a Warning that events have been logged. Here is the output from mice(.)$loggedEvents from my MWE (see below): it im dep meth out 1 1 …
6
votes
1 answer

Running mice with a formula as a variable: instant evaluation instead of later evaluation?

The R package micecomes with following example: library("mice") imp <- mice(nhanes) fit <- with(data=imp,exp=lm(bmi~hyp+chl)) I want a flexible call of with() like: model_formula <- bmi~hyp+chl fit <- with(data=imp,exp=lm(model_formula)) But this…
Qaswed
  • 3,649
  • 7
  • 27
  • 47
6
votes
2 answers

Imputation using mice with clustered data

So I am using the mice package to impute missing data. I'm new to imputation so I've got to a point but have run into a steep learning curve. To give a toy example: library(mice) # Using nhanes dataset as example df1 <- mice(nhanes, m=10) So as you…
user2498193
  • 1,072
  • 2
  • 13
  • 32
6
votes
1 answer

Plot Multiple Imputation Results

I have successfully completed a multiple imputation on the missing data of my questionnaire research using the MICE package in R and performed a linear regression on the pooled imputed variables. I can't seem to work out how to extract single pooled…
Frank Zafka
  • 829
  • 9
  • 30
6
votes
3 answers

How to extract aggregated imputed data from R-package 'mice'?

I have a question regarding the aggregation of imputed data as created by the R-package 'mice'. As far as I understand it, the 'complete'-command of 'mice' is applied to extract the imputed values of, e.g., the first imputation. However, when…
user4624133
  • 69
  • 1
  • 2
6
votes
1 answer

Memory shortage when using MICE in R

I'm trying to create multiple imputations in R with the MICE package but kepp running out of memory. This is the error message I get: Error: cannot allocate vector of size 219 Kb In addition: Warning messages: 1: In unlist(vlist, recursive = FALSE,…
5
votes
0 answers

Multilevel Multiple Imputation (MICE) with categorical/factor variable?

I have a dataset where I am trying to use multiple imputation with the packages mice, miceadds and micemd for a categorical/factor variable in a multilevel setting. I am able to use the method 2l.2stage.pois for a continuous variable, which works…
Marco Pastor Mayo
  • 803
  • 11
  • 25
5
votes
2 answers

What exactly does complete in mice do?

I am researching how to use multiple imputation results. The following is my understanding, and please let me know if there're mistakes. Suppose you have a data set with missing values, and you want to conduct a regression analysis. You may perform…
RyanKao
  • 321
  • 1
  • 5
  • 14
5
votes
3 answers

mice package in R, mipo object does not return variance covariance matrix anymore after updating to mice 3.0

My code stopped working after updating the mice (Multiple Equations by Chained Equations) package to version >3. I wish to retrieve the estimated variance-covariance matrix from linear regressions on multiply imputed datasets. This quantity (which…
user3679030
  • 153
  • 1
  • 6
5
votes
1 answer

Error in mice when trying to impute multilevel data

I've been struggling with a problem in mice trying to impute multilevel data with missing data on both levels. It took me some time but I finally managed to recreate the error, which seems to occur when mice tries to create logged events in the…
Niek
  • 1,594
  • 10
  • 20
5
votes
0 answers

Pooled Regression Results using mice, caret, and glmnet

Not sure if this more of a statistics question but the closest similar problem I could find is here, although I couldn't get it to work for my case. I am trying to develop a pooled, penalized logistic regression model. I used mice to create a…
Jay
  • 51
  • 2
5
votes
1 answer

R MICE imputation failing

I am really baffled about why my imputation is failing in R's mice package. I am attempting a very simple operation with the following data frame: dfn <- read.table(text = "a b c d 0 1 0 1 1 0 0 0 0 0 0 0 NA 0 0 0 0 0 0 NA", header =…
mjnichol
  • 361
  • 1
  • 3
  • 11
4
votes
1 answer

How import the saved mice/mids object from a file

I am looking for a way to export the mice object to a file such that I could load it back in the future for further analysis. I found some information about using miceadds::write.mice.imputation to save the data to local files. I also find a similar…
user1285419
  • 2,183
  • 7
  • 48
  • 70
4
votes
0 answers

Using mice inputed data sets in GLM analysis; can pooled model fit indices be obtained?

I used mice to impute five missing data sets, saved as the object "allImputations" in the code below. I then needed to complete linear and dichotomous regression analyses across the imputed data sets (see below for a successful…
Clar_k
  • 41
  • 2
4
votes
2 answers

How do I impute missing values only if certain conditions met in MICE?

I am struggling with using MICE for a dataset. There is a variable that is definitely contingent on another variable and I can't work out how to get MICE to impute only some of the missing values in one variable (and leave the others as genuinely…
richardb
  • 73
  • 6
1
2
3
36 37