Assigning equation regressors to variables

For questions regarding programming in the EViews programming language.

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

mectricsdonk
Posts: 29
Joined: Fri Oct 01, 2010 2:51 pm

Assigning equation regressors to variables

Postby mectricsdonk » Mon Mar 17, 2014 5:19 am

Dear Eviews forum,

version: Eviews8

I was wondering if it is possible to assign the regressors of an existing equation to variables in a program?

For example, let equation1 be: y c x1 x2.

In the program I would like to assign x1 and x2 to %regressor1 and %regressor2. I want to make the program more dynamical instead of manually entering all regressors of the equation.

Cheers,
:eviews6:
Last edited by mectricsdonk on Mon Mar 17, 2014 5:24 am, edited 1 time in total.

mectricsdonk
Posts: 29
Joined: Fri Oct 01, 2010 2:51 pm

Re: Assigning equation regressors to variables

Postby mectricsdonk » Mon Mar 17, 2014 5:23 am

ps: one could argue to just copy and past the regressors in the @uidialog("edit",%regs,"enter regressors"), but this has a limited amount of characters the user can put in. The models I create contain a lot of variables (with proper labelling to be clear of what is what), so this option is not feasible unfortunately.

mectricsdonk
Posts: 29
Joined: Fri Oct 01, 2010 2:51 pm

Re: Assigning equation regressors to variables

Postby mectricsdonk » Mon Mar 17, 2014 6:28 am

Found it! I was looking for

!result = @uidialog("edit", %eq, "enter model1")
%vars={%eq}.@varlist

Cheers,
:mrgreen:

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

Re: Assigning equation regressors to variables

Postby EViews Gareth » Mon Mar 17, 2014 6:55 am

Note that @varlist contains the dependent variable too, so you'll need to lop off the first word.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests