QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LinearRegression Class Reference

#include <linearleastsquaresregression.hpp>

+ Inheritance diagram for LinearRegression:
+ Collaboration diagram for LinearRegression:

Public Member Functions

template<class xContainer , class yContainer >
 LinearRegression (const xContainer &x, const yContainer &y, Real intercept=1.0)
 linear regression y_i = a_0 + a_1*x_0 +..+a_n*x_{n-1} + eps More...
 
template<class xContainer , class yContainer , class vContainer >
 LinearRegression (const xContainer &x, const yContainer &y, const vContainer &v)
 
- Public Member Functions inherited from GeneralLinearLeastSquares
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
 

Additional Inherited Members

- Protected Member Functions inherited from GeneralLinearLeastSquares
template<class xIterator , class yIterator , class vIterator >
void calculate (xIterator xBegin, xIterator xEnd, yIterator yBegin, yIterator yEnd, vIterator vBegin)
 
- Protected Attributes inherited from GeneralLinearLeastSquares
Array a_
 
Array err_
 
Array residuals_
 
Array standardErrors_
 

Detailed Description

Definition at line 91 of file linearleastsquaresregression.hpp.

Constructor & Destructor Documentation

◆ LinearRegression() [1/2]

LinearRegression ( const xContainer &  x,
const yContainer &  y,
Real  intercept = 1.0 
)

linear regression y_i = a_0 + a_1*x_0 +..+a_n*x_{n-1} + eps

Definition at line 105 of file linearleastsquaresregression.hpp.

◆ LinearRegression() [2/2]

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

Definition at line 114 of file linearleastsquaresregression.hpp.