26 
26 
\newcommand\Pone{P_{tt1}}

27 
27 
\newcommand\diag{\textrm{diag}}

28 
28 
\newcommand\ep{\textrm{elem\_prod}}


29 
\newcommand\admbversion{11.1}

29 
30 

30 
31 
\makeindex

31 
32 

...  ...  
35 
36 
\smalltitlepart{An Introduction to}

36 
37 
\largetitlepart{AD MODEL BUILDER}

37 
38 
\smalltitlepart{for Use in Nonlinear Modeling and Statistics}

38 

\vspace{3ex}\textsf{\textit{Version 11.1~~(20130501)}}\vspace{3ex}


39 
\vspace{3ex}\textsf{\textit{Version \admbversion~~(20130501)\\[3pt]


40 
Revised manual~~(20130624)}}\vspace{3ex}

39 
41 
}

40 
42 
\author{\textsf{\textit{David Fournier}}}

41 
43 
\manualname{AD Model Builder}

...  ...  
44 
46 

45 
47 
~\vfill

46 
48 
\noindent ADMB Foundation, Honolulu.\\\\

47 

\noindent This is the manual for AD Model Builder (ADMB) version 10.0.\\\\


49 
\noindent This is the manual for AD Model Builder (ADMB) version


50 
\admbversion.\\\\

48 
51 
\noindent Copyright \copyright\ 1993, 1994, 1996, 2000, 2001, 2004, 2007, 2008,

49 

2011 David Fournier\\\\


52 
2011, 2013 David Fournier\\\\

50 
53 
\noindent The latest edition of the manual is available at:\\

51 

\url{http://admbproject.org/documentation/manuals/admbusermanuals}


54 
\url{http://admbproject.org/documentation/manuals}

52 
55 

53 
56 
\tableofcontents

54 
57 

...  ...  
163 
166 
render the estimation of parameters in such nonlinear models more tractable. The

164 
167 
\ADMS package is intended to organize these techniques in such a way that they

165 
168 
are easy to employ (where possible, employing them in a way that the user does

166 

not need to be aware of them), so that investigating nonlinear statistical models

167 

becomesso far as possibleas simple as for linear statistical models.


169 
not need to be aware of them), so that investigating nonlinear statistical


170 
models becomesso far as possibleas simple as for linear statistical


171 
models.

168 
172 

169 
173 
\section{Installing the software}

170 
174 

...  ...  
3052 
3056 
$\infty$ for this example). The integer argument \texttt{nsteps} determines how

3053 
3057 
accurate the integration will be. Higher values of \texttt{nsteps} will be more

3054 
3058 
accurate, but greatly increase the amount of time necessary to fit the model.

3055 

The basic strategy is to use a moderate value for \texttt{nsteps}, such as~6, and

3056 

then to increase this value to see if the parameter estimates change much.


3059 
The basic strategy is to use a moderate value for \texttt{nsteps}, such as~6,


3060 
and then to increase this value to see if the parameter estimates change much.

3057 
3061 
\begin{lstlisting}

3058 
3062 
FUNCTION dvariable h(const dvariable& z)

3059 
3063 
\end{lstlisting}

...  ...  
3423 
3427 
default behavior of \ADM\ is to read in initial parameter values for the

3424 
3428 
parameters from a \texttt{PAR} file, if it finds one. Otherwise, they are given

3425 
3429 
default values consistent with their type. The quantity~\texttt{f} is a vector

3426 

of four coefficients for the autoregressive process. \texttt{Pcoff} is a $2\times

3427 

2$ matrix used to parameterize the transition matrix \texttt{P} for the Markov

3428 

process. Its values are restricted to lie between~$0.01$ and~$0.99$.


3430 
of four coefficients for the autoregressive process. \texttt{Pcoff} is a


3431 
$2\times 2$ matrix used to parameterize the transition matrix \texttt{P} for the


3432 
Markov process. Its values are restricted to lie between~$0.01$ and~$0.99$.

3429 
3433 
\texttt{smult} is a number used to parameterize \texttt{sigma} and \texttt{var}

3430 
3434 
(which is the variance) as a multiple of the meansquared residuals. This

3431 
3435 
reparameterization undimensionalizes the calculation and is a good technique to

...  ...  
3616 
3620 
interest. The matrix~\texttt{z} is calculated using a transformed matrix,

3617 
3621 
because \ADM\ deals with vector rows better than columns. The probability

3618 
3622 
distribution for the states in period~1, \texttt{qb1}, is set equal to the

3619 

unconditional distribution for a Markov process in terms of its transition matrix

3620 

\texttt{P}, as discussed in~\cite{hamilton1994}. The transition matrix is used

3621 

to compute the probability distribution of the states in periods $(2,1)$,


3623 
unconditional distribution for a Markov process in terms of its transition


3624 
matrix \texttt{P}, as discussed in~\cite{hamilton1994}. The transition matrix is


3625 
used to compute the probability distribution of the states in periods $(2,1)$,

3622 
3626 
$(3,2,1)$, $(4,3,2,1)$, and finally, $(5,4,3,2,1)$. For the last quintuplet,

3623 
3627 
this is the probability distribution before observing~\texttt{y(5)}. The

3624 
3628 
quantities \texttt{eps} in the code correspond to the possible realized values
