- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

# arx.h

Go to the documentation of this file.

    00001
    00013 #ifndef AR_H
    00014 #define AR_H
    00015
    00016 #include "../stat/libFN.h"
    00017 #include "../stat/libEF.h"
    00018
    00019 namespace bdm{
    00020
    00035 class ARX: public BMEF {
    00036 protected:
    00038         egiw est;
    00040         ldmat &V;
    00042         double &nu;
    00043 public:
    00045         ARX ( const double frg0=1.0 ) : BMEF ( frg0 ),est (), V ( est._V() ), nu ( est._nu() )
    00046         {last_lognc=est.lognc();};
    00047
    00049         ARX ( const ARX &A0 ) : BMEF (),est ( A0.est ), V ( est._V() ), nu ( est._nu() ) {};
    00050
    00052         ARX* _copy_();
    00053
    00054 //      //! Set parameters given by moments, \c mu (mean of theta), \c R (mean of R) and \c C (variance of theta)
    00055 //      void set_parameters ( const vec &mu, const mat &R, const mat &C, double dfm){};
    00057         void set_parameters ( const ldmat &V0, const double &nu0 )
    00058         {est._V() =V0;est._nu() =nu0;last_lognc=est.lognc();}
    00059         void set_statistics ( const BMEF* BM0 );
    00061         void get_parameters ( mat &V0, double &nu0 ) {V0=est._V().to_mat(); nu0=est._nu();}
    00063         void bayes ( const vec &dt, const double w );
    00064         void bayes ( const vec &dt ) {bayes ( dt,1.0 );};
    00065         const epdf& _epdf() const {return est;}
    00066         double logpred ( const vec &dt ) const;
    00067         void flatten (const BMEF* B ) {
    00068                 const ARX* A=dynamic_cast<const ARX*>(B);
    00069                 // nu should be equal to B.nu
    00070                 est.pow ( A->nu/nu);
    00071                 if(evalll){last_lognc=est.lognc();}
    00072         }
    00074         enorm<ldmat>* epredictor( const vec &rgr) const;
    00075         enorm<ldmat>* epredictor() const {it_assert_debug(rv0.count()==V.rows()-1,"Regressor is not only 1");return epredictor(vec_1(1.0));}
    00077         mlnorm<ldmat>* predictor() const;
    00078         mlstudent* predictor_student() const;
    00080         ivec structure_est ( egiw Eg0 );
    00081         const egiw* _e() const {return &est ;};
    00082 };
    00083
    00084 }
    00085
    00086 #endif // AR_H
    00087
    00088