Page 1 of 1

Pagecontract silencing error

Posted: Wed Jan 25, 2017 1:32 pm
by BigD
Hi,

I'm using pagecontract to filter out stuff in different series using a for loop. My filter is that if their percentage difference is beyond a certain threshold, it is added into the series. And then I'd group those.

The thing is, some series may not have any difference in numbers so the percentage difference would be 0. Then pagecontract will have an error popping up saying that the workfile contraction would leave no observations. And it's fine by me so I want to silence this error and let the rest of the program run.

Here's my code for the percent difference calculation portion:

Code: Select all

'loops through series list for !j=1 to chgename.@count 'calculates percentdiff for the last 10 years smpl @last-9 @last %seriesnam = chgename.@seriesname(!j) series b{%seriesnam} = @abs(({%seriesnam}_01 - {%seriesnam}) / (({%seriesnam} + {%seriesnam}_01) / 2)) * 100 'filters the series pagecontract @last-9 @last if b{%seriesnam} > !threshold and b{%seriesnam} <> na adds series to a group aresults.add b{%seriesnam} next
Any help is appreciated. Thanks!

Re: Pagecontract silencing error

Posted: Wed Jan 25, 2017 2:18 pm
by EViews Gareth
Did you try the setmaxerrs command?

Re: Pagecontract silencing error

Posted: Thu Jan 26, 2017 7:37 am
by BigD
Hmm I don't think so. I'll take a look at that and try it. Thanks :D