Last data update: 2014.03.03
|
R: Rhat Convergence Statistic of a 'mice' Imputation
Rhat Convergence Statistic of a mice Imputation
Description
Computes the Rhat statistic for a mids object.
Usage
Rhat.mice(mice.object)
Arguments
mice.object |
Object of class mids
|
Value
Data frame containing the Rhat statistic for mean and variances for all variables
of the Markov chains used for imputation
Author(s)
Alexander Robitzsch
References
Gelman, A., & Hill, J. (2007).
Data analysis using regression and multilevel/hierarchical models.
Cambridge University Press.
Examples
## Not run:
#############################################################################
# EXAMPLE 1: Rhat statistic for nhanes data
#############################################################################
library(mice)
data(nhanes, package="mice")
set.seed(9090)
# nhanes 3 parallel chains
imp1 <- mice::mice( nhanes ,m=3 , maxit=10 , imputationMethod=rep("norm" , 4 ) )
Rhat.mice( imp1 )
## variable MissProp Rhat.M.imp Rhat.Var.imp
## 1 bmi 36 1.0181998 1.155807
## 2 hyp 32 1.0717677 1.061174
## 3 chl 40 0.9717109 1.318721
## End(Not run)
Results
|