Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will create a pdf file for your answers using R quarto markdown. The due date for the project is 5 / 5 / 2

You will create a pdf file for your answers using R quarto markdown. The due date for the project is 5/5/2024,11:59PM. Submit the pdf file on Blackboard before the due date.
(1) Open RStudio and open a new Quarto Document. For the title, use last- name_firstname_382_sectionnumber_CPSPROJECT in capital letters. It should be something like this, DOE_JOHN_382_01_CPSPROJECT. The, click Create.
(2) In the preamble section, insert Author and Date information. You can also provide a Subtitle. All of this information must be in quotation marks. It should look something like this.
Figure 1: preamble
(3) Highlight and delete the body of the document, starting from Quarto section all the way to the end.
(4) Click on Render in the menu. R will ask you to save the file, choose 382PROJECT folder, and for the file name use DOE_JOHN_382_01_CPSPROJECT. Click on Save. Then, DOE_JOHN_382_01_CPSPROJECT.qmd file will be processed and you should see the html version in Viewer.
(5) Create a section heading and name it as CPS_DATA_EXERCISE.
(6) Insert an R code chunk and import the data set CPSDATA.csv. You can use read.csv() to import. Name the container data frame as CPSDATA. Take a look at the column names and data types. Make sure that numeric columns are numeric.
2
Figure 2: body
(7) SEX is coded as 1 for Males and 2 for Females. Generate a new integer column in CPSDATA named FEMALE which is an indicator for Females.
(8) RACE take several values raging from 100 to 999. The value 100 stands for White and 999 stands for missing. Generate a new integer column in CPSDATA named NONWHITE which is an indicator for Non-whites.
(9) MARST take values from 1 to 9. Value 1 indicates married and spouse being present. Value 9 stand for missing. Generate a new integer column in CPSDATA named MARRIED which is an indicator for married and spouse being present.
(10) EDUC99 take values from 0 to 18. Value 1 indicates no schooling. Value 18 stand for Doctorate degree. Missing is coded as 0. Generate a new integer column in CPSDATA named HIGHSCHOOL which is an indicator for at least High school graduates.
(11) INCWAGE is a continuous variable which indicates each respondents total pre-tax wage and salary income. Missing is coded as 99999998 or 99999999. Replace these values for missing to NA.
(12) Region variable takes 9 values starting from 11 to 42. Replace 11 and 12 with 1; 21 and 22 with 2; 31,32 and 33 with 3; 41 and 42 with 4.
(13) Drop SEX, RACE, MARST and EDUC99 from CPSDATA.
(14) Create a table of descriptive statistics for INCWAGE, FEMALE, NONWHITE, MAR- RIED, HIGHSCHOOL and REGION.
(15) Calculate the fraction of observations with zero value in INCWAGE. Add 0.01 to the zero values under INCWAGE.
3
(16) Estimate the following model and obtain heteroskedasticity robust standard errors. log(INCWAGE)=\beta 0+\beta 1FEMALE +\beta 2NONWHITE +\beta 3MARRIED
+\beta 4HIGHSCHOOL + u
(17) Estimate the following model and obtain heteroskedasticity robust standard errors.
log(INCWAGE)=\beta 0+\beta 1FEMALE +\beta 2NONWHITE +\beta 3FEMALE \times NONWHITE +\beta 4MARRIED +\beta 5HIGHSCHOOL + u
(18) Estimate the following model and obtain heteroskedasticity robust standard errors. log(INCWAGE)=\beta 0+\beta 1FEMALE +\beta 2NONWHITE +\beta 3FEMALE \times NONWHITE
+\beta 4MARRIED +\beta 5HIGHSCHOOL + R2+ R3+ R4+ u
where R2, R3 and R4 are dummies for regions 2,3 and 4.
(19) Explain the purpose including these region dummies. Explain why the first region is excluded.
(20) Present your results in a table with 3 columns. Interpret the coefficient estimates for \beta 1,\beta 2 and \beta 3 in column (3).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

Describe two of Georg Elias Mllers contributions to psychology.

Answered: 1 week ago