More equations than endogenous variables in RBC model

I recently came across my late father's bachelor's thesis, in which a RBC model is described. It appears to be a variant of Hansen's 1985 model with indivisible labor. I wrote the model into Dynare to play around with it, but according to the software, there are 16 equations but 15 endogenous variables, and thus the model cannot be solved by Dynare. Due to my lack of training in economics and dynamic optimization, I have no way of even beginning to fix this problem and I was hoping I could use your help. Here I present a screenshot of the model, which I typed out in Word (don't know LaTeX, sorry).

The Dynare code is:

%Modelo de Moloche (1993)
%Variables
var y ct c l h pi m i k lambda tau x phi1 phi2;
predetermined_variables k i;
varexo elambda etau ex;
parameters beta delta xi1 xi2 mc mi a p ho theta gamma sigma1;

beta=0.96;
gamma=0.91;
ho=0.582812;
mc=0.035;
mi=0.852;
p=0.89;
theta=0.3;
xi1=-0.19;
xi2=0.94;
a=1.51146;
sigma1=1;
delta=0.1;

model;
%Definiciones
ct=c + mc*c;
l=1-h;
h=pi*ho;
y=lambda*(k^theta)*(h^(1-theta));
phi1=1+tau*mc;
phi2=1+tau*mi;

%Restricciones presupuestarias
i=k-(1-delta)*k(-1);
m=mc*c + mi*i;
y+x = c+i+ tau*m;

%Variables estocásticas
log(lambda) = p*log(lambda(-1))+elambda;
log(x)=xi1 + xi2*log(x(-1))+ex;
log(tau)=gamma*log(tau(-1))+etau;

%Ecuaciones de Euler
(-a*log(1-ho))=((1-theta)*ho*(k^theta)*(h^(-theta)))/(phi1*c);
beta*((theta*lambda(+1)*(k(+1)^(theta-1))*(h^(1-theta))+(phi2(+1)*(1-delta))))/(phi1(+1)*c(+1))-(phi2/phi1*c)=0;
lambda*(k^theta)*(h^(1-theta))+x-(phi1*c)-(phi2*k(+1))+phi2*(1-delta)*k =0;
end;

initval;
y=-0.01255;
ct=-0.00731;
pi=0.5;
m=0.07605;
i=0.02654;
k=0.00847;
lambda=0.001;
tau=0.01027;
x=1;

end;
resid(1);

shocks;
var elambda = sigma1;
end;

stoch_simul(order=2,irf=40) ;

This is really important to me as my father loved this stuff and it's a sort of memory of him. I would be extremely grateful for any kind of help. I apologize in advance for any errors I might have made in the layout of the model, I tried to stay true to the original text, which is in spanish and only available in printed form.

• Is it possible to provide link for the whole thesis? Also can you please share your code mistake might have been made there
– 1muflon1
Dec 8 '21 at 0:16
• @1muflon1 no, it's not possible. It is available only in printed form. I can share the code.
– DDV
Dec 8 '21 at 5:21