

    \filetitle{filter}{Re-estimate the factors by Kalman filtering the data taking FAVAR coefficients as given}{FAVAR/filter}

	\paragraph{Syntax}
 
 \begin{verbatim}
 [a,d,cc,f,u,e] = filter(a,d,range,...)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{f} {[} FAVAR {]} - Estimated FAVAR object.
 \item
   \texttt{d} {[} struct \textbar{} tseries {]} - Input database or
   tseries object with the FAVAR observables.
 \item
   \texttt{range} {[} numeric {]} - Filter date range.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{a} {[} FAVAR {]} - FAVAR object.
 \item
   \texttt{d} {[} struct {]} - Output database or tseries object with the
   FAVAR observables.
 \item
   \texttt{cc} {[} struct \textbar{} tseries {]} - Re-estimated common
   components in the observables.
 \item
   \texttt{f} {[} tseries {]} - Re-estimated common factors.
 \item
   \texttt{u} {[} tseries {]} - Re-estimated idiosyncratic residuals.
 \item
   \texttt{e} {[} tseries {]} - Re-estimated structural residuals.
 \end{itemize}
 \paragraph{Options}
 
 \begin{itemize}
 \item
   \texttt{'cross='} {[} \emph{true} \textbar{} false \textbar{} numeric
   {]} - Run the filter with the off-diagonal elements in the covariance
   matrix of idiosyncratic residuals; if false all cross-covariances are
   reset to zero; if a number between zero and one, all cross-covariances
   are multiplied by that number.
 \item
   \texttt{'invFunc='} {[} \emph{`auto'} \textbar{} function\_handle {]}
   - Inversion method for the FMSE matrices.
 \item
   \texttt{'meanOnly='} {[} \texttt{true} \textbar{}
   \emph{\texttt{false}} {]} - Return only mean data, i.e.~point
   estimates.
 \item
   \texttt{'persist='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
   {]} - If \texttt{filter} or \texttt{forecast} is used with
   \texttt{'persist='} set to true for the first time, the forecast MSE
   matrices and their inverses will be stored; subsequent calls of the
   \texttt{filter} or \texttt{forecast} functions will re-use these
   matrices until \texttt{filter} or \texttt{forecast} is called.
 \item
   \texttt{'output='} {[} \emph{`auto'} \textbar{} `dbase' \textbar{}
   `tseries' {]} - Format of output data.
 \item
   \texttt{'tolerance='} {[} numeric \textbar{} \emph{0} {]} - Numerical
   tolerance under which two FMSE matrices computed in two consecutive
   periods will be treated as equal and their inversions will be re-used,
   not re-computed.
 \end{itemize}
 \paragraph{Description}
 
 It is the user's responsibility to make sure that \texttt{filter} and
 \texttt{forecast} called with \texttt{'persist='} set to true are valid,
 i.e.~that the previously computed FMSE matrices can be really re-used in
 the current run.
 
 \paragraph{Example}
 
 -IRIS Toolbox. -Copyright (c) 2007--2012 Jaromir Benes.


