Skip to main content

Module inference

Module inference 

Source
Expand description

Functional two-sample inference tests.

This module provides fdars’ first standalone functional-inference surface: two-sample functional hypothesis tests built by reusing existing permutation, Hotelling-T², and bootstrap-band machinery elsewhere in the crate. It is additive and non-breaking — no existing public signature is altered by this module.

§R baselines

The functions here mirror the table-stakes two-sample tests from the R FDA ecosystem:

  • t_perm_test / f_perm_testfda::tperm.fd / fda::Fperm.fd (permutation two-sample mean tests).
  • two_sample_mean_test — the FPC-basis Hotelling-T² mean-equality test in the spirit of fda.usc mean/covariance equality tests.
  • mean_scb / scb_two_sample_testSCBmeanfd-style simultaneous confidence bands for the mean and the mean difference.

§Conventions

Permutation tests take an explicit deterministic seed (StdRng::seed_from_u64(seed)) and default to n_perm = 999 at the call site. All public functions return Result<_, FdarError> and validate their inputs at entry. Result structs derive Debug, Clone, PartialEq and are serde-gated.

Structs§

TestResult
Result of a functional two-sample hypothesis test.

Constants§

DEFAULT_N_PERM
Default number of permutations for the permutation tests.

Functions§

f_perm_test
Functional two-sample permutation F-test (fda::Fperm.fd).
flm_f_test
Overall-significance F-test for a fitted functional linear model.
flm_gof_test
Residual-based lack-of-fit (goodness-of-fit) test for a fitted functional linear model.
mean_scb
Simultaneous confidence band for the mean function (Degras).
oneway_anova_vstat
Asymptotic one-way functional ANOVA test (V-statistic).
scb_two_sample_test
Two-sample mean-equality test via a simultaneous confidence band for the mean difference (SCBmeanfd-style).
t_perm_test
Functional two-sample permutation t-test (fda::tperm.fd).
two_sample_mean_test
Functional two-sample mean-equality test via Hotelling-T² on a shared FPC basis (fda.usc-style mean equality).