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

R: data imputation divided by gender

I have dataset mydat=structure(list(sex = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), emotion = c(20L, 15L, 49L, NA, 34L, 35L, 54L, 45L), IQ = c(101L, 98L, 105L, NA, 123L, 120L, 115L, NA)), .Names = c("sex", "emotion", "IQ"), class = "data.frame",…
psysky
  • 3,037
  • 5
  • 28
  • 64
0
votes
1 answer

How to use multiple imputed data for further analysis in SVM and ANN?

My original data contains some missing values and I used multiple imputation to fill them. My next objective is to use these data in SVM and ANN. I originally thought MI would give me a "pooled" completed dataset but it turned out that MI only gives…
Jake9226
  • 1
  • 1
0
votes
0 answers

How to get all imp values (R mice) in a data frame

I have used the mice package for calculating imputations (10 iterations, 5 imputations). Because I am new to this area, my 'methodologist' - who is very patient with me! - want to judge the imputed values (so not the completed sets). I can't seem to…
Marlein
  • 115
  • 2
  • 8
0
votes
1 answer

Complete mice function results don't match with $imp

I'm running an imputation in mice and something strange is happening with the complete function. If I display the results using $imp from my object for a specific variable these are my results: head(mice.train$imp$ViolentCrimesPerPop) Now I…
0
votes
1 answer

R: How does mice() know which variable to impute?

I came across some code studying machine learning in R leveraging the Vanderbilt Titanic dataset available HERE. It is part of a class without a live instructor or additional resources to answer my own question. The ultimate goal of this exercise is…
Richard Golz
  • 361
  • 2
  • 3
  • 16
0
votes
0 answers

R: Understanding variable selection in MICE for imputing data

EDIT: This is not a course with a live instructor and I cannot ask him directly in any way. If it were, I wouldn't be wasting your time here. I am taking an R class that is dealing with the basics of machine learning. We are working with the…
Richard Golz
  • 361
  • 2
  • 3
  • 16
0
votes
1 answer

Imputation based on factor level

I am trying to perform imputation with MICE on the following dataframe. marketValue <- c(NA, 234234, NA, 243243, NA, NA, 234523, NA, 232427, 112214) bathrooms <- c(3,3,2,3,5,4,1,5,6,3) garageSqFt <- c(400, 385, 454, 534, 210, NA, 342, 423, 535,…
0
votes
1 answer

multiple imputation and multigroup SEM in R

I want to perform multigroup SEM on imputed data using the R packages mice and semTools, specifically the runMI function that calls Lavaan. I am able to do so when imputing the entire dataset at once, but whilst trawling through…
S Atkins
  • 3
  • 3
0
votes
0 answers

error in MICE package

Sorry, I'm new to stats and r, so my terminology is probably wrong. I'm trying to conduct a multiple imputation by chained equations, with the package mice. When I run it, I immediately get the error: 'Error in cor(xobs[, keep, drop = FALSE], use =…
Conn
  • 1
  • 2
0
votes
0 answers

Error when using MICE package

I am using the MICE package to impute missing values in financial time series data (Foreign Exchange Rates). The mice() imputation worked fine for all my data sets except one. I get the following error when I try to use mice(): Error in cor(xobs[,…
Schalk Burger
  • 58
  • 1
  • 11
0
votes
1 answer

predict after multiple imputation in R

I used the mice package in R to perform multiple imputation for my data: ### multiple inputation by chained equations imp.data <- mice(data, maxit = 5, m = 5, seed = 92385, print = F) I want to run a logistic regression model after the MI, and…
mandy
  • 483
  • 9
  • 20
0
votes
1 answer

Running chi-square for multiply-imputed data / extracting estimates from a list of lists

I have run mice to create 50 imputed datasets. Now, I am trying to compute chi-square statistics for some of my variables. It is possible to obtain individual estimates for each dataset: list <- with(imp, chisq.test(var1, var2, correct =…
C_H
  • 191
  • 14
0
votes
1 answer

Binary logistic regression with multiply imputed data

I have been trying to work with options available within R (i.e. MICE) to do binary logistic regression analyses (with interaction between continuous and categorical predictors). However, I am struggling to carry out this simple analysis on multiply…
user81715
  • 67
  • 1
  • 1
  • 11
0
votes
0 answers

How can I use mice() and get results with no error?

I have data (pisa_math_tot) that is stored as a list. I want to impute the missing data using the mice function from the mice package. mice starts with a data frame containing missing data and returns an object containing several complete datasets…
Hisham
  • 35
  • 7
0
votes
0 answers

R Server very slow with mice

I have a problem with the R server. I have a dataset with 25000 rows and I want to impute the missing values. When I test this on my local computer (Windows 7, R version 3.4) there is no problem. It takes a few minutes to run the code: mice(data =…
Steffi K
  • 3
  • 1