How to estimate the parameters in Eviews with restrictions on the parameters across the equations. The restrictions are of the form a1/b1=a2/b2 for a system consisting of 2 equations of the form:
y=a1*x1+a2*x2+k1 and z=b1*x1+b2*x2+k2
We know what the series y, z, x1, and x2 are.
Thanks
Parameter Estimation
Moderators: EViews Gareth, EViews Moderator
Re: Parameter Estimation
Code: Select all
'define the coefficent vectors and the fixed ratio (a1/b1=a2/b2=r)
coef(2) a
coef(2) b
coef(1) r
'first estimate one of the equations via least squares and save the coefficents
equation olsy.ls y = a(1)*x1 + a(2)*x2
!a1=olsy.@coefs(1)
!a2=olsy.@coefs(2)
'estimate remaining equation with respect to previously saved coefficents to find r value
equation olsz.ls z = r(1)*!a1*x1 + r(1)*!a2*x2
'if E(z) = r*E(y), then you can also estimate r ratio via equation olsr.ls z = r(1)*y
'the paramaters we have just estimated are not exact but close to their real values
'therefore we should jointly estimate the paramaters for actual results.
logl joint
joint.append @logl ols
joint.append res1 = y - a(1)*x1 - a(2)*x2
joint.append res2 = z - r(1)*a(1)*x1 - r(1)*a(2)*x2
joint.append ols =-(res1^2 + res2^2)
'estimation will use our previous ols estimations as starting values
joint.ml(showopts, m=1000, c=1e-7)
show joint.output
'you can now easily calculate b coefficients
b(1) = r(1)*a(1)
b(2) = r(1)*a(2)
'you should also try beginning with other equation first and repeat the steps above for b coefficents.
'The results should be nearly identical.-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Parameter Estimation
Use a System with the equationsHow to estimate the parameters in Eviews with restrictions on the parameters across the equations. The restrictions are of the form a1/b1=a2/b2 for a system consisting of 2 equations of the form:
y=a1*x1+a2*x2+k1 and z=b1*x1+b2*x2+k2
We know what the series y, z, x1, and x2 are.
Thanks
y=a1*x1+a2*x2+k1
z=b1*x1+(a2*b1/a1)*x2+k2
Re: Parameter Estimation
Startz' answer is definitely more clean and spare compared to my unnecessarily circuitous solution. It is indeed the most usual way of doing such an estimation I might add. Since the model now becomes nonlinear in its coefficients, it would be wise to preset the value of a1 coefficient to 1 in order to avoid missing value problem for the sake of estimation process.
Who is online
Users browsing this forum: No registered users and 1 guest
