Skip to contents

Test against the null-hypothesis that the samples are drawn from the same Fisher population.

Usage

fisher_ftest(x, y, level = 0.95, na.rm = TRUE)

Arguments

x, y

objects of class "Vec3", "Line", "Ray", or "Plane", where the rows are the observations and the columns are the coordinates.

level

numeric. Confidence level (\(1-\alpha\)). Default is 0.95

na.rm

logical. Whether NA values should be removed before the computation proceeds.

Value

object of class "Test"

Details

Given two vector sets \(x\) and \(y\), then \(n_x\) and \(n_y\) are the number of vectors in each set, \(R_x\) and \(R_y\) are the mean resultant lengths of the two vector sets and \(R\) is the mean resultant length of the pooled vector, then $$F = \frac{(n_x + n_y - 2)(R_x + R_y - R)}{n_x + n_y - R_x - R_y}$$ is asymptotically F-distributed with 2 and \(2(n_x + n_y - 2)\) degrees of freedom (Fisher, Lewis & Embleton, 1987, sec. 7.2.2). Large \(F\) indicates that the two samples have different mean orientations.

References

Fisher, N.I., Lewis, T. and Embleton, B.J.J. (1987) Statistical Analysis of Spherical Data. Cambridge University Press, Cambridge.

Examples

set.seed(20250411)
x <- rvmf(100, mu = Line(120, 50), k = 20)
y <- rvmf(100, mu = Line(180, 45), k = 20)

stereoplot()
stereo_point(x, col = 1)
stereo_point(y, col = 2)


fisher_ftest(x, y)
#> 
#> 	Fisher F-test for a common mean direction
#> 
#> statistic = 237.14, df = 2, df = 396, p-value < 2.2e-16
#> critical value (95% confidence level) = 3.0185
#> null hypothesis rejected at the 95% confidence level: yes
#> further statistics:
#>        Rx        Ry         R 
#>  95.38633  95.35390 179.65004 
#> source: Fisher, Lewis & Embleton (1987), sec. 7.2.2 
#>