Identity equation with "dependent" variable on right side

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

leah
Posts: 35
Joined: Tue Jul 16, 2013 2:29 pm

Identity equation with "dependent" variable on right side

Postby leah » Tue Oct 28, 2014 7:30 am

Is there a way in eviews to solve for an unknown variable in an identity when the unknown variable is impossible to isolate on one side of the equation? This is the equation if it helps:

beta, gamma, phi, and tau are all known series. alpha is unknown -

gamma = ((1-exp(-phi-alpha))*alpha*(gamma(-1)+tau(-1)))/(beta+alpha) + (exp(-phi-alpha))*gamma

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

Re: Identity equation with "dependent" variable on right sid

Postby EViews Gareth » Tue Oct 28, 2014 7:52 am

Not really. You could use the optimize function to get darn close.

leah
Posts: 35
Joined: Tue Jul 16, 2013 2:29 pm

Re: Identity equation with "dependent" variable on right sid

Postby leah » Tue Oct 28, 2014 9:41 am

Okay, sortof fumbling around in the dark. Is this on the right track? When I run it I get an error saying that the "objective function evaluates to NA for one or more observations".

wfcreate a 2000 2013
fetch(d=na) gdp gdph jfnsco jf

subroutine f(series alpha, series phi, series gamma, series tau, series beta)
gamma = ((1-exp(-phi-alpha))*alpha*(gamma(-1)+tau(-1)))/(beta+alpha)+(exp(-phi-alpha))*gamma
endsub

series out
optimize f(out, gdp, gdph, jfnsco, jf)

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

Re: Identity equation with "dependent" variable on right sid

Postby EViews Gareth » Tue Oct 28, 2014 9:49 am

You'll have to set starting values for alpha.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests