library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.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)

cars<- mtcars
stadium <- read.csv("us_sportsvenues1909_2027.csv")
stadium_clean <- drop_na(stadium)
stadium_model <- lm(publiccost~totalcost+stadium+arena+year+pubpct100, data=stadium_clean)
summary(stadium_model)
## 
## Call:
## lm(formula = publiccost ~ totalcost + stadium + arena + year + 
##     pubpct100, data = stadium_clean)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -696.40  -60.70  -16.99   41.09  819.62 
## 
## Coefficients: (1 not defined because of singularities)
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -5.003e+03  7.813e+02  -6.403 1.14e-09 ***
## totalcost    9.387e-02  2.167e-02   4.332 2.38e-05 ***
## stadium      8.007e+01  1.962e+01   4.080 6.59e-05 ***
## arena               NA         NA      NA       NA    
## year         2.526e+00  3.962e-01   6.376 1.32e-09 ***
## pubpct100    7.579e-01  2.373e-01   3.193  0.00164 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 130.1 on 192 degrees of freedom
## Multiple R-squared:  0.4546, Adjusted R-squared:  0.4432 
## F-statistic: 40.01 on 4 and 192 DF,  p-value: < 2.2e-16

It seems that my data shows a relationship between all my varibles with my strongest varible being the the year varible. This helps to explain that stadiums have increased in price. Addtionally, This shows that as years have progressed more public funding has gone towards stadiums, but however one of my weakest is the public percentage of funding towards the stadiums is not as significant. I am confused as to why arena is showing up as N/A.

plot(stadium_model, which=1)

This model is not linear. It goes down and then curves to go back up again.