Wrong specification for GMM, please help!

For questions regarding programming in the EViews programming language.

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

Squidgy2u
Posts: 2
Joined: Sun Dec 06, 2009 5:24 pm

Wrong specification for GMM, please help!

Postby Squidgy2u » Sun Dec 06, 2009 5:47 pm

Hey I'm trying to estimate the following GMM model:

y1= ß0 + ß1x1 + ß2x1^2 + cos(ß3x1) + e1
y2= b0 + b1x1 + b2x2 + sin(b3x2) + e2

First I tried to specify this system:
y1=C(1)+C(2)*x1+C(3)*x1_2+C(4)*cos_x1 @ cos_x1_
y2=C(5)+C(6)*x1+C(7)*x2+C(8)*sin_x2_ @ sin_x2_

And I got it was a near singular matrix, then I specified:

y1=C(1)+C(2)*x1+C(3)*x1_2+cos*C(4)*x1 @ cos_x1_
y2=C(5)+C(6)*x1+C(7)*x2+sin*C(8)*x2 @ sin_x2_

And got: "Wrong number of arguments for COS function in y1=C(1)+C(2)*x1+C(3)*x1_2+cos*C(4)*x1 @ cos_x1_"

Can somebody please tell me how I fix it and if there's any way I can estimate both equations simultaneously? Thanks.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Wrong specification for GMM, please help!

Postby startz » Sun Dec 06, 2009 6:24 pm

You just have some syntax errors. x1_2 isn't x^2, and cos by itself doesn't mean anything. You might want to check the help system.

Squidgy2u
Posts: 2
Joined: Sun Dec 06, 2009 5:24 pm

Re: Wrong specification for GMM, please help!

Postby Squidgy2u » Sun Dec 06, 2009 7:09 pm

You just have some syntax errors. x1_2 isn't x^2, and cos by itself doesn't mean anything. You might want to check the help system.
Yes cos by itself seemed weird to me but the point is to make non-linear models and I'm not sure how to specify the last term. Now I have:
y1=C(1)+C(2)*x1+C(3)*x1_2+cos(C(4)*x1) @ cos(C(4)*x1)
y2=C(5)+C(6)*x1+C(7)*x2+sin(C(8)*x2) @ sin(C(8)*x2)

But again it says it's non-singular...


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests