Example of ARX model estimation

Here, we use the ARX class to estimate parameters and structure. ARX model is defined as follows:

\[ y_t = \theta' \psi_t + \rho e_t \]

where $y_t$ is the system output, $[\theta,\rho]$ is vector of unknown parameters, $\psi_t$ is an vector of data-dependent regressors, and noise $e_t$ is assumed to be Normal distributed $\mathcal{N}(0,1)$.

Special cases include:...

Mathematical background:

This particular model belongs to the exponential family, hence it has conjugate distribution of the Gauss-inverse-Wishart form (class egiw). See, [reference] for details.

For this model, structure estimation is a form of model selection procedure. Specifically, we compare hypotheses that the data were generated by the full model with hypotheses that some regressors in vector $\psi$ are redundant. The number of possible hypotheses is then the number of all possible combinations of all regressors.

Software implementation:

Estimation with this class of model is perfromed by class ARX which is derived from class BMEF (estimation of exponential family). The posterior density ( ARX::_epdf() ) is class egiw, which represents Gauss-inverse-Wishart density.

Structure estimation is implemented in method ARX::structure_est() which uses brute force tree search approach.

Examples of Use:

There are many ways how to use the object.

The easiest way how to use class ARX 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)
                                                          // forgetting is default: 1.0
        mat Data = concat_vertical( randn(1,100), ones(1,100) );
        Ar.bayesB( Data); 
                        
        cout << "Expected value of Theta is: " << Ar.posterior().mean() <<endl;
}

Here, it is assumed that


Generated on Sun Feb 15 21:43:51 2009 for mixpp by  doxygen 1.5.6