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(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")
HousingData <- read_csv("Table8.csv")
## Rows: 3221 Columns: 272
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr   (6): source, sumlevel, geoid, name, st, cnty
## dbl (266): T8_est1, T8_est2, T8_est3, T8_est4, T8_est5, T8_est6, T8_est7, T8...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
stat.desc(HousingData$T8_est5,norm=T)
##      nbr.val     nbr.null       nbr.na          min          max        range 
## 3.221000e+03 1.928000e+03 0.000000e+00 0.000000e+00 6.400000e+02 6.400000e+02 
##          sum       median         mean      SE.mean CI.mean.0.95          var 
## 3.043600e+04 0.000000e+00 9.449239e+00 5.178885e-01 1.015425e+00 8.638997e+02 
##      std.dev     coef.var     skewness     skew.2SE     kurtosis     kurt.2SE 
## 2.939217e+01 3.110533e+00 9.889180e+00 1.146178e+02 1.456695e+02 8.444325e+02 
##   normtest.W   normtest.p 
## 3.146242e-01 2.615586e-76
#This variable is measuring housing that is owner occupied, less than or equal to 30% of Hud Area Median Family Income, tenant is not cost burdened, housing lacks complete plumbing or kitchen facilities
summary(HousingData$T8_est5)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   0.000   9.449  10.000 640.000
hist(HousingData$T8_est5)

HousingData_Transformed<-HousingData |> mutate(T8_est5_log=log(T8_est5))
hist(HousingData_Transformed$T8_est5_log)