"Log of non-positive number"

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

odovakar
Posts: 11
Joined: Wed Jan 14, 2009 12:06 pm

"Log of non-positive number"

Postby odovakar » Fri Mar 20, 2009 8:47 am

Hi again Gareth and all!

I finally managed to solve the problem with the Hausman test by using Eviews 6.0 instead of 5.0 (see post below). However, according to Murphy's Law, it seems that where one problem ends, another one must start. Now, when I tried to redo the estimation in 6.0, using exactly the same panel as before, and with exactly the same settings, I keep getting the error message "Log of non-positive number"! How is this possible!!?? In 5.0 this worked perfectly and I got excellent results.

I have the following panel:

log(inflow) log(tradefreedom(-1)) log(fdi(-1)) log(inflow(-1)) log(remit(-1)) log(unempl_i(-1)) log(democ(-1))

, where inflow is the number of immigrants from country X, year by year, to a group of other countries, depending on the subsequent variables. I have tried eliminating some variables and/or lags, but the error message keeps returning. The problem is obviously in the logs. What can be wrong? Does version 6 treat logs or unbalanced panels differently than version 5?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Log of non-positive number"

Postby EViews Gareth » Fri Mar 20, 2009 8:51 am

Update your copy of EViews 6.
Follow us on Twitter @IHSEViews

odovakar
Posts: 11
Joined: Wed Jan 14, 2009 12:06 pm

Re: "Log of non-positive number"

Postby odovakar » Fri Mar 20, 2009 10:31 am

Hehe...again? :lol:
Are you saying that this problem is a known bug in 6.0?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Log of non-positive number"

Postby EViews Gareth » Fri Mar 20, 2009 10:42 am

Not a bug, but a difference in implementation in early versions of 6.
Follow us on Twitter @IHSEViews

odovakar
Posts: 11
Joined: Wed Jan 14, 2009 12:06 pm

Re: "Log of non-positive number"

Postby odovakar » Fri Mar 20, 2009 12:08 pm

Oh ****, that's bad news. The problem is that I only have version 5 myself. To use version 6 I had to sit at the university, but it would probably be hard to persuade the administrator to do an upgrade there, wouldn't it? Therefore: Is there any way at all that I could do the estimation in version 5 and then transfer the results to version 6 in order to carry out the Hausman test?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: "Log of non-positive number"

Postby startz » Fri Mar 20, 2009 12:18 pm

odovakar wrote:... that's bad news. The problem is that I only have version 5 myself. To use version 6 I had to sit at the university, but it would probably be hard to persuade the administrator to do an upgrade there, wouldn't it? Therefore: Is there any way at all that I could do the estimation in version 5 and then transfer the results to version 6 in order to carry out the Hausman test?


Upgrading 6 to the latest version is free and easy. Because EViews is quite good about fixing bugs, it makes sense for an administrator to do it fairly regularly.

You should be able to save the estimates in an equation object in version 5 and then simply re-estimate and do the test in 6 in a few seconds.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Log of non-positive number"

Postby EViews Gareth » Fri Mar 20, 2009 12:21 pm

You could always update your home copy of 5 to 5.1
Follow us on Twitter @IHSEViews

odovakar
Posts: 11
Joined: Wed Jan 14, 2009 12:06 pm

Re: "Log of non-positive number"

Postby odovakar » Fri Mar 20, 2009 12:55 pm

You could always update your home copy of 5 to 5.1


Thanks. Yes, I thought of that myself. That is of course an option, but now I'm almost afraid to do the upgrade! What happens if 5.1 for some reason will have the same "implementation bug" as 6.0? Then I will have to go back to 5.0, i.e. uninstall/reinstall.

But if I do the transfer instead: You mean that I should just open (or import?) the equation object in 6.0 and then run the Hausman test?

tex
Posts: 3
Joined: Wed Apr 22, 2009 2:44 pm

Re: "Log of non-positive number"

Postby tex » Wed Apr 22, 2009 3:02 pm

QMS Gareth wrote:Update your copy of EViews 6.

Gareth - i re-installed version 6 using the CD disc that eviews provided (recd by mail on 4/10/09), and also installed the patch in your link, and i am still getting that error message.

i made sure that the equation i developed under version 5 was the same, including all data files. however, even when i try to run the version 5 equation with version 6, i get the error message.

in Version 6, the equation that generated the error message was as follows:
log(motmwh) c log(motmwh(-1))

it's funny because when i chop off the "log(motmwh(-1))", i do not get an error message. so it's gotta be coming from the lag-dependent variable.
Last edited by tex on Wed Apr 22, 2009 3:22 pm, edited 1 time in total.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Log of non-positive number"

Postby EViews Gareth » Wed Apr 22, 2009 3:20 pm

Sounds weird. If I were to take a completely random guess, I'd say it actually an error that's occurring in one of the summary statistics. Could you post your workfile?
Follow us on Twitter @IHSEViews

tex
Posts: 3
Joined: Wed Apr 22, 2009 2:44 pm

Re: "Log of non-positive number"

Postby tex » Wed Apr 22, 2009 3:25 pm

gareth - i edited my post to mention that i also installed the patch. here is the data i am using and the equation that gives me the error is:

log(motmwh) c log(motmwh(-1))

note that the observation period i am specifying is 1980 2008


1975 0
1976 0
1977 0
1978 0
1979 0
1980 22693
1981 23318
1982 23253
1983 23058
1984 24247
1985 24545
1986 25271.192
1987 25389.622
1988 26262.415
1989 26322.629
1990 27633.885
1991 28443.029
1992 29726.889
1993 30842.372
1994 32731.35
1995 33880.39099999999
1996 34482.56499999999
1997 33687.03300000001
1998 34882.62
1999 35682.835
2000 36743.65300000001
2001 36491.258
2002 35580.32100000001
2003 36648.18999999999
2004 36044.756
2005 36910.7393
2006 36265.839
2007 36896.085
2008 34939.602
2009 0
2010 0
2011 0
2012 0
2013 0
2014 0
2015 0
2016 0
2017 0
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: "Log of non-positive number"

Postby EViews Gareth » Wed Apr 22, 2009 3:34 pm

Check your setting under Options->Auto-Series in Stats.

It should be at "Treat evaluation errors as NAs".
Follow us on Twitter @IHSEViews

tex
Posts: 3
Joined: Wed Apr 22, 2009 2:44 pm

Re: "Log of non-positive number"

Postby tex » Wed Apr 22, 2009 3:48 pm

Gareth - that worked. thank you. :D

mtimanti
Posts: 2
Joined: Mon Feb 11, 2013 11:51 am

Re: "Log of non-positive number"

Postby mtimanti » Mon Mar 11, 2013 8:19 am

Hi Gareth,
I'm trying to run a regression in EViews 7 where my dependent variable is win percentage but in the form of ln(winpercentage/1-winpercentage) however when I try to run it, I get the error message of "log of non positive number". Any ideas of how to get round this problem?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: "Log of non-positive number"

Postby startz » Mon Mar 11, 2013 8:23 am

mtimanti wrote:Hi Gareth,
I'm trying to run a regression in EViews 7 where my dependent variable is win percentage but in the form of ln(winpercentage/1-winpercentage) however when I try to run it, I get the error message of "log of non positive number". Any ideas of how to get round this problem?

Put in some more parentheses? Looks like your argument is always zero.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 11 guests