Page 1 of 1

Divide several series

Posted: Wed Feb 18, 2015 5:23 am
by YK_Econ
Hi all,
at first, sorry for asking again a very trivial question. however I find it really hard to get into eviews.

I would like to calculate the Wage Share out of compensation of employees and gdp. for that I have to divide compensation by gdp --> compensation/gdp.

the problem is, I have to do that for several countries. so compensation_esp/gdp_esp , compensation_gbr/gdp_gbr and so on.

Could anybody help me with that/

Thanks in advance
best
YK

Re: Divide several series

Posted: Wed Feb 18, 2015 6:15 am
by EViews Gareth
Easiest way is to just have a loop:

Code: Select all

for %j gdp esp series comgdp = compensation_{%j}/gdp_{%j} next
You could look into using a pool object too, if you have lots of similar calculations to perform.