On Sun, 14 Jan 2018, Sven Schreiber wrote:
Am 12.01.2018 um 21:21 schrieb Allin Cottrell:
> In addition, however, join works pretty nicely without the help of a
> temporary datafile, provided the high-frequency data start in the first
> sub-period
> <hansl>
> open AWM.gdt -q
> list PCIT = zeros(1,3)
> loop i=1..3 -q
> vname = sprintf("PC6IT_m%d", i)
> join hamilton.gdt @vname --data=PC6IT --aggr=seq:$i
> PCIT[4-i] = @vname
> endloop
> setinfo PCIT --midas
> </hansl>
>
> I'll update the gretl-midas doc with one or both of these examples.
Hm I don't know, to me this is far from user-friendly. The restriction
about the first subperiod is not innocuous, either.
Granted. The "aggr:seq" option looked quite promising but I agree
it's probably too error-prone. Plus, having to invoke "join" m times
(m being the frequency ratio) is not very nice either.
In your earlier email you wrote that the intentional
compact-then-match ordering would be relatively straightforward to
implement, although perhaps not the cleanest way. This still looks
like the most attractive way to me.
Maybe so, but I'm interested to see if we can inflect the "aggr"
apparatus in "join" such that it handles an n:n join. This may be
too complicated but it might be worth pursuing. The syntax I have in
mind is (provisionally, experimentally) something like
open awm.gdt
join hamilton.gdt PIT* --data=PC6IT
Gretl could internally determine that awm is quarterly and hamilton
monthly, and hence take PC6IT as the source while "PIT*" implictly
expands to PIT_m3, PIT_m2 and PIT_m1 as the target series. (Maybe,
if this can be made to work, it should be conditional on a --spread
or --midas option to "join").
(BTW, slightly off-topic about the database documentation: The doc
for the 'store' command says about databases: "At present this
option is available only for annual, quarterly or monthly
time-series data." The database spec in the manual also mentions
weekly and daily data I believe. Is on of these infos out of
date?)
Hmm, not sure. I think that daily series (at least) are supposed to
be supported in gretl databases. But I can't remember if there's any
extant database that includes daily data; and if there is, I'm sure
it hasn't been tested in a long time. The "store" doc is
deliberately conservative; I don't know offhand if it's too
conservative.
Allin