Implementation of equation with max operator

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

kev
Posts: 2
Joined: Mon Oct 18, 2010 11:58 am

Implementation of equation with max operator

Postby kev » Mon Oct 18, 2010 12:15 pm

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Implementation of equation with max operator

Postby EViews Gareth » Mon Oct 18, 2010 12:19 pm

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))


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests