Page **6** of **8**

### Re: An introduction to EViews programming.

Posted: **Sun Dec 22, 2013 4:35 pm**

by **rileyjiang**

Thank you for your reply Gareth. I guess learning/writing algorithm is probably too much for me. I will stay with my old 'technique' for the time being. I might pick it up at a later time for future research though. Thanks for the hints. Regards.

### Re: An introduction to EViews programming.

Posted: **Thu Dec 26, 2013 9:57 am**

by **Jirka**

Thank you for your reply. I will try it. Merry Christmas and happy New year!

### Re: An introduction to EViews programming.

Posted: **Fri Jan 03, 2014 10:04 am**

by **Mamona**

Hi

I am running the following loop

scalar n=5 'number of time series (y1,y2,.....,90), (x1,x2,.....,90)

scalar ind=1 'input for loop

for !a=1 to 2

vector(N) LMxy 'returns LMstat for volatility spillover from x to y

vector(N) pvalxy 'returns corresponding pvalue for LMxy

Eviews 5.0 is giving an error as

for statement unterminated in For !a=1 to 2

can someone help me in getting this issue resolved?

Thanks

### Re: An introduction to EViews programming.

Posted: **Fri Jan 03, 2014 10:48 am**

by **startz**

### Re: An introduction to EViews programming.

Posted: **Fri Feb 14, 2014 9:33 pm**

by **debasishmaitra**

Hi friends,

while I am running the For loop on Eviews 5, I am getting that x{!i} is an illegal or not defined. The programmes written is as follows;

'after data upload and Y and each X are defined.

'run pairwise regressions between Y and each X

for !i=1 to 15

equation eq{!i}.ls y c x{!i}

Please help me out on this

Thanking you,

Regards,

Debasish

### Re: An introduction to EViews programming.

Posted: **Fri Feb 14, 2014 9:57 pm**

by **EViews Gareth**

To be honest, EViews 5 is so old, I don't think anybody is going to be able to help. It doesn't even install on modern OSs.

### Re: An introduction to EViews programming.

Posted: **Fri Feb 21, 2014 10:32 am**

by **ChockalingamKC**

EViews Gareth. Thanks for the detailed post.

1) Is there any reference manual to learn Eviews programming.

2) any training Eviews can provide to get familiarity with Eviews Programming.

### Re: An introduction to EViews programming.

Posted: **Fri Feb 21, 2014 10:57 am**

by **EViews Gareth**

The Command and Programming Reference (pdf available from the Help menu) has a chapter on programming.

Better are our two programming webinars:

http://www.eviews.com/Training/Prog1.htmlhttp://www.eviews.com/Training/Prog2.htmlOr, if those dates don't suit you, you can organise a custom date for you by emailing

training@eviews.com

### Re: An introduction to EViews programming.

Posted: **Wed Jun 04, 2014 10:06 am**

by **patsman**

¿Cómo guardo los pasos que hago en eviews, en un program de eviews?

### Re: An introduction to EViews programming.

Posted: **Wed Jun 04, 2014 10:21 am**

by **EViews Gareth**

Currently there is no way to do that.

### Re: An introduction to EViews programming.

Posted: **Sat Jun 07, 2014 7:56 am**

by **student07**

Is there a way to pass arguments to a program that I run using the 'exec' keyword? I know that I can of course define a variable before, but in that case the variable remains in the workspace (unless I delete it at least). Is it not in a way possible to do something like 'exec program.prg x=5' (to pass the argument x=5)?

### Re: An introduction to EViews programming.

Posted: **Sat Jun 07, 2014 8:21 am**

by **EViews Gareth**

Yes. Look up program arguments in the command and programming reference pdf

### Re: An introduction to EViews programming.

Posted: **Mon Aug 04, 2014 5:52 am**

by **anhkhoa_lpt**

How can I store P value (or t-statistics) from Dickey fuller test to a matrix. I have more than 50 series, so I want to use code to improve my productivity. Tks a lot.

### Re: An introduction to EViews programming.

Posted: **Mon Aug 04, 2014 6:19 am**

by **EViews Gareth**

### Re: An introduction to EViews programming.

Posted: **Sat Aug 16, 2014 5:21 am**

by **newbie1985**

Hello, I am new user of eviews and econometrics in general and I have two questions. I have a similar task like the quoted post but the difference is that I would like to run regressions with hac errors and to store in a matrix more information than just the coefficients. I would like to store in a matrix coefficients, p values and r squared. However, before running regressions I applied unit root test and as most variables - not all- had unit root I applied the first difference for all variables. I applied again unit root test and now I cannot find unit root for any variable. I do not know if this is totally correct but please correct me if not. As I have done this process I am not sure if I should include the term c in my simple regressions. Could anyone help me with this please? Thank you in advance.

Diederick wrote:Dear all,

I am following this topic in order to write a short program to estimate market model regressions.

I have 100 dependent variables , named Y 1-100

and 100 independent variables , named x 1-100.

I would like to regress all the dependent variables y on a constant and the corresponding x.

So equations: y1 c x1 ,y2 c x2 etc.

Then I would like to store all the coefficients of c and x(i) in a matrix.

I have written the following program, which works for the regressions but does not succeed in storing the coefficients.

matrix(2,100) coefs

equation eq

for !i=1 to 100

for !j=1 to 100

if !i=!j then

equation eq{!i}_{!j}.ls y{!i} c x{!j}

colplace(coefs, eq.@coefs, !i)

endif

next

next

Could anyone tell me what is wrong here? Thanks in advance for your answer!