Page 1 of 1

Calculating annual average growth rates in a panel

Posted: Mon Feb 05, 2018 8:32 am
by Marcus
So using the Penn World Tables, I tried to calculate these growth rates. I expected to get one value for each country/cross section unit but my "best" attempt gave me one value for each year.
Here's a code that not even produced the values for each year.
Any help on this would be greatly appreciated.

/Marcus

OPEN DATA "H:\My Documents\gamlalocal\Makro\Penn\pwt90forrats.xlsx"
CALENDAR(PANELOBS=65,A) 1950:1
DATA(FORMAT=XLSX,ORG=COLUMNS,SHEET="Data") 1//1950:01 182//2014:01 c_number year rgdpe rgdpo pop emp avh $
hc ccon cda cgdpe cgdpo ck ctfp cwtfp rgdpna rconna rdana rkna rtfpna rwtfpna labsh delta xr pl_con $
pl_da pl_gdpo csh_c csh_i csh_g csh_x csh_m csh_r pl_c pl_i pl_g pl_x pl_m pl_k


set id = c_number
set timeid = year
do i = c_number, pl_k
set temp = i{0}
pform(indiv=c_number,time=timeid) i
# temp
end do i
set smpl = 1970, 2014

set rgdepop = rgdpe/pop
set rgdopop = rgdpo/pop

dofor i = rgdepop rgdopop
compute [label] l = "l"+%l(i)
set %s(l) = 100*( (( [series] i (2014:1)/ ([series]i) (1970:1))^.02222 ) -1.0)
end do i

Re: Calculating annual average growth rates in a panel

Posted: Mon Feb 05, 2018 10:10 am
by TomDoan
It looks like it should give you repeated values for each entry for a country. Is that what you're getting? You want that reduced to just show one value for each country?

Re: Calculating annual average growth rates in a panel

Posted: Mon Feb 05, 2018 3:26 pm
by Marcus
Yes, the idea was to get just one value for each country, the annual average growth rate between 1970 and 2017 and then make a scatter graph with that on the y-axis and the 1970-value on the x-axis