Pairwise subtraction for variables in groups

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

jacarandas
Posts: 20
Joined: Tue Feb 10, 2015 10:11 pm

Pairwise subtraction for variables in groups

Postby jacarandas » Wed Nov 23, 2016 2:50 pm

Hi,

I am able to do pairwise regressions between variables. I thought the same logic would work for variables in groups if I just want to do a simple subtraction between variables in groups. But, it doesn't.

For example, I have groups A, B, A1 and B1 with 3 variables in each group. I want to subtract the value of variables in A1 from A, B1 from B.

Code: Select all

for %g A B for !i=1 to {%g}.@count for %w A1 B1 for !j=1 to {%w}.@count %iname = {%g}.@seriesname(!i) %jname = {%w}.@seriesname(!j) series X{%iname} = {%iname} - {%jname} next next next next
Any help would be greatly appreciated.

Thanks!

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

Re: Pairwise subtraction for variables in groups

Postby EViews Gareth » Wed Nov 23, 2016 3:42 pm

Since A and B are not related, use two loops.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests