Taking log of non-positive number as “0”

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

Namploy
Posts: 4
Joined: Tue Feb 27, 2018 4:48 am

Taking log of non-positive number as “0”

Postby Namploy » Mon Mar 05, 2018 6:51 am

I know that taking log can’t apply with “0” (zero); however the raw data has some of “0”.
So my question is how can I take log with such data (include some “0”? Or if you have any suggestion please let me know. My friend told me that I might classify data in group, but I have no idea how to do it. Please help.

The data is “panel data”

Thank you.

[example data]
https://imageshack.com/i/pnO3QDLQj
Last edited by Namploy on Mon Mar 05, 2018 11:49 pm, edited 1 time in total.

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

Re: Taking log of non-positive number as “0”

Postby EViews Gareth » Mon Mar 05, 2018 7:23 am

What do you want the log of zero to be?
Follow us on Twitter @IHSEViews

Namploy
Posts: 4
Joined: Tue Feb 27, 2018 4:48 am

Re: Taking log of non-positive number as “0”

Postby Namploy » Tue Mar 06, 2018 8:03 am

EViews Gareth wrote:What do you want the log of zero to be?




Thank you for you response.
For your question, I still have no idea what could "log of zero" be? Actually, I don't understand EView Program very well.

Let me explain it
I do "Simultaneous Equations" between demand and supply by running data in 3 steps as follows:

1. run all data by regression
2. adjust result/equation by take log, which is the problem because "0" in data
3. estimate data by 2SLS (two-state least square)

I already test data in Stata which the program exclude "0" automaticly and has some summary. Anyway I would like to run data agian by EViews program to compare the results, but I stuck in 2nd step.



Thank you

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

Re: Taking log of non-positive number as “0”

Postby EViews Gareth » Tue Mar 06, 2018 8:06 am

Not sure what you mean. EViews will drop the zero observations if you're taking logs.
Follow us on Twitter @IHSEViews

Namploy
Posts: 4
Joined: Tue Feb 27, 2018 4:48 am

Re: Taking log of non-positive number as “0”

Postby Namploy » Wed Mar 07, 2018 12:58 am

EViews Gareth wrote:Not sure what you mean. EViews will drop the zero observations if you're taking logs.



I'll check data now. thank you


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 11 guests