Storing information criterion values
Posted: Mon Aug 06, 2012 7:54 am
Hi Eviews support,
I'm doing a project which involves recursive modelling and analysis of information criterion. I have a recursive modelling and forecasting pattern, but I want to be able to use the set up I have of individual model estimation to be able to produce values of AIC, SIC (or BIC), and R^2 for individual observations. Below is an example of the program I have written so far.
series a=cpi
series b=m1
series c1=dgdpm
series d1=t1y
series e=t30d
series f=vwrincd
series g=wti
series h=indout
series i=sp500(-1)
'run rolling regression
!window=60
!step=1
!length=@obsrange
series ser=1
%start=@otod(@ifirst(ser))
%end=@otod(@ilast(ser))
!j=0
'move sample !step obs at a time
for !i=1 to !length-!window+1-!step step !step
!j=!j+1
%first = @otod(@dtoo(%start)+!i-1)
%last=@otod(@dtoo(%start)+!i+!window-2)
smpl {%first} {%last}
equation eqcons{%first}.ls sp500 c
eqcons{%first}.forecast fsp500_eqcons{%first}
equation eqa{%first}.ls sp500 c a
eqa{%first}.forecast fsp500_eqa{%first}
equation eqb{%first}.ls sp500 c b
eqb{%first}.forecast fsp500_eqb{%first}
equation eqc{%first}.ls sp500 c c1
eqc{%first}.forecast fsp500_eqc{%first}
equation eqd{%first}.ls sp500 c d1
eqd{%first}.forecast fsp500_eqd{%first}
equation eqe{%first}.ls sp500 c e
eqe{%first}.forecast fsp500_eqe{%first}
equation eqf{%first}.ls sp500 c f
eqf{%first}.forecast fsp500_eqf{%first}
equation eqg{%first}.ls sp500 c g
eqg{%first}.forecast fsp500_eqg{%first}
equation eqh{%first}.ls sp500 c h
eqh{%first}.forecast fsp500_eqh{%first}
equation eqi{%first}.ls sp500 c i
eqi{%first}.forecast fsp500_eqi{%first}
next
exitloop
I understand the labelling conditions and how it selects the period for observation for estimation, but I don't know how to get information criterion values for individual observations. What I would like to know is if its possible to store all the AIC values, for example, the AIC values of model y=mx+c for all observations between 1982M12 to 2011M12 (December 1982 to December 2011).
Your help is much appreciated
I'm doing a project which involves recursive modelling and analysis of information criterion. I have a recursive modelling and forecasting pattern, but I want to be able to use the set up I have of individual model estimation to be able to produce values of AIC, SIC (or BIC), and R^2 for individual observations. Below is an example of the program I have written so far.
series a=cpi
series b=m1
series c1=dgdpm
series d1=t1y
series e=t30d
series f=vwrincd
series g=wti
series h=indout
series i=sp500(-1)
'run rolling regression
!window=60
!step=1
!length=@obsrange
series ser=1
%start=@otod(@ifirst(ser))
%end=@otod(@ilast(ser))
!j=0
'move sample !step obs at a time
for !i=1 to !length-!window+1-!step step !step
!j=!j+1
%first = @otod(@dtoo(%start)+!i-1)
%last=@otod(@dtoo(%start)+!i+!window-2)
smpl {%first} {%last}
equation eqcons{%first}.ls sp500 c
eqcons{%first}.forecast fsp500_eqcons{%first}
equation eqa{%first}.ls sp500 c a
eqa{%first}.forecast fsp500_eqa{%first}
equation eqb{%first}.ls sp500 c b
eqb{%first}.forecast fsp500_eqb{%first}
equation eqc{%first}.ls sp500 c c1
eqc{%first}.forecast fsp500_eqc{%first}
equation eqd{%first}.ls sp500 c d1
eqd{%first}.forecast fsp500_eqd{%first}
equation eqe{%first}.ls sp500 c e
eqe{%first}.forecast fsp500_eqe{%first}
equation eqf{%first}.ls sp500 c f
eqf{%first}.forecast fsp500_eqf{%first}
equation eqg{%first}.ls sp500 c g
eqg{%first}.forecast fsp500_eqg{%first}
equation eqh{%first}.ls sp500 c h
eqh{%first}.forecast fsp500_eqh{%first}
equation eqi{%first}.ls sp500 c i
eqi{%first}.forecast fsp500_eqi{%first}
next
exitloop
I understand the labelling conditions and how it selects the period for observation for estimation, but I don't know how to get information criterion values for individual observations. What I would like to know is if its possible to store all the AIC values, for example, the AIC values of model y=mx+c for all observations between 1982M12 to 2011M12 (December 1982 to December 2011).
Your help is much appreciated