Publications by Ian

Examining changes in stadiums and their effects on home advantages

03.12.2024

Stadiums, home advantages, etc of EPL clubs A look at the stadiums colnames(decade_epl) ## [1] "X" "Competition_Name" "Gender" "Country" ## [5] "Season_End_Year" "Round" "Wk" "Day" ## [9] "Date" "Time" "Home" "HomeGoals" ## [13] "...

5119 sym R (19923 sym/61 pcs) 5 img

Football Team Strengths: A Bradley Terry and Bayesian Hierarchical Analysis

09.10.2024

Data: Football-data.co.uk Get the dataset by directly reading, via read.csv, the url that contains the csv files for the relevant dates. A function has been created to include more dates. library(ggplot2) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The followin...

2999 sym R (30292 sym/68 pcs) 11 img

Bradley Terry Model for EPL

07.10.2024

Data: Football-data.co.uk Get the dataset by directly reading, via read.csv, the url that contains the csv files for the relevant dates. A function has been created to include more dates. library(ggplot2) library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse...

1886 sym R (11730 sym/32 pcs) 7 img

A look into Poisson distributions

11.06.2024

Simple look into the shape of Poisson distributions by the value of the mean \(X\sim \text{Poisson}(\lambda)\) Where the \(\lambda\) represents the mean of the distribution, or the expected value. It is also the variance of the distribution. The Poisson distribution is a powerful distribution used to model count values. As a result, it is popu...

2074 sym R (2997 sym/6 pcs) 2 img 1 tbl

Analysing sleep part 2: modelling

07.06.2024

Type of linear model - should we use GLM? cat('Range of values of deep sleep:' ,range(cleaned_sleep_df$Deep.Sleep.duration)) FALSE Range of values of deep sleep: 12 83 ggplot(cleaned_sleep_df, aes(x = Deep.Sleep.duration)) + geom_histogram(aes(y = after_stat(density)), binwidth = 0.5, fill = "blue", color = "black") +# Adjust binwidth as needed ...

927 sym R (4145 sym/25 pcs) 2 img 7 tbl

Analyzing EPL Football Data on R

09.06.2023

library(httr) #install.packages('devtools') #install.packages("worldfootballR") library(worldfootballR) library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.1 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ str...

7615 sym R (53342 sym/86 pcs) 8 img

Open Street maps

08.10.2011

There have been some exciting developments in the Deducer ecosystem over the summer which should go into CRAN release in the next few months. Today I’m going to give a quick sneak peek at an Open Street Map – R connection with accompanying GUI. This post will just show the non-GUI components. The first part of the project was to create a wa...

2381 sym R (1276 sym/5 pcs) 6 img

Installing rgdal on a Mac

16.10.2011

So, installing rgdal, which is an important R package for spatial data analysis can be a bit of a pain on the mac. Here are two ways to make it happen. The Easy Way In R run: install.packages(‘rgdal’,repos=”http://www.stats.ox.ac.uk/pub/RWin“) The Hard Way Download and install GDAL 1.8 Complete and  PROJ framework v4.7.0-2   ...

1183 sym

Normality tests don’t do what you think they do

23.10.2011

Last week a question came up on Stack Overflow about determining whether a variable is distributed normally. Some of the answers reminded me of a common and pervasive misconception about how to apply tests against normality. I felt the topic was general enough to reproduce my comments here (with minor edits). Misconception: If your statistic...

2456 sym R (400 sym/2 pcs) 6 img 2 tbl

Reading Excel data is easy with JGR and XLConnect

30.10.2011

Despite the fact that Excel is the most widespread application for data manipulation and (perhaps) analysis, R’s support for the xls and xlsx file formats has left a lot to be desired. Fortunately, the XLConnect package has been created to fill this void, and now JGR 1.7-8 includes integration with XLConnect package to load .xls and .xlsx docum...

785 sym