Conditional estimate

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

kerry
Posts: 4
Joined: Mon Oct 05, 2015 10:59 am

Conditional estimate

Postby kerry » Mon Oct 05, 2015 11:12 am

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?

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

Re: Conditional estimate

Postby EViews Gareth » Mon Oct 05, 2015 11:18 am

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.

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Conditional estimate

Postby startz » Mon Oct 05, 2015 12:04 pm

Try something like

Code: Select all

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


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests