When using rollreg on "real" data I learnt that my data cannot contain
any gaps. Unfortunately many of my firms have gaps in their data so I
need to remove them. Can anyone suggest how to do this? For concreteness
here is an example of my problem. In the dataset below I need to remove
all observations with id == 1. (In practice I don't know in advance
which firms need to be removed, I need to test for gaps.) Also the vast
majority of firms in my sample begin with a series of missing values.
. tsset id year
panel variable: id, 1 to 2
time variable: year, 1980 to 1995
. rollreg y x1 x2, move(5) stub(rr)
Number of gaps in sample: 1
Observations with preceding time gaps
----------------------------------
Record | id year
----------+-----------------------
7 | 1 1986
----------------------------------
sample may not contain gaps
r(198);