Thanx Ignacio,
Indeed, your script works fine whatever the time series frequency may be.
That points out another question: why is the same script "2005:01")> working
in monthly and quaterly data but failing in annual data ? As long as we deal with time
series it should result to the same behavior regardless of the frequency.
best,
artur
Message du 26/07/10 09:57
De : "Ignacio Diaz-Emparanza"
A : "Gretl list"
Copie à :
Objet : Re: [Gretl-users] genr dummy on annual data
artur bala escribió:
> Hello,
> On an annual dataset spanning from 1970 to 2010, I want to create a
> dummy valid from 2005 and on.
> I tried the following command line :
> * genr D = (t > "2005")*
> but the newly created variable D has zeros only. Same result through the
> GUI.
> Note that this script does work fine for a monthly dataset (let's say
> *genr D = (t > "2005:01")*).
> best,
> artur
>
Artur,
for annual data, "t" and "obs" refers to the 1-entry index. Thi is
exactly the same as if you put a single number, genr D= t>2005, with
quarterly or monthly data. This is indicating the observation at the
2005th place in the series. For the behaviour that you want, you should use
genr D = (t > obsnum(2005))
(see discussion in gretl-dev list some months ago, initiated at the
message:
http://lists.wfu.edu/pipermail/gretl-devel/2010-February/002461.html )
--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.ea3.ehu.es
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail
www.laposte.net