Matlab 'eval' function in Eviews
Posted: Sun Oct 04, 2009 4:11 am
It will be great if it is possible to include Matlab2008 function 'eval'.
That execute the comand written in string:
the following
z=1
eval(['ds' num2str(z) '= rp']);
will execute the following:
ds1=rp
I understand that it is partly organised in indexing like: ds{!z}=!rp ,
but for the purposes of automatically choosing of optimal equation out of set of different equations it would be good.
E.g.: Find optimal equations from GARCH with the following possible parameters GARCH-M, AR(1), MA(1). It gives 8 combinations of equation to estimate to find the optimal (lets say using Schwarz). Thus, currently in eviews it could be organised only using 'IF' statement, which 'inflates' the code.
Combinations using GARCH framework:
1: No GARCH-M, no AR(1), no MA(1)
2: No GARCH-M, AR(1), no MA(1)
3: No GARCH-M, AR(1), MA(1)
4: No GARCH-M, no AR(1), MA(1)
5: GARCH-M, no AR(1), no MA(1)
6: GARCH-M, AR(1), no MA(1)
7: GARCH-M, AR(1), MA(1)
8: GARCH-M, no AR(1), MA(1)
Thank you.
That execute the comand written in string:
the following
z=1
eval(['ds' num2str(z) '= rp']);
will execute the following:
ds1=rp
I understand that it is partly organised in indexing like: ds{!z}=!rp ,
but for the purposes of automatically choosing of optimal equation out of set of different equations it would be good.
E.g.: Find optimal equations from GARCH with the following possible parameters GARCH-M, AR(1), MA(1). It gives 8 combinations of equation to estimate to find the optimal (lets say using Schwarz). Thus, currently in eviews it could be organised only using 'IF' statement, which 'inflates' the code.
Combinations using GARCH framework:
1: No GARCH-M, no AR(1), no MA(1)
2: No GARCH-M, AR(1), no MA(1)
3: No GARCH-M, AR(1), MA(1)
4: No GARCH-M, no AR(1), MA(1)
5: GARCH-M, no AR(1), no MA(1)
6: GARCH-M, AR(1), no MA(1)
7: GARCH-M, AR(1), MA(1)
8: GARCH-M, no AR(1), MA(1)
Thank you.