Page 1 of 1

IF functions in economic models

Posted: Fri Jun 10, 2016 8:48 am
by jmurray804
Easy question for you Eviews geniuses.

Let's say the the central bank is more responsive when the output gap is wide.

I'd love to code that up in my small model using an IF function but I've no idea of the right syntax - searching for if in the forum naturally returns rather a lot of articles.

Basically something like:

IF y<-2, i = 4 + 1.5*y + 1.5*inf
ELSE i = 4 + 0.5*y + 1.5*inf

Where i is the policy rate, y is the output gap and inf is the deviation of inflation from target.

A quick pointer would be much appreciated.

Best,

Jamie

Re: IF functions in economic models

Posted: Fri Jun 10, 2016 8:54 am
by EViews Gareth
@recode
http://www.eviews.com/help/helpintro.ht ... tions.html

Code: Select all

series i = @recode(y<-2, 4 + 1.5*y + 1.5*inf, 4 + 0.5*y + 1.5*inf)

Re: IF functions in economic models

Posted: Fri Jun 10, 2016 9:04 am
by jmurray804
That's fantastic, thanks so much for the swift reply.