Page 1 of 1

Finding the series that leads to "log of nonpositive" error

Posted: Mon Aug 05, 2019 8:15 pm
by hasan1
Hi All,

I have a model with 60000+ equations. When I try to solve the model (deterministically), I am getting the "log of nonpositive number" error. Obviously a negative value appears somewhere. But the error window doesnt tell us anything else.

My question is, is there a quick way in Eviews to find the series that leads to this error? I dont want to rely on python or something else to find the troublesome series.

Thanks in advance!

Re: Finding the series that leads to "log of nonpositive" error

Posted: Sat Aug 10, 2019 12:12 pm
by amrsherif
Not sure if this is late but if you’re still having the issue, you might want to use a string or scalar as an identifier as you loop through the equations.

For example, say i have 10 equations then:

scalar i=1
for %equation 1 2 3
Estimate your equation here
i=i+1
next

The variable i will tell you where the error is

There may be a more efficient way but this is the first thing that comes to mind