This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
This data is on the Highest paid athletes around the world from 1990-2020 collecting up to 300 athlete names through the past 30 years. This data includes their nationality, name of the athlete, sport, year of rank, ranking the previous year and earnings of that year in million. This data was collected and published in Kaggle and extracted from topendsports.com Potential research questions I am interested in investigating are the effect of sports and nationality on ranking, or the relationship between earnings and year which could be in relation to inflation and the change in the value of money throughout the years, or relationship between Sports, Nationality and earnings. At the end, I found to be interested the most in whether sports and nationality have an effect on ranking.
library(readr)
ForbesRichest <- read_csv("ForbesRichest.csv")
head(ForbesRichest)
Null Hypothesis: There is no effect on ranking based on Sport and Nationality; \(\beta_1\) = \(\beta_2\) =…= \(\beta_n\)
Alt. Hypothesis: There is some effect on ranking based on Sport and Nationality; at least one beta does not equal zero
Our model has 3+ categories with ordered ranking of categorical variables. This would fit a multinomial regression model with the 3+ categorical variables But it wouldn’t work because ordered ranking does not fit the multinomial regression model Thus, we have to use Ordinal Regression where Ordinal regression is a statistical technique that is used to predict behavior of ordinal level dependent variables with a set of independent variables. The dependent variable is the order response category variable and the independent variable may be categorical or continuous.
From the statistics, the Nationality with the richest athletes over the last 30 years is American with 206 athletes, while the rest of the 21 nations have less than 13 athletes who lie among the richest. From the dataset we can also see basketball has the highest paid athletes at 82 and 46 boxers coming in second followed by golf at 44 and soccer 33
##three-way cross table
ftable(xtabs(~ Nationality + Sport...6 + CurrentRank , data = ForbesRichest))
## CurrentRank 1 2 3 4 5 6 7 8 9 10
## Nationality Sport...6
## Argentina auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 1 2 2 2 0 0 0 0 0 2
## tennis 0 0 0 0 0 0 0 0 0 0
## Australia auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 1 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Austria auto racing 0 0 0 0 1 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Brazil auto racing 0 0 2 1 1 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 1 1 1 0 0 1 1 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Canada auto racing 0 0 0 0 0 0 0 0 0 2
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 1 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 1 0
## ice hockey 0 0 0 0 1 0 0 0 0 1
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Dominican auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 1 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Filipino auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 1 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Finland auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 1 0 1 1 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## France auto racing 0 0 0 1 1 1 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Germany auto racing 2 0 0 0 0 0 0 0 1 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 3 1 1 0 0 0 0 0 0
## f1 racing 0 3 0 0 1 0 0 0 1 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Ireland auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 1 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Italy auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 1 3 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Mexico auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 1 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Northern Ireland auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 1 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Philippines auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 1 0 0 0 1 0 1 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Portugal auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 2 3 2 0 0 0 1 0 2 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Russia auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 1 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## Serbia auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 1 0 0 0 0
## Spain auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 0 0 0 1 0
## Switzerland auto racing 0 0 0 0 0 0 0 0 0 0
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 1 1 0 3 3 1 2 0 1 0
## UK auto racing 0 0 0 1 0 0 0 0 1 2
## baseball 0 0 0 0 0 0 0 0 0 0
## boxing 0 0 0 0 0 0 0 0 0 0
## cycling 0 0 0 0 0 0 0 0 0 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 0 0 0 0 0 0 0 0 0 0
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 0 0 0 0 0 0
## nba 0 0 0 0 0 0 0 0 0 0
## nfl 0 0 0 0 0 0 0 0 0 0
## nfl / baseball 0 0 0 0 0 0 0 0 0 0
## soccer 0 1 0 0 2 2 1 3 0 0
## tennis 0 0 0 0 0 0 0 0 0 0
## USA auto racing 0 0 0 0 0 1 0 0 1 1
## baseball 0 0 0 0 0 0 1 1 2 1
## boxing 7 8 6 3 4 3 4 4 1 0
## cycling 0 0 0 0 0 0 0 0 1 0
## f1 motorsports 0 0 0 0 0 0 0 0 0 0
## f1 racing 0 0 0 0 0 0 0 0 0 0
## golf 11 2 4 4 2 4 2 9 3 1
## hockey 0 0 0 0 0 0 0 0 0 0
## ice hockey 0 0 0 0 0 0 0 0 0 0
## mma 0 0 0 0 0 0 0 0 0 0
## motorcycle gp 0 0 0 0 0 0 0 0 0 0
## nascar 0 0 0 0 1 0 0 1 0 1
## nba 6 6 9 7 11 13 9 8 6 7
## nfl 0 0 1 1 2 3 3 0 4 6
## nfl / baseball 0 0 1 0 0 0 0 0 0 0
## soccer 0 0 0 0 0 0 0 0 0 0
## tennis 0 0 0 0 0 1 3 0 4 1
ggplot(ForbesRichest, aes(x = Nationality, y = CurrentRank)) +
geom_boxplot(size = 0.5) +
facet_wrap(as.factor(Sport...6) ~ ., ncol = 5) +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))
We can examine the distribution of forbes ranking for each nationality
in the dataset broken down by sport. Using ggplot2, this results in a
2x2 grid with all sports. There is 21 nationalities that exist in the
dataset which causes a lot of clutter on the grid x-axis. This would be
a good visual of the distribution of ranking if there weren’t so many
nationalities. Instead we can try a different type of boxplot.
ggplot(ForbesRichest, aes(x = Sport...6, y = CurrentRank, color = factor(Nationality))) +
geom_boxplot(size = 0.5) +
# geom_jitter(alpha = .75) +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))
The boxplot in this visual uses nationality as a factor with sport as
the explanatory vairable and rank as the explanatory. The problem with
using this visual as a good visual of the distribution is there is still
clutter. By removing the jitter we can see a more simplified version of
the distribution. The box plots with the largest length are some of the
boxplots with the largest range of rich athletes such as basketball in
the USA, golf in the USA, NFL in the USA. Other sports are hard to tell
with such a small frame. Looking at countries individually, we can get a
better visual representation of their distribution.
library(ggplot2)
# Filtering data for participants from the USA
data_usa <- ForbesRichest[ForbesRichest$Nationality == "USA", ]
# Creating a boxplot using ggplot
ggplot(data_usa, aes(x = Sport...6, y = CurrentRank, fill = Sport...6)) +
geom_boxplot() +
labs(title = "Distribution of Current Rank Across Sports for USA Participants") +
xlab("Sport") + # Adding label for the x-axis
ylab("Current Rank") + # Adding label for the y-axis
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # Rotating x-axis labels for better readability
Filtering the USA to see the effect of Sport that exist in the USA ranking. Before analyzing this any further, let’s make it clear that the Current Rank has 1 as the highest paid, such that a ranking at 10 would mean a lower ranking. There is little to no data for sports like cycling and there is only one athlete in the data set that was both an NFL and baseball player. There is a large range of athletes over the last 30 years that have made the list of Forbes richest athletes such as golf and the nba. Golf and the NFL appear to be the only sports with median and mean being near the same. In the golf box plot there is a larger upper extreme which suggest some outliers in the golf effect on ranking in the USA.
We can do the same for another country.
library(ggplot2)
# Filtering data for participants from the UK
data_UK <- ForbesRichest[ForbesRichest$Nationality == "UK", ]
# Creating a boxplot using ggplot for UK participants
ggplot(data_UK, aes(x = Sport...6, y = CurrentRank, fill = Sport...6)) +
geom_boxplot() +
labs(title = "Distribution of Current Rank Across Sports for UK Participants") +
xlab("Sport") + # Adding label for the x-axis
ylab("Current Rank") + # Adding label for the y-axis
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # Rotating x-axis labels for better readability
In this case, there is only 2 sports that represent the United Kingdom in the Forbes dataset - auto racing and soccer. UK has higher paying soccer athletes than any other sport with auto racing following right behind. In contrast to the US who had a variety of high paid athletes from different sports in it’s history. For soccer, the median seems to lie at a ranking of 6 with a lower extreme of higher ranking soccer players. Auto Racing has a lower overall ranking than soccer with its median lying at about 9th place and ranging usually between 8 and 10th place ranking with the exception of some athlete who was ranked at 4th place at some point in the span of 30 years.
library(MASS)
ForbesRichest$CurrentRank <- factor(ForbesRichest$CurrentRank)
##fit ordered logit model and store in 'orderedModel'
orderedModel <- polr(CurrentRank ~ Nationality + Sport...6, data = ForbesRichest, Hess=TRUE )
summary(orderedModel)
## Call:
## polr(formula = CurrentRank ~ Nationality + Sport...6, data = ForbesRichest,
## Hess = TRUE)
##
## Coefficients:
## Value Std. Error t value
## NationalityAustralia 4.3297 2.0416 2.12073
## NationalityAustria 0.2716 1.7498 0.15522
## NationalityBrazil 0.3717 0.9014 0.41237
## NationalityCanada 5.3801 1.7353 3.10032
## NationalityDominican 2.2916 2.1443 1.06867
## NationalityFilipino 1.9170 2.0442 0.93778
## NationalityFinland -2.0095 2.0870 -0.96286
## NationalityFrance 0.2759 1.3160 0.20962
## NationalityGermany -2.1127 1.7234 -1.22593
## NationalityIreland -0.2514 1.7463 -0.14398
## NationalityItaly 2.6116 1.2664 2.06214
## NationalityMexico 3.2731 2.0267 1.61496
## NationalityNorthern Ireland 3.8123 2.0398 1.86896
## NationalityPhilippines 4.0062 1.7615 2.27436
## NationalityPortugal -0.3417 0.8396 -0.40700
## NationalityRussia 2.2638 2.7515 0.82278
## NationalitySerbia 1.5770 2.0815 0.75761
## NationalitySpain 3.6206 2.1260 1.70297
## NationalitySwitzerland 0.9671 1.5836 0.61071
## NationalityUK 1.7596 0.7854 2.24023
## NationalityUSA 3.0063 1.4206 2.11626
## Sport...6baseball -0.3794 1.2291 -0.30871
## Sport...6boxing -3.5246 1.0315 -3.41704
## Sport...6cycling -0.1552 1.7796 -0.08722
## Sport...6f1 motorsports 0.9340 1.5480 0.60336
## Sport...6f1 racing 1.5104 1.6009 0.94349
## Sport...6golf -3.0035 1.0447 -2.87490
## Sport...6hockey -2.5283 2.0319 -1.24431
## Sport...6ice hockey -3.0831 2.1240 -1.45155
## Sport...6nascar -0.9210 1.4532 -0.63377
## Sport...6nba -2.4068 1.0179 -2.36459
## Sport...6nfl -0.8759 1.0767 -0.81343
## Sport...6nfl / baseball -3.8259 1.7515 -2.18431
## Sport...6soccer -0.4641 0.8115 -0.57191
## Sport...6tennis -0.7690 1.1296 -0.68075
##
## Intercepts:
## Value Std. Error t value
## 1|2 -2.0805 1.0169 -2.0458
## 2|3 -1.1346 1.0084 -1.1251
## 3|4 -0.5046 1.0081 -0.5005
## 4|5 0.0017 1.0114 0.0017
## 5|6 0.5414 1.0158 0.5330
## 6|7 1.0759 1.0192 1.0556
## 7|8 1.5767 1.0220 1.5427
## 8|9 2.2468 1.0248 2.1925
## 9|10 3.4562 1.0336 3.3438
##
## Residual Deviance: 1287.395
## AIC: 1375.395
From the summary ordered model in ordinal regression, all nationality values are derived from comparing them to one other nationality. In this case, we are using Argentina as our base comparison. Similarly, auto racing is the group for the sports variable.
The theoretical model is:
\(log(\frac{\pi_1}{\pi_2 +...+\pi_{10}})\) = \(\beta_{0,1} + \beta_{1}Nationality_{j1} + \beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+\pi_2}{\pi_3...+\pi_{10}})\) = \(\beta_{0,2} + \beta_{1}Nationality_{j1} +\beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+...+\pi_3}{\pi_4+...+\pi_{10}})\) = \(\beta_{0,3}+\beta_{1}Nationality_{j1}+\beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+...+\pi_4}{\pi_5+...+\pi_{10}})\) = \(\beta_{0,4}+\beta_{1}Nationality_{j1}+\beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+...+\pi_5}{\pi_6+...+\pi_{10}})\) = \(\beta_{0,5}+\beta_{1}Nationality_{j1}+\beta{2}Sport_{k2}\)
\(log(\frac{\pi_1+ ...+\pi_6}{\pi_7+...+\pi_{10}})\) = \(\beta_{0,6}+\beta_{1}Nationality_{j1}+\beta_2Sport_{k2}\)
\(log(\frac{\pi_1+ ...+\pi_7}{\pi_8+\pi_9+\pi_{10}})\)=\(\beta_{0,7}+\beta_{1}Nationality_{j1}+\beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+...+\pi_8}{\pi_9+\pi_{10}})\) =\(\beta_{0,8}+\beta_{1}Nationality_{j1}+\beta_{2}Sport_{k2}\)
\(log(\frac{\pi_1+...+\pi_9}{\pi_{10}})\) = \(\beta_{0,9} + \beta_{1}Nationality_{j1}+ \beta_{2}Sport_{k2}\)
such that \(\pi_i\) is the log odds of observing a i ranking where i= 1,2,3…10
\(\beta_{0,j}\) is the intercept for the 10 rankings
\(\beta_{2},\beta_{1}\) is the coefficient for the explanatory variables
\(Nationality_{j1}\) is j nationality with Argentina as the base nationality.
\(Sport_{k2}\) is the k sport with auto racing as the base sport of comparison
Basic model assumptions that must be met for logistic regression include independence of errors, linearity in the logit for continuous variables, absence of multicollinearity, and lack of strongly influential outliers.
This is \(\epsilon\) ~\(^{iid}NI(0, \sigma)\)
(ctable <- coef(summary(orderedModel))) #store table
## Value Std. Error t value
## NationalityAustralia 4.329694415 2.0416020 2.120733787
## NationalityAustria 0.271613606 1.7498464 0.155221395
## NationalityBrazil 0.371727944 0.9014383 0.412372022
## NationalityCanada 5.380101118 1.7353367 3.100321096
## NationalityDominican 2.291599565 2.1443412 1.068673018
## NationalityFilipino 1.917021891 2.0442192 0.937777051
## NationalityFinland -2.009493347 2.0869993 -0.962862500
## NationalityFrance 0.275868716 1.3160388 0.209620503
## NationalityGermany -2.112729777 1.7233650 -1.225932849
## NationalityIreland -0.251433216 1.7463463 -0.143976725
## NationalityItaly 2.611570702 1.2664391 2.062136903
## NationalityMexico 3.273092314 2.0267348 1.614958347
## NationalityNorthern Ireland 3.812302329 2.0397980 1.868960674
## NationalityPhilippines 4.006187248 1.7614566 2.274360414
## NationalityPortugal -0.341725767 0.8396158 -0.407002564
## NationalityRussia 2.263847074 2.7514526 0.822782497
## NationalitySerbia 1.577006581 2.0815495 0.757611844
## NationalitySpain 3.620577108 2.1260335 1.702972718
## NationalitySwitzerland 0.967111878 1.5835912 0.610708039
## NationalityUK 1.759553478 0.7854336 2.240232051
## NationalityUSA 3.006317425 1.4205823 2.116257164
## Sport...6baseball -0.379438065 1.2290974 -0.308712762
## Sport...6boxing -3.524603156 1.0314794 -3.417036954
## Sport...6cycling -0.155217884 1.7796104 -0.087220147
## Sport...6f1 motorsports 0.933989461 1.5479856 0.603357959
## Sport...6f1 racing 1.510424151 1.6008952 0.943487220
## Sport...6golf -3.003521433 1.0447407 -2.874896418
## Sport...6hockey -2.528285213 2.0318722 -1.244313127
## Sport...6ice hockey -3.083050475 2.1239726 -1.451549047
## Sport...6nascar -0.921017924 1.4532386 -0.633769238
## Sport...6nba -2.406826772 1.0178625 -2.364589350
## Sport...6nfl -0.875852226 1.0767355 -0.813433038
## Sport...6nfl / baseball -3.825894008 1.7515333 -2.184311374
## Sport...6soccer -0.464119473 0.8115202 -0.571913662
## Sport...6tennis -0.768984266 1.1296059 -0.680754452
## 1|2 -2.080466022 1.0169422 -2.045805623
## 2|3 -1.134602236 1.0084402 -1.125106168
## 3|4 -0.504570872 1.0081417 -0.500495989
## 4|5 0.001725873 1.0113679 0.001706474
## 5|6 0.541402121 1.0158450 0.532957400
## 6|7 1.075889903 1.0192396 1.055580953
## 7|8 1.576651385 1.0220016 1.542709237
## 8|9 2.246844874 1.0247867 2.192500128
## 9|10 3.456232795 1.0336313 3.343777278
#calculate and store p-value
p <- pnorm(abs(ctable[,'t value']), lower.tail = FALSE) * 2
#combined table
(ctable <- cbind(ctable, "p value" = p))
## Value Std. Error t value p value
## NationalityAustralia 4.329694415 2.0416020 2.120733787 0.0339442115
## NationalityAustria 0.271613606 1.7498464 0.155221395 0.8766467821
## NationalityBrazil 0.371727944 0.9014383 0.412372022 0.6800667668
## NationalityCanada 5.380101118 1.7353367 3.100321096 0.0019331095
## NationalityDominican 2.291599565 2.1443412 1.068673018 0.2852170338
## NationalityFilipino 1.917021891 2.0442192 0.937777051 0.3483589969
## NationalityFinland -2.009493347 2.0869993 -0.962862500 0.3356165305
## NationalityFrance 0.275868716 1.3160388 0.209620503 0.8339638759
## NationalityGermany -2.112729777 1.7233650 -1.225932849 0.2202239461
## NationalityIreland -0.251433216 1.7463463 -0.143976725 0.8855188491
## NationalityItaly 2.611570702 1.2664391 2.062136903 0.0391947039
## NationalityMexico 3.273092314 2.0267348 1.614958347 0.1063197155
## NationalityNorthern Ireland 3.812302329 2.0397980 1.868960674 0.0616282859
## NationalityPhilippines 4.006187248 1.7614566 2.274360414 0.0229443255
## NationalityPortugal -0.341725767 0.8396158 -0.407002564 0.6840061052
## NationalityRussia 2.263847074 2.7514526 0.822782497 0.4106316920
## NationalitySerbia 1.577006581 2.0815495 0.757611844 0.4486833875
## NationalitySpain 3.620577108 2.1260335 1.702972718 0.0885731740
## NationalitySwitzerland 0.967111878 1.5835912 0.610708039 0.5413928833
## NationalityUK 1.759553478 0.7854336 2.240232051 0.0250758619
## NationalityUSA 3.006317425 1.4205823 2.116257164 0.0343229418
## Sport...6baseball -0.379438065 1.2290974 -0.308712762 0.7575400349
## Sport...6boxing -3.524603156 1.0314794 -3.417036954 0.0006330669
## Sport...6cycling -0.155217884 1.7796104 -0.087220147 0.9304965252
## Sport...6f1 motorsports 0.933989461 1.5479856 0.603357959 0.5462705836
## Sport...6f1 racing 1.510424151 1.6008952 0.943487220 0.3454317490
## Sport...6golf -3.003521433 1.0447407 -2.874896418 0.0040416006
## Sport...6hockey -2.528285213 2.0318722 -1.244313127 0.2133843416
## Sport...6ice hockey -3.083050475 2.1239726 -1.451549047 0.1466270350
## Sport...6nascar -0.921017924 1.4532386 -0.633769238 0.5262314313
## Sport...6nba -2.406826772 1.0178625 -2.364589350 0.0180500728
## Sport...6nfl -0.875852226 1.0767355 -0.813433038 0.4159698239
## Sport...6nfl / baseball -3.825894008 1.7515333 -2.184311374 0.0289393756
## Sport...6soccer -0.464119473 0.8115202 -0.571913662 0.5673804679
## Sport...6tennis -0.768984266 1.1296059 -0.680754452 0.4960268751
## 1|2 -2.080466022 1.0169422 -2.045805623 0.0407754986
## 2|3 -1.134602236 1.0084402 -1.125106168 0.2605440479
## 3|4 -0.504570872 1.0081417 -0.500495989 0.6167258799
## 4|5 0.001725873 1.0113679 0.001706474 0.9986384311
## 5|6 0.541402121 1.0158450 0.532957400 0.5940630696
## 6|7 1.075889903 1.0192396 1.055580953 0.2911597067
## 7|8 1.576651385 1.0220016 1.542709237 0.1229013397
## 8|9 2.246844874 1.0247867 2.192500128 0.0283434139
## 9|10 3.456232795 1.0336313 3.343777278 0.0008264606
We can take this a step further and check the p-value of each Nationality factor and Sports factor. A significant p-value suggests a significant difference between the base level and the level. Take for example, An athlete of Australian nationality has higher odds of making it to a higher ranking on Forbes list as compared to Argentina with a p-value of 0.0339 which is a significant difference.
About 13 nationality on the Forbes ranking do not have a significant difference to Argentina suggesting their odds of making it to a higher ranking on the Forbes list are not much higher.
Similarly, an increase in value in Sports represents high odds of an athlete of that sport being placed in a higher ranking than auto racing, our variable of comparison with Nationality being held constant.
# Assuming orderedModel is an ordered regression model
# ci will contain confidence intervals for coefficients of the model
# Check for missing values in pr
if (any(is.na(p))) {
# Handle missing values (e.g., remove or impute)
p <- na.omit(p) # Remove rows with NA values or use appropriate imputation
}
# Ensure non-negative probabilities
if (any(p < 0) || any(p > 1)) {
# Handle invalid probabilities (if any)
# For example, set negative probabilities to zero or adjust values accordingly
p[p < 0] <- 0
p[p > 1] <- 1
}
confint.default(orderedModel)
## 2.5 % 97.5 %
## NationalityAustralia 0.3282280 8.3311609
## NationalityAustria -3.1580224 3.7012496
## NationalityBrazil -1.3950587 2.1385146
## NationalityCanada 1.9789036 8.7812986
## NationalityDominican -1.9112319 6.4944311
## NationalityFilipino -2.0895742 5.9236180
## NationalityFinland -6.0999368 2.0809501
## NationalityFrance -2.3035199 2.8552574
## NationalityGermany -5.4904631 1.2650036
## NationalityIreland -3.6742090 3.1713426
## NationalityItaly 0.1293958 5.0937456
## NationalityMexico -0.6992349 7.2454196
## NationalityNorthern Ireland -0.1856284 7.8102330
## NationalityPhilippines 0.5537957 7.4585788
## NationalityPortugal -1.9873424 1.3038909
## NationalityRussia -3.1289010 7.6565952
## NationalitySerbia -2.5027555 5.6567687
## NationalitySpain -0.5463721 7.7875263
## NationalitySwitzerland -2.1366698 4.0708936
## NationalityUK 0.2201320 3.2989750
## NationalityUSA 0.2220273 5.7906075
## Sport...6baseball -2.7884248 2.0295486
## Sport...6boxing -5.5462656 -1.5029407
## Sport...6cycling -3.6431902 3.3327545
## Sport...6f1 motorsports -2.1000067 3.9679856
## Sport...6f1 racing -1.6272728 4.6481211
## Sport...6golf -5.0511757 -0.9558672
## Sport...6hockey -6.5106815 1.4541111
## Sport...6ice hockey -7.2459604 1.0798594
## Sport...6nascar -3.7693133 1.9272774
## Sport...6nba -4.4018006 -0.4118530
## Sport...6nfl -2.9862150 1.2345106
## Sport...6nfl / baseball -7.2588361 -0.3929519
## Sport...6soccer -2.0546698 1.1264308
## Sport...6tennis -2.9829712 1.4450027
Generating 95% confidence intervals.
Australia, Canada, Italy, Philippines,UK, USA are statistically significant parameter estimates that do not include 0; all other nationality in the dataset include 0.
Similarly, for boxing, golf, nba, nfl/baseball are statistically significant parameter estimates. Comparing these results of to our p-values in the previous table, we see similar results of statistically significant values except nba is in this list now.
exp(coef(orderedModel)) #odd ratios
## NationalityAustralia NationalityAustria
## 75.92108264 1.31207992
## NationalityBrazil NationalityCanada
## 1.45023838 217.04422147
## NationalityDominican NationalityFilipino
## 9.89074593 6.80067513
## NationalityFinland NationalityFrance
## 0.13405658 1.31767486
## NationalityGermany NationalityIreland
## 0.12090747 0.77768539
## NationalityItaly NationalityMexico
## 13.62042770 26.39282820
## NationalityNorthern Ireland NationalityPhilippines
## 45.25450979 54.93700953
## NationalityPortugal NationalityRussia
## 0.71054303 9.62002702
## NationalitySerbia NationalitySpain
## 4.84044462 37.35912187
## NationalitySwitzerland NationalityUK
## 2.63033675 5.80984260
## NationalityUSA Sport...6baseball
## 20.21282744 0.68424580
## Sport...6boxing Sport...6cycling
## 0.02946350 0.85622860
## Sport...6f1 motorsports Sport...6f1 racing
## 2.54464070 4.52865122
## Sport...6golf Sport...6hockey
## 0.04961205 0.07979574
## Sport...6ice hockey Sport...6nascar
## 0.04581927 0.39811359
## Sport...6nba Sport...6nfl
## 0.09010075 0.41650691
## Sport...6nfl / baseball Sport...6soccer
## 0.02179894 0.62868844
## Sport...6tennis
## 0.46348361
Generating Odds ratios help identify how likely an exposure is to lead to a specific event. In the case of this experiment we are analyzing whether the odds of nationality and sports having an effect on ranking.
Odds ratios help identify how likely an exposure is to lead to a specific event. In the case of this experiment we are analyzing whether the odds of nationality having an effect on ranking. The odds of being Australian and landing a higher ranking on Forbes highest paid athletes is 75.9 times higher than in comparison to Argentina.
This follows with most nations except, Finland, Ireland, Germany and Portugal. This means these nations have fewer odds of being in a higher ranking placement than Argentina in Forbes list of highest paid athletes with odds less than 1.
Looking at the Sports category, f1 racing and Motorsports have higher odds of being in a higher ranking than auto racing.
lets recall our main goal is to make a conclusion of the overall effect of Nationality and Sports on ranking. For this, we could look at the Likelihood ratio test and compare a nested model with the complex.
library(zoo)
library(lmtest)
#Model without Sports
noSport.Model <- glm(as.factor(CurrentRank) ~ as.factor(Nationality), data = ForbesRichest, family = binomial("logit"))
#Model with all variables
complexModel <- glm(as.factor(CurrentRank) ~ as.factor(Nationality) + as.factor(Sport...6), data= ForbesRichest, family=binomial("logit"))
#likelihood ratio test between the 2 models
lrtModel_Sport <- lrtest( noSport.Model, complexModel)
lrtModel_Sport
Using a significance level to be 0.05, the p-value of the Complex Model is statistically significant at 0.01764. These results suggest we can reject the null hypothesis and Sports do have an effect of ranking on the Forbes highest paid athletes.
If we were to use a significance level of 0.01, the Complex model would fail to reject the null hypothesis and use the simpler model with Nationality solely
#Likelihood ratio Test
noNationality.Model <- glm(as.factor(CurrentRank) ~ as.factor(Sport...6), data = ForbesRichest, family = binomial("logit"))
lrtModel_Nationality <- lrtest(noNationality.Model, complexModel)
lrtModel_Nationality
Looking at the Complex Model compared to the model with no Nationality, the complex model has a p-value of 0.5449. Thus, we can not reject the null hypothesis and disregard the complex model. The results suggest there is no clear overall effect of Nationality on Forbes Ranking.
My initial question was whether there was an effect of Sports and Nationality on Forbes Rankings. The results show Sports have an effect and when we looked at the log odds, boxing, golf and NASCAR had higher odds of having a higher ranking compared to auto racing. On the other hand, according to the likelihood ratio test Nationality does not have an effect on ranking. The strengths of my analysis were making an interpretation of the likelihood ratio. It was a simple model showing the df, log likelihood and p-value using Chi sq. It was much harder understanding the theoretical model with so many intercepts and making conclusions from the table since there were so many coefficients to look at. I think it would have been interesting to re-level the base level. Considering my nationality and favorite sport, I would probably have the base level be USA and base level sport be soccer. I also wish I found a way to remove any empty data to have the boxplots be side by side.