use "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\Class\class_A110.dta", clear
preserve
drop if number_1 !=1
local a = gyear_inventor_lo
local b = gyear_inventor_up
local c = class_4digit
restore
keep if gyear >= `a'& gyear <= `b'
gen explor = 1
replace explor = 0 if strpos(class_4digit,"`c'")
keep if explor == 0
save "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\1.dta"
use "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\Class\class_A110.dta", clear
preserve
drop if number_1 !=2
local a = gyear_inventor_lo
local b = gyear_inventor_up
local c = class_4digit
restore
keep if gyear >= `a'& gyear <= `b'
gen explor = 1
replace explor = 0 if strpos(class_4digit,"`c'")
keep if explor == 0
save "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\2.dta"
···
use "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\Class\class_A110.dta", clear
preserve
drop if number_1 != n
local a = gyear_inventor_lo
local b = gyear_inventor_up
local c = class_4digit
restore
keep if gyear >= `a'& gyear <= `b'
gen explor = 1
replace explor = 0 if strpos(class_4digit,"`c'")
keep if explor == 0
save "D:\2016-2017博士生涯\博士生涯\数据整理\inventor\哈佛数_3\n.dta"