# How to use dynareOBC

**URL:** <https://forum.dynare.org/t/how-to-use-dynareobc/18975>\
**Category:** Dynare contributions and examples\
**Created:** [27 September 2021 02:11 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975 "2021-09-27T02:11:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![heroluotao](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heroluotao](https://forum.dynare.org/u/heroluotao)\
**Post date:** [27 September 2021 02:11 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975/1 "2021-09-27T02:11:38Z")

</div>

Why I can never compute dashed line with dynareOBC, only solid line result.

```auto
var C lamb N w r A K mu q I xi Y;

varexo e_a e_xi;

parameters thetta chi betta alfa phi deltta rhoa rhoxi xiss;

thetta=7.71;
chi=1;
betta=0.99;
alfa=1/3;
phi=4;
deltta=0.02;
rhoa=0.98;
rhoxi=0.9;
xiss=0.015;

model;
1/C=lamb;
thetta*N^chi=lamb*w;
lamb=betta*lamb(1)*(1+r);
w=(1-alfa)*A*K(-1)^alfa*N^(-alfa);
1+mu=q*(1-phi*(I/K(-1)-deltta));
q=betta*lamb(1)/lamb*(alfa*A*K(-1)^(alfa-1)*N^(1-alfa)+q(1)*((1-deltta)+mu(1)*xi(1)-phi/2*(I(1)/K-deltta)^2+phi*(I(1)/K-deltta)*I(1)/K));
Y=A*K(-1)^alfa*N^(1-alfa);
Y=C+I;
K=I-phi/2*(I/K(-1)-deltta)^2*K(-1)+(1-deltta)*K(-1);
%I=xi*q*K(-1);
0=min(mu,xi*q*K(-1)-I);
log(A)=rhoa*log(A(-1))+e_a;
log(xi)=(1-rhoxi)*log(xiss)+rhoxi*log(xi(-1))+e_xi;
end;

initval;
A=1;
xi=xiss;
r=1/betta-1;
mu=deltta/xi-1;
q=1+mu;
w=(1-alfa)*A*(alfa/(1/betta-(1-deltta)-mu*xi))^(alfa/(1-alfa));
N=(1/thetta*w*A/(w/(A*(1-alfa))-deltta*(w/(A*(1-alfa)))^(1/alfa)))^(1/(1+chi));
K=(alfa/(1/betta-(1-deltta)-mu*xi))^(1/(1-alfa))*N;
Y=A*K^alfa*N^(1-alfa);
I=deltta*K;
C=Y-I;
lamb=1/C;
end;

resid;
check;
steady;

shocks;
var e_a;
stderr 0.01;
var e_xi;
stderr 0.01;
end;

stoch_simul(order=2,slowirfs=40)Y N I C q mu;

```

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [27 September 2021 08:43 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975/2 "2021-09-27T08:43:03Z")

</div>

What do you mean with solid and dashed lines? Also, for DynareOBC, you should tag @cfp

---

<div class="post-metadata">

**Author:** ![heroluotao](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/e36b37/32.png) [@heroluotao](https://forum.dynare.org/u/heroluotao)\
**Post date:** [27 September 2021 09:08 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975/4 "2021-09-27T09:08:03Z")

</div>

Dear teacher, The impulse response function calculated by dynareOBC generally has two lines, a solid line without constraints and a dashed line with constraints. Sometimes after using the command, only one solid line comes out, no dashed line. Today I re-run a program, the program is as follows. In the command dynareOBC filename.mod shockscale=24.5, “Shockscale =24.5” is added and both solid and dashed lines appear. Whether the initial command schockscale should be added every time it is run.

---

<div class="post-metadata">

**Author:** ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)\
**Post date:** [27 September 2021 09:15 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975/5 "2021-09-27T09:15:40Z")

</div>

My wife just gave birth so I can’t look at this. Ask Jonathan Swarbrick who is a regular DynareOBC user.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [27 September 2021 09:26 UTC](https://forum.dynare.org/t/how-to-use-dynareobc/18975/6 "2021-09-27T09:26:06Z")

</div>

@cfp Congratulations!
