Variables disappear from solution

A strange problem: I have a model with approximately 60 variables. I am solving it to do a stochastic simulation. The model appears to solve, and I get impulse responses, but five of the variables (labeled n0u, n1u, n2u, n3u, and n4u in the attached file) simply disappear from the output. I only get an error when I try to write the output, when it says “Unrecognized function or variable ‘n0u_w’.” Since these 5 variables are proportional to 5 other variables (k0u,…,k4u), I don’t really need to solve for them, so I tried a workaround of eliminating them from my “out=cat(…)” list (note that I comment out the first list and replace it with a second one omitting those variables). But I still get the same error, as the .driver code seems to reinsert the (n0u_w,…,n4u_w) back into the cat() statement. So why do the variables disappear, and why do they reappear in the .driver file?


investmentGE_Nov2021_UR_invsimpS4.mod (7.7 KB)

I cannot reproduce any error. Which Dynare version are you using?

I didn’t get an error until I tried to write the output. Those 5 variables I mentioned were not in the output, so when I tried to write using the cat() operator I got an error “Unrecognized function or variable…”

Is the above mod-file the one that generates the error message? And what is the exact error message?

The error was at line 192, “Unrecognized function or variable ‘n0u_w’," because for some reason n0u and some other variables were mysteriously not being solved for, though there was no earlier error. But I just reran the program and for better or worse can no longer reproduce the error. I have no explanation, but we can close this out. Sorry for the bother.