Page 1 of 1

Test Statistic within a loop

Posted: Thu Jul 30, 2009 11:35 am
by arturobandini
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

Re: Test Statistic within a loop

Posted: Thu Jul 30, 2009 11:39 am
by EViews Gareth
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.