悬赏 20 个论坛币 未解决
不知道为什么每次打开stata跑回归得到的结果都不一样???我做了个简单地测试,发现问题可能是出在以下处理某年数据的code里面,但是我自己看不出来,烦请大神帮忙看下。
use "D:\stata14\chfs2011_hh_20191120_version14.dta", clear
merge 1:1 hhid using "D:\stata14\chfs2011_master_city_20180418_version14.dta", nogen
merge 1:m hhid using "D:\stata14\\chfs2011_ind_20191120_version14.dta", nogen
save 2011_merge.dta, replace
*part 1:样本初步筛选
use "2011_merge.dta", clear
keep if rural==1 //删除城市样本
destring hhid, gen(id)
drop hhid
destring agri_labor, replace
destring certified, replace
destring certified_year, replace
destring province, replace
gen ln_income = ln(hh_total_income +1)
gen ln_wage_income = ln(hh_wage_income+1)
gen ln_business_income = ln(hh_business_income+1)
gen ln_transfer_income = ln(hh_transfer_income+1)
gen ln_property_income = ln(hh_property_income+1)
gen ln_other_income = ln(hh_other_income+1)
order id year region province city_lab hh_total_income ln_income ln_wage_income ln_business_income ln_transfer_income ///
ln_property_income ln_other_income certified certified_year household_size hhead_age hhead_age2 hhead_gender ///
labor_ratio education_per education_per2 health politics ///
agriculture agri_labor noagri_hukou_ratio noagri_ratio ///
experience_per experience_per2 operational_capital policy ///
credit_per non_operational_capital landarea_per financialassets city_income_per
sort id year, stable
set seed 123
duplicates drop id year, force
save 2011_data.dta, replace