mice (version 2.30)

pool.scalar: Multiple imputation pooling: univariate version

Description

Pools univariate estimates of m repeated complete data analysis

Usage

pool.scalar(Q, U, n = 99999, k = 1, method = "smallsample")

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, a large sample n = 99999 is assumed.

k

A number indicating the number of parameters to be estimated. By default, k = 1 is assumed.

method

A string indicatint the method to calculate the degrees of freedom. If method = "smallsample" (the default) then the Barnard-Rubin adjustment for small degrees of freedom is used. Otherwise, the method from Rubin (1987) is used.

Value

Returns a list with components. Component m is the number of imputations. Component qhat contains the m univariate estimates of repeated complete data analyses. Component u contains the corresponding m variances of the univariate estimates. Component qbar is the pooled univariate estimate, formula (3.1.2) Rubin (1987). Component ubar is the mean of the variances (i.e. the pooled within-imputation variance), formula (3.1.3) Rubin (1987). Component b is the between-imputation variance, formula (3.1.4) Rubin (1987). Component t is the total variance of the pooled estimated, formula (3.1.5) Rubin (1987). Component r is the relative increase in variance due to nonresponse, formula (3.1.7) Rubin (1987). Component df is the degrees of freedom for t reference distribution, formula (3.1.6) Rubin (1987) or method of Barnard-Rubin (1999) (if method = "smallsample"). Component fmi is the fraction missing information due to nonresponse, formula (3.1.10) Rubin (1987). Component lambda is the proportion of variation due to nonresponse, formula (2.24) Van Buuren (2012).

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 nonresponse and the fraction of missing information.

References

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

See Also

pool

Examples

Run this code
# NOT RUN {

imp <- mice(nhanes)
m <- imp$m
Q <- rep(NA, m)
U <- rep(NA, m)
for (i in 1:m) {
   Q[i] <- mean(complete(imp, i)$bmi)
   U[i] <- var(complete(imp, i)$bmi) / nrow(nhanes)  # (standard error of estimate)^2
}
pool.scalar(Q, U, method = "rubin")   # Rubin 1987
pool.scalar(Q, U, n = nrow(nhanes), k = 1)  # Barnard-Rubin 1999

# }

Run the code above in your browser using DataLab