Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Current Population Survey: (100 points) Go to the IPUMS CPS; the link is here. Here is a video tutorial on how to use the

image text in transcribed

4. Current Population Survey: (100 points) Go to the IPUMS CPS; the link is here. Here is a video tutorial on how to use the IPUM CPS. 1. First, download a file archiver. One option is to install 7-Zip from this link. You need to construct the appropriate data set. . Click Get Data under Create An Extract". Click Change Samples and make sure ONLY THE YEAR 2020 IS TICKED! Then click Submit Sample Selections. . You need to extract the following variables: Ser (SEX), Age (AGE), Hours usually worked per week at all jobs (UHRSWORKT), educational attainment (EDUC99), wage and salary income (INCWAGE), and any health insurance coverage last year (ANY- COVLY). Let us look at the SEX variable. 3. Decompress your downloaded files and move them to your working directory. Read the data set into R Studio. (Here is an informative pdf showing all the steps.) (a) Remove observations having NA in either SEX, AGE, UHRSWORKT, EDUC99, INCW AGE, and ANYCOV LY (b) In IPUMS CPS. NIU means there is no information for that variable. So we will proceed to remove observations having NIU entries. In the IPUMS CPS code tab, you will find the code identifying NIU for each variable. You have to do some data cleaning! 80 in AGE stands for anyone who is 80-84 85 in AGE stands for anyone who is older than 85. So these aren't actual values. Remove observations having either 80 or 85 in AGE . 99 stands for NIU in ANYCOVLY. Remove these observations . 9 stands for NIU in SEX. Remove these observations. . O includes NIU in UHRSWORKT. Remove these observations .0 is NIU in EDUC99. Remove these observations, 99999999 is NIU in INCWAGE. Remove these observations, 4. Sex is a categorical variable. Read its Code tab in the IPUMS CPS website. Now convert it into a dummy variable. What fraction of observations is male? 5. Now construct the wage, or the average hourly earnings variable. . Call the variable AHE and initialize it with NA for every observation Page 2 There are about 52 weeks in a year. Set AHE = USORAT Is the formula a reasonable calculation of average hourly earnings? Report the mean and percentiles (5%-25%-50%:75%-95%) of these variables AGE and . . Plot the distributions of average hourly earnings and age. Please label your axes and title. Set alim=c(0,200) for the wage distribution to zoom into the graph. Compute the kurtosis and skewness of the two distributions. Can you explain the skewness of the average hourly wage distribution? Also, if someone says the wage distribution is normally distributed, what is your response? Do you think this sample is representative of the U.S. working population? Use the summary statistics to explain your answer. Finally, report a 95% confidence interval for the average hourly wage. Explain your calculation 6. You are going to construct a variable called EDUC. . Apply the unique function on EDUC99. Does EDUC99 correctly measures years of education? Can EDUC99 tell you if someone's highest grade is the 6th grade? What about the highest grade being the 3rd grade? . Follow these instructions to construct EDUC. - Initialize EDUC=NA for every observation IF EDUC99 = 6 then set EDUC = 9. I EDUC99 = 7 then set EDUC = 10 IF EDUC99 = 8 then set EDUC = 11. - If EDUC99 = 9 or 10 then set EDUC = 12 - If EDUC99 = 12, 13, or 14 then set EDUC = 14 - If EDUC99 = 15 then set EDUC = 16. Now remove any observations having NA in EDUC. Explain why or why not EDUC is a reasonable measurement for years of education. 7. Convert the variable ANYCOV LY into a categorical variable. 8. Use a t-test to compare the average years of education between those had no health care coverage last year vs those had some health care coverage last year. (Remember to report all body parts of a test!) 9. Explain why you should or should not interpret health-care insurance causes workers to be more educated basing just on the t-test? 4. Current Population Survey: (100 points) Go to the IPUMS CPS; the link is here. Here is a video tutorial on how to use the IPUM CPS. 1. First, download a file archiver. One option is to install 7-Zip from this link. You need to construct the appropriate data set. . Click Get Data under Create An Extract". Click Change Samples and make sure ONLY THE YEAR 2020 IS TICKED! Then click Submit Sample Selections. . You need to extract the following variables: Ser (SEX), Age (AGE), Hours usually worked per week at all jobs (UHRSWORKT), educational attainment (EDUC99), wage and salary income (INCWAGE), and any health insurance coverage last year (ANY- COVLY). Let us look at the SEX variable. 3. Decompress your downloaded files and move them to your working directory. Read the data set into R Studio. (Here is an informative pdf showing all the steps.) (a) Remove observations having NA in either SEX, AGE, UHRSWORKT, EDUC99, INCW AGE, and ANYCOV LY (b) In IPUMS CPS. NIU means there is no information for that variable. So we will proceed to remove observations having NIU entries. In the IPUMS CPS code tab, you will find the code identifying NIU for each variable. You have to do some data cleaning! 80 in AGE stands for anyone who is 80-84 85 in AGE stands for anyone who is older than 85. So these aren't actual values. Remove observations having either 80 or 85 in AGE . 99 stands for NIU in ANYCOVLY. Remove these observations . 9 stands for NIU in SEX. Remove these observations. . O includes NIU in UHRSWORKT. Remove these observations .0 is NIU in EDUC99. Remove these observations, 99999999 is NIU in INCWAGE. Remove these observations, 4. Sex is a categorical variable. Read its Code tab in the IPUMS CPS website. Now convert it into a dummy variable. What fraction of observations is male? 5. Now construct the wage, or the average hourly earnings variable. . Call the variable AHE and initialize it with NA for every observation Page 2 There are about 52 weeks in a year. Set AHE = USORAT Is the formula a reasonable calculation of average hourly earnings? Report the mean and percentiles (5%-25%-50%:75%-95%) of these variables AGE and . . Plot the distributions of average hourly earnings and age. Please label your axes and title. Set alim=c(0,200) for the wage distribution to zoom into the graph. Compute the kurtosis and skewness of the two distributions. Can you explain the skewness of the average hourly wage distribution? Also, if someone says the wage distribution is normally distributed, what is your response? Do you think this sample is representative of the U.S. working population? Use the summary statistics to explain your answer. Finally, report a 95% confidence interval for the average hourly wage. Explain your calculation 6. You are going to construct a variable called EDUC. . Apply the unique function on EDUC99. Does EDUC99 correctly measures years of education? Can EDUC99 tell you if someone's highest grade is the 6th grade? What about the highest grade being the 3rd grade? . Follow these instructions to construct EDUC. - Initialize EDUC=NA for every observation IF EDUC99 = 6 then set EDUC = 9. I EDUC99 = 7 then set EDUC = 10 IF EDUC99 = 8 then set EDUC = 11. - If EDUC99 = 9 or 10 then set EDUC = 12 - If EDUC99 = 12, 13, or 14 then set EDUC = 14 - If EDUC99 = 15 then set EDUC = 16. Now remove any observations having NA in EDUC. Explain why or why not EDUC is a reasonable measurement for years of education. 7. Convert the variable ANYCOV LY into a categorical variable. 8. Use a t-test to compare the average years of education between those had no health care coverage last year vs those had some health care coverage last year. (Remember to report all body parts of a test!) 9. Explain why you should or should not interpret health-care insurance causes workers to be more educated basing just on the t-test

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