The SURVEYIMPUTE Procedure

Example 113.1 Approximate Bayesian Bootstrap Imputation

(View the complete code for this example.)

This example illustrates the approximate Bayesian bootstrap hot-deck imputation method by using a simulated data set from a fictitious survey of drug abusers. A stratified clustered sample of drug abuse treatment centers is taken from a list of available treatment centers. The list is first stratified based on geographic locations. From each strata, two or three treatment centers are sampled as the primary sampling units (PSU). Data are collected from individual patients within the selected treatment centers. The survey collects information about the substances that the patients used (such as drugs, alcohol, and marijuana) along with insurance information and treatment information.

The data set contains 736 observation units in 35 PSUs and 10 strata. The sum of the weights is 19,600. Therefore, the survey data represent a population of 19,600 patients from the study area. Some participants did not respond to all questions. The data set contains missing values in many variables.

To impute the missing items, you first need to decide whether to impute within imputation cells. Imputation cells divide the data into groups of similar units such that the recipient units share similar characteristics with the donor units in the same group. For example, it is reasonable to believe that different age groups, races, and income categories might have different responses to the drug abuse survey. You can use these characteristics to create imputation cells. Characteristics for imputation cells might come from the same survey or might come from other sources such as census data or previous surveys. In this example, assume that the imputation cells are available as a variable called ImputationCell in the data set.

The data set DrugAbuse contains the following items:

  • Strata: stratum identification

  • PSU: PSU identification (treatment centers)

  • ObsWeight: observation weight for patients

  • ImputationCell: imputation cell identification

  • Age: age, in years

  • Sex: 1 for female and 2 for male

  • Race: 1 for white, 2 for black, and 3 for others

  • Insurance: 1 if the patient has any insurance, and 2 otherwise

  • Drug: 1 if the patient used any drugs in the past three months, and 2 otherwise

  • Alcohol: 1 if the patient consumed any alcohol in the past month, and 2 otherwise

  • Treatment: 1 if the patient is being treated for the first time, and 2 otherwise

data DrugAbuse;
   input Strata PSU ObsWeight ImputationCell Age Sex Race Insurance
         Drug Alcohol Treatment;
   datalines;
 1    1     5        1      74  1    1      3       2      2        1
 1    1     5        1      20  0    3      1       2      2        1
 1    1     5        3      42  1    2      1       1      2        1
 1    1     5        3      65  1    3      2       1      2        1
 1    1     5        2      53  1    1      1       1      1        1
 1    1     5        3      49  1    1      1       1      2        1
 1    1     5        3      51  0    2      1       2      1        1
 1    1     5        2      77  0    3      1       1      1        1
 1    1     5        2      26  1    1      1       1      2        1
 1    1     5        3      28  0    3      1       1      1        1
 1    1     5        1      71  1    1      1       2      2        1
 1    1     5        2      72  1    1      3       2      2        1
 1    1     5        3      24  1    1      1       1      1        1
 1    1     5        2      65  1    1      2       1      1        2
 1    1     5        3      47  1    1      1       1      1        1
 1    1     5        2      37  1    1      2       1      2        1
 1    1     5        2      46  1    1      3       1      1        1
 1    1     5        2      52  1    1      1       1      2        2
 1    1     5        3      60  0    3      1       1      2        1
 1    1     5        1      31  0    1      1       1      2        1
 1    2     5        1      23  0    3      3       1      1        1
 1    2     5        2      78  1    1      .       .      .        .
 1    2     5        2      29  1    1      1       1      1        1
 1    2     5        2      21  .    .      .       .      .        .

   ... more lines ...   

10    4  55.5556      1      40  0    3      2       1      1        2
10    4  55.5556      1      32  1    3      1       2      2        1
10    4  55.5556      3      68  0    1      2       2      1        2
10    4  55.5556      3      35  1    1      2       1      2        2
;

The following statements request that the missing items be imputed by using the approximate Bayesian bootstrap hot-deck imputation method:

proc surveyimpute data=DrugAbuse method=hotdeck(selection=abb)
                  ndonors=5 seed=773269;
   var Sex Race Insurance Drug Alcohol Treatment;
   cells ImputationCell;
   output out=DrugAbuseABB;
run;

The PROC SURVEYIMPUTE statement invokes the procedure, the DATA= option specifies the input data set DrugAbuse, the METHOD= option requests the hot-deck imputation method, the METHOD=HOTDECK(SELECTION=ABB) option requests the approximate Bayesian bootstrap method, the NDONORS= option requests five donor units for every recipient unit, and the SEED= option specifies the random number generator seed. The VAR statement specifies the variables that are to be imputed, the CELLS statement identifies the imputation cell variable ImputationCell, and the OUT= option in the OUTPUT statement names the output data set DrugAbuseABB.

You do not need to use WEIGHTS, STRATA, and CLUSTER statements for the approximate Bayesian bootstrap method unless you want to create the jackknife replication weights by including the VARMETHOD=JACKKNIFE option in the PROC SURVEYIMPUTE statement. The selection of donors does not use the design information. However, if you want to select donors from the same strata or the same group of clusters, then you must include that information in the imputation cell.

Summary information about the imputation method, number of observations, and missing data patterns is shown in Output 113.1.1. The "Imputation Information" table summarizes the imputation method. The "Number of Observations" table shows that PROC SURVEYIMPUTE read and used all 736 observations. The "Missing Data Pattern" table displays the missing patterns in the data set. There are four different missing data pattern groups: all items observed, one item missing, four items missing, and all items missing. Of the observation units, 92.53% have all items observed; 4.64% have missing values in Treatment; 1.77% have missing values in Insurance, Drug, Alcohol, and Treatment; and 1.09% have missing values in all variables. Because the WEIGHT statement is not specified, these percentages represent the percentages of missing units in the input data.

Output 113.1.1: Imputation Summary

The SURVEYIMPUTE Procedure

Imputation Information
Data SetWORK.DRUGABUSE
Imputation MethodHOTDECK
Selection MethodABB
Random Number Seed773269

Number of Observations Read736
Number of Observations Used736

Missing Data Patterns
GroupSexRaceInsuranceDrugAlcoholTreatmentFreqSum of
Weights
Unweighted
Percent
Weighted
Percent
Group Means
SexRaceInsuranceDrugAlcoholTreatment
1XXXXXX68168192.5392.530.5668141.4919241.7180621.2922171.7165931.201175
2XXXXX.34344.624.620.5000001.4411761.5882351.2941181.588235.
3XX....13131.771.770.6923081.230769....
4......881.091.09......

Imputation Summary
Observation StatusNumber of
Observations
Sum of
Weights
Nonmissing681681
Missing5555
Missing, Imputed5555
Missing, Not Imputed00


Some selected observations from the output data set are displayed in Output 113.1.2. The output data set DrugAbuseABB contains the unit identification, the recipient index, and all the variables from the input data set DrugAbuse. Units that are complete respondents have one row, but units that are incomplete respondents have five rows in the output data set. For example, unit 21 is a complete respondent, so it has only one row in the output data set and its ImpIndex value is 0. Unit 22 is an incomplete respondent, so it has five rows in the output data set and its ImpIndex values range from 1 to 5.

Output 113.1.2: Observations for Some Selected Units

UnitIDImpIndexStrataPSUObsWeightImputationCellAgeSexRaceInsuranceDrugAlcoholTreatment
200115131011121
210125123033111
221125278111111
222125278111111
223125278112121
224125278113121
225125278111122
230125229111111
241125221122122
242125221131111
243125221122121
244125221112121
245125221122211
250125385013121


Suppose you want to perform a logistic regression analysis by using the imputed data set. If you want to use the multiple imputation variance estimator that is available in the MIANALYZE procedure with the imputed data set, then you need to create one complete data set for every imputation. The following SAS statements create five complete data sets and then merge the five data sets into one. Each complete data set contains the complete respondents and only one donor unit for the incomplete respondents. Each data set also contains the imputation number (_Imputation_).

data DAIMP;
   set DrugAbuseABB;
   if (ImpIndex = 0) then do;  /* Include complete respondents */
      do _Imputation_=1 to 5;   /* in all imputations.          */
         output;
      end;
   end;
   else do;                     /* Put incomplete respondents   */
      _Imputation_ = ImpIndex; /* in separate imputations.     */
      output;
   end;
proc sort data=DAIMP;
   by _Imputation_ UnitID;
run;

The following SAS statements first use the SURVEYLOGISTIC procedure (see Chapter 114: The SURVEYLOGISTIC Procedure) to perform separate logistic regression analyses within the imputed data sets and use the MIANALYZE procedure (Chapter 78: The MIANALYZE Procedure) to combine the logistic regression results from five imputed data sets:

ods select none;
proc surveylogistic data=DAIMP;
   by _imputation_;
   class Treatment Insurance Sex Race;
   strata Strata;
   cluster PSU;
   weight ObsWeight;
   model Drug=Treatment Insurance Age Sex Race / covb;
   ods output parameterestimates=Estimates covb=Covariances;
run;
ods select all;
proc mianalyze parms(classvar=classval)=Estimates
               covb(effectvar=stacking)=Covariances
               edf=25;
   class Treatment Insurance Sex Race;
   modeleffects Intercept Treatment Insurance Age Sex Race;
   ods output parameterestimates=ABBLogisticAnalysis;
run;

Although the survey design information was not directly used in the imputation, you must use the complete design information, including strata, clusters, and weights, to estimate the design variance within each imputed data set. The STRATA, CLUSTER, and WEIGHT statements in PROC SURVEYLOGISTIC specify the design information. However, separate logistic regression results from any single imputed data set should not be used for inference.

Degrees of freedom values for survey data are often much less than the number of observation units. In this example, there are 736 observation units, but there are 35 PSUs in 10 strata. The degrees of freedom for the Taylor series linearized variance estimator is 25 (35 – 10). You should specify the reduced degrees of freedom by using the EDF= option in PROC MIANALYZE. For more information, see the section EDF=<phrase remap="Argument">number</phrase> in Chapter 78: The MIANALYZE Procedure; also see Barnard and Rubin (1999).

The estimated regression parameters and their standard errors from a multiply imputed data set are shown in Output 113.1.3.

Output 113.1.3: Logistic Regression Analysis Using a Multiply Imputed Data Set

The MIANALYZE Procedure

Parameter Estimates (5 Imputations)
ParameterTreatmentInsuranceSexRaceEstimateStd Error95% Confidence LimitsDFMinimumMaximumTheta0t for H0:
Parameter=Theta0
Pr > |t|
Intercept    0.5270800.2320940.046561.00760322.6580.4926000.57483202.270.0330
Treatment1   0.0949370.153297-0.222250.41212122.9160.0784590.11423300.620.5418
Insurance 1  -0.1284750.144781-0.428220.17126822.671-0.157661-0.1089980-0.890.3842
Insurance 2  -0.0383530.119353-0.285360.20865822.816-0.059264-0.0246900-0.320.7509
Age    0.0019260.004635-0.007670.01152422.5770.0008580.00253900.420.6817
Sex  0 -0.0888230.088702-0.272650.09500022.279-0.101860-0.0636310-1.000.3274
Race   10.4365640.1564140.113070.76006023.0920.4186730.44348402.790.0104
Race   2-0.1110910.195368-0.515090.29290423.16-0.118899-0.0964290-0.570.5751


Last updated: February 13, 2019