Skip to main content

Module classifytestsf

Module classifytestsf 

Source
Expand description

Nested F-test classification of t-statistics (limma classifyTestsF).

Pure-Rust port of the classifyTestsF routine in limma’s decidetests.R. Given a matrix of t-statistics (genes × contrasts) it computes, per gene, an overall moderated F-statistic and — via a step-down procedure — classifies each individual contrast as up (1), down (-1) or non-significant (0).

The optional correlation matrix is the estimated correlation of the coefficients (equivalently the covariance of the t-statistics). When given, the F-statistic whitens by it via the eigendecomposition; when omitted the contrasts are treated as independent and the F-statistic is the mean square.

Functions§

classify_tests_f
Classify each contrast per gene as 1 (up), -1 (down) or 0 via the nested step-down F-test. df is the denominator degrees of freedom, recycled when length 1 (f64::INFINITY selects the chi-squared limit).
classify_tests_fstat
Overall moderated F-statistic per gene (limma’s fstat.only=TRUE). Returns the F-statistics together with the numerator degrees of freedom df1 = r; the denominator df2 is the caller’s df, unchanged.