因子和假人的不同边际效应

时间:2016-07-20 13:47:09

标签: stata margins dummy-variable

有人可以解释为什么我会为以下命令获得不同的边缘效应,即离散效果(但系数相同)。我试图创建一个数据集来复制这个发现。

clear
set seed 123456
set obs 4

gen factor = 0 if _n == 1
replace factor = 1 if _n == 2
replace factor = 2 if _n == 3
replace factor = 3 if _n == 4

gen dummy1 = 0
replace dummy1 = 1 if factor == 1
gen dummy2 = 0
replace dummy2 = 1 if factor == 2
gen dummy3 = 0
replace dummy3 = 1 if factor == 3

expand 10

gen dv = 5 + rnormal()

gen b = 0
replace b = 1 if dv > 6

quietly logit b i.factor, robust
margins, dydx(*)
quietly logit b i.dummy1 i.dummy2 i.dummy3, robust
margins, dydx(*)

为什么两种情况下的边际效应都不同?

0 个答案:

没有答案