Grabbing Variable Names

For questions regarding programming in the EViews programming language.

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

Davidth
Posts: 10
Joined: Thu Feb 06, 2014 12:59 pm

Grabbing Variable Names

Postby Davidth » Tue Mar 04, 2014 9:48 am

I am curious if there is a way to grab each independent variable name separately from an regression equation output. I am running several models with time lags and am having the results captured in a table to quickly examine all of them as a group as opposed to comparing each one individually. I have been able to get the coefficients and p-values for the dependent variables, but I can't seem to find a way to capture the names of the dependent variable and independent variables. As the equation changes each time I do a comparison or add data, I would like the system to recognize there are now 4 instead of 5 variables, and apply those new variable names to the table.

I'm using Eviews 8.
Attachments
Regression output.PNG.jpg
Regression output.PNG.jpg (152.66 KiB) Viewed 4365 times

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

Re: Grabbing Variable Names

Postby EViews Gareth » Tue Mar 04, 2014 10:10 am

equation.@varlist.

You should take a look at the source code for the eqtabs add-in. Probably has a lot of stuff similar to what you're trying to do.

Davidth
Posts: 10
Joined: Thu Feb 06, 2014 12:59 pm

Re: Grabbing Variable Names

Postby Davidth » Tue Mar 04, 2014 11:07 am

Thanks, I'll check that out.

I've been using the @varlist currently, but was hoping there was something allowing me to pull out each variable independently, something like @varlist(i).

I'll look into the eqtabs. Thanks again.

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

Re: Grabbing Variable Names

Postby EViews Gareth » Tue Mar 04, 2014 11:10 am

@word(@varlist, !i)

Davidth
Posts: 10
Joined: Thu Feb 06, 2014 12:59 pm

Re: Grabbing Variable Names

Postby Davidth » Tue Mar 04, 2014 11:21 am

I'll try this.

By the way, that EqTabs addin is awesome, almost exactly what I need. Thanks for pointing me in that direction.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests