Test Statistic within a loop

For questions regarding programming in the EViews programming language.

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

arturobandini
Posts: 8
Joined: Thu Jul 30, 2009 11:01 am

Test Statistic within a loop

Postby arturobandini » Thu Jul 30, 2009 11:35 am

Hi,

I'm trying to implement a Sup W statistic. It basically consists of estimating a threshold regression for, say, 100 different threshold values, compute the Wald statistic for each of them, and finally chose the Sup W as the largest values among all Walds... So I run a loop, estimate the regression (named ch1) and then compute the wald statistic as:
ch1.wald c(4)=c(8)
Still, I'm not able to do the Sup thing cause I can't manage e.g. to store all Walds into a vector.

There's a somehow related topic there: http://forums.eviews.com/viewtopic.php?f=5&t=18. But storing via a table won't do it in my case since I am inside the loop...

Help of any form would be deeply appreciated. Many thanks in advance!
Arturo

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

Re: Test Statistic within a loop

Postby EViews Gareth » Thu Jul 30, 2009 11:39 am

Just follow exactly the same steps as that previous topic, but rather than storing the statistic into a scalar, store it into the row of a vector.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests