1 #ifndef STATISTICS_OLS_H 2 #define STATISTICS_OLS_H 37 Vector& coeffs,Real& offset);
45 bool LeastSquares(
const std::vector<Vector>& data,
int dependentVariable,
56 int& dependentVariable,
Vector& coeffs);
bool SolveUnweighted()
ignores weights w, if defined
Definition: OLS.cpp:24
bool SolveWeighted()
weighted least-squares
Definition: OLS.cpp:57
bool LeastSquares(const Matrix &data, const Vector &outcome, Vector &coeffs, Real &offset)
Calculate a least squares fit of the outcome given data.
Definition: OLS.cpp:121
Real b
coefficients a,b
Definition: OLS.h:24
Contains all definitions in the statistics directory.
Definition: BernoulliDistribution.h:6
Basic statistical utilities.
Real stdb
standard errors for a,b
Definition: OLS.h:25
1-D least squares y = ax+b
Definition: OLS.h:12
bool SolvePerpendicular()
perpendicular least-squares
Definition: OLS.cpp:94
Real corrCoeff
correlation coefficient
Definition: OLS.h:26
bool Solve()
standard least-squares, y as fn of x
Definition: OLS.cpp:18
bool LeastSquaresPickDependent(const vector< Vector > &data, int &dependentVariable, Vector &coeffs)
Calculate a least squares fit and pick some dependent variable.
Definition: OLS.cpp:195