QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
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>

+ Inheritance diagram for GeneralLinearLeastSquares:
+ Collaboration diagram for GeneralLinearLeastSquares:

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 Arraycoefficients () const
 
const Arrayresiduals () const
 
const ArraystandardErrors () const
 standard parameter errors as given by Excel, R etc. More...
 
const Arrayerror () const
 modeling uncertainty as definied in Numerical Recipes More...
 
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.

Definition at line 45 of file generallinearleastsquares.hpp.

Constructor & Destructor Documentation

◆ GeneralLinearLeastSquares() [1/2]

GeneralLinearLeastSquares ( const xContainer &  x,
const yContainer &  y,
const vContainer &  v 
)

Definition at line 79 of file generallinearleastsquares.hpp.

+ Here is the call graph for this function:

◆ GeneralLinearLeastSquares() [2/2]

GeneralLinearLeastSquares ( xIterator  xBegin,
xIterator  xEnd,
yIterator  yBegin,
yIterator  yEnd,
vIterator  vBegin,
vIterator  vEnd 
)

Definition at line 90 of file generallinearleastsquares.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ coefficients()

const Array & coefficients ( ) const

Definition at line 56 of file generallinearleastsquares.hpp.

+ Here is the caller graph for this function:

◆ residuals()

const Array & residuals ( ) const

Definition at line 57 of file generallinearleastsquares.hpp.

◆ standardErrors()

const Array & standardErrors ( ) const

standard parameter errors as given by Excel, R etc.

Definition at line 60 of file generallinearleastsquares.hpp.

◆ error()

const Array & error ( ) const

modeling uncertainty as definied in Numerical Recipes

Definition at line 62 of file generallinearleastsquares.hpp.

◆ size()

Size size ( ) const

Definition at line 64 of file generallinearleastsquares.hpp.

+ Here is the call graph for this function:

◆ dim()

Size dim ( ) const

Definition at line 66 of file generallinearleastsquares.hpp.

+ Here is the call graph for this function:

◆ calculate()

void calculate ( xIterator  xBegin,
xIterator  xEnd,
yIterator  yBegin,
yIterator  yEnd,
vIterator  vBegin 
)
protected

Definition at line 103 of file generallinearleastsquares.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ a_

Array a_
protected

Definition at line 69 of file generallinearleastsquares.hpp.

◆ err_

Array err_
protected

Definition at line 69 of file generallinearleastsquares.hpp.

◆ residuals_

Array residuals_
protected

Definition at line 69 of file generallinearleastsquares.hpp.

◆ standardErrors_

Array standardErrors_
protected

Definition at line 69 of file generallinearleastsquares.hpp.