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

EC 204-B1, D1, Spring 2023

Problem Set#2, 100 points

Instructions:

1)   Submit under PS#2 Submission link under Problem Sets and PS#2” folder by 8:00 pm on M, 02/20.

2)   Please double check to make sure that everything has been uploaded correctly. If you aren’t sure, re-upload (I give you multiple attempts) or email me and our TA. We won’t be able to give you full points back if you tell us that your documents weren’t uploaded correctly, after we post answers.

3)   You need to upload two files on blackboard: the do-file with ALL commands, and a word file where you answer ALL written questions and copy, paste ALL your Stata output (regression tables, graphs, summary statistics table etc). Write question and part# associated with the command with an “*” in the do file, for ease of grading.

4)   Show all your explanations/work/steps/formulas, wherever needed.

5)   If you are using sources other than the book (including online sources) to complete this problem set, please cite. Any new Stata commands that you use apart from the ones in my do-file or done in class must also be cited.

6)   Each student must submit their own problem set. You are encouraged to work together but show your own work. Two problem sets shouldn’t be the same. You MUST write names of your classmates you are working with (if you are working with others).

7)   This problem set is for 100 points.

IPUMS-CPS and Stata based question:

Go tohttps://cps.ipums.org/cps/, go to Create an Extract and Get data”. Then download the  following  data  in  Stata(.dta)  format  following  the procedure  outlined  in  the video uploaded under content on blackboard:

•   Choose ASEC 2021 sample (which is annual data). Choose Cross Sectional NOT Longitudinal, 1 Year Apart (make sure you uncheck all other CPS Monthly and ASEC samples when you download). When you download, you should have only “1” sample in your cart.

•   Choose age and taxinc and download data. You can search for these variables once you choose ASEC 2021. age is the age of the person answering the question and taxinc is the taxable income (gross income tax deductions).

•   Read the different tabs associated with these two variables: codes, description, etc. This step is important because it helps you understand which codes to drop before starting your analyses.

•   Once you get the email from IPUMS-CPS saying that your data is ready for download, log on to IPUMS CPS, download and save the data in .dta format on your computer. Note the path where the data has been saved.

a)  Now open Stata, then open a new Stata do file and call your downloaded data in Stata using the “use” command. Make sure you state the data path correctly. “use” command must be in your do file. Refer uploaded do file#1 for the use” command syntax. Along with this have the clear all”, “log using”, “log close” and save command for your data  set” . You should save your data set with a new name. Note: log close should be the last line in your do file. There should be 163,543 observations in your data set. (10 points)

b)  Now clean the 2 variables that you downloaded (if needed). This means NIU” needs to be set to a “ .” or missing. Check codes of the 2 variables and topcodes (if any) in IPUMS- CPS. Next, drop all observations with a “ .”. You should be left with 129,110 observations if you have done this correctly. You must have all commands in your do file. Refer my uploaded do file#1 that we went over in-class. (5 points)

c)  Read  a  little  about  CPS’s  data  collection  from the website  and  comment  about the possibility of measurement error in these two variables. (5 points)

d)  Now generate a scatterplot with age” on the x-axis and taxinc” on the y-axis. You should also generate a scatterplot for means of taxinc with respect to age to better understand the relationship between x and y. Copy and paste both graphs in your word file and write the Stata commands in your do file. Comment on the relationship you observe. Is it linear if not, what is it? Is it positive or negative? Are there any outliers? Note that graphs will not be saved in your logfile, so you would have to copy and paste it in your word file or take a screenshot and paste. (15 points)

e)  Write the population regression model and its expected value with taxinc as the y and age as the x variable. Write the formula for e. (5 points)

f)   Now, estimate the population regression model using Ordinary Least Squares (OLS) in Stata. Write the Stata command in your do file and attach the output. Write the equation of the sample regression line and the sample regression model. Write the formula for  .

(10 points)

g)  Interpret b1 and b2, paying careful attention to the units. Does b1 make sense? (5 points)

h)  Find predicted taxinc when age = 40 years. Show your calculation by hand. You can round to 3 decimal places at every step. Also write the Stata command for predicting taxinc in your do-file. (5 points)

i)   Calculate the predicted error for a person who is 40 years old, if the actual taxable income is $34,577. Show your calculation by hand. You can round to 3 decimal places. Did your model overestimate/underestimate/exactly estimate the actual hours worked? Also write the Stata command for predicting the error in your do-file. (5 points)

j)   Find mean age () and mean taxinc (n̅̅c̅) in Stata. The command must be in the do file and attach your output. Why are the minimum and maximum ages what they are? Why is the minimum taxable income $0? Explain. Read the CPS documentation for these variables to answer this. (10 points)

k)  What is the predicted taxable income when age is fixed at the mean level? Where would the point (g̅ea̅Xn) lie as compared to the regression line? Show your calculation by hand, no Stata command needed. Do not round. (5 points)

l)   In general, will the predicted error when age is fixed at the mean value be greater than, less than or equal to 0? Explain. (5 points)

m) Explain any functional form error that you made when you estimated a straight-line relationship for these two variables and why. (5 points)

n)  State one confounding variable that can make age endogenous in this relationship and explain how. Explain the omitted variable bias with respect to this omitted variable. What is the sign of this omitted variable bias? (10 points)