cancel
Showing results for 
Search instead for 
Did you mean: 

Correlation Matrix

uwe_kohlmann
Explorer
0 Kudos

Hi

How can I create a simple correlation matrix in SAP PA? Pearson's R, Cramer's V and Spearman's Rank Correlation coeffeicient would be needed

Cheers,

Uwe

Accepted Solutions (1)

Accepted Solutions (1)

AndreasForster
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Uwe,

This collection of Custom R Components includes a Correlation Matrix.

http://scn.sap.com/docs/DOC-62119

You can download the component as .spar file. The article contains details on how to import it.

Many Greetings

Andreas

Answers (2)

Answers (2)

achab
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Uwe, is your question answered?

Best regards,

Antoine

0 Kudos

Hi Uwe,

In addition to Andreas' suggestion below, in case you are working on a PA + HANA architecture, you could use the Multivariate Statistics PAL within HANA.


This function calculates several basic multivariate statistics including covariance matrix and Pearson’s correlation coefficient matrix. The function treats each column as a data sample.


Here is an extract from the PAL documentation for your reference:


Covariance Matrix

The covariance between two data samples (random variables) x and y is:

Multivariate Formula 1

Suppose that each column represents a data sample (random variable), the covariance matrix Σ is defined as the covariance between any two random variables:

Multivariate Formula 2

where X=[X1,X2,...,Xn].

Pearson’s Correlation Coefficient Matrix

The Pearson’s correlation coefficient between two data samples (random variables) X and Y is the covariance of Xand Y divided by the product of standard deviation of X and the standard deviation Y:

Multivariate Formula 3

Similar to the covariance matrix, the Pearson’s correlation coefficient matrix Σ is:

Multivariate Formula 4

where X=[X1,X2,...,Xn]

Regards,

Surya