mi.hist: Multiple Imputation Histogram

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

A function for plotting the histogram of each variable and of its observed and imputed values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  mi.hist( object, Yobs, ...)
## S4 method for signature 'mi.method,ANY'
mi.hist( object, Yobs, ...)
## S4 method for signature 'mi.categorical,ANY'
mi.hist( object, Yobs, ...)
## S4 method for signature 'mi.binary,ANY'
mi.hist( object, Yobs,...)
## S4 method for signature 'mi.polr,ANY'
mi.hist( object, Yobs, ...)
## S4 method for signature 'mi.pmm,ANY'
mi.hist( object, Yobs, ...)

Arguments

Yobs

observed values.

object

imputed values or member object of mi.method object family.

...

Other options for plot function.

Value

The histogram (in black) of the complete variable, the histogram (in blue) of the observed values and the histogram (in red) of the imputed values.

Note

The histogram of the completed values (observed plus imputed) is in black, the histogram of the imputed values in red, while the one of the observed values in blue.

Author(s)

Masanao Yajima yajima@stat.columbia.edu, Yu-Sung Su suyusung@tsinghua.edu.cn, M.Grazia Pittau grazia@stat.columbia.edu, Andrew Gelman gelman@stat.columbia.edu

References

Kobi Abayomi, Andrew Gelman and Marc Levy. (2008). “Diagnostics for multivariate imputations”. Applied Statistics 57, Part 3: 273–291.

Yu-Sung Su, Andrew Gelman, Jennifer Hill, Masanao Yajima. (2011). “Multiple Imputation with Diagnostics (mi) in R: Opening Windows into the Black Box”. Journal of Statistical Software 45(2).

Andrew Gelman and Jennifer Hill. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press.

See Also

plot.mi, hist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  # true data
  x<-rnorm(100,0,1) # N(0,1)
  y<-rnorm(100,(1+2*x),1.2) # y ~ 1 + 2*x + N(0,1.2)
  # create artificial missingness on y
  y[seq(2,100,10)]<-NA
  dat.xy <- data.frame(x,y)
  # imputation
  dat.cont.mi <- mi.continuous(y~x, data = dat.xy)
  mi.hist( dat.cont.mi, y)

  # imputation
  #dat.mi <- mi(dat.xy)
  #mi.hist( imp(dat.mi,1)[["y"]], y)

mi documentation built on May 2, 2019, 4:43 p.m.

Related to mi.hist in mi...