Page 1 of 1

Taking log of non-positive number as “0”

Posted: Mon Mar 05, 2018 6:51 am
by Namploy
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

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

Posted: Mon Mar 05, 2018 7:23 am
by EViews Gareth
What do you want the log of zero to be?

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

Posted: Tue Mar 06, 2018 8:03 am
by Namploy
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

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

Posted: Tue Mar 06, 2018 8:06 am
by EViews Gareth
Not sure what you mean. EViews will drop the zero observations if you're taking logs.

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

Posted: Wed Mar 07, 2018 12:58 am
by Namploy
Not sure what you mean. EViews will drop the zero observations if you're taking logs.

I'll check data now. thank you