- Main Page
- Related Pages
- Classes
- Files

# work/git/mixpp/bdm/estim/arx.h

Go to the documentation of this file.

    00001
    00013 #ifndef AR_H
    00014 #define AR_H
    00015
    00016 #include <itpp/itbase.h>
    00017 #include "../stat/libFN.h"
    00018 #include "../stat/libEF.h"
    00019
    00020 using namespace itpp;
    00021
    00036 class ARX: public BMEF {
    00037 protected:
    00039         egiw est;
    00041         ldmat &V;
    00043         double &nu;
    00044 public:
    00046         ARX ( const RV &rv, const mat &V0, const double &nu0, const double frg0=1.0 ) : BMEF ( rv,frg0 ),est ( rv,V0,nu0 ), V ( est._V() ), nu ( est._nu() )
    00047         {last_lognc=est.lognc();};
    00048
    00050         ARX ( const ARX &A0 ) : BMEF ( A0),est ( rv,A0.V,A0.nu ), V ( est._V() ), nu ( est._nu() ) {};
    00051
    00053         ARX* _copy_(bool changerv=false);
    00054
    00055 //      //! Set parameters given by moments, \c mu (mean of theta), \c R (mean of R) and \c C (variance of theta)
    00056 //      void set_parameters ( const vec &mu, const mat &R, const mat &C, double dfm){};
    00058         void set_parameters ( const ldmat &V0, const double &nu0 )
    00059         {est._V() =V0;est._nu() =nu0;last_lognc=est.lognc();}
    00060         void set_statistics ( const BMEF* BM0 );
    00062         void get_parameters ( mat &V0, double &nu0 ) {V0=est._V().to_mat(); nu0=est._nu();}
    00064         void bayes ( const vec &dt, const double w );
    00065         void bayes ( const vec &dt ) {bayes ( dt,1.0 );};
    00066         const epdf& _epdf() const {return est;}
    00067         double logpred ( const vec &dt ) const;
    00068         void flatten (BMEF* B ) {
    00069                 ARX* A=dynamic_cast<ARX*>(B);
    00070                 // nu should be equal to B.nu
    00071                 est.pow ( A->nu/nu);
    00072                 if(evalll){last_lognc=est.lognc();}
    00073         }
    00074
    00076         ivec structure_est ( egiw Eg0 );
    00077 };
    00078
    00079
    00080 #endif // AR_H
    00081
    00082