library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.2 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── 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
library(tidyr)
library(ggplot2)
library(pastecs)
##
## Attaching package: 'pastecs'
##
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## The following object is masked from 'package:tidyr':
##
## extract
library(readxl)
Quant_Data_Set <- read_excel("C:/Users/carmo/Downloads/Quant Data Set.xlsx")
View(Quant_Data_Set)
stat.desc(Quant_Data_Set$`Total PSH`)
## nbr.val nbr.null nbr.na min max range
## 3.630000e+02 0.000000e+00 1.900000e+01 7.776000e+03 1.264351e+08 1.264273e+08
## sum median mean SE.mean CI.mean.0.95 var
## 1.785339e+09 1.799715e+06 4.918289e+06 5.828006e+05 1.146100e+06 1.232953e+14
## std.dev coef.var
## 1.110384e+07 2.257664e+00
#Total PSH represents the funding of a specific housing type called Permanent Suportive Housing. This housing type is for individuals that are considered to be chronically homeless. According to HUD, the designation of “chronically homeless” comes when an individual or family has been literally homeless for a year or longer and has a verified disability. This housing subsidy is indefinite and is paired with intensive case management.
Clean_Quant_Data_Set <- Quant_Data_Set %>% drop_na(`Total PSH`)
hist(Clean_Quant_Data_Set$`Total PSH`)
#Per this histogram, the data is skewed left. In order to adjust for
this skew, the data will be manipulated.
hist(log(Clean_Quant_Data_Set$`Total PSH`))
#Using the log function, the data now has a more normal distribution.