stata 发芽_1121b_30
cap:mkdir 1121b //发芽_1121b_30 import excel "D:\Stata17\1121b\2.各省份绿色金融指数(2000年-2022年).xlsx", sheet("Sheet1") firstrow clear rename(省份 年份)(sheng year) replace sheng=subinstr(sheng,"市","",.) replace sheng=subinstr(sheng,"省","",.) replace sheng=subinstr(sheng,"自治区","",.) replace sheng=subinstr(sheng,"回族","",.) replace sheng=subinstr(sheng,"维吾尔","",.) replace sheng=subinstr(sheng,"壮族","",.) duplicates drop sheng year,force save 1121b\shu1,replace import excel "D:\Stata17\1121b\二版)01-22就业人数.xlsx", sheet("Sheet1") firstrow clear rename id sheng drop if sheng=="" replace sheng=subinstr(sheng,"市","",.) replace sheng=subinstr(sheng,"省","",.) replace sheng=subinstr(sheng,"自治区","",.) replace sheng=subinstr(sheng,"回族","",.) replace sheng=subinstr(sheng,"维吾尔","",.) replace sheng=subinstr(sheng,"壮族","",.) duplicates drop sheng year,force save 1121b\shu2,replace import excel "D:\Stata17\1121b\农业经济韧性.xlsx", sheet("Sheet1") firstrow clear rename(地区 年份)(sheng year) drop if sheng=="" replace sheng=subinstr(sheng,"市","",.) replace sheng=subinstr(sheng,"省","",.) replace sheng=subinstr(sheng,"自治区","",.) replace sheng=subinstr(sheng,"回族","",.) replace sheng=subinstr(sheng,"维吾尔","",.) replace sheng=subinstr(sheng,"壮族","",.) duplicates drop sheng year,force save 1121b\shu3,replace import excel "D:\Stata17\1121b\农业新质生产力原始数据.xlsx", sheet("Sheet1") firstrow clear drop in 1 rename(地区 年份)(sheng year) destring year,force replace drop if sheng=="" replace sheng=subinstr(sheng,"市","",.) replace sheng=subinstr(sheng,"省","",.) replace sheng=subinstr(sheng,"自治区","",.) replace sheng=subinstr(sheng,"回族","",.) replace sheng=subinstr(sheng,"维吾尔","",.) replace sheng=subinstr(sheng,"壮族","",.) duplicates drop sheng year,force save 1121b\shu4,replace use 1121b\shu1,clear forvalues ii=2/4{ merge 1:1 sheng year using 1121b\shu`ii' keep if _merge==3 drop _merge } save 1121b\jieguo1,replace tostring _all,replace force do "C:\Users\ADMINI~1\AppData\Local\Temp\STDcc8_000000.tmp"