The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:multiple_imputation_with_mice_and_metafor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:multiple_imputation_with_mice_and_metafor [2020/03/06 16:53] Wolfgang Viechtbauertips:multiple_imputation_with_mice_and_metafor [2020/07/10 11:16] Wolfgang Viechtbauer
Line 133: Line 133:
 One way of dealing with missing data is to make use of imputation techniques. The advantage of using [[wp>Imputation_(statistics)#Multiple_imputation|multiple imputation]] is that we not only impute once (and then pretend that the imputed values are free of any uncertainty), but multiple times from appropriate distributions, so that several imputed datasets are generated. The same analysis is then applied to each dataset and the results are pooled, taking into consideration not only the uncertainty in each fitted model, but also across models. One way of dealing with missing data is to make use of imputation techniques. The advantage of using [[wp>Imputation_(statistics)#Multiple_imputation|multiple imputation]] is that we not only impute once (and then pretend that the imputed values are free of any uncertainty), but multiple times from appropriate distributions, so that several imputed datasets are generated. The same analysis is then applied to each dataset and the results are pooled, taking into consideration not only the uncertainty in each fitted model, but also across models.
  
-The mice package allows us to automate this process and can be used in combination with the metafor package. First, we install and load the mice package and then evaluate some code from the metafor package that generates two helper functions we need so that mice and metafor can interact as necessary:+The [[https://cran.r-project.org/package=mice|mice]] package allows us to automate this process and can be used in combination with the metafor package. First, we install and load the mice package:
 <code rsplus> <code rsplus>
 install.packages("mice") install.packages("mice")
 library(mice) library(mice)
-eval(metafor:::.mice) 
 </code> </code>
  
tips/multiple_imputation_with_mice_and_metafor.txt · Last modified: 2022/08/03 11:35 by Wolfgang Viechtbauer