pageselect in subroutine
Posted: Sat Oct 28, 2017 2:53 pm
Dear All,
I have a subroutine like following where I am using pagenames string. Unfortunately, when I call the subroutine pageselect command gives an error. It says the page was not found. I call the program in this way: call ce_t_t_1("page1", a, series01, 6)
Could you please help. thanks in advance.
subroutine ce_t_t_1(string %pagenames, matrix data, series sername, string %colnumber)
pageselect %pagenames
matrix(@rows(data)+5,@columns(data)) predictions_b
matrix(@rows(data)+5, @columns(data)) predictions_u
%colnumber=@str(@columns(data))
smpl @all
for !i=1 to @obssmpl
for !j=1 to @columns(data)
smpl if sername=data(!i,{%colnumber})
series ser0{!j}_{!i}=ser0{!j}(+1)
%shifter="!i+1"
predictions_u({%shifter},!j)=@sum(ser0{!j}_{!i}/(@obssmpl-1))
predictions_b({%shifter},!j)=@mean(ser0{!j}_{!i})
next
next
endsub
I have a subroutine like following where I am using pagenames string. Unfortunately, when I call the subroutine pageselect command gives an error. It says the page was not found. I call the program in this way: call ce_t_t_1("page1", a, series01, 6)
Could you please help. thanks in advance.
subroutine ce_t_t_1(string %pagenames, matrix data, series sername, string %colnumber)
pageselect %pagenames
matrix(@rows(data)+5,@columns(data)) predictions_b
matrix(@rows(data)+5, @columns(data)) predictions_u
%colnumber=@str(@columns(data))
smpl @all
for !i=1 to @obssmpl
for !j=1 to @columns(data)
smpl if sername=data(!i,{%colnumber})
series ser0{!j}_{!i}=ser0{!j}(+1)
%shifter="!i+1"
predictions_u({%shifter},!j)=@sum(ser0{!j}_{!i}/(@obssmpl-1))
predictions_b({%shifter},!j)=@mean(ser0{!j}_{!i})
next
next
endsub