Skip to main content

StatsWatsonUSquaredTest

StatsWatsonUSquaredTest [/ALPH=val /Q/Z/T=k] srcWave1, srcWave2

The StatsWatsonUSquaredTest operation performs Watson's nonparametric two-sample U2 test for samples of circular data. Output is to the W_WatsonUtest wave in the current data folder or optionally to a table.

Flags

/ALPH=valSets the significance level (default val =0.05).
/DEST=sWaveSpecify the destination wave for Watson's non-parametric two sample test results. If you do not use this flag, the operation saves this output in the wave W_WatsonUtest in the current data folder.
This flag was added in Igor Pro 10.00.
/FREECreates 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.
/QNo results printed in the history area.
/T=kDisplays results in a table. k specifies the table behavior when it is closed.
k =0:Normal with dialog (default).
k =1:Kills with no dialog.
k =2:Disables killing.
The table is associated with the test, not the data. If you repeat the test, it will update any existing table with the new results.
/ZIgnores errors. V_flag will be set to -1 for any error and to zero otherwise.

Details

The input waves, srcWave1 and srcWave2, each must contain at least two angles in radians (mod 2π) can have any number of dimensions, and can be single or double precision. They must not contain NaNs or INFs.

The Watson U2 H0 postulates that the two samples came from the same population against the different populations alternative. In the calculation, StatsWatsonUSquaredTest ranks the two inputs, accounts for possible ties, computes the test statistic U2, and compares it with the critical value. Because of the difficulty of computing the critical values, it always computes first the approximation due to Tiku and if possible it computes the exact critical value using the method outlined by Burr. You can evaluate the U2 CDF to get more information about the critical region.

V_flag will be set to -1 for any error and to zero otherwise.

References

We have found that this method leads to slightly different results depending on the compiler and the system on which it is implemented:

Burr, E.J., Small sample distributions of the two sample Cramer-von Mises' W2 and Watson's U2, Ann. Mah. Stat. Assoc., 64, 1091-1098, 1964.

Tiku, M.L., Chi-square approximations for the distributions of goodness-of-fit statistics, Biometrica, 52, 630-633, 1965.

See Also

Statistical Analysis, StatsWatsonWilliamsTest, StatsWheelerWatsonTest, StatsUSquaredCDF, StatsInvUSquaredCDF

Demos

Open Watson USquared Demo.pxp