Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Stata Assignment 2

Econ 120B Spring 2022

1. In this exercise you will employ regression analysis to study how education, experience, and job tenure affect wage. First, consider the following regression model:

lnwagei  = 80  + 81 gradei  + 82 ttl  expi  + 83 tenurei  + ui ,

To estimate this model, generate a new variable called lnwage which is the natural logarithm of wage times 100.  (This will make it easier to interpret the coefficients.  For example, a one unit increase in grade will correspond to a 81 % increase in wage.)

(a)  Use the regress command to estimate the above model. What is the percentage change in wage when education

increases by one year? How about job tenure?

(b)  To test the null hypothesis that 82  = 3, what is the t-statistic?  What is the p-value?  Will you reject the null

hypothesis at the 10% significance level?

Next, to study if education has a quadratic (nonlinear) eect on lnwage, consider the following regression model:

lnwagei  = 80  + 81 gradei  + 82 ttl  expi  + 83 tenurei  + 84 gradei(2)  + ui ,

To estimate this model, generate a new variable which equals grade2 .  Use the regress command to estimate the coefficients.

(c) What is the value of 8ˆ1 ?  What is the 95% confidence interval?  (Use the standard normal critical value 1.960 to find the confidence interval.)

(d) What is the value of 8ˆ4 ? Is it statistically significant at the 10% level?

(e)  For someone with 12 years of education, what is the percentage change in wage if she receives an additional year

of education?

(f)  To test the null hypothesis that 81  = 84  = 0, what is the Bonferroni statistic? How many restrictions are in this

hypothesis? What is the p-value? Will you reject the null hypothesis at the 5% level?

 

2. In this exercise, you will conduct regression analysis with binary and categorical variables.

(a)  Use the command tabulate to show the categories of the variable occupation and their frequencies. What is the

relative frequency of the category Sales? Please report a number between 0 and 1.

(b)  Use the same command, this time specifying the option nolabel, to visualize the numeric values corresponding

to the different categories of occupation. Which numeric value corresponds to the label Sales?

(c)  Use the command summarize with the option if to compute the sample mean of wage for workers with Sales occupation. What is the average wage for workers with Sales occupation?

(d)  Use the command regress  wage  i.occupation to run a regression with binary variables for every occupation category.  (Adding i.  to a categorical variable will automatically generate a binary variable for each category.) The occupation with numeric value 1 is used as the base group. Given the regression results, what is the average wage for workers with Sales occupation? How does your answer compare to part 2(c)?

(e) Which occupation has the highest average wage? How much is it?

(f)  Use a similar command as in step (d), this time to study the average hours for each occupation. Which occupation

works the longest hours per week? How many hours on average for this occupation?

Next, we follow a similar procedure as in steps (a)–(d) to study the wage gap among different races.

(g)  Use the command regress  wage  i.race to run a regression with binary variables for every race category. What

is the average wage for white?

(h) What is the wage gap between white and black (report a positive number)? What is the 95% confidence interval

for this wage gap?

(i)  Generate three binary variables for categories in race to run a saturated regression instead of (g).  What is the average wage for white? How does your result compare to (g)?

 

3. In this exercise, you will run multiple regressions with interaction terms.  First, consider the following regression with an interaction between the two binary regressors, collgrad and union:

wagei  = 80  + 81unioni  + 82 collgradi  + 83union Xcollgradi  + ui ,

To estimate this model, generate an interaction term between collgrad and union.  Use the regress command to estimate the regression coefficients.

(a) What is the base category in this model? What is the average wage for workers in this base category?

(b) What is the difference in average wage for non-college graduates in a union and non-college graduates not in a

union (report a positive number)?

(c) What is the difference in average wage for college graduates in a union and college graduates not in a union (report a positive number)?

Next, consider the following regression with an interaction term between ttl  exp and union:

lnwagei  = 80  + 81unioni  + 82 ttl  expi  + 83union Xttl  expi  + ui ,

To estimate this model, generate an interaction term between ttl  exp and union.   Use the regress command to estimate the OLS coefficients.

(d)  For non-unionized workers, what is the average percentage change in wage when experience increases by one year? (e)  For unionized workers, what is the average percentage change in wage when experience increases by one year?