Page 1 of 1

Pairwise subtraction for variables in groups

Posted: Wed Nov 23, 2016 2:50 pm
by jacarandas
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!

Re: Pairwise subtraction for variables in groups

Posted: Wed Nov 23, 2016 3:42 pm
by EViews Gareth
Since A and B are not related, use two loops.