21 | | Extension for time-variant parameters $\theta_t,r_t$ may be achived using exponential forgetting (Kulhavy and Zarrop, 1993). In such a case, the forgetting factor {\tt frg} $\in <0,1>$ should be given in the constructor. Time-invariant parameters are estimated for {\tt frg} = 1. \subsection*{Public Member Functions} |
22 | | \begin{CompactItemize} |
23 | | \item |
24 | | \hypertarget{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ |
25 | | \hyperlink{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ARX} (const double frg0=1.0)} |
26 | | \label{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98} |
27 | | |
28 | | \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item |
29 | | \hypertarget{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ |
30 | | \hyperlink{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ARX} (const \hyperlink{classbdm_1_1ARX}{ARX} \&A0)} |
31 | | \label{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed} |
32 | | |
33 | | \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item |
34 | | \hypertarget{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{ |
35 | | \hyperlink{classbdm_1_1ARX}{ARX} $\ast$ \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{\_\-copy\_\-} ()} |
36 | | \label{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61} |
37 | | |
38 | | \begin{CompactList}\small\item\em Auxiliary function. \item\end{CompactList}\item |
39 | | \hypertarget{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{ |
40 | | void \hyperlink{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0}{set\_\-parameters} (const \hyperlink{classldmat}{ldmat} \&V0, const double \&nu0)} |
41 | | \label{classbdm_1_1ARX_cab0a1de5355b1027d24fd3d4862c9b0} |
42 | | |
43 | | \begin{CompactList}\small\item\em Set sufficient statistics. \item\end{CompactList}\item |
| 20 | See \hyperlink{tut_arx}{Theory of ARX model estimation} for mathematical treatment. |
| 21 | |
| 22 | The easiest way how to use the class is: |
| 23 | |
| 24 | \begin{DocInclude}\begin{verbatim}#include <estim/arx.h> |
| 25 | using namespace bdm; |
| 26 | |
| 27 | // estimation of AR(0) model |
| 28 | int main() { |
| 29 | //prior |
| 30 | mat V0 = 0.00001*eye(2); V0(0,0)= 0.1; // |
| 31 | ARX Ar; |
| 32 | Ar.set_statistics(1, V0); //nu is default (set to have finite moments) |
| 33 | // forgetting is default: 1.0 |
| 34 | mat Data = concat_vertical( randn(1,100), ones(1,100) ); |
| 35 | Ar.bayesB( Data); |
| 36 | |
| 37 | cout << "Expected value of Theta is: " << Ar.posterior().mean() <<endl; |
| 38 | } |
| 39 | \end{verbatim} |
| 40 | \end{DocInclude} |
| 41 | \subsection*{Public Member Functions} |
| 42 | \begin{CompactItemize} |
| 43 | \item |
48 | | \begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item |
49 | | \hypertarget{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{ |
50 | | void \hyperlink{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad}{get\_\-parameters} (mat \&V0, double \&nu0)} |
51 | | \label{classbdm_1_1ARX_1974409e022ea1efb3404b5c2fde66ad} |
52 | | |
53 | | \begin{CompactList}\small\item\em Returns sufficient statistics. \item\end{CompactList}\item |
| 48 | \begin{CompactList}\small\item\em Set sufficient statistics. \item\end{CompactList}\item |
| 49 | \hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{ |
| 50 | \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)} |
| 51 | \label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} |
| 52 | |
| 53 | \begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize} |
| 54 | \begin{Indent}{\bf Constructors}\par |
| 55 | \begin{CompactItemize} |
| 56 | \item |
| 57 | \hypertarget{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98}{ |
| 58 | \textbf{ARX} (const double frg0=1.0)} |
| 59 | \label{classbdm_1_1ARX_43ed6114f04a3a8756fe2b42eaa35f98} |
| 60 | |
| 61 | \item |
| 62 | \hypertarget{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed}{ |
| 63 | \textbf{ARX} (const \hyperlink{classbdm_1_1ARX}{ARX} \&A0)} |
| 64 | \label{classbdm_1_1ARX_73a55a3d66bfbeeee4df6c2ae40920ed} |
| 65 | |
| 66 | \item |
| 67 | \hyperlink{classbdm_1_1ARX}{ARX} $\ast$ \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{\_\-copy\_\-} () |
| 68 | \item |
| 69 | \hypertarget{classbdm_1_1ARX_7aef6fe827f15427d534e6fb2c220e04}{ |
| 70 | void \textbf{set\_\-parameters} (double frg0)} |
| 71 | \label{classbdm_1_1ARX_7aef6fe827f15427d534e6fb2c220e04} |
| 72 | |
| 73 | \item |
| 74 | \hypertarget{classbdm_1_1ARX_f859f53eab269845a9064bbd92f841af}{ |
| 75 | void \textbf{set\_\-statistics} (int dimx0, const \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)} |
| 76 | \label{classbdm_1_1ARX_f859f53eab269845a9064bbd92f841af} |
| 77 | |
| 78 | \end{CompactItemize} |
| 79 | \end{Indent} |
| 80 | \begin{Indent}{\bf Mathematical operations}\par |
| 81 | \begin{CompactItemize} |
| 82 | \item |
97 | | \hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{ |
98 | | \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)} |
99 | | \label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} |
100 | | |
101 | | \begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize} |
| 125 | \hypertarget{classbdm_1_1ARX_5a96a50d212648f049122a31d9553618}{ |
| 126 | const \hyperlink{classbdm_1_1egiw}{egiw} \& \textbf{posterior} () const } |
| 127 | \label{classbdm_1_1ARX_5a96a50d212648f049122a31d9553618} |
| 128 | |
| 129 | \end{CompactItemize} |
| 130 | \end{Indent} |
| 131 | \begin{Indent}{\bf Connection}\par |
| 132 | \begin{CompactItemize} |
| 133 | \item |
| 134 | \hypertarget{classbdm_1_1ARX_df3dc1b90efc0cc54a3a6e5e858542d1}{ |
| 135 | void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&drv0)} |
| 136 | \label{classbdm_1_1ARX_df3dc1b90efc0cc54a3a6e5e858542d1} |
| 137 | |
| 138 | \item |
| 139 | \hypertarget{classbdm_1_1ARX_7b96872783ab72e135b7b9ee26ef0577}{ |
| 140 | \hyperlink{classbdm_1_1RV}{RV} \& \textbf{get\_\-yrv} ()} |
| 141 | \label{classbdm_1_1ARX_7b96872783ab72e135b7b9ee26ef0577} |
| 142 | |
| 143 | \end{CompactItemize} |
| 144 | \end{Indent} |
186 | | \hypertarget{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{ |
| 236 | \hypertarget{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{ |
| 237 | \index{bdm::ARX@{bdm::ARX}!\_\-copy\_\-@{\_\-copy\_\-}} |
| 238 | \index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::ARX@{bdm::ARX}} |
| 239 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}{\bf ARX} $\ast$ bdm::ARX::\_\-copy\_\- ()\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}} |
| 240 | \label{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61} |
| 241 | |
| 242 | |
| 243 | Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype: |
| 244 | |
| 245 | \begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} |
| 246 | \end{verbatim} |
| 247 | \end{Code} |
| 248 | |
| 249 | |
| 250 | |
| 251 | Reimplemented from \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{bdm::BM}.\hypertarget{classbdm_1_1ARX_8bdf2974052e8ce74eb0d4f3791c58a3}{ |
243 | | References bdm::epdf::dimension(), bdm::egiw\_\-bestbelow(), est, and bdm::egiw::lognc(). |
| 308 | References bdm::epdf::dimension(), est, and bdm::egiw::lognc(). |
| 309 | |
| 310 | \subsection{Member Data Documentation} |
| 311 | \hypertarget{classbdm_1_1ARX_363aaa55b2ab3eec602510cdf53e84ef}{ |
| 312 | \index{bdm::ARX@{bdm::ARX}!\_\-yrv@{\_\-yrv}} |
| 313 | \index{\_\-yrv@{\_\-yrv}!bdm::ARX@{bdm::ARX}} |
| 314 | \subsubsection[\_\-yrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} {\bf bdm::ARX::\_\-yrv}\hspace{0.3cm}{\tt \mbox{[}protected\mbox{]}}}} |
| 315 | \label{classbdm_1_1ARX_363aaa55b2ab3eec602510cdf53e84ef} |
| 316 | |
| 317 | |
| 318 | description of modelled data $ y_t $ in the likelihood function Do NOT access directly, only via {\tt get\_\-yrv()}. |