What I need to do is estimate a few reaction functions as a system, so the coefficient’s (cross-price elasticities) are the same.
For example, I have reaction functions for shares of Natural Gas, Light Fuel Oil (LFO) and Electricity:
equation rsgas.ls rsgas c rpgas rplfo rpele
equation rslfo.ls rslfo c rpgas rplfo rpele
equation rsele.ls rsele c rpgas rplfo rpele
I know I need to drop one equation to avoid over-determination (say LFO) and then estimate the electricity and the natural gas equations at the same time with the cross-price elasticity coefficients constrained to equal each other and then the fuel oil share would be 1- the estimated shares of natural gas and electricity. However, I’m not exactly sure how to program this into E-views
Programming a System of Equations
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Programming a System of Equations
You need to use a system object rather than the equation object. Something like:
(Note I didn't pay exact attention to the specification I used up there, just chose something to give you an idea of how you can constrain coefficients).
Code: Select all
system s
s.append rsgas = c(1) + c(2)*rpgas + c(3)*rplfo + c(4)*rpele
s.append rsele = c(5) + c(4)*rpgas + c(6)*rplfo + c(7)*rpele
s.append rslfo = c(8) + (1-c(4)-c(2))*rpgas + c(9)*rplfo + (1-c(4)-c(7))*rpele
s.ls
-
canboardrp
- Posts: 17
- Joined: Tue Mar 06, 2012 9:11 am
Re: Programming a System of Equations
Thanks for the help!
If after testing I want to try a different specification (say take the natural logs of all the variables), how would you program that specification into the system object?
If after testing I want to try a different specification (say take the natural logs of all the variables), how would you program that specification into the system object?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Programming a System of Equations
Put @log() around the variables.
Who is online
Users browsing this forum: No registered users and 2 guests
