Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Missing values


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: Missing values
Date   Thu, 27 Aug 2009 10:05:44 -0400

Beatrice Crozza<[email protected]> :
There are a lot of possible reasons.  To see one, try:
 sysuse sp500, clear
 tsset date
 g r=close/l.close-1
 g dr=(close/close[_n-1]-1)/(date-date[_n-1])
 li in 1/10

On Thu, Aug 27, 2009 at 9:22 AM, Beatrice
Crozza<[email protected]> wrote:
> Dear all,
>
> I have just realised to have a problem with my database.
> I need to generate the variable return from my prices. So  I did:
> tsset time
> gen lreturn= ln(price/l.price)
> but the result is that there are 12 missing values.
> This problem does not happen with Eviews, for example. What I did wrong?
>
> Thank you very much
>
> Bea

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index