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).
The first application on missing blood pressure data (Buuren, Boshuizen, and Knook 1999).
Term Fully Conditional Specification describes a general class of methods that specify imputations model for multivariate data as a set of conditional distributions (Buuren et al. 2006).
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 …
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…
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…
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…
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…
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,…
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…
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…
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…
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…
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…
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 =…
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…
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…
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…