Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Filling Missing Times/Dates and Corresponding Variable Entries


From   Muhammad Anees <aneesmkhattak@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Filling Missing Times/Dates and Corresponding Variable Entries
Date   Thu, 26 May 2011 13:20:23 +0500

Dear All!

I have the following examplified stock market data on three different
companies in different csv files for the same times or dates in each
sheet:

time                      share price            market capitalization
       volume

01JAN2005            20                          2000
         10022
02JAN2005            21                          2001
         10023
03JAN2005            22                          2002
         10024
04JAN2005            23                          2003
         10025
05JAN2005            24                          2004
         10026
.
.
08JAN2005            26                         2007
        10029
09JAN2005            27                         2008
        10030
10JAN2005            28                         2009
        10031
11JAN2005            29                         2010
        10032
12JAN2005            30                         2011
        10033
.
.
and so on where the missing date is either a weekend or public holidy.

Now my problem is how to fill the time gaps and the corresponding
values for given variables using either values on the prior dates of
each variable or average of the last and next working dates. I know
stata offers ways to fill missing values but how can I do it in this
case.

Thank you very much in advance for guiding me through the problem.


--------
Best,
Anees
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index