Deadline May 4, 2026 at 11:59 PM.
<aside> π‘
What is a Lorenz curve?
Deciles break the population into ten equally sized slices, letting you see who is at the bottom, middle, or top. The Lorenz curve then turns these slices into a visual story: by sorting people from poorest to richest and plotting how much of total income the cumulative population holds, you can literally see inequalityβif everyone had the same income, the curve would be a straight 45Β° line.
</aside>
<aside> π
You will complete this assignment as an R Markdown file. The goal is not just to get results, but to clearly show and explain your workflow.
echo = TRUE and include = TRUE should be used throughout.Your PDF document should be clearly organized using section headers:
You must create a single self-contained folder that includes:
You must create one folder that someone else can run without touching anything.
pset2_name_surname/
β
βββ pset2.Rproj
βββ analysis.R
βββ anaylsis.pdf (complied when you Knit to pdf using RMarkdown)
β
βββ input_data/
β βββ coreecon_ineq.xlsx
β
βββ outputs/
βββ (your figures will be saved here automatically)
Your .Rmd must follow this structure exactly:
---
title:"Problem Set 2: Income Inequality"
author:"Your Name"
output: pdf_document
---
```{rsetup,include=FALSE}
knitr::opts_chunk$set(echo=TRUE,warning=FALSE,message=FALSE)
# Load libraries
library(readxl)
library(tidyverse)
library(janitor)
```php
# **SECTION 1 β Data Preparation**
## **1.1 Load Data**
....