contestada

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? 2 (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)?