HTR v FTR
2 years ago in Plain Text
View(my_dataEPL)
my_dataEPL <- subset(my_dataEPL, HTR!="D")
my_dataEPL <- subset(my_dataEPL, FTR!="D")
View(my_dataEPL)
# Basically just subsetting a few times over. Removing Draws from the HTResult and FTResult,
# then only counting instances where the HTResult is the same as the FTResult
HTMomentum <- my_dataEPL[c("HomeTeam", "AwayTeam", "HTR", "FTR")] %>%
subset(FTR!= "D") %>%
subset(HTR!="D") %>%
subset(HTR==FTR)
view(HTMomentum)
#This is counting where the HTResult does not match the FTresult, I just called it an 'upset'
HTUpset <- my_dataEPL[c("HomeTeam", "AwayTeam", "HTR", "FTR")] %>%
subset(FTR!= "D") %>%
subset(HTR!="D") %>%
subset(HTR!=FTR)
View (HTUpset)
#This counts how often a draw at HT leads to a draw at FT
HTMomentumDraws <- my_dataEPL[c("HomeTeam", "AwayTeam", "HTR", "FTR")] %>%
subset(FTR=="D") %>%
subset(HTR=="D") %>%
subset(HTR==FTR)
View(HTMomentumDraws)
#Using a histogram to show that teams that win in the half time results, generally win in the full time results.
HalfTimeResults_freq <- table(my_dataEPL$HTR)
view(HalfTimeResults_freq)
#away winnings in HTR
my_dataEPL2 <- subset(my_dataEPL, HTR!="H")
#teams that won in the FTR where away won in the HTR
FullTimeResults_freq_away <- table(my_dataEPL2$FTR)
view(FullTimeResults_freq_away)
#data where home won in the HTR
my_dataEPL3 <- subset(my_dataEPL, HTR!="A")
#Team that won in the FTR where home won in the HTR
FullTimeResults_freq_home <- table(my_dataEPL3$FTR)
#Histogram showing ...
library(datasets)
hist(my_dataEPL)
library(ggplot2)