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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Partially balancing an unbalanced panel data set


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Partially balancing an unbalanced panel data set
Date   Thu, 17 Jun 2010 07:02:41 -0500

xtset com qu
tsfill
replace assets = (l.asset + f.asset)/2 if asset == .

Scott


On Thu, Jun 17, 2010 at 6:55 AM, A Loumiotis
<antonis.loumiotis@gmail.com> wrote:
> Dear Statalist,
>
> I have a panel dataset that contains quarterly balance sheets of
> corporations that belong to the Athens stock exchange (ASE) starting
> from the first quarter of 2006 and ending at the fourth quarter of
> 2009.  This panel dataset is unbalanced because of two reasons.
> First, there are companies in the panel dataset that were listed in
> the (ASE) after the first quarter of 2006 or exited the ASE before the
> fourth quarter of 2009.  Second data for some quarters data are
> missing for some companies although there were in the ASE. What I want
> to do is to partially balance this dataset so that it corrects the
> second reason that the panel set is unbalanced but not the first.
> Last I would like to fill in the missing values with the average of
> the previous and the next value.

*
*   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