NLLS estimation

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

Chris
Posts: 5
Joined: Tue Jun 30, 2009 5:22 am

NLLS estimation

Postby Chris » Wed Jul 01, 2009 2:47 am

Hello,

I am quite new to EViews and I desire to estimate a model that includes a hyperbolic tangent with NLLS. Equation is of the form Yt= c1+c2*Xt +tanh((Xt+1-Xt)*(c3*Xt-c4*Pt)). A syntax error appears when implemented. What are the proper steps for estimating such parameters? Should I provide some starting values from a restrictive case? Would another method like maximum likelihood be more appropriate?
Your help will be very much appreciated!

Chris

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: NLLS estimation

Postby trubador » Wed Jul 01, 2009 5:16 am

You can enter the following into the equation editor:

Code: Select all

y= c(1) + c(2)*x + (@exp(2*((x(1)-x)*(c(3)*x-c(4)*p))-1)/@exp(2*((x(1)-x)*(c(3)*x-c(4)*p))+1))
And yes, supplying initial values might be helpful in terms of convergence. However, you should be careful in using the tanh(x) function, since it takes values between -1 and +1 and saturates quickly (e.g. |x|>3).

Chris
Posts: 5
Joined: Tue Jun 30, 2009 5:22 am

Re: NLLS estimation

Postby Chris » Thu Jul 02, 2009 2:29 am

Thanks a lot ! I just have to restrict some parameters and I'm done. Already saw a topic in this concern.

All my best,
Chris


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests