Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: can I replace with missing value with 0?
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: can I replace with missing value with 0?
Date
Tue, 20 Aug 2013 00:21:20 +0100
You could but that would be a bad idea. If sales are known to be zero
or negative, then a logarithmic transformation is not a good idea in
the first place. (A logarithm of 0 corresponds to sales of 1.)
Nick
[email protected]
On 19 August 2013 22:47, Ken Ning <[email protected]> wrote:
> Hi statausers
>
> If I am using a formula taking ln(sales) (e.g the formula--[ ln (sales
> t)-ln(sales t-1) ] ) and for some years sales is zero or negative, is
> there an accepted way to retain the observations for those years? For
> example can you just repalce the missing result with 0.
>
> year sales log value
> 2001 10010 9.21134
> 2002 10020 9.212338
> 2003 30010 10.30929
> 2004 0 missing (replace with 0?)
> 2005 14010 9.547527
> 2006 10555 9.264355
> 2007 70010 11.15639
> 2008 -200 missing (replace with 0?)
>
> Many thanks
> Ken
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/