pool.scalar: Multiple imputation pooling: univariate version

View source: R/pool.scalar.R

pool.scalarR Documentation

Multiple imputation pooling: univariate version

Description

Pools univariate estimates of m repeated complete data analysis

Usage

pool.scalar(
  Q,
  U,
  n = Inf,
  k = 1,
  rule = c("rubin1987", "reiter2003"),
  dfcom = n - k
)

pool.scalar.syn(Q, U, n = Inf, k = 1, rule = "reiter2003")

Arguments

Q

A vector of univariate estimates of m repeated complete data analyses.

U

A vector containing the corresponding m variances of the univariate estimates.

n

A number providing the sample size. If nothing is specified, an infinite sample n = Inf is assumed.

k

A number indicating the number of parameters estimated in the complete-data model. Use the same k for every coefficient of that model, not 1 per coefficient. Count all estimated parameters, including the variance parameters of a mixed model, but not the predicted random effects. By default, k = 1 is assumed.

rule

A string indicating the pooling rule. Currently supported are "rubin1987" (default, for missing data) and "reiter2003" (for synthetic data created from a complete data set).

dfcom

The residual degrees of freedom of the complete-data analysis, used for the Barnard-Rubin adjustment. The default is n - k. Set dfcom = df.residual(fit) to use the value that pool() uses for a fitted model fit. Ignored for rule = "reiter2003".

Details

The function averages the univariate estimates of the complete data model, computes the total variance over the repeated analyses, and computes the relative increase in variance due to missing data or data synthesisation and the fraction of missing information.

The arguments n and k only enter through the complete-data degrees of freedom dfcom = n - k, which sets the degrees of freedom of the pooled estimate. pool() takes dfcom from df.residual() of the fitted model. For lme4 models, this is the number of observations minus the number of fixed effects, variance parameters and the residual standard deviation. The choice of k matters little unless n - k is small.

To pool all coefficients of a model at once, use pool.table() on a data frame with the estimates and standard errors of each imputed data set.

Value

Returns a list with components.

m:

Number of imputations.

qhat:

The m univariate estimates of repeated complete-data analyses.

u:

The corresponding m variances of the univariate estimates.

qbar:

The pooled univariate estimate, formula (3.1.2) Rubin (1987).

ubar:

The mean of the variances (i.e. the pooled within-imputation variance), formula (3.1.3) Rubin (1987).

b:

The between-imputation variance, formula (3.1.4) Rubin (1987).

t:

The total variance of the pooled estimated, formula (3.1.5) Rubin (1987).

r:

The relative increase in variance due to nonresponse, formula (3.1.7) Rubin (1987).

df:

The degrees of freedom for t reference distribution by the method of Barnard-Rubin (1999).

fmi:

The fraction missing information due to nonresponse, formula (3.1.10) Rubin (1987). (Not defined for synthetic data.)

Author(s)

Karin Groothuis-Oudshoorn and Stef van Buuren, 2009; Thom Volker, 2021

References

Rubin, D.B. (1987). Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons.

Reiter, J.P. (2003). Inference for Partially Synthetic, Public Use Microdata Sets. Survey Methodology, 29, 181-189.

See Also

pool

Examples

# missing data imputation with with manual pooling
imp <- mice(nhanes, maxit = 2, m = 2, print = FALSE, seed = 18210)
fit <- with(data = imp, lm(bmi ~ age))

# manual pooling
summary(fit$analyses[[1]])
summary(fit$analyses[[2]])
pool.scalar(Q = c(-1.5457, -1.428), U = c(0.9723^2, 1.041^2), n = 25, k = 2)

# check: automatic pooling using broom
pool(fit)

# same, with the residual degrees of freedom of the fitted model
pool.scalar(
  Q = c(-1.5457, -1.428), U = c(0.9723^2, 1.041^2),
  dfcom = df.residual(fit$analyses[[1]])
)

# manual pooling for synthetic data created from complete data
imp <- mice(cars,
  maxit = 2, m = 2, print = FALSE, seed = 18210,
  where = matrix(TRUE, nrow(cars), ncol(cars))
)
fit <- with(data = imp, lm(speed ~ dist))

# manual pooling: extract Q and U
summary(fit$analyses[[1]])
summary(fit$analyses[[2]])
pool.scalar.syn(Q = c(0.12182, 0.13209), U = c(0.02121^2, 0.02516^2), n = 50, k = 2)

# check: automatic pooling using broom
pool.syn(fit)

mice documentation built on Nov. 30, 2026, 5:06 p.m.