Dynamically get F stats for hettest on each regression

For questions regarding programming in the EViews programming language.

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

benlambert18785
Posts: 9
Joined: Tue Sep 18, 2012 8:19 am

Dynamically get F stats for hettest on each regression

Postby benlambert18785 » Tue Apr 09, 2013 6:16 am

Hi,

I am currently creating equations dynamically within a program, and then storing the results of this to a table. I am fine to collect the t stats etc. by using the relevant commands on the equation object which I have created.

However, I am having some issues with trying to collect (in my table) the results of hettest on each of those objects.

I would like to capture the F stat along with the F stat's associated p value in my table.

I can use the following code to do a Breusch-Pagan test on an equation object (with the auxillary regression having three independent variables c ds_eon and d_eon):

Code: Select all

z_aus_eon.hettest(type=BPG) c ds_eon d_eon
However, I really don't have a clue as to how to record the F stat (and it's associated p value) as one of the values in my table.

I have tried @f, but this brings up the F stat for the actual regression rather than the auxillary one used to test for heteroscedasticity.

Any help as to how I can do this would be most appreciated!

Many thanks,

Ben

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

Re: Dynamically get F stats for hettest on each regression

Postby EViews Gareth » Tue Apr 09, 2013 7:51 am


benlambert18785
Posts: 9
Joined: Tue Sep 18, 2012 8:19 am

Re: Dynamically get F stats for hettest on each regression

Postby benlambert18785 » Tue Apr 09, 2013 9:04 am

Hi Gareth,

That's great - many thanks. Just for anyone else who runs into this issue I thought I would post my code. This pulls the F statistic for a hettest together with its associated p value.

Code: Select all

table(770,2) ztab freeze(tab1) zzz_{%i}.hettest(type=BGP) c ds_eon d_eon ztab(!j+1,1) = @val(tab1(3,2)) ztab(!j+1,2) = @val(tab1(3,5))
Thanks,

Ben


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests