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.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.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
library(readxl)
Hot<-read_excel("HOTax.xlsx")
Hot_cleaned<-Hot%>%filter(!is.na(`Tax Code Ch. 351 Revenue`)&!is.na(`Signage Revenue`))
cor(Hot_cleaned$`Tax Code Ch. 351 Revenue`,Hot_cleaned$`Signage Revenue`)
## [1] -0.001616619
hot_pairs<-Hot_cleaned%>%select(`Tax Code Ch. 351 Revenue`,`Signage Revenue`,`Advertising Revenue`)
pairs(hot_pairs)

Hot_cleaned_2<-Hot%>%filter(!is.na(`Information Centers Revenue`))
cor.test(Hot_cleaned_2$`Fiscal Year`,Hot_cleaned_2$`Information Centers Revenue`,method = "kendall")
##
## Kendall's rank correlation tau
##
## data: Hot_cleaned_2$`Fiscal Year` and Hot_cleaned_2$`Information Centers Revenue`
## z = -0.85194, p-value = 0.3942
## alternative hypothesis: true tau is not equal to 0
## sample estimates:
## tau
## -0.01748753
# The findings indicate that there is a very weak or no correlation between the variables. COVID severely affected revenues over the last few years, so I doubted a linear relationship or a normal distribution of data (nonparametric) between the variables. Consequently, I ruled out utilizing the Pearson method. Additionally, I assumed that a monotonic relationship did not exist, thus, I selected the Kendall method.