# 5 SAS Missing Data Analysis Procedures

Interactive Online Courses: Elevate Skills & Succeed Enroll Now!

In our last SAS/STAT Tutorial, we talk about Mixed Model Procedure. Today we are going to look at SAS missing data analysis. In addition, we will study different Procedures for missing data analysis in SAS/STAT with examples.
So, let’s start SAS Missing Data Analysis Procedures.

### What is SAS Missing Data Analysis?

SAS Missing values are defined as the values that are not available and that would be meaningful for analysis if they were observed. The reasons for missing values can be the unavailability of subjects, poor plans.

Through SAS missing data analysis, we try to fill this void. The strategy used for handling SAS/STAT missing data analysis is multiple imputations, which replaces each missing value with a set of plausible values that represent the uncertainty about the right value to impute.

The multiply imputed data sets are then analyzed by using standard procedures for complete data and combining the results from these analyses. No matter which complete-data analysis is used, the process of combining results from different data sets is essentially the same.

### Procedures for Missing Data Analysis in SAS/STAT

Following procedure is used for SAS missing data analysis of a sample data. Each procedure has a different syntax and is used with different type of data in different contexts. Let us explore each one of these.

#### a. PROC CALIS

PROC CALIS in SAS/STAT is used for structural equation modeling (SEM). It can perform an exploratory and confirmatory factor analysis of any order. PROC CALIS is also used for multiple and multivariate linear regression, path analysis and causal modeling.
A Syntax of PROC CALIS-

```PROC CALIS DATASET <OPTIONS>;
PATH <paths>;```

PROC CALIS Example –

```proc calis data=sashelp.cars;
path mpg_highway ---> length;
run;```

In the PATH model specification, all the one-headed arrows in the path diagram are represented as path entries in theÂ PATH statement, with entries separated by commas.

In each path entry, you specify a pair of variables and the direction of the path (eitherÂ <===Â orÂ ===>), followed by a path coefficient, which is either a fixed constant or a parameter with a name in the specification.

SAS Missing Data Analysis –Â PROC CALIS

SAS Missing Data Analysis –Â PROC CALIS

SAS Missing Data Analysis –Â PROC CALIS

SAS Missing Data Analysis –Â PROC CALIS

SAS Missing Data Analysis –Â PROC CALIS

#### b. PROC MI and MIANALYZE

MI stands for multiple imputations. Both the procedures are used to perform multiple imputations. To perform multiple imputations, we need to follow some steps. These are-

1. Generate imputed samples using PROC MI.
2. Estimate the parameters for each imputed sample by using some statistical procedure.
3. Combine the estimation from the imputed samples by using PROC MIANALYZE.

A Syntax ofÂ PROC MIÂ

`PROC MI dataset <OPTIONS>;`

The PROC MI statement is the only required statement for the MI procedure.
The MIANALYZE procedure combines the results of the analyses of imputations and generates valid statistical inferences.

```PROC MIANALYZE<options>;
MODELEFFECTS effects;```

The PROC MIANALYZE and MODE EFFECTS statements are required for the MIANALYZE procedure.

Example-

```data miss1;
input x1 x2 x3 x4;
datalines;
2Â  4Â  6Â  7
3Â  5Â  .Â  4
.Â  6Â  7Â  6
1Â  4Â  6Â  3
3Â  5Â  .Â  4
2Â  5Â  6Â  7
2Â  .Â  8Â  9
1Â  9Â  0Â  .
2Â  .Â  7Â  5
.Â  4Â  6Â  9
3Â  .Â  6Â  4
1Â  .Â  5Â  .
2Â  .Â  1Â  5
1Â  3Â  2Â  4
2Â  4Â  9Â  6
3Â  6Â  3Â  1
;
/** STEP 1 - generate imputed samples**/
PROC MI DATA=miss1 NIMPUTE=20 SEED=135782
OUT=ImputedSamples;
var x1-x4;
run;
/** STEP 2 - fit the generated imputed samples**/
proc reg data=ImputedSamples outest=Estimates covout;
model x1=x3-x4;
by descending;
run;
/** STEP 3 - use PROC MIANALYZE**/
proc mianalyze data=Estimates;
modeleffects interceptÂ  x3 x4;
run;```

Â

SAS Missing Data Analysis –Â PROC MIÂ and MIANALYZE

SAS Missing Data Analysis –Â PROC MIÂ and MIANALYZE

SAS Missing Data Analysis –Â PROC MIÂ and MIANALYZE

#### c. PROC SURVEYIMPUTE

The SURVEYIMPUTE procedure imputes missing values of an item in a data set by replacing them with observed values from the same item.Â The SURVEYIMPUTE procedure implements single and multiple hot-deck imputations.

PROC SURVEYIMPUTE also computes replicate weights that account for the imputation and that can be used for replication-based variance estimation for complex surveys.
A Syntax forÂ PROC SURVEYIMPUTE –

```PROC SURVEYIMPUTE dataset <OPTIONS>;
VAR Â (variables);```

The PROC SURVEYIMPUTE and VAR statements are required.
PROC SURVEYIMPUTE Example-

```proc surveyimpute data=sashelp.class;
var age height;
run;```

SAS Missing Data Analysis –Â PROC SURVEYIMPUTE

#### d. PROC GEE

We have already discussed this procedure in detail. You can refer to the following link for the complete tutorial.

#### e. PROC MCMC

We have already discussed this procedure in detail. You can refer to the following link for the complete tutorial.
So, this was all about SASÂ Missing Data Analysis Tutorial. Hope you like our explanation.

### Conclusion

Hence, in this tutorial, we study what is SAS Missing Data Analysis and all the procedures offered by SAS/STAT missing data analysis. We looked at each one of them: their syntax, and how SAS Missing Data Analysis can use. Hope you all enjoyed it.

Stay tuned for more interesting topics in SAS/STAT. Furthermore, if you have any query, feel free to ask in the comment section.

Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

DataFlair Team

The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.

### 1 Response

1. Ketema Bekele says: