Divide several series

For questions regarding programming in the EViews programming language.

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

YK_Econ
Posts: 36
Joined: Wed Jan 28, 2015 8:34 am

Divide several series

Postby YK_Econ » Wed Feb 18, 2015 5:23 am

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

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

Re: Divide several series

Postby EViews Gareth » Wed Feb 18, 2015 6:15 am

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.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests