方差分析 C++ 库 libANOVA :
[libANOVA on GitHub] ()
Include the header
#include "../../anova/libAnova.h"
Define the experiments
vector eCols;eCols.push_back(3);//the 3rd (0-based) column is the empty columnANOVA a(4, eCols);//total 4 columns with the last column as the error column
Add experimental data
vectorx1;x1.push_back(1); //0-th columnx1.push_back(10); //1st columnx1.push_back(30); //2nd columnx1.push_back(2); //3rd columndouble y1 = 30.4; //the y value/response//a.AddData(x1,y1); //add a row of data into the ANOVA objects
Set names for sources
//set the name of each column (the source)a.SetColumnName(0,"Factor-1");a.SetColumnName(1,"Factor-2");a.SetColumnName(2,"Factor-3");
Do ANOVA
a.doANOVA();