# Initial value NaN although initval block used

**URL:** https://forum.dynare.org/t/initial-value-nan-although-initval-block-used/22028
**Category:** Steady state
**Created:** [2 March 2023 20:54 UTC](https://forum.dynare.org/t/initial-value-nan-although-initval-block-used/22028 "2023-03-02T20:54:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![needhelp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/fbc32d/32.png) [@needhelp](https://forum.dynare.org/u/needhelp)
#### Post date: [2 March 2023 20:54 UTC](https://forum.dynare.org/t/initial-value-nan-although-initval-block-used/22028/1 "2023-03-02T20:54:51Z")

</div>

Hi!

I am facing this error where the initial values of some my of variables are NaN. Why does this arise, when I have specified the initial values (which I am confident are not equal to NaN) in the initval block? I attach my mod file here just in case.

I was trying to refer to Basu and Bundick’s 2017 Uncertainty Shocks in a Model of Effective Demand, and also Pfeifer’s replication codes for the paper: the former does not have a steady state file while the latter does. Is there something wrong with my initval, and perhaps I should create my own steady state file? What is the best way to proceed, when I do not want to log linearize my equations by hand?  
[shadow.mod](https://forum.dynare.org/uploads/short-url/2c6WrtstMIizMfwMYOdM15WU0Qv.mod) (7.8 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: [3 March 2023 15:12 UTC](https://forum.dynare.org/t/initial-value-nan-although-initval-block-used/22028/2 "2023-03-03T15:12:08Z")

</div>

See

> [@Model doesn't work . Can't understand error message](https://forum.dynare.org/t/model-doesnt-work-cant-understand-error-message/19438/8):
>
> Your initial values cannot be sequentially executed. See [Debugging parameter initializations and steady\_state\_model-blocks - YouTube](https://www.youtube.com/watch?v=C15xKE5s4Lo)

In your case `pibar` in `Rbar = pibar/beta;` was not defined.
