# Multivariate Analysis Procedure – SAS/STAT

Job-ready Online Courses: Click, Learn, Succeed, Start Now!

We looked at different types of methods for analysis in our previous tutorials, today we will be looking at another method of analysis called multivariate analysis in SAS/STAT. Our focus here will be to understand different SAS multivariate analysis procedures through the use of examples.
So, let’s start SAS Multivariate Analysis.

### What is SAS Multivariate Analysis?

SAS MultivariateÂ DataÂ AnalysisÂ is a statistical technique that analysis data arriving from multiple variables. It comes into picture when there are 4 or more dependent variables to be examined against an independent variable or variables.

SAS/STAT Multivariate analysis can handle more complex sets of data than whatÂ univariate analysis methods can handle. This type of analysis is usually performed with software (i.e.Â SPSSÂ orÂ SAS). STAT Multivariate analysis has the ability to reduce the likelihood ofÂ Type I errors.

SAS Multivariate Data Analysis – Sample

### Procedures for Multivariate analysis in SAS/STAT

Following procedures are used for SAS multivariate 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 CANCORR

PROC CANCORRÂ in SAS/STAT is used for canonical correlation of data. In canonical correlation, through the use of statistics, we examine the relationship between linear combinations of a set of variables. These linear combinations are calledÂ canonical variables.

This procedure tests a series of hypotheses such as ANOVA, regression such that each canonical correlation and all smaller canonical correlations are zero in the population.

A Syntax of PROC CANCORR-

```PROC CANCORR DATASET <OPTIONS>;
VAR variables;
WITH variables;```

The PROC CANCORR statement and the WITH statement are required.
PROC CANCORR Example –

```ods graphics on;
proc cancorr data=SASHELP.CARS;
Â Â Â Â Â Â Â Â Â Â Â  /*** The VAR statement defines Variable set 1 ***/
Â Â Â Â Â Â Â Â Â Â Â  var EngineSize;
Â Â Â Â Â Â Â Â Â Â Â  /*** The WITH statement defines Variable set 2 ***/
Â Â Â Â Â Â Â Â Â Â Â  with MPG_City;
run;```

Technology is evolving rapidly!

SAS Multivariate Analysis –Â PROC CANCORR

SAS Multivariate Analysis of Variance –Â PROC CANCORR

#### b. PROC PRINCOMP

PRINCOMP stands for principal component analysis. The principal component analysis comes under SAS multivariate analysis and is a technique through which we examine relationships among several variables.

In SAS/STAT PRINCOMP procedure is used to perform principal component analysis by using different data such as raw data, a correlation matrix, a covariance matrix, or a sum-of-squares-and-cross products (SSCP) matrix as input data set.

A Syntax of PROC PRINCOMP-

```PROC PRINCOMP dataset <OPTIONS>;
VAR variables;```

The PROC PRINCOMP statement is the required statement and usually, VAR statement is only used with it.
Example PROC PRINCOMP-

```proc princomp data=SASHELP.CARS plots=all;
Â Â Â Â Â Â Â Â Â Â Â  var MSRP Cylinders;
run;```

Â

Analysis of Multivariate – PROC PRINCOM

SAS Multivariate Analysis –Â PROC PRINCOM

SAS Multivariate Analysis –Â PROC PRINCOM

SAS/STAT Multivariate Analysis –Â Â PROC PRINCOMP

Multivariate Analysis in SAS/STAT –Â Â PROC PRINCOMP

Analysis of Multivariate in SAS –Â Â PROC PRINCOMP

#### c. PROC FACTOR

The PROC FACTOR procedure in SAS/STAT performs factor analysis, and also a variety of common factor and component analysis and rotations. This procedure can factor either the correlation or covariance matrix, and you can save the results in an output data set.

Different methods can be used for factor extraction such as principal component analysis, principal factor analysis, least squares factor analysis, maximum likelihood etc.
A Syntax of PROC FACTOR-

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

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

```proc factor data=SASHELP.CLASS method=principal nfactors=2 plots=all;
Â Â Â Â Â Â Â Â Â Â Â  var Height Weight;
run;```

SAS Multivariate Analysis –Â PROC FACTOR

Analysis of Multivariate in SAS – PROC FACTOR

Analysis of Multivariate in SAS – PROC FACTOR

Analysis of Multivariate in SAS – PROC FACTOR

#### d. PROC CORR

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

#### e. PROC CORRESP

We have already discussed this procedure in SAS STAT Market research tutorial.

#### f. PROC PRINQUAL

We have already discussed this procedure in SAS STAT Market research tutorial.

#### g. PROC MDS

We have already discussed this procedure in SAS STAT Market research tutorial.
So, this was allÂ about SAS Multivariate Analysis Tutorial. Hope you like our explanation.

### Conclusion

Hence, in this tutorial, we study what is SAS multivariate analysis. In addition, we looked different procedures for multivariate data analysis:Â PROC CANCORR,Â PROC PRINCOMP, PROC FACTOR,Â PROC CORR,Â PROC CORRESP,Â PROC PRINQUAL, and PROC MDS with examples and syntax.

At last, we discuss how they can be used. Hope you all enjoyed it. Stay tuned for more interesting topics in SAS/STAT, and, for any doubts, post it in the comments section below.

Did you know we work 24x7 to provide you best tutorials