v2.0.0
Loading...
Searching...
No Matches
sts_ftest.cpp File Reference

Implementation of the one-way ANOVA F-test declared in sts_ftest.h. More...

#include "sts_ftest.h"
#include "sts_ttest.h"
#include <cmath>
Include dependency graph for sts_ftest.cpp:

Go to the source code of this file.

Detailed Description

Implementation of the one-way ANOVA F-test declared in sts_ftest.h.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.0
Date
April 2026

Computes the grand mean across all groups, then per group adds n_g*(mean_g - grand_mean)^2 to the between-group sum-of-squares and the row-wise squared deviations from the group mean to the within-group sum-of-squares. Mean-square ratios give the F-statistic with k-1 and N-k degrees of freedom.

The right-tail p-value is obtained from the exact F CDF via the regularised incomplete beta function reused from STSLIB::StatsTtest, so the t- and F-test machinery share the same numerically-stable special-function back-end.

Definition in file sts_ftest.cpp.