Hi,
Allin wrote last month:
Here's what's now in CVS (I'm not documenting it yet
because it's still open to discussion):
A. The simple case with common regressors:
<hansl>
open denmark.gdt
list Y = LRM LRY IBO IDE
var 3 Y
list X = const lags(3, Y)
system method=SUR
equations Y X
end system
</hansl>
B. With differing regressors:
<hansl>
# subset of the Grunfeld investment data (attached)
open grunfeld.txt
list Y = ige iwh
list X1 = const fge kge
list X2 = const fwh kwh
# join lists with separator
list X = X1 ; X2
system method=SUR
equations Y X
end system
</hansl>
In form B the composite X-list must contain as many sub-lists
(joined via ";") as there are series in the Y-list.
Now I have tried to test and use this, but I don't know how to construct
the semicolon-separated list in a loop (since in general I don't know
the number of equations in advance). Here's what I tried but that didn't
work (on current cvs):
<hansl>
open denmark
list lhs = IBO IDE LRM LRY
list allrhs = null
loop foreach i lhs
list rhs_$i = LRM(-1) # trivial example
list allrhs = allrhs ; rhs_$i # does this work?
endloop
system method=SUR
equations lhs allrhs
end system
</hansl>
I get the following error:
<error>
equations lhs allrhs
Command has insufficient arguments
Error executing script: halting
</error>
Any ideas?
BTW, I noticed that one year ago there was already a discussion about
how to construct (SUR) systems in a script, see
http://lists.wfu.edu/pipermail/gretl-devel/2010-December/003042.html
We somehow seem to have forgotten about it in the meantime. Would that
approach still work, I haven't tried it so far?
Thanks,
sven