El mar, 16-02-2010 a las 16:00 -0500, Allin Cottrell escribió: > The manual is now updated, but it's not possible to issue a > warning, I'm afraid. When the user types, e.g., "1980" after "==" > in a genr expression, we don't know what he/she intends to compare > it against, and whether the comparison make sense. > > Allin.
I see that. But I see this is because you have only solved "my problem" changing the behaviour of 'obs' for annual data. But the things are not so clear for the user, because the paragraph below (extracted from the 'genr' manual entry) describes 3 or 4 different uses of the 'obs' function: "The special variable obs serves as an index of the observations. For instance genr dum =(obs=15) will generate a dummy variable that has value 1 for observation 15, 0 otherwise. You can also use this variable to pick out particular observations by date or name. For example, genr d = (obs>1986:4), genr d = (obs>"2008/04/01"), or genr d = (obs="CA"). If daily dates or observation labels are used in this context, they should be enclosed in double quotes. Quarterly and monthly dates (with a colon) may be used unquoted. Note that in the case of annual time series data, the year is not distinguishable syntactically from a plain integer; therefore if you wish to compare observations against obs by year you must use the function obsnum to convert the year to a 1-based index value, as in genr d = (obs>obsnum(1986))." I think it would be more clear if 'obs' were used only for 1-base periods. So the user should use 'obsnum' for all the other possibilities: genr d = (obs>1986:4) --> genr d = (obs>obsnum(1986:4)) genr d = (obs>"2008/04/01") -- genr d = (obs>obsnum(2008/04/01)) genr d = (obs="CA") --> genr d = (obs=obsnum(CA)) I know this imply more backward-incompatibilities than the current state, because in the three cases at left side above, gretl will produce an error, but may be easier to display a warning in them ¿isn't it? -- 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
