bdm::ARX Class Reference
Linear Autoregressive model with Gaussian noise. More...
#include <arx.h>
Detailed Description
Linear Autoregressive model with Gaussian noise.
Regression of the following kind:
where unknown parameters rv
are , regression vector
is a known function of past outputs and exogeneous variables
. Distrubances
are supposed to be normally distributed:
See Theory of ARX model estimation for mathematical treatment.
The easiest way how to use the class is:
#include "estim/arx.h" using namespace bdm; // estimation of AR(0) model int main() { //prior mat V0 = 0.00001 * eye ( 2 ); V0 ( 0, 0 ) = 0.1; // ARX Ar; Ar.set_statistics ( 1, V0 ); //nu is default (set to have finite moments) Ar.set_constant ( true ); Ar.validate(); // forgetting is default: 1.0 mat Data = concat_vertical ( randn ( 1, 100 ), ones ( 1, 100 ) ); Ar.bayes_batch ( Data ); cout << "Expected value of Theta is: " << Ar.posterior().mean() << endl; }
odo sort out constant terms - bayes should accept vec without additional 1s
Member Function Documentation
void bdm::ARX::from_setting | ( | const Setting & | set | ) |
Create object from the following structure
class = 'ARX'; rgr = RV({'names',...},[sizes,...],[times,...]); % description of regressor variables --- optional fields --- prior = configuration of bdm::egiw; % any offspring of eqiw for prior density, bdm::egiw::from_setting alternative = configuration of bdm::egiw; % any offspring of eqiw for alternative density in stabilized estimation of prior density constant = []; % 0/1 switch if the constant term is modelled or not --- inherited fields --- bdm::BMEF::from_setting
If the optional fields are not given, they will be filled as follows:
prior = posterior; % when prior is not given the posterior is used (TODO it is unclear)
alternative = prior; % when alternative is not given the prior is used
constant = 1; % constant term is modelled on default
Reimplemented from bdm::BMEF.
Reimplemented in bdm::ARXg.
References bdm::RV::_dsize(), alter_est, bdm_assert, bdm::BM::dimc, bdm::BM::dimy, bdm::shared_ptr< T >::get(), bdm::UI::get(), have_constant, rgr, rgrlen, bdm::BM::rvc, set_prior(), and bdm::BM::yrv.
The documentation for this class was generated from the following files:
- arx.h
- arx.cpp
Generated on Fri Aug 27 16:54:40 2010 for mixpp by
