Least Squares Regression Using a System on a Group

For questions regarding programming in the EViews programming language.

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

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Least Squares Regression Using a System on a Group

Postby kszynkar » Wed Feb 17, 2016 3:52 am

Hi, perhaps a silly question, but how do I create a set (System I assume) of linear least square regressions on a group. CSer is a series, and CServGroup is a group. This line of code would get me an equation on on the series:

equation CServEqn.ls CSer CSer(-1)

What I'm trying to do is:

system CServSys.ls CServGroup CServGroup(-1)

So essentially a set of of the operation above. However, when I double-click the resulting system, I don't see anything in it. Is there a way to do this?

Thanks

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Least Squares Regression Using a System on a Group

Postby EViews Glenn » Wed Feb 17, 2016 10:26 am

Is the latter supposed to be estimating a VAR(1)?

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Re: Least Squares Regression Using a System on a Group

Postby kszynkar » Thu Feb 18, 2016 1:09 am

Yes

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Least Squares Regression Using a System on a Group

Postby EViews Glenn » Fri Feb 19, 2016 11:00 am

Why not use the built in VAR tools?

Code: Select all

var var1.ls 1 1 CServEqn CServGroup

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Re: Least Squares Regression Using a System on a Group

Postby kszynkar » Mon Feb 22, 2016 9:43 am

Apologies, I misunderstood VAR(1).

I'm not interested in capturing the cross terms in the regression (ie. getting a coefficient for the sensitivity of my first series in the group to the second), and the above was just to illustrate what I'm trying to do, but it won't only be an auto-regression, there will be other terms in the regression.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Least Squares Regression Using a System on a Group

Postby EViews Glenn » Mon Feb 22, 2016 10:08 am

You'll have to add the specification for each of your equations explicitly (apart form the implied error)

Code: Select all

system a a.add var1= c(1) + c(2)*var2 + c(3)*var1(-1) a.add var2 = c(4) + c(5)*var1(-1) + c(6)*x
etc.
Then

Code: Select all

a.ls
There are some tools for creating common specifications to ease some of the editing burdens. See the documentation on the system object, and the makesystem command proc for a group.

kszynkar
Posts: 45
Joined: Tue Feb 02, 2016 1:15 am
Location: Switzerland

Re: Least Squares Regression Using a System on a Group

Postby kszynkar » Thu Mar 03, 2016 9:57 am

Perfect. Thanks for the help.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests