Update userguide .mod files: reconcile text with updated .mod files
parent
e02e3b8a85
commit
7b59c012b9
|
@ -225,7 +225,7 @@ end;}\\
|
|||
We add the following commands to ask Dynare to run a basic estimation of our model:\\
|
||||
\\
|
||||
\texttt{estimation(datafile=fsdat,nobs=192,loglinear,mh\_replic=2000,\\
|
||||
mode\_compute=4,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.65);}\\
|
||||
mode\_compute=6,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.65);}\\
|
||||
|
||||
\textsf{\textbf{NOTE!}} As mentioned earlier, we need to instruct Dynare to log-linearize our model, since it contains non-linear equations in non-stationary variables. A simple linearization would fail as these variables do not have a steady state. Fortunately, taking the log of the equations involving non-stationary variables does the job of linearizing them.\\
|
||||
|
||||
|
@ -234,19 +234,19 @@ We have seen each part of the .mod separately; it's now time to get a picture of
|
|||
\\
|
||||
\texttt{var m P c e W R k d n l Y\_obs P\_obs y dA; \\
|
||||
varexo e\_a e\_m;\\
|
||||
\\
|
||||
parameters alp, bet, gam, mst, rho, psi, del;
|
||||
parameters alp, bet, gam, mst, rho, psi, del;\\
|
||||
\\
|
||||
model;\\
|
||||
dA = exp(gam+e\_a);\\
|
||||
log(m) = (1-rho)*log(mst) + rho*log(m(-1))+e\_m;\\
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))*k\textasciicircum (alp-1)\\
|
||||
*n(+1)\textasciicircum (1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;\\
|
||||
-P/(c(+1)*P(+1)*m)+bet*P(+1)*(alp*exp(-alp*(gam+log(e(+1))))\\
|
||||
*k\textasciicircum (alp-1)*n(+1)\textasciicircum (1-alp)+(1-del)\\
|
||||
*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0;\\
|
||||
W = l/n;\\
|
||||
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0;\\
|
||||
R = P*(1-alp)*exp(-alp*(gam+e\_a))*k(-1)\textasciicircum alp*n\textasciicircum (-alp)/W;\\
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e\_a))*k(-1)\textasciicircum alp*n\textasciicircum (1-alp)/(m*l*c(+1)*P(+1)) = 0;\\
|
||||
c+k = exp(-alp*(gam+e\_a))*k(-1)\textasciicircum alp*n\textasciicircum (1-alp)+(1-del)*exp(-(gam+e\_a))*k(-1);\\
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e\_a))*k(-1)\textasciicircum alp*n\textasciicircum (1-alp)/\\(m*l*c(+1)*P(+1)) = 0;\\
|
||||
c+k = exp(-alp*(gam+e\_a))*k(-1)\textasciicircum alp*n\textasciicircum (1-alp)+(1-del)\\*exp(-(gam+e\_a))*k(-1);\\
|
||||
P*c = m;\\
|
||||
m-1+d = l;\\
|
||||
e = exp(e\_a);\\
|
||||
|
@ -262,7 +262,7 @@ P\_obs (log(mst)-gam);\\
|
|||
Y\_obs (gam);\\
|
||||
end;\\
|
||||
\\
|
||||
unit\_root\_vars = P\_obs Y\_obs;\\
|
||||
unit\_root\_vars P\_obs Y\_obs;\\
|
||||
\\
|
||||
initval;\\
|
||||
k = 6;\\
|
||||
|
@ -298,7 +298,7 @@ stderr e\_m, inv\_gamma\_pdf, 0.008862, inf;\\
|
|||
end;\\
|
||||
\\
|
||||
estimation(datafile=fsdat,nobs=192,loglinear,mh\_replic=2000,\\
|
||||
mode\_compute=4,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.65);}\\
|
||||
mode\_compute=6,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.65);}\\
|
||||
\\
|
||||
|
||||
\subsection{Summing it up}
|
||||
|
|
|
@ -35,7 +35,7 @@ end;}\\
|
|||
\section{Declaring observable variables}
|
||||
This should not come as a surprise. Dynare must know which variables are observable for the estimation procedure. \textsf{\textbf{NOTE!}} These variables must be available in the data file, as explained in section \ref{sec:estimate} below. For the moment, we write:\\
|
||||
\\
|
||||
\texttt{varobs Y;}\\
|
||||
\texttt{varobs y;}\\
|
||||
|
||||
\section{Specifying the steady state} \label{sec:ssest}
|
||||
Before Dynare estimates a model, it first linearizes it around a steady state. Thus, a steady state must exist for the model and although Dynare can calculate it, we must give it a hand by declaring approximate values for the steady state. This is just as explained in details and according to the same syntax outlined in chapter \ref{ch:solbase}, covering the \texttt{initval}, \texttt{steady} and \texttt{check} commands. In fact, as this chapter uses the same model as that outlined in chapter \ref{ch:solbase}, the steady state block will look exactly the same.\\
|
||||
|
@ -138,7 +138,8 @@ displayed). Actually seeing if the various blocks of Metropolis-Hastings runs co
|
|||
Finally, coming back to our example, we could choose a standard option:\\
|
||||
\\
|
||||
\texttt{estimation(datafile=simuldataRBC,nobs=200,first\_obs=500,\\
|
||||
mh\_replic=2000,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.8); }\\
|
||||
mh\_replic=2000,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.8,\\
|
||||
mode\_compute=6); }\\
|
||||
|
||||
This ends our description of the .mod file.
|
||||
|
||||
|
@ -147,7 +148,6 @@ To summarize and to get a complete perspective on our work so far, here is the c
|
|||
\\
|
||||
\texttt{var y c k i l y\_l w r z;\\
|
||||
varexo e;\\
|
||||
\\
|
||||
parameters beta psi delta alpha rho epsilon;\\
|
||||
\\
|
||||
model;\\
|
||||
|
@ -162,7 +162,7 @@ model;\\
|
|||
z = rho*z(-1)+e;\\
|
||||
end;\\
|
||||
\\
|
||||
varobs Y;\\
|
||||
varobs y;\\
|
||||
\\
|
||||
initval;\\
|
||||
k = 9;\\
|
||||
|
@ -175,7 +175,6 @@ initval;\\
|
|||
end;\\
|
||||
\\
|
||||
steady;\\
|
||||
\\
|
||||
check;\\
|
||||
\\
|
||||
estimated\_params;\\
|
||||
|
@ -189,7 +188,8 @@ stderr e, inv\_gamma\_pdf, 0.01, inf;\\
|
|||
end;\\
|
||||
\\
|
||||
estimation(datafile=simuldataRBC,nobs=200,first\_obs=500,\\
|
||||
mh\_replic=2000,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.8); }
|
||||
mh\_replic=2000,mh\_nblocks=2,mh\_drop=0.45,mh\_jscale=0.8,\\
|
||||
mode\_compute=6); }
|
||||
\\
|
||||
|
||||
|
||||
|
|
|
@ -87,8 +87,9 @@ So that you can gain experience by manipulating the entire model, here is the co
|
|||
\\
|
||||
\\
|
||||
\texttt{var y, c, k, a, h, b;\\
|
||||
varexo e,u;\\
|
||||
varexo e, u;\\
|
||||
parameters beta, rho, alpha, delta, theta, psi, tau;\\
|
||||
\\
|
||||
alpha = 0.36;\\
|
||||
rho = 0.95;\\
|
||||
tau = 0.025;\\
|
||||
|
@ -96,6 +97,7 @@ beta = 0.99;\\
|
|||
delta = 0.025;\\
|
||||
psi = 0;\\
|
||||
theta = 2.95;\\
|
||||
\\
|
||||
phi = 0.1;\\
|
||||
\\
|
||||
model;\\
|
||||
|
|
|
@ -452,13 +452,14 @@ For completion's sake, and for the pleasure of seeing our work bear its fruits,
|
|||
|
||||
\texttt{var y c k i l y\_l w r z;\\
|
||||
varexo e;\\
|
||||
parameters beta psi delta alpha rho sigma epsilon;\\
|
||||
parameters beta psi delta alpha rho gamma sigma epsilon;\\
|
||||
\\
|
||||
alpha = 0.33;\\
|
||||
beta = 0.99;\\
|
||||
delta = 0.023;\\
|
||||
psi = 1.75;\\
|
||||
rho = 0.95; \\
|
||||
sigma = (0.007\/(1-alpha));\\
|
||||
rho = 0.95;\\
|
||||
sigma = (0.007/(1-alpha));\\
|
||||
epsilon = 10;\\
|
||||
\\
|
||||
model;\\
|
||||
|
@ -475,23 +476,22 @@ end;\\
|
|||
\\
|
||||
initval;\\
|
||||
k = 9;\\
|
||||
c = 0.7;\\
|
||||
c = 0.76;\\
|
||||
l = 0.3;\\
|
||||
w = 2.0;\\
|
||||
r = 0;\\
|
||||
z = 0; \\
|
||||
w = 2.07;\\
|
||||
r = 0.03;\\
|
||||
z = 0;\\
|
||||
e = 0;\\
|
||||
end;\\
|
||||
\\
|
||||
steady;\\
|
||||
\\
|
||||
check;\\
|
||||
\\
|
||||
shocks;\\
|
||||
var e = sigma\textasciicircum 2;\\
|
||||
end;\\
|
||||
\\
|
||||
stoch\_simul(periods=2100);}\\
|
||||
stoch\_simul(periods=2100);}
|
||||
|
||||
\subsection{The deterministic model (case of temporary shock)}
|
||||
|
||||
|
@ -502,7 +502,7 @@ alpha = 0.33;\\
|
|||
beta = 0.99;\\
|
||||
delta = 0.023;\\
|
||||
psi = 1.75;\\
|
||||
sigma = (0.007\/(1-alpha));\\
|
||||
sigma = (0.007/(1-alpha));\\
|
||||
epsilon = 10;\\
|
||||
\\
|
||||
model;\\
|
||||
|
@ -530,7 +530,7 @@ steady;\\
|
|||
check;\\
|
||||
\\
|
||||
shocks;\\
|
||||
var z;
|
||||
var z;\\
|
||||
periods 1:9;\\
|
||||
values 0.1;\\
|
||||
end;\\
|
||||
|
|
Loading…
Reference in New Issue