楼主: liuliumuzi02
4335 1

[回归分析求助] 为什么stata 每次回归的结果不一样 [推广有奖]

  • 0关注
  • 0粉丝

VIP1

本科生

44%

还不是VIP/贵宾

-

威望
0
论坛币
1185 个
通用积分
1.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
146 点
帖子
6
精华
0
在线时间
178 小时
注册时间
2019-3-7
最后登录
2021-4-12

楼主
liuliumuzi02 发表于 2020-2-20 14:02:18 |AI写论文
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


沙发
19163441187 发表于 2023-12-22 15:34:10
你好请问解决了吗,遇到了同样的问题

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-7 17:41