# Learn SAS/STAT Exact Inference with 5 Procedures

Expert-led Courses: Transform Your Career â€“ Enroll Now

In our previous articles, we looked at different types of analysis and the procedures used for performing them, today we will be looking at what is an exact inference in SAS/STAT. Moreover, we will also cover how SAS/STATÂ Exact Inference is used.

Finally, we will focus on understanding different procedures:Â PROC LOGISTIC, PROC GENMOD, PROC FREQ, PROC NPAR1WAY, and PROC MULTTEST that can be used for SAS/STATÂ Exact Inference through the use of examples.

### What is SAS/STAT Exact Inference?

Modern statistical methods rely heavily on nonparametric techniques for comparing two or more populations. These techniques generate p-values without making any distributional assumptions about the populations being compared. They rely, however, on an asymptotic theory that is valid only, if the sample sizes are reasonably large and well balanced across the populations.

For small, sparse, skewed, or heavily tied data, the asymptotic theory may not be valid. In such cases, SAS/STAT exact inference methods are used.

### Procedures for Exact Inference in SAS/STAT

Following procedures are used to perform SAS/STAT exact inference 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 MULTTEST

The MULTTEST procedure in SAS/STATÂ Exact Inference is used to remove the multiple testing problems. This problem arises when you perform many hypothesis tests on the same data set. PROC MULTTEST approaches the multiple testing problems by adjusting theÂ p-values from a family of hypothesis tests.

It handles data arising from a multivariate one-way ANOVA model.
PROC MULTTEST Syntax-

`PROC MULTTEST<`

options > ; Â Class variable; Â Test name <options> ;
PROC MULTTEST Example-

```title 'multtest procedure';
data cars;
Â Â  input origin\$ airbags1-airbags4;
Â Â  datalines;
indiaÂ Â Â Â Â  1Â Â  1Â Â  0Â Â  0
americaÂ Â Â  1Â Â  1Â Â  1Â Â  0
russiaÂ Â  Â Â 1Â Â  0Â Â  0Â Â  0
brazilÂ Â Â Â  1Â Â  1Â Â  1Â Â  0
chinaÂ Â Â Â Â  1Â Â  0Â Â  0Â Â  0
japanÂ Â Â Â Â  1Â Â  1Â Â  0Â Â  0
europeÂ Â Â Â  1Â Â  0Â Â  1Â Â  0
singaporeÂ  1Â Â  0Â Â  0Â Â  0
australiaÂ  1Â Â  0Â Â  0Â Â  1
dubaiÂ Â Â Â Â  1Â Â  1Â Â  0Â Â  1
germanyÂ Â Â  1Â Â  1Â Â  1Â Â  1
canadaÂ Â Â Â  1Â Â  1Â Â  1Â Â  1
parisÂ Â Â Â Â  1Â Â  0Â Â  1Â Â  1
egyptÂ Â Â Â Â  1Â Â  1Â Â  0Â Â  1
pakistanÂ Â  0Â Â  0Â Â  1Â Â  1
;Â
ods graphics on;
proc multtest bootstrap nsample=1000 seed=41287
Â Â Â Â Â Â Â Â Â Â Â Â Â  plots=ALL;
Â Â  class origin;
Â  test ca(airbags1-airbags4);
Â Â  contrast 'Trend' 0 1 2;
run;```

This analysis uses theÂ BOOTSTRAP option to adjust theÂ p-values. TheÂ NSAMPLE=option requests 1000 samples for the bootstrap analysis, and the starting seed for the random number generator is 41287.
TheÂ PLOTS=option displays a visual summary of the unadjusted and adjustedÂ p-values against each test.

TheÂ CLASS statement is used to specify the grouping variable, origin. TheÂ ca(airbags1-airbags4)Â specification in theÂ TEST statement requests a Cochran-Armitage linear trend test for all 4 characteristics.
TheÂ CONTRAST statement gives the coefficients for the linear trend test.

SAS/STAT Exact Inference –Â PROC MULTTEST

Exact Inference –Â PROC MULTTEST

Exact Inference In SAS/STAT-Â PROC MULTTEST

Exact Inference in STAT –Â PROC MULTTEST

SAS/STAT Exact Inference –Â PROC MULTTEST

Exact Inference in SAS/STAT -PROC MULTTEST

Exact Inference in STATÂ – PROC MULTTEST

#### b. PROC NPAR1WAY

NPAR1WAY stands for non-parametric one-way analysis. PROC NPAR1WAY provides a standard analysis of variance on the raw data, empirical distribution function statistics, pair-wise multiple comparison analysis, and stratified analysis. It provides tests that use the raw input data as scores.

When the data are classified into two samples, tests are based on simple linear rank statistics. When the data are classified into more than two samples, tests are based on one-way analysis of variance (ANOVA) statistics.

PROC NPAR1WAYÂ Syntax

```PROC Â NPAR1WAY dataset <options>;Â
Â Class <classification variable> ;Â
Var <dependent variable>;```

PROC NPAR1WAY Example-

```title'NPAR1WAY Procedure';
proc npar1way data=SASHELP.CARS;
Â Â Â Â Â Â Â Â Â Â Â  class Origin;
Â Â Â Â Â Â Â Â Â Â Â  var MPG_Highway;
run;```

When no analysis options are specified in the PROC NPAR1WAY statement, the ANOVA, WILCOXON, MEDIAN, VW, SAVAGE, and EDF options are invoked by default. Below is the output of these analyses.

SAS/STAT Exact Inference –Â PROC NPAR1WAY

Exact Inference in SAS/STAT –Â PROC NPAR1WAY

Exact Inference in STAT –Â PROC NPAR1WAY

SAS/STAT Exact Inference –Â PROC NPAR1WAY

Exact Inference in SAS/STAT –Â PROC NPAR1WAY

SAS/STAT Exact Inference

Exact Inference in STAT –Â PROC NPAR1WAY

SAS/STAT Exact Inference –Â PROC NPAR1WAY

Exact Inference in SAS/STAT –Â PROC NPAR1WAY

Exact Inference – PROC NPAR1WAY

Exact Inference in SAS/STAT-Â PROC NPAR1WAY

SAS/STAT Exact Inference –Â PROC NPAR1WAY

Exact Inference inÂ SAS/STAT –Â PROC NPAR1WAY

#### c. PROC FREQ

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

#### d. PROC GENMOD

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

#### e. PROC LOGISTIC

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/STAT Exact Inference Tutorial. Hope you like our explanation.

### Conclusion

Hence, in this tutorial,Â we studied what is Exact Inference in SAS/STAT. Moreover, we have discussed the procedures used for performing SAS/STAT Exact Inference:Â PROC LOGISTIC, PROC GENMOD, PROC FREQ, PROC NPAR1WAY, and PROC MULTTEST with their syntax and examples.Â Furthermore, if you have any query, feel free to ask in the comment section.

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google