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

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

hasan1
Posts: 4
Joined: Mon Aug 05, 2019 1:18 pm

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

Postby hasan1 » Mon Aug 05, 2019 8:15 pm

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!

amrsherif
Posts: 99
Joined: Mon Jul 23, 2018 4:34 pm

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

Postby amrsherif » Sat Aug 10, 2019 12:12 pm

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 73 guests