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

Convert dataframe to mids using mice in R

I have use mice to impute data, save the data as csv, and then run a Factor Analysis in SPSS and generated some factors. I now want to load the csv in R and run an imputed linear regression on the data. However, when I try to convert the dataframe…
Nico Biagi
  • 21
  • 6
-1
votes
1 answer

replicate the result of `mice()` using library(Hmisc) in R

Below, I've used library(mice) to multiply impute 5 datasets from my data.frame popmis. Then, I performed my desired analysis with() all those 5 imputed datasets and finally pool() across those analyses. Question: Is it possible to replicate the…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
-1
votes
1 answer

R MICE Imputation

data=data.frame("student"=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5), "time"=c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4), "v1"=c(16,12,14,12,17,16,12,12,13,12,16,16,10,10,14,17,17,12,10,11), "v2"=c(1,1,3,2,2,2,3,1,2,1,2,1,3,1,1,2,3,3,1,2), "v3"=c(4,1,…
bvowe
  • 3,004
  • 3
  • 16
  • 33
-1
votes
1 answer

use name_repair for mids object in mice

I have a set of 5 datasets that were generated through multiple imputation using the mice package. I'm running a hierarchical regression on these datasets, but when I try to pool the results, I get an error that "Column 6 must be named" and to use…
J.Sabree
  • 2,280
  • 19
  • 48
-1
votes
1 answer

Creating a function to take in dataframe name and column in R

I would like to create a function that will let me input the dataframe name and column and return the rowmeans of its imputation values (have already carried out imputation through mice for each of the columns #fillNA values for columns fillna_func…
Emm
  • 2,367
  • 3
  • 24
  • 50
-1
votes
1 answer

Using imputation models created from amelia or mice in R for new data

Suppose I run one of the missing variable imputation R packages, amelia or mice (or similar), on a large data frame -- let's say 100000 rows and 50 columns -- to get imputations for one particular column with some (let's say 200) NAs in it. Is there…
bioniclime
  • 47
  • 5
-1
votes
1 answer

Multiple imputation separated by gpoup

In my data example data=structure(list(groupvar = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 1L), v1 = c(27L, 52L, 92L, 86L, NA, 19L, 94L, NA, 26L, 94L, NA, 58L, 96L, 74L, 8L,…
psysky
  • 3,037
  • 5
  • 28
  • 64
-1
votes
1 answer

How can I use rowSums() after multiple imputation with MICE package in R

I have a short question: I imputed item data using multiple imputation with the MICE package. After imputation, I would like to sum items to a total score. However, my data is now in a mids object, and I can't figure out how to do this simple…
L. Bakker
  • 147
  • 1
  • 13
-1
votes
1 answer

can mice() handle crr()? Fine-Gray model

My doubt is if it is possible to pool multiple imputation data set, from "mice()", on a fit model of Fine-Gray from "crr()", and if it is statistically correct... example library(survival) library(mice) library(cmprsk) test1 <-…
-1
votes
2 answers

Error while importing mice functions in R package

I would like to include the mice::mice function in my package to perform imputation on my data. I use Roxygen to list imports #' @param data dataset to be used for imputation #' @importFrom dplyr select_ #' @importFrom mice mice complete #' @return…
mickkk
  • 1,172
  • 2
  • 17
  • 38
-4
votes
1 answer

Replacement of NAs for in the variable?

Good evening, I have dataset where there is one variable which is Gender with missing data. Could anyone please help me how could i replace these NAs using R Packages. I have tried the "Mice" package however it does not replace the NAs and its…
P Kumar
  • 1
  • 2
1 2 3
36
37