跳至正文

学术力max代写Economics 217 Take home coding assignment

Instructions: This is a take home “exam” – notes and generic online resources are fine. You are required to submit a brief write-up showing your results (just like your homework), as well as a source code that is both runnable and readable. Credit will be given based on both materials. Partial credit will be given for code that shows comprehension of the material, even if the end result is incorrect.

Problem 1
In this question we will study differences in wages and hours worked by the gender of respondents in our Org data. Of particular interest is how these differences in employment outcomes change along the lifecycle of work, from college age to retirement.
To begin, we will study wage differences by gender, and how these differences change with age. Specifically, we will estimate the following using a generalized linear model:

log(rw) = as.f actor(age) ∗ f emale + educ + wbho + u

Here, rw is the real wage, educ is an education factor variable, wbho is a factor variable describing the race of the respondent, age is the age of the respondent, and f emale takes on a value of 1 when the respondent is a woman. Note that we have wrapped “age” with “as.factor”, which changes numeric values of age to a factor variable. We have also interacted age, and female, which in R will compute the full interaction between them. This interaction will allow us to look at the lifecycle of the wage gap.
a. Please estimate the model described above for 1993 and 2013 (separately), restricting the models to only those respondents who are in the labor force. Please interpret the education coefficients briefly, and comment on any changes between the two years. (10 points)
b. For each sample (1993 and 2013), please generate a predicted log wage for a white female with a college education for all ages 20-70, and then for a white male with a college education for the same ages. Illustrate the log differences in male-female wages on a plot, and comment on how the wage gap changes over the age of the respondent, and how the life cycle of the wage gap changes between
1993 and 2013. (20 points)

c. Please repeat the exercise in part b, but propose and use a model evaluating hours worked. Please be sure to change missing value of hours worked to zero prior to running the estimation. Illustrate the log differences in male-female predicted hours worked on a plot, and comment on how the gap changes over the age of the respondent, and how the life cycle of the gap changes between 1993 and
2013. (20 points)
Problem 2
For this question, please use the data set with your name on it from the course webpage. This dataset was sourced from the St. Louis Fed “FRED” data series for local housing markets. Your job in this question is to estimate a non-parametric fit for your housing market.
a. Using LOESS with degree=1 in R, use a leave-one-out (cross-validation) procedure to estimate the optimal span for non-parametric estimation. Please report this span, and plot your optimal non-parametric function using this span, including the original data on the same plot. (10 points)
Precision: When finding the optimal span, please do so to the nearest 0.05.

b. Please estimate the same time series using a third-degree spline, with knots every 10 periods (which are actually quarters) starting at period 10. Again, plot your non-parametric fit on a plot, which also includes the original data. (20 points)
c. Please use the logic of cross validation and write a procedure to optimize where you start the 10 period increments. That is, does the best spline fit start follow (5,15,…), or (10,20,…), or (11,21,…) or some other sequence of 10 period increments. Plot the best fit from the cross-validation, reporting the starting point. (20 points)

扫一扫又不会怀孕,扫一扫,作业无烦恼。
留学顾问の QQ:2128789860
留学顾问の微信:risepaper

让我们成为您的快乐赶due水!天才的人总是勤奋的,小编旗下的专家虽然不是最顶级的,但是态度和责任心绝对是靠谱的。


拒绝黑眼圈,远离变态的作业负担!大量的assignment term paper group project,不仅夺走了您的良好的美美的睡眠,还给了您一双韩式半永久黑眼圈,真的是太悲剧,何不找锐泽代写来赶走他们呢?!