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)
library(ggplot2)
Hot<-read_excel("HOTax.xlsx")
Hot_Cleaned<-Hot%>%filter(!is.na(`Tax Code Ch. 351 Revenue`)&!is.na(`Advertising Revenue`))
Advertising<-Hot_Cleaned$`Advertising Revenue`
Tax<-Hot_Cleaned$`Tax Code Ch. 351 Revenue`
Signage<-Hot_Cleaned$`Signage Revenue`
Arts<-Hot_Cleaned$`Arts Revenue`
lm('Tax ~ Advertising + Signage + Arts ', data = Hot_Cleaned)
##
## Call:
## lm(formula = "Tax ~ Advertising + Signage + Arts ", data = Hot_Cleaned)
##
## Coefficients:
## (Intercept) Advertising Signage Arts
## 3.862e+06 2.346e+00 -1.937e+01 2.123e+00
model_1<-lm('Tax ~ Advertising + Signage + Arts', data = Hot_Cleaned)
summary(model_1)
##
## Call:
## lm(formula = "Tax ~ Advertising + Signage + Arts", data = Hot_Cleaned)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28073769 -3862104 -3770423 -3423748 1653519914
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.862e+06 3.752e+06 1.029 0.304
## Advertising 2.346e+00 2.746e+00 0.854 0.393
## Signage -1.937e+01 1.221e+02 -0.159 0.874
## Arts 2.123e+00 4.906e+00 0.433 0.665
##
## Residual standard error: 76160000 on 473 degrees of freedom
## (1034 observations deleted due to missingness)
## Multiple R-squared: 0.0139, Adjusted R-squared: 0.007645
## F-statistic: 2.222 on 3 and 473 DF, p-value: 0.08477
#The variables that I have selected resulted in a lack of statistical significance.
plot(model_1,which=1)
