Implementation of two-way anova.
The call tree for table.anovaof() was changed to support an array of columns for Categories/Labels/Factors, however you call it.
A new recursive appraoch is implemented to calculate multi-way anovas. The Tree structure is implemented via the new structures AnovaCalculationStructure and FactorNode in memory.hpp.
Implementation test: (Describe the type of test, which you performed, and if it was successful)
one test was added to the table SW-Test repo. The results compaired where retrefed from following python code:
import numpy as np
import pandas as pd
import statsmodels.api as sm
from statsmodels.formula.api import ols
all = [4.8, 5, 6.4, 6.3,
4.4, 5.2, 6.2, 6.4,
3.2, 5.6, 4.7, 5.6,
3.9, 4.3, 5.5, 4.8,
4.4, 4.8, 5.8, 5.8,
4.4, 4.9, 5.8, 6,
4.2, 5.3, 6.2, 4.9,
3.8, 5.7, 6.3, 4.6,
3.7, 5.4, 6.5, 5.6,
3.9, 4.8, 5.5, 5.5]
#perform two-way ANOVA
model = ols('height ~ C(water) + C(sun) + C(water):C(sun)', data=df).fit()
ret = sm.stats.anova_lm(model, typ=2)
print(ret)
SUMMARY
Implements necessary changes for #10
Reviewers: @numere-org/maintainers
IMPLEMENTATION
Implementation of two-way anova. The call tree for table.anovaof() was changed to support an array of columns for Categories/Labels/Factors, however you call it. A new recursive appraoch is implemented to calculate multi-way anovas. The Tree structure is implemented via the new structures
AnovaCalculationStructure
andFactorNode
inmemory.hpp
.one test was added to the table SW-Test repo. The results compaired where retrefed from following python code:
DOCUMENTATION
TESTS BY REVIEWERS