mi.pooled: Modeling Functions for Multiply Imputed Dataset

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

Description

Modeling Function that pulls together the estimates from multiply imputed dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
mi.pooled(coef, se)
lm.mi(formula, mi.object, ...)
glm.mi(formula, mi.object, family = gaussian, ...)
bayesglm.mi(formula, mi.object, family = gaussian, ...)
polr.mi(formula, mi.object, ...)
bayespolr.mi(formula, mi.object, ...)
lmer.mi(formula, mi.object, rescale=FALSE, ...)
glmer.mi(formula, mi.object, family = gaussian, rescale=FALSE, ...)
## S3 method for class 'mi.pooled'
print(x, ...)
## S4 method for signature 'mi.pooled'
coef(object)
## S4 method for signature 'mi.pooled'
se.coef(object)
## S4 method for signature 'mi.pooled'
display(object, digits=2)

Arguments

coef

list of coefficients

se

list of standard errors

formula

See lm, glm, polr, lmerfor detail.

mi.object

mi object

family

See glm, polr, lmerfor detail.

rescale

default is FALSE, see rescale for detail.

x

mi.pooled object.

object

mi.pooled object.

digits

number of significant digits to display, default=2.

...

Any option to pass on to lm, glm, bayesglm, bayespolr, polr, and lmer functions

Value

call

the matched call.

mi.pooled

pulled estimates from the multiple dataset.

mi.fit

estimates from each dataset.

Author(s)

Yu-Sung Su suyusung@tsinghua.edu.cn,

References

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

See Also

lm, glm, bayesglm, bayespolr, polr, and lmer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  # true data
  n <- 100
  x <- rbinom(n,1,.45) 
  z <- ordered(rep(seq(1, 5),n)[sample(1:n, n)])
  y <- rnorm(n)
  group <- rep(1:10, 10)

  # create artificial missingness
  dat.xy <- data.frame(x, y, z)
  dat.xy <- mi:::.create.missing(dat.xy, pct.mis=10)  
  
  # imputation 
  IMP <- mi(dat.xy, n.iter=6, add.noise=FALSE)

  # fit models
  M1 <- lm.mi(y ~ x + z, IMP)
  display(M1)
  coef(M1)
  se.coef(M1)

  M2 <- glm.mi(x ~ y , IMP, family = binomial(link="logit"))
  display(M2)
  coef(M2)
  se.coef(M2)

  M3 <- bayesglm.mi(x ~ y , IMP, family = binomial(link="logit"))
  display(M3)
  coef(M3)
  se.coef(M3)

  M4 <- polr.mi(ordered(z) ~  y, IMP)
  display(M4)
  coef(M4)
  se.coef(M4)

  M5 <- bayespolr.mi(ordered(z) ~  y, IMP)
  display(M5)
  coef(M5)
  se.coef(M5)

  M6 <- lmer.mi(y ~ x  + (1|group), IMP)
  display(M6)
  coef(M6)
  se.coef(M6)

  M7 <- glmer.mi(x ~ y  + (1|group), IMP, family = binomial(link="logit"))
  display(M7)
  coef(M7)
  se.coef(M7)  

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

Related to mi.pooled in mi...