circ_htest.m

Parametric Hotelling paired sample test for equal angular means.
252 Downloads
Updated 24 Apr 2014

View License

Parametric Hotelling paired sample test for equal angular means. Can be
used as a paired-sample test for circular data. The test has 2 by N-2
degrees of freedom where N is the number of pairs in the phase
distribution.

If the individual phase values in alpha are mean values of
distributions, this concearns a second-level analysis. In that case,
the associated average vector lengths of these distributions are taken
into account.

H0: the two populations have equal mean phase angles
HA: the two populations have unequal mean phase angles

Usage:
[pval, F] = circ_htest(alpha1, alpha2)
[pval, F] = circ_htest(alpha1, alpha2, r1 ,r2)

Input:
alpha1: angles in radians or degrees
alpha2: angles in radians or degrees
r1: (optional) resultant vector lengths of alpha1, in case the values
in alpha1 consist of mean values of distributions themselves (i.e.
second-level analysis)
r2: (optional) resultant vector lengths of alpha2, in case the values
in alpha2 consist of mean values of distributions themselves (i.e.
second-level analysis)

Notes:
Inputs can be either a row or column vector. Inputs alpha1 and alpha2
need to have the same length. Optional r1 and r2 need to be the same
length as alpha, and each value in r should have the same index as
their alpha counterpart.

Output:
pval p-value of the Hotelling paired-sample test. Discard H0 if
pval is small.
F the test statistic of the Hottelling test

References:
Biostatistical Analysis, J. H. Zar (1999)

Cite As

Rudy van den Brink (2024). circ_htest.m (https://www.mathworks.com/matlabcentral/fileexchange/46349-circ_htest-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0