ECN 102 UCD Model Specification and Interactive Dummy Variables Questionnaire

User Generated

jjkjjkjjk

Programming

ECN 102

University of California Davis

ECN

Description

Unformatted Attachment Preview

Economics 102 Problem Set 3 Model Specification, Interactive Dummy Variables, and the Gender Gap 30 points possible (Due in Canvas on Monday, July 26 before 10 p.m. PDT) Department of Economics UC Davis Professor Siegler Summer 2021 Instructions: Please submit one self‐contained Word or PDF document that includes all of your calculations, written explanations, R scripts, and R output. It is due on Monday, July 26 before 10 p.m. in Canvas as attachments in Assignments. You may also attach supplementary files, such as the actual R script files, etc. All of your work must be typed and well‐formatted. No handwritten scans will be accepted. If your TA has provided additional instructions, please follow those as well. The data for this problem set are in gendergap.csv and the data set consists of 1,259 observations from a random sample of individuals, and it includes the following dependent and explanatory variables: csv name lnwage looks union goodhealth black married south bigcity smallcity Description The natural logarithm of hourly wages A measure of physical attractiveness on a 1 to 5 scale (5=best) 1 if a member of a labor union, and 0 otherwise. 1 if person says they are in good health, and 0 otherwise. 1 if person is black, and 0 otherwise. 1 if person is married, and 0 otherwise. 1 if person lives in South, and 0 otherwise. 1 if person lives in a large city, and 0 otherwise. 1 if person lives in a small city, and 0 otherwise. 1 Stargazer table label Natural Log of Wages Physical Attractiveness Member of Labor Union Good Health Black Married Lives in Southern U.S. Lives in a Big City Lives in a Small City service 1 if person works in a service sector occupation, and 0 otherwise. The number of years of formal education. 1 if a person is female, and 0 otherwise. The number of years of work experience. Interactive dummy variable (see Part 2 below) education female experience female:experience 1. Works in Service Sector Occupation Years of Education Female Years of Work Experience Female:Years of Work Experience Estimate the Unrestricted Model with OLS Assume initially that the data‐generating process (DGP) or true population regression function (PRF) is: 𝑙𝑛𝑤𝑎𝑔𝑒 𝛽 𝛽 𝑙𝑜𝑜𝑘𝑠 𝛽 𝑢𝑛𝑖𝑜𝑛 𝛽 𝑔𝑜𝑜𝑑ℎ𝑒𝑎𝑙𝑡ℎ 𝛽 𝑏𝑙𝑎𝑐𝑘 𝛽 𝑚𝑎𝑟𝑟𝑖𝑒𝑑 𝛽 𝑠𝑜𝑢𝑡ℎ 𝛽 𝑏𝑖𝑔𝑐𝑖𝑡𝑦 𝛽 𝑠𝑚𝑎𝑙𝑙𝑐𝑖𝑡𝑦 𝛽 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝛽 𝑒𝑑𝑢𝑐𝑎𝑡𝑖𝑜𝑛 𝛽 𝑒𝑥𝑝𝑖𝑒𝑟𝑖𝑒𝑛𝑐𝑒 𝛽 𝑓𝑒𝑚𝑎𝑙𝑒 𝛽 𝑓𝑒𝑚𝑎𝑙𝑒 ∙ 𝑒𝑥𝑝𝑒𝑟𝑖𝑒𝑛𝑐𝑒 𝜀 Estimate the model using the lm() command in R and report the results with the summary() command. Note that all of the variables are in the data frame, except the interactive dummy variable multiplying female and experience. You can use female:experience or female*experience inside your lm() function for this variable. 2. Interpreting Coefficients A. B. 3. Precisely interpret the estimated coefficient on “bigcity”. Precisely interpret the estimated coefficient on “looks”. Testing a Linear Restriction Suppose you want to test for whether females have a different intercept or partial slope coefficient with regard to experience. As is standard, the null hypothesis is the “no effect” or “no difference” hypothesis. So, in this case, let the null hypothesis be: 𝐻 :𝛽 𝛽 0 2 First, do this test the “long way” by saving the unrestricted residual sum of squares from Part 1. Then, impose the restriction above and re‐estimate the model to get the restricted residual sum of squares. Third, compute the F‐ statistic using the unrestricted and restricted sum of squares from the unrestricted model (Part 1) and the restricted model (Part 2). Compare this F‐ statistic to the appropriate F critical value or use R to get the p‐value. Can you reject the null hypothesis above and accept the alternative of difference in intercept and/or slope for females at conventional significance levels? Briefly explain. Finally, use anova() to let R do the entire test with this one line of code to check your work. 4. Multiple Regression Specification Tests Use the results from Part 2 above to determine the “preferred” model at this point. If you cannot reject the null hypothesis of the restriction, then use the restricted model in the tests below. If you reject the null hypothesis of the restriction, then use the unrestricted model in the tests below. Using R and the packages described in the video lectures, run and interpret the following specification tests: A. B. C. D. RESET Jarque‐Bera (JB) test and graph the histogram of the residuals Breusch‐Pagan (BP) test Variance Inflation Factors What are your overall conclusions from these tests? Explain. 5. Estimate the Model using HC0 Standard Errors and Report the Results with stargazer() Estimate the model from Part 3 above, but report the results using heteroskedastically‐corrected standard errors. If, for example, you call your regression “ols”, then the command in R is: olshc0=coeftest(ols, vcov = vcovHC(ols, type = "HC0")) 3 I have named a new object called “olshc0” which uses the ols coefficient estimates, but replaces the OLS standard errors with standard errors that correct for heteroscedasticity, using the “HC0” method. Report the results in a well‐labeled and formatted regression table using stargazer(). Your stargazer command should begin with: stargazer(olshc0, no.space=TRUE, style="ajps", ….) The “….” are meant to show that you need to include other arguments within this stargazer function besides what I’ve shown above. The style is from the American Journal of Political Science and it seems to format things well in this case. Use the labels for the dependent and explanatory variables given in the third column of the table of the variable descriptions on pp. 1‐2 on this problem set, and add the title: “Table 1: Multiple Regression Results”. Also, add a note to the bottom of your regression table with the embedded argument: notes=c("Heteroskedastically-corrected standard errors in parenthesis"). Finally, report all digits in your regression table to the 4th decimal place with digits=4. 4
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Please view explanation and answer below.

Economics 102
Problem Set 3
Model Specification, Interactive Dummy Variables, and the Gender Gap
30 points possible
(Due in Canvas on Monday, July 26 before 10 p.m. PDT)

Department of Economics
UC Davis

Professor Siegler
Summer 2021

Instructions: Please submit one self‐contained Word or PDF document that includes all
your calculations, written explanations, R scripts, and R output. It is due on Monday,
July 26, before 10 p.m. in Canvas as attachments in Assignments. You may also attach
supplementary files, such as the actual R script files, etc. All of your work must be
typed and well‐formatted. No handwritten scans will be accepted. If your TA has
provided additional instructions, please follow those as well.
The data for this problem set are in gendergap.csv, and the data set consists of 1,259
observations from a random sample of individuals, and it includes the following
dependent and explanatory variables:
csv name
lnwage
looks

union
goodhealth
black
married
south
bigcity
smallcity

Description
The natural logarithm of
hourly wages
A measure of physical
attractiveness on a 1 to 5
scale (5=best)
1 if a member of a labor
union, and 0 otherwise.
1 if a person says they are in
good health, and 0 otherwise.
1 if a person is black, and
0 otherwise.
1 if the person is married,
and 0 otherwise.
1 if a person lives in the
South, and 0 otherwise.
1 if a person lives in a
large city, and 0
1otherwise.
if a person lives in a
small city, and 0
otherwise.

1

Stargazer table label
Natural Log of Wages
Physical Attractiveness

Member of Labor Union
Good Health
Black
Married
Lives in Southern U.S.
Lives in a Big City
Lives in a Small City

service

education
female
experience
female: experience

1.

1 if a person works in a
service sector occupation,
and 0 otherwise.
The number of years of
formal education.
1 if a person is female, and 0
otherwise.
The number of years of work
experience.
An interactive dummy
variable (see Part 2 below)

Works in Service Sector
Occupation
Years of Education
Female
Years of Work Experience
Female...


Anonymous
This is great! Exactly what I wanted.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags