IF command for samples in a model
Posted: Wed Apr 14, 2021 2:16 am
Hi, I am programming a model with Eviews10 and I have a query about using the IF command on it.
What I am trying to do:
I have a model with several equations already stored in the workfile and I'm writing the model as "Text" in the model view. My yearly sample runs from 1971 to 2018 and what I need (due to some data availability issues) is that the model picks one equation to estimate certain variable from 1971 to 1998 and another equation from 1999 onwards.
What I am writing:
So, in the "Text" tab of the model view, I'm writing something like this: IF smpl<1999 then :EQ04 else :EQ05 endif. So the model should take :EQ04 before 1999 and :EQ05 afterwards. But it does not and an error message pops up. It might not have a programming solution, but it must be done through scenarios or other Eviews' option, but I have also tried and still doesn't work.
I hope this all makes sense. I had a look at the Eviews' help and the forum and I couldn't find anything describing a situation like this. My apologies if I'm posting something already discussed and many thanks in advance for any help I could get on this.
What I am trying to do:
I have a model with several equations already stored in the workfile and I'm writing the model as "Text" in the model view. My yearly sample runs from 1971 to 2018 and what I need (due to some data availability issues) is that the model picks one equation to estimate certain variable from 1971 to 1998 and another equation from 1999 onwards.
What I am writing:
So, in the "Text" tab of the model view, I'm writing something like this: IF smpl<1999 then :EQ04 else :EQ05 endif. So the model should take :EQ04 before 1999 and :EQ05 afterwards. But it does not and an error message pops up. It might not have a programming solution, but it must be done through scenarios or other Eviews' option, but I have also tried and still doesn't work.
I hope this all makes sense. I had a look at the Eviews' help and the forum and I couldn't find anything describing a situation like this. My apologies if I'm posting something already discussed and many thanks in advance for any help I could get on this.