# How to use dynareOBC

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

``````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;

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;
``````

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

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.

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

@cfp Congratulations!