


* how to ue PWT data:

use "C:\Dropbox\Conspiring_Tech\PCI and skill premium\GAMS\data\PWT9_pop_cgdpe_long_raw.dta", clear


tab yearcode

bysort region: egen yearmax = max(yearcode)
bysort region: egen yearmin = min(yearcode)
drop yearmax yearmin


keep if year == 1990 | year == 2005 | year == 2014

preserve

keep if variablecode == "pop"
drop variablecode
rename aggvalue pop
save temp_pop, replace

restore

keep if variablecode == "cgdpe"
drop variablecode
rename aggvalue cgdpe
merge 1:1 yearcode regioncode using temp_pop

drop _merge
rename region country
gen pcgdpe = cgdpe / pop
drop cgdpe pop

reshape wide pcgdpe, i(country) j(yearcode)


save "C:\Dropbox\Conspiring_Tech\PCI and skill premium\GAMS\data\pcgdpe_1990_2005_2014.dta", replace



