Project 1:

Research Question: Is there a linear relationship between Median early-career salaries of different college majors and the unemployment rate of recent grads with that major?

Analysis will be performed on a dataset from the Federal Reserve Bank of New York titled “Labor Market Outcomes of College Graduates by Major in 2024”, particularly the “outcomes by major” section. The column “Median Wage Early Career” measures the median salaries of graduates aged 22-27 by college major, and the column “Unemployment Rate” measures the percentage of people in the US holding undergraduate degrees in a given major who are not employed despite actively seeking employment.

library(readxl)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## âś” dplyr     1.2.1     âś” readr     2.2.0
## âś” forcats   1.0.1     âś” stringr   1.6.0
## âś” ggplot2   4.0.3     âś” tibble    3.3.1
## âś” lubridate 1.9.5     âś” tidyr     1.3.2
## âś” purrr     1.2.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## âś– dplyr::filter() masks stats::filter()
## âś– dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
labordata_raw <- as_tibble(read_excel("College-labor-data.xlsx", sheet = "outcomes by major", skip = 9))
labordata_raw
## # A tibble: 74 Ă— 6
##    Major       `Unemployment Rate` `Underemployment Rate` Median Wage Early Ca…¹
##    <chr>                     <dbl>                  <dbl>                  <dbl>
##  1 Agriculture                1.40                   57.1                  56000
##  2 Animal and…                2.54                   53.5                  46600
##  3 Environmen…                6.31                   50.5                  50000
##  4 Architectu…                6.84                   25.7                  60000
##  5 Ethnic Stu…                4.86                   49.6                  52000
##  6 Communicat…                3.86                   53.0                  52000
##  7 Journalism                 2.32                   43.3                  49000
##  8 Mass Media                 5.16                   52.1                  50000
##  9 Advertisin…                5.68                   38.1                  60000
## 10 Informatio…                5.98                   25.6                  67000
## # ℹ 64 more rows
## # ℹ abbreviated name: ¹​`Median Wage Early Career`
## # ℹ 2 more variables: `Median Wage Mid-Career` <dbl>,
## #   `Share with Graduate Degree` <dbl>
labordata_cleaned <- labordata_raw |>
    select(Major, `Median Wage Early Career`, `Unemployment Rate`) |>
    filter(Major != "Overall")

##Plotting

# Setup
options(scipen=999) 
library(ggplot2)

# Init Ggplot
ggplot(data=labordata_cleaned, mapping = aes(x=`Median Wage Early Career`, y=`Unemployment Rate`))+geom_point()+geom_smooth(method = "lm", formula = y ~ x, se=FALSE)

##Finding the R Score

# Get R-score
model <- lm(`Unemployment Rate` ~ `Median Wage Early Career`, data = labordata_cleaned)
r_score <- summary(model)$r.squared
print(r_score)
## [1] 0.00731601

##Conclusion and Future Directions

The r score, which represents the strength of the linear relationship between unemployment rate of college graduates of a given major and the median salary for young graduates with a degree in that major, is equal to 0.00731601. This means there is an extremely weak or almost non-existent positive linear relationship between the Median early-career salaries of different college majors and the unemployment rate of recent grads with that major. One avenue of further analysis would be compare underemployment rates of college graduates to the median early career salaries of grads in their major. One could also sum the unemployment and underemployment percentages of the majors, subtract that sum from 100% to find the percentage of graduates who successfully entered the workforce relating to their area of study, and compare that percentage to the majors’ median early career salary.

Source: Federal Reserve Bank of New York, The Labor Market for Recent College Graduates, https://www.newyorkfed.org/research/college-labor-markets.

Source: U.S. Census Bureau, American Community Survey (IPUMS).