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
3
votes
1 answer

How to use mice for multiple imputation of missing values in longitudinal data?

I have a dataset with a repeatedly measured continuous outcome and some covariates of different classes, like in the example below. Id y Date Soda Team 1 -0.4521 1999-02-07 Coke Eagles 1 0.2863 1999-04-15 …
3
votes
1 answer

multiple imputation, lmer, and pooling ggeffects objects

I computed linear mixed effects models using lme4::lmer() on data that I multiply imputed using the mice package. On these lmer objects, I want to apply ggeffects::ggeffect() to get marginal effects that I can then plot for mean, +1sd and -1sd. The…
riepenha
  • 31
  • 4
3
votes
2 answers

plotting an interaction term in moderated regression using MICE imputation

I'm using imputed data to test a series of regression models, including some moderation models. Imputation imp_data <- mice(data,m=20,maxit=20,meth='cart',seed=12345) I then convert this to long format so I can recode / sum variables as needed,…
pandfny
  • 33
  • 4
3
votes
0 answers

R Error when I use mice::pool function: "Error: No tidy method for objects of class lmerMod"

On my linux server, I want to use mice::pool to combine results obtained from multiple lmer fits with multiply imputed data. However, I get this error: Error: No tidy method for objects of class lmerMod However, if I run the code on my local…
Kejin Wu
  • 31
  • 1
3
votes
1 answer

How to use a multiply imputed data set (mids) object in a foreach loop in R?

I am trying to use parallel computation to compute percentile bootstrap 95% confidence intervals for least absolute deviations regression parameters, as explained in this article. However, I am not using a single data frame, but rather a multiply…
Dion Groothof
  • 1,406
  • 5
  • 15
3
votes
1 answer

Supply lavaan.mi object (runMI(), semTools) to semPaths (semPlot) in r

I am trying to supply a lavaan.mi object (a SEM modelling multiple-imputed data using runMI() from semTools 0.5-2.) to semPaths() (semPlot 1.1.2). Doing so returns the error: Error in (function (classes, fdef, mtable) : unable to find an…
pienkowski
  • 61
  • 7
3
votes
1 answer

Error while using mice function: nothing left to impute

I tried to fill my NA data in data frame. I made simple data: library(mice) first <- c(1,2,3,4,5,NA,7,8,9,NA) second<- c(1,2,NA,4,5,6,7,NA,9,10) sample_data <- data.frame(first,second) imp2 <- mice(sample_data) I got this message Error in…
3
votes
1 answer

How to impute only one or some columns with mice R

I am experimenting with the mice package in R and am curious about how i can leave columns out of the imputation. If i want to run a mean imputation on just one column, the mice.impute.mean(y, ry, x = NULL, ...) function seems to be what I would…
MadMan
  • 65
  • 1
  • 7
3
votes
0 answers

How to perform Mixed Design ANOVA on MICE imputed data in R?

I have a question about performing a Mixed Design ANOVA in R after multiple imputation using MICE. My data is as follows: id <- c(1,2,3,4,5,6,7,8,9,10) group <- c(0,1,1,0,0,1,0,0,0,1) measure_1 <- c(60,80,90,54,60,61,77,67,88,90) measure_2 <-…
Anna_70
  • 91
  • 1
  • 7
3
votes
1 answer

Include ID variable in imputed data frame

I'm using library(mice) to impute missing data. I want a way to tell mice that the ID variables should be included on the imputed data set but not used for the imputations. For instance #making a silly data frame with missing…
tomw
  • 3,114
  • 4
  • 29
  • 51
3
votes
1 answer

Individual AUC after multiple imputation using MICE

I have a question about calculating an AUC for every individual in a dataset, after imputation using MICE. I know how I can do it in a complete cases dataset. I have done it as follows: id <- c(1,2,3,4,5,6,7,8,9,10) measure_1 <-…
Anna_70
  • 91
  • 1
  • 7
3
votes
1 answer

How to use predict function with my pooled results from mice()?

Hi I just started using R as part of a module in school. I have a data set with missing data and I have used mice() to impute the missing data. I'm now trying to use the predict function with my pooled results. However, I observed the following…
Elijah
  • 31
  • 1
  • 2
3
votes
1 answer

How to extract AIC and Log Likelihood from pooled GLM?

I've imputed data using the MICE package. Now I would like to present the results of a GLM based on the pooled data. This is how I came up with the data: data.imputed <- mice(data, m=5, maxit = 50, method = 'pmm', seed = 500) And this is what I…
Tea Tree
  • 882
  • 11
  • 26
3
votes
1 answer

multinominal regression with imputed data

I need to impute missing data and then coduct multinomial regression with the generated datasets. I have tried using mice for the imputing and then multinom function from nnet for the multnomial regression. But this gives me unreadable output. …
Branners
  • 63
  • 1
  • 9
3
votes
1 answer

Time lag analysis on list of imputed datasets

My question and data is similar to the post in: Loop Through Data with Sequential Time Lags output Linear Regression Coefficients set.seed(242) df<- data.frame(month=order(seq(1,248,1),decreasing=TRUE), psit=c(79,1, NA, 69, 66, 77, 76, 93, NA, 65…
Danielle
  • 785
  • 7
  • 15