

    \filetitle{estimate}{Estimate a reduced-form VAR or BVAR}{VAR/estimate}

	\paragraph{Syntax with database input}
 
 \begin{verbatim}
 [V,DATA,FITTED] = estimate(W,D,RANGE,...)
 [V,DATA,FITTED] = estimate(W,D,LIST,RANGE,...)
 \end{verbatim}
 \paragraph{Syntax with tseries input}
 
 \begin{verbatim}
 [V,DATA,FITTED] = estimate(W,X,RANGE,...)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{V} {[} VAR {]} - Empty VAR object.
 \item
   \texttt{D} {[} struct {]} - Input database.
 \item
   \texttt{LIST} {[} cellstr {]} - List of series from the database on
   which the VAR will be estimated; \texttt{LIST} can be omitted if
   variable names have been already specified at the time of creating the
   VAR object.
 \item
   \texttt{X} {[} tseries {]} - Tseries objects with input data.
 \item
   \texttt{RANGE} {[} numeric {]} - Estimation range, including
   \texttt{P} pre-sample observations where \texttt{P} is the order of
   the VAR.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{W} {[} VAR {]} - Estimated reduced-form VAR object.
 \item
   \texttt{DATA} {[} struct \textbar{} tseries {]} - Output data that
   include the endogenous variables and the estimated residuals; the
   output data is a struct (database) when \texttt{estimate} is called
   with a database input, and the output data is a tseries when
   \texttt{estimate} is called with a tseries input.
 \item
   \texttt{FITTED} {[} numeric {]} - Periods for which fitted values can
   be calculated.
 \end{itemize}
 \paragraph{Options}
 
 \begin{itemize}
 \item
   \texttt{'A='} {[} numeric \textbar{} \emph{empty} {]} - Restrictions
   on the individual values in the transition matrix, \texttt{A}.
 \item
   \texttt{'BVAR='} {[} numeric {]} - Prior dummy observations for
   estimating a BVAR; construct the dummy observations using the one of
   the \texttt{BVAR} functions.
 \item
   \texttt{'C='} {[} numeric \textbar{} \emph{empty} {]} - Restrictions
   on the individual values in the constant vector, \texttt{C}.
 \item
   \texttt{'diff='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
   {]} - Difference the series before estimating the VAR; integrate the
   series back afterwards.
 \item
   \texttt{'G='} {[} numeric \textbar{} \emph{empty} {]} - Restrictions
   on the individual values in the matrix at the co-integrating vector,
   \texttt{G}.
 \item
   \texttt{'cointeg='} {[} numeric \textbar{} \emph{empty} {]} -
   Co-integrating vectors (in rows) that will be imposed on the estimated
   VAR.
 \item
   \texttt{'constraints='} {[} char {]} - General linear constraints on
   the VAR parameters.
 \item
   \texttt{'constant='} {[} \emph{\texttt{true}} \textbar{}
   \texttt{false} {]} - Include a constant vector in the VAR.
 \item
   \texttt{'covParameters='} {[} \texttt{true} \textbar{}
   \emph{\texttt{false}} {]} - Calculate the covariance matrix of
   estimated parameters.
 \item
   \texttt{'eqtnByEqtn='} {[} \texttt{true} \textbar{}
   \emph{\texttt{false}} {]} - Estimate the VAR equation by equation.
 \item
   \texttt{'maxIter='} {[} numeric \textbar{} \emph{1} {]} - Maximum
   number of iterations when generalised least squares algorithm is
   involved.
 \item
   \texttt{'mean='} {[} numeric \textbar{} \emph{empty} {]} - Assume a
   particular mean of the VAR process.
 \item
   \texttt{'order='} {[} numeric \textbar{} \emph{1} {]} - Order of the
   VAR.
 \item
   \texttt{'progress='} {[} \texttt{true} \textbar{}
   \emph{\texttt{false}} {]} - Display progress bar in the command
   window.
 \item
   \texttt{'schur='} {[} \emph{\texttt{true}} \textbar{} \texttt{false}
   {]} - Calculate triangular (Schur) representation of the estimated
   VAR.
 \item
   \texttt{'stdize='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
   {]} - Adjust the prior dummy observations by the std dev of the
   observations.
 \item
   \texttt{'tolerance='} {[} numeric \textbar{} \emph{\texttt{1e-5}} {]}
   - Convergence tolerance when generalised least squares algorithm is
   involved.
 \item
   \texttt{'yNames='} {[} cellstr \textbar{} function\_handle \textbar{}
   \emph{\texttt{@(n) sprintf('y\%g',n)}} {]} - Use these names for the
   VAR variables.
 \item
   \texttt{'eNames='} {[} cellstr \textbar{} function\_handle \textbar{}
   \emph{\texttt{@(yname,n) {[}'res\_',yname{]}}} {]} - Use these names
   for the VAR residuals.
 \item
   \texttt{'warning='} {[} \emph{\texttt{true}} \textbar{} \texttt{false}
   {]} - Display warnings produced by this function.
 \end{itemize}
 \paragraph{Description}
 
 If the VAR is estimated with a database input, \texttt{D}, the variable
 names, \texttt{LIST}, will be stored within the VAR object, and used
 whenever you call a VAR or SVAR function that returns output data, such
 as \url{VAR/simulate} or \url{SVAR/srf}.
 
 If the VAR is estimated with a tseries input, \texttt{X}, the VAR
 functions will return tseries as output data.
 
 \paragraph{Example}


