changing last year of sample
Posted: Wed Jun 03, 2015 6:42 am
Hi folks,
I use the following code to re-estimate all my equations. I would change the end of the sample date to 2012 but I do not want to change the start date (which varies from eqn to eqn). Is there an easy way to do this? At present some eqn's will have their end date specified, some will be @last. I tried getting the third word out of the string with the sample but I think I may be on the wrong track!
Thanks in advance
Code to estimate all equations
%eqlist=@wlookup("*","equation") 'make a list of all equations in workfile
%s = @pagesmpl
for !i=1 to @wcount(%eqlist) 'cycle through the list one at a time
%eq = @word(%eqlist,!i) 'current equation name
%estcmd = {%eq}.@command 'current equation's estimation command
%s = {%eq}.@smpl
smpl {%s}
{%eq}.{%estcmd} 're-estimate current equation with its command
next
smpl 1950 2025
I use the following code to re-estimate all my equations. I would change the end of the sample date to 2012 but I do not want to change the start date (which varies from eqn to eqn). Is there an easy way to do this? At present some eqn's will have their end date specified, some will be @last. I tried getting the third word out of the string with the sample but I think I may be on the wrong track!
Thanks in advance
Code to estimate all equations
%eqlist=@wlookup("*","equation") 'make a list of all equations in workfile
%s = @pagesmpl
for !i=1 to @wcount(%eqlist) 'cycle through the list one at a time
%eq = @word(%eqlist,!i) 'current equation name
%estcmd = {%eq}.@command 'current equation's estimation command
%s = {%eq}.@smpl
smpl {%s}
{%eq}.{%estcmd} 're-estimate current equation with its command
next
smpl 1950 2025