Dear Tom, i do have two questions I want to label some series with short descriptions.
I want to collect these series later in a separate procedure in a vector of series. When I pass the labeled series via reglist (# series1 series2...) to the procedure , it uses the labels insted of the series names and the vector of series is empty.
How can I fix this?
And the second question is: How can I not only pass series names via reglist to a procedure but also the lags (#series1 series2{1})
Thanks in advance!
retaining series name in reglist
Re: retaining series name in reglist
You want to use the %tablefromrl function to convert the regressor list into a table with series and lags separated. As a simple exampleGilbril wrote:Dear Tom, i do have two questions I want to label some series with short descriptions.
I want to collect these series later in a separate procedure in a vector of series. When I pass the labeled series via reglist (# series1 series2...) to the procedure , it uses the labels insted of the series names and the vector of series is empty.
How can I fix this?
And the second question is: How can I not only pass series names via reglist to a procedure but also the lags (#series1 series2{1})
Thanks in advance!
procedure test
local vect[int] rl
enter(varying) rl
compute tt=%tablefromrl(rl)
do j=1,%cols(tt)
disp %l(tt(1,j)) "{" tt(2,j) "}"
end do j
end test
@test
# x1{1 to 3} x2
will display
X1 { 1 }
X1 { 2 }
X1 { 3 }
X2 { 0 }
Depending upon what you are doing, you might find it easier to just put the reglist information directly into an EQUATION in the procedure with
local equation eqn
equation eqn *
then it will pick up the list of variables from outside the procedure.