How to save Wald test results from several regressions?

For questions regarding programming in the EViews programming language.

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

lexy
Posts: 2
Joined: Wed Sep 15, 2010 9:06 am

How to save Wald test results from several regressions?

Postby lexy » Wed Sep 15, 2010 9:56 am

Hi,

I'm trying to obtain the results of a standard wald test on coefficient restrictions from 188 regressions (using the same dependent series but changing a dummy variable 188 times), I am able to run the regressions but I can't seem to get the code right to tabulate the wald test results!

Here is the code i use to run the regressions which works

Code: Select all

for !i=1 to 188 equation eq{!i}.ls uk c c{!i} t1 t2 t3 t4 t5 t6 t7 t8 t9 next
Below I have put the code i've tried to use which doesn't work.

Code: Select all

matrix(188,1) Walds !rowcounter=1 for !i=1 to 188 equation eq{!i}.ls uk c c{!i} t1 t2 t3 t4 t5 t6 t7 t8 t9 freeze(waldtable) eq.wald c(3)=c(4)=c(5)=c(6)=c(7)=c(8)=c(9)=c(10)=c(11)=0 walds(!rowcounter,1) = @val(waldtable(6,2)) !rowcounter=!rowcounter+1 d waldtable next
When i try running the program i receive the error message "WALDTABLE is not defined in "WALDS(1,1)=@VAL(WALDTABLE(6,2))"."

Does anyone have any idea as to how i should amend my code or write a different one which will calculate the wald test for each equation and then puts the outcome into a column vector?

Any help would be appreciated thanks!

Lexy

Using Eviews 7.1

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

Re: How to save Wald test results from several regressions?

Postby EViews Gareth » Wed Sep 15, 2010 10:20 am

In your Wald command, you're not using the name of the equation you just estimated. Change that line to be:

Code: Select all

freeze(waldtable) eq{!i}.wald c(3)=c(4)=c(5)=c(6)=c(7)=c(8)=c(9)=c(10)=c(11)=0

lexy
Posts: 2
Joined: Wed Sep 15, 2010 9:06 am

Re: How to save Wald test results from several regressions?

Postby lexy » Wed Sep 15, 2010 10:30 am

Thanks!

Ikki
Posts: 1
Joined: Tue Nov 23, 2010 7:56 am

Re: How to save Wald test results from several regressions?

Postby Ikki » Tue Nov 23, 2010 8:07 am

Hi, I want to know if it is possible to save directly some output from the Wald table other than freeze the table and save specific values.
For example, I want to capture the standard error from the test, the t-test, the degrees of freedom of the t-test, and the probability of the t-test. For a regression output, in order to capture the instrument rank, we use directly eq1.@instrank ... is any similar option for the Wald test for the values I mentioned above?

Thanks in advance,

Ikki

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

Re: How to save Wald test results from several regressions?

Postby EViews Gareth » Tue Nov 23, 2010 9:04 am

Unfortunately not.

banhbengconuong
Posts: 15
Joined: Mon Apr 25, 2011 8:31 pm

Re: How to save Wald test results from several regressions?

Postby banhbengconuong » Wed Mar 19, 2014 10:02 pm

Hello,
I have the same problem, but then I freeze the result as a table first, then I can call the element of the result table later.
Hope this help.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests