Lab Assignment 1

docx

School

University of California, Los Angeles *

*We aren’t endorsed by this school

Course

MISC

Subject

Economics

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by SuperWalrus4091

Report
Lab Assignment 1 For the duration of the course, we will be working with a random sample of a federally publicly available dataset called HMDA. HMDA is a nationally representative sample of mortgage lending in the United States. I have provided a random sample of 50 thousand homebuyers from 2020. In addition, each observations contains a wealth of information of the borrowers including socio-demographic characteristics, loan details, property characteristics, and neighborhood characteristics. You are required to complete your lab assignments in R and you are required to submit your assignment using an R markdown file. Variables – Variable name Age of the respondent - age Race of the respondent – race Gender of the respondent - female Income of the borrower – income1 Debt-to-income ratio of the respondent - dti Loan amount requested – loan_amount1 Co-applicant status- coapplicant Property value of the home- property_value1 Housing Price Index – index_sa2020 1. Provide the appropriate labels for the following variables: Gender (female): 0 – male, 1 – female Race (race): 1 – white, 2- black, 3- Latino, 4- Asian, 5- Native American, 6- Pacific Island Age (age): 1- <25 yrs, 2- 25-34 yrs, 3- 35-44 yrs, 4- 45-54 yrs, 5- 55-64 yrs, 6- 65-74 yrs, 7- >75 yrs Debt-to-Income Ratio (dti): 1- <36%, 2- 36-40%, 3- 40-45%, 4- >45% Co-applicant (coapplicant): 0- single, 1- co-applicant 2. Create a clean data subset by deleting missing observations from the following variable: Housing Price Index Show the dimensions of the original and final subset of the data: dim() Using the data subset:
3. Create a 5-category variable from income. Create an 8-category variable from property value (Show frequency of new variables) 4. Provide the appropriate measures of central tendency for income, loan amount, property value, race, gender, and age of the borrowers. 5. What is the average income by race? 6. Create a pie graph of the respondents ages. 7. Create a bar graph of gender by race and ethnicity 8. What is the average property value of women who have a debt-to-income ratio of less than 36 percent? 9. What is the average income of Asian men?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help