当前位置:文档之家› 第7章 Dummy Variables 虚拟变量

第7章 Dummy Variables 虚拟变量

• d: dummy variable虚拟变量
Case 1: y = b0 + d0d + b1x + u
• 考虑一个简单工资方程:
wage = b0 + d0 female + b1 educ + u
• If female =0, then wage = b0 + b1educ + u • If female =1, then wage = (b0 + d0) + b1educ + u
• d0 = E(wage| female=1, educ) - E(wage| female=0, educ)
• d0 (an intercept shift): 给定教育年限educ,女性平 均工资比男性平均工资高d0元。
Example of d0 > 0
E(wage|female,educ) = b0 + d0 female + b1 educ
扩展:多个虚拟变量回归模型
• female(1 female; 0 male); married(1 married; 0 single) • marrfem( 1 female married; 0 others) • marrmale (1 male married; 0 others) • singlefem (1 female single; 0 others) • singlemale (1 male single; 0 others)
• A dummy variable 是一种只取1或0两个数值的变量. • Examples: (1) sex: 1: male 2: female
male (= 1 if male, 0 otherwise); female (= 1 if female, 0 otherwise) (2) region: 1. eastern; 2. central ; 3. western) eastern (=1 if eastern, 0 otherwise); central (=1 if central, 0 otherwise) western (=1 if western, 0 otherwise) • Dummy variables are also called: 二值变量(binary variables), 0-1变量(zero-one variables)
Interaction between dummy variables
• 在表示多种性别-婚姻分组时,工资方程又可以表示为:
• wage =b0+d1 female+d2married+d3female*married+b1educ+u • = b0 + d1 female+ (d2+ d3female) married + b1educ+u • = b0 + (d1 + d3married) female + d2married + b1educ+u
Example of d0 < 0
E(wage|female,educ) = b0 + d0 female + b1 educ
回归结果
wage = b0 + d0 female + b1 educ + u
特例:仅有虚拟变量的回归模型
• wage = b0 + d0 female+ u • E(wage| female) = b0 + d0 female • E(wage| female=1) = b0 + d0 • E(wage| female=0) = b0 • d0 = E(wage| female=1) - E(wage| female=0) • d0 含义:女性平均工资比男性平均工资高d0元
education attainment (1: primary; 2: junior 3. high; 4: college)
training (1. trainees; 2. nontrainees); insurance(1. participating; 2. not participating); industry (1.agriculture; 2: manufacture; 3: service;4. others)
• base group: male*single
• E(wage|female=1,married=1, educ) = b0+d1 female+d2married+d3female*married+b1educ
? wage =b0+d1estern+d2 central+b1educ+ u ? wage =b0+d1estern+d2 central+d3western+b1educ+u
• 2. 对于log model, 如何解释虚拟变量系数d0 ?
log(wage) = b0 + d0 female+ b1 educ + u
Multiple Regression Analysis
y = b0 + b1x1 + b2x2 + . . . bkxk + u
5. Dummy Variables
Chapter Outline
• 1. 描述定性信息 Describing Qualitative Information • 2. 一个虚拟变量作解释变量 A Single Dummy Independent Variable • 3. 用多个虚拟变量表示多种分类数据 Using Dummy Variables For Multiple Categories • 4. 与虚拟变量有关的交互项 Interactions Involving Dummy Variables • 5. 虚拟变量作因变量:线性概率模型 A Binary Dependent Variable: The Linear Probability Model • 6. 关于政策分析与项目评价的进一步讨论 More On Policy Analysis And Program Evaluation
• E(wage|female,married, educ)= b0 + d1 female+ d2 married + b1educ • E(wage|female=1,married=1, educ)= b0 + d1 + d2 + b1educ • E(wage|female=1,married=0, educ)= b0 + d1 + b1educ • E(wage|female=0,married=1, educ)= b0 + d2 + b1educ • E(wage|female=0,married=0, educ)= b0 + b1educ • d1 =E(wage|female=1,married=1, educ)- E(wage|female=0,married=1, educ)
2. 虚拟变量作为解释变量(截距项) Dummy Independent Variables
2. 虚拟变量作为解释变量
• Case 1: y = b0 + d0d + b1x + u • Case 2: y = b0 + d1d1 + d1d2 + b1x + u • Case 3: y = b0 + d1d1 + d1d2 + d1d1d2 + b1x + u • Case 4: y = b0 + d0d + d1d·x+b1x + u
Lecture Outline
• 1. 定性信息与虚拟变量 Qualitative information & Dummy
Variables • 2. 虚拟变量作为解释变量(截距项) Dummy Independent Variables • 3. 与虚拟变量有关的交互项 Interactions Involving Dummy Variables:
log(ˆwage) bˆ0 dˆ0 female bˆ1educ
• 在相同教育年限下,女性平均工资比男性平均工
资高(相差)的比率(百分比)。
dˆ0
log(ˆwagef
)
log(ˆwagem )
wagˆef wagˆem wagˆem
wagˆef wagˆem wagˆem
exp(dˆ0 ) 1 dˆ0
• d0 can be interpreted as an intercept shift
(截距项变动)
wage = b0 + d0 female + b1 educ + u
• 在零值条件期望假定( zero conditional mean)下:
E(wage| female, educ) = b0 + d0 female + b1 educ • (1) E(wage| female=1, educ) = (b0 + d0 ) + b1 educ • (2) E(wage| female=0, educ) = b0 + b1 educ
Income groups (1. <1000; 2. 1000-5000; 3. >5000); age group (1. <16; 2. 16-60; 3. >60);
Ordinal variables: Credit rating (low to high: 1 2 3 4 5);
相关主题