# Variables disappear from solution

**URL:** https://forum.dynare.org/t/variables-disappear-from-solution/19360
**Category:** Stochastic simulations
**Created:** [26 November 2021 21:07 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360 "2021-11-26T21:07:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)
#### Post date: [26 November 2021 21:07 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360/1 "2021-11-26T21:07:08Z")

</div>

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?

> **Summary**
>
> [investmentGE\_Nov2021\_UR\_invsimpS4.mod](https://forum.dynare.org/uploads/short-url/8WpW4yJRADiGXmniKZuPL6y3WNC.mod) (7.7 KB)

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [28 November 2021 19:21 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360/2 "2021-11-28T19:21:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)
#### Post date: [29 November 2021 02:52 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360/3 "2021-11-29T02:52:35Z")

</div>

4.6.4  
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…”

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [29 November 2021 08:02 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360/4 "2021-11-29T08:02:45Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jimmyk](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/ba8739/32.png) [@jimmyk](https://forum.dynare.org/u/jimmyk)
#### Post date: [29 November 2021 18:56 UTC](https://forum.dynare.org/t/variables-disappear-from-solution/19360/5 "2021-11-29T18:56:46Z")

</div>

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.
