Bookmark and Share

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: Partially balancing an unbalanced panel data set


From   Scott Merryman <[email protected]>
To   [email protected]
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
<[email protected]> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index