QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GeneralLinearLeastSquares Class Reference

general linear least squares regression More...

#include <ql/math/generallinearleastsquares.hpp>

Inherited by LinearLeastSquaresRegression< ArgumentType >, and LinearRegression.

Public Member Functions

template<class xContainer , class yContainer , class vContainer >
 GeneralLinearLeastSquares (const xContainer &x, const yContainer &y, const vContainer &v)
 
template<class xIterator , class yIterator , class vIterator >
 GeneralLinearLeastSquares (xIterator xBegin, xIterator xEnd, yIterator yBegin, yIterator yEnd, vIterator vBegin, vIterator vEnd)
 
const Array & coefficients () const
 
const Array & residuals () const
 
const Array & standardErrors () const
 standard parameter errors as given by Excel, R etc.
 
const Array & error () const
 modeling uncertainty as definied in Numerical Recipes
 
Size size () const
 
Size dim () const
 

Protected Member Functions

template<class xIterator , class yIterator , class vIterator >
void calculate (xIterator xBegin, xIterator xEnd, yIterator yBegin, yIterator yEnd, vIterator vBegin)
 

Protected Attributes

Array a_
 
Array err_
 
Array residuals_
 
Array standardErrors_
 

Detailed Description

general linear least squares regression

References: "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery,

Tests:
the correctness of the returned values is tested by checking their properties.