Page 1 of 1

Implementation of equation with max operator

Posted: Mon Oct 18, 2010 12:15 pm
by kev
Hi,

I want to estimate an equation on the form
y = C1*(max(x - C2, 0) - max(x - C3, 0))

However, since I am not an experienced EViews user, I do'nt know how the implementation of the max operator can be done. Any suggestions?

Re: Implementation of equation with max operator

Posted: Mon Oct 18, 2010 12:19 pm
by EViews Gareth
I'm sure there are lots of different ways, but this one came immediately to mind:

Code: Select all

ls y=c(1)*(x-c(2))*(x>c(2)) - (x-c(3))*(x>c(3))