Matlab 'eval' function in Eviews

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

Ruslan
Posts: 8
Joined: Thu Jan 22, 2009 9:53 am

Matlab 'eval' function in Eviews

Postby Ruslan » 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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Matlab 'eval' function in Eviews

Postby EViews Gareth » Sun Oct 04, 2009 9:35 am

I'm not sure I follow your GARCH example exactly, although I am sure it can be done in a simple for loop.

With regards to your Matlab code, something similar can be done quite easily in EViews:

Code: Select all

create u 100 series rp = nrnd !z=1 %s = " ds" + @str(!z) + "=rp" series {%s}


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 1 guest