Page 1 of 1

Conditional estimate

Posted: Mon Oct 05, 2015 11:12 am
by kerry
I'm trying to estimate a model with conditions, I have series y and series x available,
the model is simply y = a + bx + error term

There are two conditions:
1) y = a + bx when x >= 0
2) y = - (a + bx) when x < 0 which is basically y = -y when x <0

How do I get that conditional estimate in eviews? What are the commands?

Re: Conditional estimate

Posted: Mon Oct 05, 2015 11:18 am
by EViews Gareth
I don't think any built in estimator will do it. You'd probably have to write a program using the optimize command to find the coefficients.

Re: Conditional estimate

Posted: Mon Oct 05, 2015 12:04 pm
by startz
Try something like

Code: Select all

ls y = ((-1)^(x<0))*(c(1)+c(2)*x)