On Sun, 2010-12-05 at 19:15 -0500, Allin Cottrell wrote:
On Sun, 5 Dec 2010, Giuseppe Vittucci wrote:
What version of gretl are you using?
1.9.3
And is your dataset
recognized by gretl as a panel? (It should say "panel" in the
main window, under the listing of series.)
Yes
I tried the following
and could not replicate the problem you describe:
open greene14_1.gdt # a panel dataset
logs C
series l_C1 = l_C(+1)
diff l_C1
print l_C l_C1 d_l_C1 --byobs
The series l_C1 and d_l_C1 both have missing values at the last
observation for each panel group, as expected.
Ok. I replicated the bug with the greenedataset.
Try the following:
open greene14_1.gdt # a panel dataset
logs C
diff l_C(+1)
print l_C l_C1 d_l_C1 --byobs
One point to note is that if you take the first difference of a
series previously defined as a lead you lose an observation
unnecessarily at the start of the data. You can preserve the extra
observation by doing, e.g.
d_l_C1 = l_C(+1) - l_C
Oh, thanks. I didn't realize it cause in DOLS you usually generate the
same number of leads and lags and therefore it always happens to lose
some initial and final observation.
I was actually running the two commands this way because I needed an
easy way to generate and control lags and leads of first differenced
variables for DOLS.
I thought the easiest way in gretl was:
diff l_h(-2 to +2) l_sd(-2 to +2) l_sf(-2 to +2)
ols l_tfp du_* l_h l_sd l_sf d_* --robust
Indeed, if I first take differences:
diff l_h l_sd l_sf
One can easy generate lags (with the appropriate command), but not leads.
Is there a better way to proceed?
Thanks
Giuseppe