I see. I misunderstood you then.
But actually what I was thinking that you were saying was also a mistake, even if you did not say that.
So I changed it, and now I do not get that error message as before, no problem with eq-s 54 or 69 or variable iff. Also, the code does not say that the endval SS is not a SS. I uploaded the updated file.
There is a new problem though, namely that the path between the 2 SS-s is still not okay, matrix is singular. I tried to change simulation options (periods, stack_solve_algo and maxit) as follows, but it did not help:
"1. stack_solve_algo=0 or 6
0:
Warning: Matrix is singular to working precision.
> In sim1 at 128
In simul at 126
In SA_det_new_3 at 758
In dynare at 180
Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your
model.
6:
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In sim1_lbj at 85
In simul at 128
In SA_det_new_3 at 758
In dynare at 180
I terminated it, as it was running for a long time, so this is the only error message I see.
2. block, stack_solve_algo=1 or 2 or 3 or 4 or 5 or 6
1, 2, 3, 4, 5, 6:
Undefined function 'T3' for input arguments of type 'double'.
3. periods=2000
4. maxit=10000"
Regarding your point, I see what you mean. But, that equation is not a mistake. Entry is endogenous in my model. It means that there is a fixed entry cost which is equal to the discounted value of future profits by definition. This equation works perfectly fine when I consider stochastic simulation or Bayesian estimation (when ENTRYNF is a stochastic shock, ie. an exogenous state which is still related to an endogenous variable, PROFITF). So should I get rid of this equation? Then I have 2 more variables than equations...
What do you think?