Update userguide .mod files: replace $\hat{}$ and $\widehat{}$ with \textasciicircum
parent
15d4e8b88f
commit
e02e3b8a85
|
@ -115,7 +115,7 @@ where we go from the second to the third line by taking the exponential of both
|
|||
|
||||
The above is the equation we retain for the .mod file of Dynare into which we enter:\\
|
||||
\\
|
||||
\texttt{y=k(-1) $\widehat{}$ alp*n $\widehat{}$ (1-alp)*exp(-alp*(gam+e\_a))}\\
|
||||
\texttt{y=k(-1)\textasciicircum alp*n\textasciicircum (1-alp)*exp(-alp*(gam+e\_a))}\\
|
||||
\\
|
||||
|
||||
The other equations are entered into the .mod file after transforming them in exactly the same way as the one above. A final transformation to consider, that turns out to be useful since we often deal with the growth rate of technology, is to define \\
|
||||
|
@ -142,19 +142,19 @@ We of course do the same for prices, our other observable variable, except that
|
|||
\texttt{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$\hat{}$(alp-1)\\
|
||||
*n(+1)$\hat{}$(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)$\hat{}$alp*n$\hat{}$(-alp)/W;\\
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e\_a))*k(-1)$\hat{}$alp*n$\hat{}$(1-alp)/\\
|
||||
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)$\hat{}$alp*n$\hat{}$(1-alp)+(1-del)\\
|
||||
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);\\
|
||||
y = k(-1)$\hat{}$alp*n$\hat{}$(1-alp)*exp(-alp*(gam+e\_a));\\
|
||||
y = k(-1)\textasciicircum alp*n\textasciicircum (1-alp)*exp(-alp*(gam+e\_a));\\
|
||||
Y\_obs/Y\_obs(-1) = dA*y/y(-1);\\
|
||||
P\_obs/P\_obs(-1) = (p/p(-1))*m(-1)/dA;\\
|
||||
end;}\\
|
||||
|
@ -240,17 +240,17 @@ 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$\hat{}$(alp-1)\\
|
||||
*n(+1)$\hat{}$(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)$\hat{}$alp*n$\hat{}$(-alp)/W;\\
|
||||
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e\_a))*k(-1)$\hat{}$alp*n$\hat{}$(1-alp)/(m*l*c(+1)*P(+1)) = 0;\\
|
||||
c+k = exp(-alp*(gam+e\_a))*k(-1)$\hat{}$alp*n$\hat{}$(1-alp)+(1-del)*exp(-(gam+e\_a))*k(-1);\\
|
||||
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);\\
|
||||
P*c = m;\\
|
||||
m-1+d = l;\\
|
||||
e = exp(e\_a);\\
|
||||
y = k(-1)$\hat{}$alp*n$\hat{}$(1-alp)*exp(-alp*(gam+e\_a));\\
|
||||
y = k(-1)\textasciicircum alp*n\textasciicircum (1-alp)*exp(-alp*(gam+e\_a));\\
|
||||
Y\_obs/Y\_obs(-1) = dA*y/y(-1);\\
|
||||
P\_obs/P\_obs(-1) = (p/p(-1))*m(-1)/dA;\\
|
||||
end;\\
|
||||
|
|
|
@ -23,7 +23,7 @@ Suppose that the equation of motion of technology is a \textbf{stationary} AR(1)
|
|||
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);\\
|
||||
psi*c/(1-l) = w;\\
|
||||
c+i = y;\\
|
||||
y = (k(-1)$\hat{}$alpha)*(exp(z)*l)$\hat{}$(1-alpha);\\
|
||||
y = (k(-1)\textasciicircum alpha)*(exp(z)*l)\textasciicircum (1-alpha);\\
|
||||
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;\\
|
||||
r = y*((epsilon-1)/epsilon)*alpha/k(-1);\\
|
||||
i = k-(1-delta)*k(-1);\\
|
||||
|
@ -154,7 +154,7 @@ model;\\
|
|||
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);\\
|
||||
psi*c/(1-l) = w;\\
|
||||
c+i = y;\\
|
||||
y = (k(-1)$\hat{}$alpha)*(exp(z)*l)$\hat{}$(1-alpha);\\
|
||||
y = (k(-1)\textasciicircum alpha)*(exp(z)*l)\textasciicircum (1-alpha);\\
|
||||
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;\\
|
||||
r = y*((epsilon-1)/epsilon)*alpha/k(-1);\\
|
||||
i = k-(1-delta)*k(-1);\\
|
||||
|
|
|
@ -78,8 +78,8 @@ where the last line specifies the contemporaneous correlation between our two ex
|
|||
Alternatively, you can also write: \\
|
||||
\\
|
||||
\texttt{shocks;\\
|
||||
var e = 0.009 $\hat{}$ 2;\\
|
||||
var u = 0.009 $\hat{}$ 2;\\
|
||||
var e = 0.009\textasciicircum 2;\\
|
||||
var u = 0.009\textasciicircum 2;\\
|
||||
var e, u = phi*0.009*0.009;\\
|
||||
end;}\\
|
||||
|
||||
|
@ -99,10 +99,10 @@ theta = 2.95;\\
|
|||
phi = 0.1;\\
|
||||
\\
|
||||
model;\\
|
||||
c*theta*h$\hat{ }$(1+psi)=(1-alpha)*y;\\
|
||||
c*theta*h\textasciicircum (1+psi)=(1-alpha)*y;\\
|
||||
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))\\
|
||||
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));\\
|
||||
y = exp(a)*(k(-1)$\hat{ }$alpha)*(h$\hat{ }$(1-alpha));\\
|
||||
y = exp(a)*(k(-1)\textasciicircum alpha)*(h\textasciicircum (1-alpha));\\
|
||||
k = exp(b)*(y-c)+(1-delta)*k(-1);\\
|
||||
a = rho*a(-1)+tau*b(-1) + e;\\
|
||||
b = tau*a(-1)+rho*b(-1) + u;\\
|
||||
|
|
|
@ -200,7 +200,7 @@ One of the beauties of Dynare is that you can \textbf{input your model's equatio
|
|||
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);\\
|
||||
psi*c/(1-l) = w;\\
|
||||
c+i = y;\\
|
||||
y = (k(-1)$\hat{}$alpha)*(exp(z)*l)$\hat{}$(1-alpha);\\
|
||||
y = (k(-1)\textasciicircum alpha)*(exp(z)*l)\textasciicircum (1-alpha);\\
|
||||
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;\\
|
||||
r = y*((epsilon-1)/epsilon)*alpha/k(-1);\\
|
||||
i = k-(1-delta)*k(-1);\\
|
||||
|
@ -392,7 +392,7 @@ end;}\\
|
|||
Recall from our earlier description of stochastic models that shocks are only allowed to be temporary. A permanent shock cannot be accommodated due to the need to stationarize the model around a steady state. Furthermore, shocks can only hit the system today, as the expectation of future shocks must be zero. With that in mind, we can however make the effect of the shock propagate slowly throughout the economy by introducing a ``latent shock variable'' such as $e_t$ in our example, that affects the model's true exogenous variable, $z_t$ in our example, which is itself an $AR(1)$, exactly as in the model we introduced from the outset. In that case, though, we would declare $z_t$ as an endogenous variable and $e_t$ as an exogenous variable, as we did in the preamble of the .mod file in section \ref{sec:preamble}. Supposing we wanted to add a shock with variance $\sigma^2$, where $\sigma$ is determined in the preamble block, we would write: \\
|
||||
\\
|
||||
\texttt{shocks;\\
|
||||
var e = sigma $\widehat{}$ 2;\\
|
||||
var e = sigma\textasciicircum 2;\\
|
||||
end;}\\
|
||||
\\
|
||||
|
||||
|
@ -465,7 +465,7 @@ model;\\
|
|||
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);\\
|
||||
psi*c/(1-l) = w;\\
|
||||
c+i = y;\\
|
||||
y = (k(-1)$\hat{}$alpha)*(exp(z)*l)$\hat{}$(1-alpha);\\
|
||||
y = (k(-1)\textasciicircum alpha)*(exp(z)*l)\textasciicircum (1-alpha);\\
|
||||
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;\\
|
||||
r = y*((epsilon-1)/epsilon)*alpha/k(-1);\\
|
||||
i = k-(1-delta)*k(-1);\\
|
||||
|
@ -488,7 +488,7 @@ steady;\\
|
|||
check;\\
|
||||
\\
|
||||
shocks;\\
|
||||
var e = sigma $\widehat{}$ 2;\\
|
||||
var e = sigma\textasciicircum 2;\\
|
||||
end;\\
|
||||
\\
|
||||
stoch\_simul(periods=2100);}\\
|
||||
|
@ -509,7 +509,7 @@ model;\\
|
|||
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);\\
|
||||
psi*c/(1-l) = w;\\
|
||||
c+i = y;\\
|
||||
y = (k(-1)$\hat{}$alpha)*(exp(z)*l)$\hat{}$(1-alpha);\\
|
||||
y = (k(-1)\textasciicircum alpha)*(exp(z)*l)\textasciicircum (1-alpha);\\
|
||||
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;\\
|
||||
r = y*((epsilon-1)/epsilon)*alpha/k(-1);\\
|
||||
i = k-(1-delta)*k(-1);\\
|
||||
|
|
Loading…
Reference in New Issue