[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: lagged averages in a panel, if data is not available for every year
Carmine da Napoli --
I recommend you make the averages by hand, which will create the
average as missing if any period in the window is missing, and offer
flexibility limited only by your imagination (see -help tsvarlist- for
webuse grunfeld, clear
la var ak "Average of prior three periods capital"
la var ai "Average of prior three periods investment"
xtreg mv ak ai, fe cluster(com)
but be aware that the estimated impact of a three-prior-period average
need look nothing like the average impact of the three prior periods:
xtreg mv L(1/3).ks L(1/3).inv, fe cluster(com)
On 5 Jun 2007 13:06:18 -0000, <firstname.lastname@example.org> wrote:
My dataset is made up of a certain number of firms, and contains variables over the time period from 1995 to 2000. The panel in uncomplete and, in order to mitigate survivorship bias, companies are included in the analysis even if data is not available for every year.
Afer having sorted my dataset ( - sort id year - , - tsset id year - ), the regression equation to estimate is:
y_i,t = f( X1_i,t-3 , X2_i,t-3, ...)
where: "i" refers to the individual firms, "t" to the time period of the variable (measured at the accounting year end), and "t-3" to the average for the previous three years.
* For searches and help try: