方差分析 C++ 庫 libANOVA :git
[libANOVA on GitHub] (https://github.com/Amuwa/libAnova)github
#include "../../anova/libAnova.h"
vector<int> eCols; eCols.push_back(3);//the 3rd (0-based) column is the empty column ANOVA a(4, eCols);//total 4 columns with the last column as the error column
vector<double> x1; x1.push_back(1); //0-th column x1.push_back(10); //1st column x1.push_back(30); //2nd column x1.push_back(2); //3rd column double y1 = 30.4; //the y value/response // a.AddData(x1,y1); //add a row of data into the ANOVA objects
//set the name of each column (the source) a.SetColumnName(0,"Factor-1"); a.SetColumnName(1,"Factor-2"); a.SetColumnName(2,"Factor-3");
a.doANOVA();