File Exchange > Data Analysis >    Asymmetric Correlation Matrix

Author:
OriginLab Technical Support
Date Added:
9/28/2023
Last Update:
1/11/2024
Downloads (90 Days):
1269
Total Ratings:
11
File Size:
697 KB
Average Rating:
File Name:
Asymmetric...ix.opx
File Version:
1.00
Minimum Versions:
License:
Type:
App
Summary:

Calculate the correlation matrix between the columns of x matrix and the columns of y matrix.

Screen Shot and Video:
Description:

Purpose

This App can be used to calculate the correlation matrix (Pearson, Spearman, and Kendall) between the columns of x matrix and the columns of y matrix.

Operation

  1. Activate a worksheet. Click the App icon to bring up the dialog.
  2. Select data range for x and y matrices. If your data is grouped, choose Grouped for Input Data Form and select group range.
  3. Choose Correlation Type from Pearson, Spearman and Kendall.
  4. Choose to plot correlation heatmap.
  5. Click OK to output results.

Sample OPJU File
This app provides a sample OPJU file.  Right click the App icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file Asymmetric Correlation Matrix Sample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).

Algorithm

Let M1 and M2 be \(n\times n_{x}\) and \(n\times n_{y}\) matrices.

Pearson:

Let A1 and A2 be vectors that average over rows of M1 and M2.

\(\hat{M1}_{ki}=M1_{ki}-A1_{i}\)

\(\hat{M2}_{kj}=M2_{kj}-A2_{j}\)

\(c_{ij}=\frac{1}{n-1}  \hat{M1}^{T} \hat{M2}\)

\(S1_{i}= \sqrt{\frac{1}{n-1}\sum_{k=1}^{n}\hat{M1}_{ki}^{2}}\)

\(S2_{j}= \sqrt{\frac{1}{n-1}\sum_{k=1}^{n}\hat{M2}_{kj}^{2}}\)

\(cor_{ij}=\frac{c_{ij}}{S1_{i}S2_{j}}\)

Spearman:

Let MR1 and MR2 be rank matrices(over rows) of M1 and M2. Let A1 and A2 be vectors that average over rows of MR1 and MR2.

\(\hat{M1}_{ki}=MR1_{ki}-A1_{i}\)

\(\hat{M2}_{kj}=MR2_{kj}-A2_{j}\)

\(c_{ij}=\frac{1}{n-1}  \hat{M1}^{T} \hat{M2}\)

\(S1_{i}= \sqrt{\frac{1}{n-1}\sum_{k=1}^{n}\hat{M1}_{ki}^{2}}\)

\(S2_{j}= \sqrt{\frac{1}{n-1}\sum_{k=1}^{n}\hat{M2}_{kj}^{2}}\)

\(cor_{ij}=\frac{c_{ij}}{S1_{i}S2_{j}}\)

Kendall:

Let MR1 and MR2 be rank matrices(over rows) of M1 and M2. Let \(m1_{i}\) and \(m2_{j}\) be columns of MR1 and MR2.

\(c_{ij}\)= C-D, where C and D are the number of concordant pairs and the number of discordant pairs of joint random variables \(m1_{i}\) and \(m2_{j}\).

\(S1_{i}= \sqrt{C+D}\), where C and D are the number of concordant pairs and the number of discordant pairs of random variables \(m1_{i}\).

\(S2_{j}= \sqrt{C+D}\), where C and D are the number of concordant pairs and the number of discordant pairs of random variables \(m2_{j}\).

\(cor_{ij}=\frac{c_{ij}}{S1_{i}S2_{j}}\)

Updates:

Reviews and Comments:
05/05/20241606412262低版本不能下载

04/18/2024wang031799作图

04/18/2024wang031799作图

04/15/2024huangxx521This is a very convenient software for data processing

04/15/2024huangxx521This is a very convenient software for data processing

04/13/2024zhanggongrui好好好

02/23/2024melihaydinliother

12/05/20233582802414

11/30/2023202147331034

11/26/2023hajer.ziadi.etui like using it

12