1. Introduction
2.1

Write a short introductory paragraph providing the context of your topic and a description of the problem your research intends to address. I would like to compare the median age of renters and owners and see if there is any correlation between the two.

2.2 Conceptual Framework

Population growth –(+)–> Housing Demand –(+)–> Housing Prices –(+)–> Age of Resident –(+)–> Renter or Owner

2.3 Null Hypothesis

This empirical exercise will test and operationalize the following hypothesis:

This research will use American Community Survey (ACS) data from the United States Census Bureau gathered using the tidycensus R Package. A census tract will be categorized as having disproportionate growth if it’s growth value is over the county median value. Each of the hypotheses previously stated will be operationalized as:

2.4 Describing Data

Age: The data on age were derived from answers to Question 4 in the 2019 American Community Survey (ACS). The age classification is based on the age of the person in complete years at the time of interview. Both age and date of birth are used in combination to calculate the most accurate age at the time of the interview.

Owner-Occupied: A housing unit is owner-occupied if the owner or co-owner lives in the unit, even if it is mortgaged or not fully paid for. The owner or co-owner must live in the unit and usually is Person 1 on the questionnaire. The unit is “Owned by you or someone in this household with a mortgage or loan” if it is being purchased with a mortgage or some other debt arrangement such as a deed of trust, trust deed, contract to purchase, land contract, or purchase agreement. The housing unit is also considered owned with a mortgage if there is a home equity line of credit on it. The unit also is considered owned with a mortgage if it is built on leased land and there is a mortgage on the unit. Mobile homes occupied by owners with installment loan balances also are included in this category.

Renter-Occupied – All occupied housing units which are not owner-occupied, whether they are rented or occupied without payment of rent, are classified as renter-occupied. “No rent paid” units are separately identified in the rent tabulations. Such units are generally provided free by friends or relatives or in exchange for services such as resident manager, caretaker, minister, or tenant farmer.

2.5 Provide at least two statistical tests based on your data. Provide a clear interpretation of the results
#downloading data using ACS API
library(tidycensus)

renter_age<- get_acs(geography = "tract", variables = "B25128_024",
                           state = "TX", county = "Bexar", geometry = TRUE,year = 2022)
owner <- get_acs(geography = "tract", variables = "B25091_001",
                           state = "TX", county = "Bexar", geometry = FALSE,year = 2022)
renter<- get_acs(geography = "tract", variables = "B25056_001",
                           state = "TX", county = "Bexar", geometry = TRUE,year = 2022)

library(sf)
renter_age<-st_drop_geometry(renter_age)
owner<-st_drop_geometry(owner)
renter<-st_drop_geometry(renter)

data_list<-list(renter_age, owner, renter)
data_table<-merge(renter_age,owner, by="GEOID")
data_table2<-merge(data_table,renter, by="GEOID")

names(data_table2)[names(data_table2)%in%c("estimate.x","moe.x")] <-c("estimate_rent_age","moe_rent_age")
names(data_table2)[names(data_table2)%in%c("estimate.y","moe.y")] <-c("estimate_own","moe_own")
names(data_table2)[names(data_table2)%in%c("estimate","moe")] <-c("estimate_rent","moe_rent")