I have the following code and I am receiving parse error at ‘=’ : usage might be invalid MATLAB syntax
Please help.
var c k y L z w r;
varexo e;
% Declare the parameters
%-----------------------
parameters beta1 alpha1 delta1 phi1 rho1 sigmae;
% Initialize the parameters: give them numerical values
%-----------------------------------------------------
beta1=0.9961;
alpha1=0.36;
delta1=0.0389;
phi1=2.0163;
rho1=0.66505;
sigmae=0.0182;
% Declare the model: write down the equations that characterize the solution of the model
%-----------------
model;
phi1*exp(c)=(1-phi1)*(1-exp(L))*exp(z)*(1-alpha1)*(exp(k(-1)))^(alpha1))*(exp(L)^(-alpha1));
exp(c(+1))=beta1*exp(c)*exp(z(+1))*alpha1*((exp(k))^(alpha1-1))*(exp(L(+1))^(1-alpha1))+1-delta1;
exp(c)+exp(k)-(1-delta1)*exp(k(-1))=exp(y);
exp(y)=exp(z)*((exp(k(-1)))^alpha1)*((exp(L))^(1-alpha1));
exp(w)=(1-alpha1)*exp(z)*((exp(k(-1)))^(alpha1))*((exp(L))^(-alpha1));
exp(r)=alpha1*exp(z)*((exp(k(-1)))^(alpha1-1))*(exp(L)^(1-alpha1));
z=rho1*z(-1)+e;
end;
% EXERCISE: Compute impulse responses to a productivity shock
%-----------------------------------------------------------
% Enter values of all variables in the deterministic steady state
initval;
L=log(0.33);
k=log((exp(L))*(((1-alpha1)*(1/(beta1-1+delta1)))^(1/(alpha1-1))))
y=log(exp(z)*exp(k)^alpha1*exp(L)^(1-alpha1));
c=log(exp(y)-delta1*exp(k));
w=log((1-alpha1)*(exp(k)^(alpha1))*(exp(L)^(-alpha1)));
r=log(alpha1*(exp(k)^(alpha1-1))*(exp(L)^(1-alpha1)));
z=log(1);
end;
steady;
% difference between codes^ and below is the initval equations:
%L=log(0.33);
%k=log(((1/beta1-1+delta1)/(alpha1*exp(L)^(1-alpha1)))^(1/(alpha1-1)));
%y=log(exp(z)*exp(k)^alpha1*exp(L)^(1-alpha1));
%c=log(exp(y)-delta1*exp(k));
%r=log(alpha1*exp(k)^(alpha1-1)*exp(L)^(1-alpha1));
%w=log((1-alpha1)*exp(k)^alpha1*exp(L)^(-alpha1));
%z=log(1);
% Specify the variance of the shocks
shocks;
var e; stderr sigmae;
end;
% Run the stochastic simulation
%-----------------------------
stoch_simul(irf=300, periods=2000);