Page 1 of 1

Create variables functions of parameters to estimate

Posted: Mon Jul 09, 2012 6:27 am
by Umass
Dear all,
I am new to Eviews programming and I have a relatively simple question.
I want to write a program to estimate a nonlinear model but before writing the specification of the model (that will be passed to "equation eq1.ls ...") I would like to create variables which are functions of the parameters that i want to estimate.
A stylized example is the following:

genr x1 = @abs(c(1)*x)
genr z1 = @exp(c(2)*z)

equation eq1.ls y = z1*x1 + (1-z1)*c(2)*y(-1)

Thanks a lot for any suggestion!

Re: Create variables functions of parameters to estimate

Posted: Mon Jul 09, 2012 8:02 am
by EViews Gareth

Code: Select all

equation eq1.ls y = @exp(c(2)*z)*@abs(c(1)*x) + (1-@exp(c(2)*z) )*c(2)*y(-1)
Assuming that you want the c(1) and c(2) in the genr statements to be part of the estimation, substituting them out is the only way to do it.

Re: Create variables functions of parameters to estimate

Posted: Mon Jul 09, 2012 8:15 am
by Umass
Yes, I wanted the c(1) and c(2) to be part of the estimation.
I thought about substituting them out in the specification of the model, the problem is that the actual expressions are way more tedious than the ones in the stylized example. But if that's the only way to go, I guess I'll have to deal with it.
Thanks anyway!

Re: Create variables functions of parameters to estimate

Posted: Mon Jul 09, 2012 8:19 am
by EViews Gareth
You could try the LogL object instead of an equation object, but that offers fewer post-estimation options than the equation.