--- title: "Final Project - Report" subtitle: "Effect of Poverty on Housing Affordability" author: "Your Name" output: html_document # ioslides_presentation --- # 1. Introduction ## Overview...

1 answer below »

submit the ioslides_presentation file of your final presentation.




--- title: "Final Project - Report" subtitle: "Effect of Poverty on Housing Affordability" author: "Your Name" output: html_document # ioslides_presentation --- # 1. Introduction ## Overview {.smaller} ***EDIT ME*** ## Hypothesis Development {.smaller} ***EDIT ME*** # 2. Empirical Framework ```{r, message=F, warning=F, echo=F} #Load in libraries library(tidycensus) library(tidyverse) library(plyr) library(stargazer) library(corrplot) library(purrr) ``` ```{r echo=F, message=F, quietly=T} library(tidycensus) census_key <- "8eab9b16f44cb26460ecbde164482194b7052772"="" census_api_key(census_key)="" ```="" ```{r,="" message="F," warning="F," echo="F}" #create="" your="" list="" of="" variables="" variables="c(" houseprice='B25077_001' ,="" #="" median="" value="" of="" housing="" units="" hhincome='B19013_001' ,="" #="" median="" household="" income="" #explanatory="" variables="" below="" below_poverty='B05010_002' ,="" total_pop='B01001_001' ,="" pop_white='B01001H_001' ,="" #="" not="" hispanic="" pop_black='B01001B_001' ,="" pop_hispanic='B01001I_001' ,="" speak_english='B06007_002' ,="" speak_spanish='B06007_003' ,="" bachelors='B06008_002' ,="" married='B06008_003' ,="" no_hs='B06009_002' ,="" hs='B06009_003' ,="" bach_degree='B06009_005' ,="" grad_degree='B06009_006' )="" ```="" ```{r,="" message="F," warning="F," echo="F}" #load="" in="" census="" data="" censusdf=""><- get_acs(geography="county" ,="" year="2017," survey="acs5" ,="" variables="variables," geometry="F)" ```="" ```{r,="" message="F," warning="F," echo="F}" censusdf=""><- censusdf="" %="">% select(-moe) %>% #Removes MOE variable spread(variable, estimate) %>% #Converts data from long to wide mutate( # Creates new variable Home_Affordability = HousePrice/HHIncome, # Dependent Variable below_poverty = below_poverty/ total_pop, bach_degree = bach_degree / total_pop, bachelors = bachelors / total_pop, grad_degree = grad_degree / total_pop, hs = hs / total_pop, married = married / total_pop, no_hs = no_hs / total_pop, pop_black = pop_black / total_pop, pop_hispanic = pop_hispanic / total_pop, pop_white = pop_white / total_pop, speak_english = speak_english / total_pop, speak_spanish = speak_spanish / total_pop) ``` ## Data Description {.smaller} ***EDIT ME*** ## View Data {.smaller} ```{r, message=F, warning=F, echo=F} head(CensusDF[,c("Home_Affordability","below_poverty")]) ``` ***EDIT ME*** # 3. Descriptive Results {.smaller} ```{r,message=F, warning=F, echo=F} CensusDF<-as.data.frame(censusdf)><-c("home_affordability","below_poverty", "no_hs","hs","bach_degree","bachelors","grad_degree",="" "pop_hispanic","pop_white","pop_black",="" "speak_english","speak_spanish","married")="" ```="" ##="" 5-point="" summary="" {.smaller}="" ```{r,="" results='asis' ,message="F," warning="F," fig.width="9,fig.align='center'," echo="F" }="" #visualize="" 5-point="" summary="" stargazer(censusdf[,reportthese],="" omit.summary.stat="c("p25"," "p75"),="" nobs="F," type="html" )="" #="" for="" a="" pdf="" document,="" replace="" html="" with="" latex="" ```="" ***edit="" me***="" ##="" histogram="" {.smaller}="" ```{r,message="F," warning="F," echo="F}" #histogram="" censusdf="" %="">% keep(is.numeric) %>% gather() %>% ggplot(aes(value)) + facet_wrap(~ key, scales = "free") + geom_histogram() ``` ***EDIT ME*** ## Histogram after Log-Transformation {.smaller} ```{r,message=F, warning=F, echo=F} #Log transformation CensusDF %>% keep(is.numeric) %>% gather() %>% ggplot(aes(log(value+1))) + facet_wrap(~ key, scales = "free") + geom_histogram() ``` ***EDIT ME*** ## Correlation Plot {.smaller} ```{r, message=F, warning=F, echo=F} #Remove NAs CensusDF<-na.omit(censusdf) ##save="" correlations="" in="" train_cor="" train_cor=""><- cor(censusdf[,reportthese="" ])="" ##correlation="" plot="" corrplot(train_cor,="" type='lower' )="" ```="" ***edit="" me***="" #="" 4.="" map="" results="" {.smaller}="" ##="" ```{r,="" message="F," warning="F," quietly="T," results='hide' ,="" echo="F}" #create="" your="" list="" of="" variables="" variablesnew="c(" houseprice='B25077_001' ,="" #="" median="" value="" of="" housing="" units="" hhincome='B19013_001' #="" median="" household="" income="" )="" #load="" in="" census="" data="" censussp=""><- get_acs(geography="county" ,="" year="2017," survey="acs5" ,="" variables="variablesNew," geometry="T," shift_geo="T)" #data="" wrangling="" censussp=""><- censussp="" %="">% select(-moe) %>% #Removes MOE variable spread(variable, estimate) %>% #Converts data from long to wide mutate( # Creates new variable Home_Affordability = HousePrice/HHIncome) # Dependent Variable #Map MapFig<-ggplot(censussp, aes(fill="Home_Affordability))" +="" geom_sf(color="white" )="" +="" theme_void()="" +="" theme(panel.grid.major="element_line(colour" =="" 'transparent'))="" +="" scale_fill_distiller(palette="Reds" ,="" direction="1," name="House Price to Income Ratio" )="" +="" labs(title="Home_Affordability in US counties" ,="" caption="Source: US Census/ACS5 2017" )="" mapfig="" ```="" ***edit="" me***="" #="" 5.="" regression="" model="" results="" ##="" {.smaller}="" ```{r,="" results='asis' ,message="F," warning="F," echo="F," fig.align='center' }=""><-lm(log(home_affordability+1) ~="" log(below_poverty+1)="" ,="" data="CensusDF)"><-lm(log(home_affordability+1) ~="" log(below_poverty+1)="" +="" log(no_hs+1)="" +="" log(hs+1)="" +="" log(bachelors+1)="" ,="" data="CensusDF)"><-lm(log(home_affordability+1) ~ log(below_poverty+1) + log(no_hs+1) + log(hs+1) + log(bachelors+1) + log(married+1) + log(pop_black+1) + log(pop_hispanic+1) + log(pop_white+1) , data=censusdf) #present results with stargazer library(stargazer) stargazer(reg1, reg2, reg3, title="effect of local poverty on housing affordability",type='html',align=true) # for a pdf document, replace html with latex ``` ## summary of main findings {.smaller} ***edit me*** # conclusion ## summary of findings and policy implications ***edit me*** ~="" log(below_poverty+1)="" +="" log(no_hs+1)="" +="" log(hs+1)="" +="" log(bachelors+1)="" +="" log(married+1)="" +="" log(pop_black+1)="" +="" log(pop_hispanic+1)="" +="" log(pop_white+1)="" ,="" data="CensusDF)" #present="" results="" with="" stargazer="" library(stargazer)="" stargazer(reg1,="" reg2,="" reg3,="" title="Effect of Local Poverty on Housing Affordability" ,type='html' ,align="TRUE)" #="" for="" a="" pdf="" document,="" replace="" html="" with="" latex="" ```="" ##="" summary="" of="" main="" findings="" {.smaller}="" ***edit="" me***="" #="" conclusion="" ##="" summary="" of="" findings="" and="" policy="" implications="" ***edit="">
Answered Same DayOct 08, 2021

Answer To: --- title: "Final Project - Report" subtitle: "Effect of Poverty on Housing Affordability" author:...

Subhanbasha answered on Oct 08 2021
139 Votes
Final Project - Report





1. Introduction
Overview
1.Here my topic is hypothesis testing and regression analysis. i got interested in thi
s topic because of we can know the which variables if affecting the dependent variable or also we can see is there any difference between variables or not.
2.The tasks are hypothesis testing and the regression analysis by applying the various types of transformations.
Hypothesis Development
The research hypothesis is that whether the models producing the same R square by building the model using the different variables, and also we can know which variable is significantly different in model.
2. Empirical Framework
Data Description
1.The data is census data from the various states of the country United states consisting the various features of the people in the various states. I got the data from the US Census survey the data from 2013 to 2017.
2.Here the dependent variable is Home_Affordability abd the main interest of explanatory variables are below_poverty, bachelors, hs, no_hs, pop_hispanic, pop_white, married and pop_black
View Data
## # A tibble: 6 x 2
## Home_Affordability below_poverty
##
## 1 2.59 0.0472
## 2 3.46 0.0325
## 3 2.68 0.0835
## 4 2.43 0.0395
## 5 2.58 0.0563
## 6 2.25 0.0956
i have applied the log transformation to the variables and the first few rows of the dependent and the main explanatory variable showing that the data is converted into the specific range of the each variable because of applying the transformation.
3. Descriptive Results
5-point...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here