


* how to ue PWT data:

* downloaded from: https://www.rug.nl/ggdc/productivity/pwt/


* MAKE FILE FOR RGDP

use "D:\Dropbox\Conspiring_Tech\PCI and skill premium\GAMS\data\PWT9_feb2018\pwt90.dta", clear
*tab year
drop if year< 1980

*g year2 = year

keep if year == 1995 | year == 2009 | year == 2010 

gen pcrgdpe = rgdpe / pop
replace pcrgdpe = round(pcrgdpe,1) 

keep pcrgdpe year countrycode


reshape wide pcrgdpe, i(countrycode) j(year)
replace countrycode ="ROM" if countrycode =="ROU"
drop if pcrgdpe1995 ==.


* COPY TO GAMS


****

* MAKE FILE FOR EXPORT / GDP  (note: this is only merchendise exports)

use "D:\Dropbox\Conspiring_Tech\PCI and skill premium\GAMS\data\PWT9_feb2018\pwt90.dta", clear
*tab year
drop if year< 1980

keep if year == 1995 | year == 2009

keep csh_x year countrycode
reshape wide csh_x, i(countrycode) j(year)
replace countrycode ="ROM" if countrycode =="ROU"
drop if csh_x2000 ==.

* COPY TO GAMS


****



















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



