联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Database作业Database作业

日期:2024-03-26 03:53

Homework 8 - Interpreting Interaction E?ects

IRE379


Figure 1: UAW Organizing in Detroit

Introduction

Before analyzing data, we often must do some ‘data wrangling’—reading, reshaping, merging, and cleaning data to make it useful for analysis. This assignment practices some basic data wrangling, before moving on the interpretation of coe?cients from interaction models.

1    Merging datasets

The Blau and Kahn PSID data has been split into two datasets, one containing demographics (PSID_demographics.csv) and the other containing the respondents’ employment outcomes (PSID_jobs.csv). Fortunately, each respondent is identi?ed with a numeric code that is the same in both datasets:  id. Read  these two data sets into memory, and then use the function left_join() to merge them into a single dataset, using the column id as the key for merging.

2    Race, wages, and union coverage

2.1    Binary X  (No interaction e?ects)

Fit the bivariate regression model Yi  = β0 + β1 Di + ui  with average wage as the dependent variable and a dummy variable indicating whether the respondent was white as the independent variable. Using only the regression output, what are the following values?

?  Estimated mean wage for white respondents

?  Estimated mean wage for non-white respondents

2.2    Subgroup means from an interaction model

Fit the interaction model Yi  = β0 + β1 D1i + β2 D2i + β3 (D1i * D2i) + ui  with average wage as the dependent variable and binary indicator (dummy) variables for white identity and union coverage as the independent variables. Using only the regression output, what are the following values?

?  Estimated mean wage for white respondents without union coverage

?  Estimated mean wage for non-white respondents without union coverage

?  Estimated mean wage for white respondents with union coverage

?  Estimated mean wage for non-white respondents with union coverage

2.3    Con?rming the subgroup means

Use filter() to create 4 separate datasets for each permutation of white (0, 1) and union coverage (0, 1). Calculate the mean wage within each dataset and compare to your results from the previous question.

2.4    Interaction e?ect interpretation

What does the coe?cient on ‘white:unjob’ tell us? Why might this be true?





版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp