Description
- Enter your answers to the number of decimal places that R reports unless there are more than 6. If there are more than 6 numbers after the decimal, just report the first 6 in your answer in Canvas. And if you follow these instructions and get it marked wrong due to rounding, send me a submission comment or Canvas message so I can fix the question – thanks!
- You must use R and provide your code using the starter script format to receive credit for this assignment (more information at the bottom of these instructions).
- Background:Well look at income data from the Current Population Study (CPS), a regular survey conducted by the U.S. Census Bureau. The hdm package in R includes the cps2012 data from a 2012 CPS survey. This is similar to the data used in Mulligan and Rubinstein (2008) which studied the impact of gender on wages. It contains data on incomes and respondent demographics.
- Use this R script file to call in and wrangle the data (make transformations, delete certain columns, etc…). The variables in the wrangled dataset are:
- hrwage — hourly wage in 2012 dollars
- female
widowed
divorced
separated
nevermarried
hsd8 — education less than 8th grade
hsd911 — education 9th – 11th grade
hsg — high school graduate
cg — college grad
ad — advanced graduate degree
mw — subject lives in midwest
so — subject lives in south
west — subject lives in west
pexp — potential experience, a heuristic for the number of years that a survey respondent could have been working full time - Important Note: pexp and hrwage are numeric variables and the remaining variables are columns of 1’s and 0’s. These are binary indicators for group membership. For example, if so = 1, the subject lives in the south and if so = 0, the subject does not live in the south. If you wanted to subset on someone who lives in the south, you would subset on the so column for entries where it is 1. (You will need to understand this to answer at least one of the questions in the case).The omitted categories determine the reference levels: our baseline subject here is a married male from the northeast who has some college but not a full four-year degree. Use this information and R to answer the questions below and please make sure to watch this short video before submitting your R code to me.https://youtu.be/ZFTGW1Flx74