answer these questions in the do file with the data provides use stata

profileKevGod12
vanparys_assignment10.do.docx

/*==============================================================================

Title: vanparys_assignment10_solutions.do

Author: Jessica Van Parys

Date modified: 10/30/2020

Module: #10

==============================================================================*/

cap log close _all

clear

set more off

/*==============================================================================

Create a log file for your results

==============================================================================*/

log using "C:\Users\Kevin\OneDrive\Desktop\ECO321\Gutierrez-assignment10.log", name(KG) replace

/*==============================================================================

Suppose you want to find out if racial discrimination is worse in some parts

of the country than others.

Open the wage2.dta data set. It is a random sample of men who applied to serve

in the Armed Forces. The men completed IQ tests and Knowledge of the World of

Work tests. The data set contains their scores on those tests, as well as

information about their wages and other characteristics.

==============================================================================*/

use "C:\Users\Kevin\OneDrive\Desktop\ECO321\wage2.dta"

/*==============================================================================

(Q1): Estimate a model that expresses the natural log of wages as a function of

years of education (educ), work experience (exper), IQ scores (IQ), Knowledge

of the World of Work test scores (KWW), a black binary variable (black), a

binary variable that equals 1 if the person lives in a city (SMSA), and a binary

variable that equals 1 if the person lives in the Southern US.

Use heteroskedasticity-robust standard errors.

Interpret beta5hat in a sentence.

Which variables have individually statistically significant relationships to

log(wages)? Use alpha=0.10.

==============================================================================*/

gen SMSA=urban==1

gen us=south==1

reg educ exper IQ KWW black urban south

test exper exper

*beta5hat is .052 completed the IQ test.

*H0: beta1=beta2=0 vs. H1: beta1!=0 and/or beta2!=0

*The p-value testing the joint statistical significance is less than 0.0000 < 0.10,

*so we reject the null hypothesis of no statistical significance.

stop

/*==============================================================================

(Q2): The racial wage gap is the difference in wages between black and nonblack

men.

Create an interaction term between the black binary variable and the

south binary variable, and add that variable to the model (as X8).

Does the racial wage gap depend on whether the man lives in the South or not?

Use alpha=0.10.

==============================================================================*/

/*==============================================================================

(Q3): Create two more binary variables, one variable call nonblack_south that

equals 1 if the man is nonblack and lives in the South and equals 0 otherwise.

The second variable called black_nonsouth that equals 1 if the man is black

and does not live in the South.

Re-estimate the model in (Q2) but use three interaction terms instead of one.

Note: You will have to drop one or more variables to do this.

How much less do black men in the South earn compared to non-black men who

do not live in the South?

==============================================================================*/

/*==============================================================================

(Q4): Start with the model in (Q1). Repeat (Q2) for urban and black variables.

What do you conclude?

==============================================================================*/

/*==============================================================================

(Q5): Start with the model in (Q1). Repeat (Q3) for urban and black variables.

What do you conclude?

==============================================================================*/

/*==============================================================================

(Q6): What do you conclude overall from this exercise?

==============================================================================*/

/*==============================================================================

==============================================================================*/