# 5 SAS Missing Data Analysis Procedures

Stay updated with latest technology trends
Join DataFlair on Telegram!!

## 1. Objective

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.

## 2. 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.
Let’s Revise Important SAS/STAT Features

## 3. 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;```

Read about SAS Bayesian Analysis Procedures
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.

Let’s Study SAS Categorical Data Analysis Procedure

### 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.
Read about Group Sequential Design and Analysis
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;```

Let’s Discuss SAS /STAT ANOVA – 8 Procedures for Calculating Analysis of Variance

### 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;```

### 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.

## 4. 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.
Related Topic- SAS/STAT Cluster Analysis Procedures
For reference

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google | Facebook