This example contains parametric and non-parametric tests with correlated and uncorrelated inputs.
Angle-Angle Correlation
The following data sets contain angle measurements in radians:
data1 | data2 |
0 | 0.558505 |
0.174533 | 0.296706 |
0.261799 | 0.959931 |
0.349066 | 2.23402 |
0.436332 | 6.00393 |
The first test is the parametric angle-angle correlation. To run the test execute the command:
StatsCircularCorrelationTest/T=1/Q/PAA data1,data2
The results appear in the table "Circular Correlation Test":
raa | 0.0145224 |
avg | 0.00473055 |
variance | 0.00391019 |
L1 | -0.00112052 |
L2 | 0.1085 |
Here raa is the computed correlation coefficient, avg is the average correlation coefficient and variance is the variance of the correlation coefficient computed for all N combinations when eliminating a single pair of data. L1 and L2 provide the confidence interval at the specified significance (which in this case is the default 0.05). If the confidence interval includes zero, as is the case above then H0: there is no relationship between the two waves can't be rejected.
Nonparametric Test with uncorrelated inputs
To run the test execute the following command:
StatsCircularCorrelationTest/T=1/Q/NAA data1,data2
The results appear in the table "Circular Correlation Test":
N | 5 |
rp | 0.523607 |
rpp | 0.0763932 |
Statistic | 1.78885 |
alpha1 | 1.796 |
alpha2 | 4.004 |
Here rp and rpp are r' and r'' respectively of the Fisher and Lee formulation. The statistic is (n-1)(rp-rpp) which is compared to one of the two critical values: alpha1 for one tail hypothesis and alpha2 for a two tail hypothesis. In this case the test agrees with the results of the parametric test above since the statistic is smaller than the critical value so the hypothesis of zero correlation can't be rejected.
Parameteric Test with correlated input
This example illustrates the result of a parametric test when there exists correlation between the input waves. To run the test execute the following commands:
data3=data2+gnoise(0.2)
StatsCircularCorrelationTest/T=1/Q/PAA data2,data3
The results of the parametric test are:
raa | 0.887882 |
avg | 0.88599 |
variance | 0.00199459 |
L1 | 0.856304 |
L2 | 0.934596 |
It is clear from these values that there exists correlation between the two waves and since the values of L1 and L2 are not on both sides of zero, H0 of zero correlation must be rejected.
Nonparametric Test with Correlated Inputs
The fourth example consists of nonparametric test and correlated inputs (larger number of samples). To run the test execute the commands:
Duplicate/O data4,data5
data5+=enoise(0.05)
StatsCircularCorrelationTest/T=1/Q/NAA data4,data5
The results are:
N | 10 |
rp | 0.925066 |
rpp | 0.00145898 |
Statistic | 8.31246 |
alpha1 | 2.5 |
alpha2 | 3.19336 |
Here the test statistic is greater than the critical value (alpha2) so H0: of zero correlation must be rejected.
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More