ABB: Approximate Bayesian Bootstrap

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

View source: R/ABB.R

Description

This function performs multiple imputation (MI) with the Approximate Bayesian Bootstrap (ABB) of Rubin and Schenker (1986).

Usage

1
ABB(X, K=1)

Arguments

X

This is a vector or matrix of data that must include both observed and missing values. When X is a matrix, missing values must occur somewhere in the set, but are not required to occur in each variable.

K

This is the number of imputations.

Details

The Approximate Bayesian Bootstrap (ABB) is a modified form of the BayesianBootstrap (Rubin, 1981) that is used for multiple imputation (MI). Imputation is a family of statistical methods for replacing missing values with estimates. Introduced by Rubin and Schenker (1986) and Rubin (1987), MI is a family of imputation methods that includes multiple estimates, and therefore includes variability of the estimates.

The data, X, are assumed to be independent and identically distributed (IID), contain both observed and missing values, and its missing values are assumed to be ignorable (meaning enough information is available in the data that the missingness mechanism can be ignored, if the information is used properly) and Missing Completely At Random (MCAR). When ABB is used in conjunction with a propensity score (described below), missing values may be Missing At Random (MAR).

ABB does not add auxiliary information, but performs imputation with two sampling (with replacement) steps. First, X_star_obs is sampled from X_obs. Then, X_star_mis is sampled from X_star_obs. The result is a sample of the posterior predictive distribution of (X_mis|X_obs). The first sampling step is also known as hotdeck imputation, and the second sampling step changes the variance. Since auxiliary information is not included, ABB is appropriate for missing values that are ignorable and MCAR.

Auxiliary information may be included in the process of imputation by introducing a propensity score (Rosenbaum and Rubin, 1983; Rosenbaum and Rubin, 1984), which is an estimate of the probability of missingness. The propensity score is often the result of a binary logit model, where missingness is predicted as a function of other variables. The propensity scores are discretized into quantile-based groups, usually quintiles. Each quintile must have both observed and missing values. ABB is applied to each quintile. This is called within-class imputation. It is assumed that the missing mechanism depends only on the variables used to estimate the propensity score.

With K=1, ABB may be used in MCMC, such as in LaplacesDemon, more commonly along with a propensity score for missingness. MI is performed, despite K=1, because imputation occurs at each MCMC iteration. The practical advantage of this form of imputation is the ease with which it may be implemented. For example, full-likelihood imputation should perform better, but requires a chain to be updated for each missing value.

An example of a limitation of ABB with propensity scores is to consider imputing missing values of income from age in a context where age and income have a positive relationship, and where the highest incomes are missing systematically. ABB with propensity scores should impute these highest missing incomes given the highest observed ages, but is unable to infer beyond the observed data.

ABB has been extended (Parzen et al., 2005) to reduce bias, by introducing a correction factor that is applied to the MI variance estimate. This correction may be applied to output from ABB.

Value

This function returns a list with K components, one for each set of imputations. Each component contains a vector of imputations equal in length to the number of missing values in the data.

ABB does not currently return the mean of the imputations, or the between-imputation variance or within-imputation variance.

Author(s)

Statisticat, LLC software@bayesian-inference.com

References

Parzen, M., Lipsitz, S.R., and Fitzmaurice, G.M. (2005). "A Note on Reducing the Bias of the Approximate Bayesian Bootstrap Imputation Variance Estimator". Biometrika, 92, 4, p. 971–974.

Rosenbaum, P.R. and Rubin, D.B. (1983). "The Central Role of the Propensity Score in Observational Studies for Causal Effects". Biometrika, 70, p. 41–55.

Rosenbaum, P.R. and Rubin, D.B. (1984). "Reducing Bias in Observational Studies Using Subclassification in the Propensity Score". Journal of the American Statistical Association, 79, p. 516–524.

Rubin, D.B. (1981). "The Bayesian Bootstrap". Annals of Statistics, 9, p. 130–134.

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

Rubin, D.B. and Schenker, N. (1986). "Multiple Imputation for Interval Estimation from Simple Random Samples with Ignorable Nonresponse". Journal of the American Statistical Association, 81, p. 366–374.

See Also

BayesianBootstrap, LaplacesDemon, and MISS.

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
library(LaplacesDemon)

### Create Data
J <- 10 #Number of variables
m <- 20 #Number of missings
N <- 50 #Number of records
mu <- runif(J, 0, 100)
sigma <- runif(J, 0, 100)
X <- matrix(0, N, J)
for (j in 1:J) X[,j] <- rnorm(N, mu[j], sigma[j])

### Create Missing Values
M1 <- rep(0, N*J)
M2 <- sample(N*J, m)
M1[M2] <- 1
M <- matrix(M1, N, J)
X <- ifelse(M == 1, NA, X)

### Approximate Bayesian Bootstrap
imp <- ABB(X, K=1)

### Replace Missing Values in X (when K=1)
X.imp <- X
X.imp[which(is.na(X.imp))] <- unlist(imp)
X.imp

Example output

            [,1]       [,2]       [,3]       [,4]        [,5]        [,6]
 [1,] 27.4479555  29.199600 124.164591  15.717739  46.4573213   97.267618
 [2,] 29.7202987 186.538101  92.081068   4.063159 -17.8225758  -69.847897
 [3,] 27.7102275 172.476328  62.959453  38.397134   2.5222753  -66.297545
 [4,] 30.2898962 144.505717  55.979924  30.569144  38.1825057  110.850882
 [5,] 32.6615055  72.577123  -2.437707 -24.874004  15.0867408  -18.862785
 [6,] 15.1286486 199.062121  80.104398  33.168335  53.6240223   18.394285
 [7,] 23.4929578 161.352597   5.806499  17.426940  21.1272725   79.060892
 [8,] 28.3520628  77.671417  22.094706 -30.047490   6.0864001 -130.325092
 [9,] 23.9676012  90.789308  32.805576  28.184561  -0.3074967  -42.832358
[10,] 28.9983927 111.162010  19.208856  17.549106 -39.1188892  -60.660768
[11,] 22.8781955 105.832515 120.265183  11.162739  -7.8482632   37.766315
[12,] 22.2760626   2.738746  53.893065   9.129157  45.5780280  -67.922736
[13,] 30.0323401 111.437885 105.820958  17.789519 -26.5269174  198.608419
[14,] 19.0657360 272.156214  66.562827  37.040025  10.7333052   35.367762
[15,] 13.9645675 157.736451  50.749252  56.834614  -1.7319273  209.727687
[16,] 20.5266618 137.345760  41.770118  33.542036 -12.1856838   58.582751
[17,] 28.1587886 -27.000097  48.546865  67.179022  59.5749657  -68.978821
[18,] 13.4312542 125.025906  29.218355 -18.652384  37.6765175   42.702075
[19,] 29.0078983 308.884069  51.240279  40.452247   3.3057440   80.333011
[20,] 14.0845672   2.738746  21.650372  21.740888   6.6220089    5.102486
[21,] 29.1918309 143.234386 -17.229724   7.512198  -6.0600364  -59.174359
[22,] 23.1451737 197.849629 -99.714565  13.264285  59.1097207  -20.898235
[23,] 25.5641067  29.961728 108.081188  31.416002   8.0758554  140.320916
[24,] 23.2496397  54.991400  79.889326  -2.262989  15.9912708   39.797582
[25,] 23.0961825 107.181817 -44.580881  -8.224126  11.0309395  -69.329590
[26,] 19.0657360 137.359676 -33.821053  66.111474   1.2584269  -43.726575
[27,] 19.2486644  34.844003  95.464418 -16.376266  21.1272725  233.693935
[28,] 24.3073132  90.755741  73.239456  -3.790246  24.8479993   21.733777
[29,] 14.7127080  47.659096  32.961227  41.991572   0.4734992  112.689749
[30,] 28.4034987  81.452669  99.272310  41.775893  59.5749657  -64.767935
[31,] 29.6663420  22.022469  99.870095   3.901195  21.9394485  153.446898
[32,]  0.2491529 198.407970  34.203042  46.194061 -16.7614461  -52.516128
[33,]  9.8535637  82.009603  85.364648  42.825741  13.2215368   79.138244
[34,] 17.9240326  92.637437 -39.837170  38.947679  21.1272725   79.060892
[35,] 24.3073132  29.929573  76.605078   8.962915  21.3454831  142.433243
[36,] 18.5800289 161.596980  78.734786  12.434474  75.6143081  103.123017
[37,] 28.1123864 137.849599  74.615540 -23.230711  51.0217125   92.302873
[38,] 31.2620869  81.793627 127.159579  25.320183 -11.0778830  -29.949833
[39,] 31.7291438 -52.586129 117.295781 -16.376266  69.8248144  127.997160
[40,] 16.1994694  42.049347  21.530445   3.807450 -15.8310900  127.997160
[41,] 13.9645675 143.158376   6.759298  36.591977  38.6337505   92.294658
[42,] 23.1451737  69.894617  98.895276  -9.297184  57.0860362  -74.718073
[43,] 19.5531642 172.476328  78.413789  14.718388  18.7160679  191.194212
[44,] 26.4009745 126.172298 -24.402567  -9.490415  -7.7369947  146.354162
[45,] 18.8902893 120.472277 141.984615 -17.432359  52.9504965   59.878062
[46,] 30.5881537  11.056665  53.031043  40.534146  87.1705786   62.311624
[47,] 26.9130475 104.717969  18.277497  37.304100  31.1407464   31.225120
[48,] 29.6335603 135.205036 -15.448668  55.735403  46.6558196   50.523129
[49,] 18.7859944  13.038355  47.690324  29.023077  -7.8482632   91.405343
[50,] 33.7413311 150.532821 -29.048349  54.658151  18.7485356   30.750731
             [,7]      [,8]        [,9]       [,10]
 [1,]  22.4289007 107.68202   17.958639  -82.244383
 [2,]  -8.1868126 120.33030   -7.329413   77.122542
 [3,]  15.1397611 106.56311  115.613275 -212.310149
 [4,]  45.5430687  95.59442  100.181790   90.031150
 [5,]   0.4156687 156.58683   59.717157   47.980456
 [6,]  19.9475395  75.31008   61.286691  -57.222372
 [7,]  26.3063055 100.90410  138.368175  -62.939258
 [8,]   8.5353477  86.78485   58.153845   81.256030
 [9,]   0.1204387  93.00113   71.013100   71.455358
[10,]  25.9217179  71.47643 -127.120920   63.931470
[11,]   9.7208983  88.70718  146.996307  -21.242962
[12,] -14.2384536  84.36056   60.866701   96.777360
[13,]  17.5591015  59.83607   13.627680  -18.901654
[14,]  12.0622153  84.27482  159.953018   55.638429
[15,]  -3.1101647  84.94025  144.773018   38.977132
[16,]  11.8300385 118.60344   36.070018   27.017961
[17,]  20.8116965  81.41027   64.781799   49.160260
[18,]  14.6183014  94.25617  113.574047  -57.544182
[19,]  22.3901535  76.83697  191.380516  -72.825478
[20,]  21.6923615 104.21552   56.704791 -116.918462
[21,]  21.5956954  93.56764  135.972581  107.595679
[22,] -22.3168661 115.86241  122.647198   74.041987
[23,]  40.6628785  68.13787   80.026350  163.615126
[24,]   3.9154278 118.99069  217.008376   57.561552
[25,]  61.5639579 116.29137   19.108007   -7.238832
[26,] -11.9322184  86.39193  148.430820   81.256030
[27,]  32.1041391  91.71934  102.768745  123.250030
[28,]   8.5505864 104.66646    3.083909  223.392412
[29,]   9.7208983  75.95391  103.222110  -82.244383
[30,]  26.2366645  88.91749  211.821205   40.158435
[31,]  26.6985288  87.96929   52.851359   55.307285
[32,]  25.3672527  85.67475  146.468591  180.430553
[33,]  -3.8168491 104.44860  116.889394   57.561552
[34,]  26.2366645 101.04614   16.295902  198.685646
[35,] -19.1006010 129.71035  165.154132  -29.247418
[36,]  13.3832374  76.46695   28.017739  113.875986
[37,]  18.1779059  97.50721  217.008376   66.871640
[38,]   0.2791158  84.41508  138.918558  -11.550056
[39,]   0.1174765 107.98680  -72.421144   21.990018
[40,]   2.0703579  80.30584   58.517290   99.788700
[41,]  13.2223361 101.99992   49.269747   68.579903
[42,]  -0.3529732 111.41867  133.343950   30.762506
[43,]  39.5945161 126.48166  303.388024   93.031029
[44,]  19.5473831  82.35203   18.245547  129.643615
[45,]   0.2791158  90.67254  -59.296976  -95.330802
[46,]  32.0097487  88.74652   64.572335   68.746163
[47,]   7.8119702 110.81246  173.398315  133.812425
[48,]  42.9507905 117.01701  170.005925   -7.789793
[49,]  15.9368831 117.49441  138.847640    4.320419
[50,]  -4.5792146  96.68661  -83.377163   43.277173

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.