## regression in loop structure and saving results

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

kelaynak
Posts: 33
Joined: Fri Nov 07, 2008 7:02 am

### regression in loop structure and saving results

Hello,
I am new in programming. May be my question so simple. If you help me, I really appreciate your help.

I want do several regresiion in a loop structure for the below model for finding best AR MA parameters. I want to get all AIC, SBC, adj R2 and probabilities of coefficients (a0,a1,a2,a3) in a table after regressing. Then I will choose right model comparing each model

Do i= 1, n
Do j= 1, m
ls Y= a0 +a1X + a2AR(i) + a3MA(j)
sending AIC,SBC Adj R2 and prbablities of coeeficient to a table
continue

Is it possible with using programming in Eviews 7?

Thanks

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

### Re: regression in loop structure and saving results

kelaynak
Posts: 33
Joined: Fri Nov 07, 2008 7:02 am

### Re: regression in loop structure and saving results

Thanks Gareth,
Especially the second viewtopic that you suggested contains the program that I needed
I just need to modify it to my system

But what about, probabilities of all coefficient in regression equations? Is there any @ commnets for them?

I could not find it. But there is a comment for "@tstats(i)" for t-statistics for coefficient (i)
How can I convert it to p values?
Thanks

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

### Re: regression in loop structure and saving results

From the thread immediately beneath yours:
viewtopic.php?f=5&t=2549

kelaynak
Posts: 33
Joined: Fri Nov 07, 2008 7:02 am

### Re: regression in loop structure and saving results

Thanks Gareth.
But I could not find the translation formula from tstats to p in there?
I am remembering that in Eviews manual I see the transformation formula from tstats to p value, but I could not find it now.
If you know the formula, could you please give it?

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

@tdist