Package pulse.search.statistics
Class FTest
- java.lang.Object
-
- pulse.search.statistics.FTest
-
public class FTest extends Object
A static class for testing two calculations based on the Fischer test (F-Test) implemented in Apache Commons Math.
-
-
Field Summary
Fields Modifier and Type Field Description static double
FALSE_REJECTION_PROBABILITY
False-rejection probability for the F-test, equal to 0.05
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]
evaluate(Calculation a, Calculation b)
Evaluates the F-statistic for two calculations.static Calculation
findNested(Calculation a, Calculation b)
Tests two models to see which one is nested in the other.static Calculation
test(Calculation a, Calculation b)
Tests two models to see which one is better according to the F-test
-
-
-
Field Detail
-
FALSE_REJECTION_PROBABILITY
public static final double FALSE_REJECTION_PROBABILITY
False-rejection probability for the F-test, equal to 0.05- See Also:
- Constant Field Values
-
-
Method Detail
-
test
public static Calculation test(Calculation a, Calculation b)
Tests two models to see which one is better according to the F-test- Parameters:
a
- a calculationb
- another calculation- Returns:
null
if the result is inconclusive, otherwise the best of two calculations.
-
evaluate
public static double[] evaluate(Calculation a, Calculation b)
Evaluates the F-statistic for two calculations.- Parameters:
a
- a calculationb
- another calculation- Returns:
null
if the test is inconclusive, i.e., if models are not nested, or if the model selection criteria are based on a statistic different from least-squares, or if the calculations refer to different data ranges. Otherwise returns an double array, consisting of two elements[fStatistic, fCritical]
-
findNested
public static Calculation findNested(Calculation a, Calculation b)
Tests two models to see which one is nested in the other. A model is considered nested if it refers to the same class of problems but has fewer parameters.- Parameters:
a
- a calculationb
- another calculation- Returns:
null
if the models refer to different problem classes. Otherwise returns the model that is nested in the second model.
-
-