StatsLinearCorrelationTest
StatsLinearCorrelationTest [/ALPH=alpha /T=k /RHO=rhoValue /Q/Z] waveA, waveB
The StatsLinearCorrelationTest operation performs correlation tests on waveA and waveB, which must be real valued numeric waves and must have the same number of points. Output is to the W_StatsLinearCorrelationTest wave in the current data folder or optionally to a table.
Flags
| /ALPH=val | Sets the significance level (default val =0.05). | ||||||
| /CI | computes confidence intervals for the correlation coefficient. | ||||||
| /DEST=dstWave | Specify the destination wave for the correlation test results. If you do not specify this flag, the results are stored in the wave W_StatsLinearCorrelationTest in the current data folder. | ||||||
| This flag was added in Igor Pro 10.00. | |||||||
| /FREE | Creates the user-specified destination wave as a free wave. | ||||||
| /FREE is allowed only in functions, and only if the destination waves are simple names or wave reference structure fields. | |||||||
| See Free Waves for more discussion. | |||||||
| The /FREE flag was added in Igor Pro 10.00. | |||||||
| /Q | No results printed in the history area. | ||||||
| /RHO=rhoValue | Tests hypothesis that the correlation has a nonzero value | ||||||
| /T=k | Displays results in a table. k specifies the table behavior when it is closed. | ||||||
| |||||||
| /Z | Ignores errors. | ||||||
Details
The linear correlation tests start by computing the linear correlation coefficient for the n elements of both waves:
.
Next it computes the standard error of the correlation coefficient
.
The basic test is for hypothesis H0: the correlation coefficient is zero, in which case t and F statistics are applicable. It computes the statistics:
and
,
and then the critical values for one and two tailed hypotheses (designated by tc1, tc2, Fc1, and Fc2 respectively). Critical value for r are computed using
,
where i takes the values 1 or 2 for one and two tailed hypotheses. Finally, the operation computes the power of the test at the alpha significance level for both one and two tails (Power1 and Power2).
If you use /RHO it uses the Fisher transformation to compute
,
,
the standard error approximation
,
,
and the critical values from the normal distribution Zci.
The confidence intervals are calculated differently depending on the hypothesis for the value of the correlation coefficient. If /RHO is not used the confidence intervals are computed using the critical value Fc2, otherwise they are computed using the critical Zc2 and sigmaZ.
References
See, in particular, Chapter 18 of:
Zar, J.H., Biostatistical Analysis, 4th ed., 929 pp., Prentice Hall, Englewood Cliffs, New Jersey, 1999.
See Also
Statistical Analysis, StatsCircularCorrelationTest, StatsMultiCorrelationTest, StatsRankCorrelationTest