Is your change request related to a problem? Please describe.
The TAB().anovaof() table method only provides a one-way ANOVA, which is not enough for all possible applications.
Describe the solution you'd like
Add a two-way ANOVA to the TAB().anovaof() method implemented with #756.
Describe possible alternatives you've considered
No alternatives
The one-way anova is implemented in AnovaResult Memory::getOneWayAnova(size_t colCategories, size_t colValues, const VectorIndex& _vIndex, double significance) const within memory.cpp. It is either possible to extend this method to cope with multiple value columns in colValues, or by adding a specialized function for two-way anova according https://en.wikipedia.org/wiki/Two-way_analysis_of_variance and an additional dispatcher method using to distinguish between one-way and two-way anova.
It makes probably sense to try to integrate first (and renaming the method afterwards).
If that fails, use the second approach and create the dispatcher method as well.
The interface function for the user, which has to be adapted as well, is static std::string tableMethod_anova(const std::string& sTableName, std::string sMethodArguments, const std::string& sResultVectorName) in dataaccess.cpp and there's also a tunnel through MemoryManager to consider.
DESCRIPTION
Is your change request related to a problem? Please describe. The
TAB().anovaof()
table method only provides a one-way ANOVA, which is not enough for all possible applications.Describe the solution you'd like Add a two-way ANOVA to the
TAB().anovaof()
method implemented with #756.Describe possible alternatives you've considered No alternatives
Additional context Migrated from here: https://sourceforge.net/p/numere/tickets/758/
(Do not write below this line)
DEVS' SECTION
ANALYSIS
The one-way anova is implemented in
AnovaResult Memory::getOneWayAnova(size_t colCategories, size_t colValues, const VectorIndex& _vIndex, double significance) const
withinmemory.cpp
. It is either possible to extend this method to cope with multiple value columns incolValues
, or by adding a specialized function for two-way anova according https://en.wikipedia.org/wiki/Two-way_analysis_of_variance and an additional dispatcher method using to distinguish between one-way and two-way anova.static std::string tableMethod_anova(const std::string& sTableName, std::string sMethodArguments, const std::string& sResultVectorName)
indataaccess.cpp
and there's also a tunnel throughMemoryManager
to consider.IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST