Publications by Jacob Martin

DS 1870 - Module 3.2 Homework - Spring 2024

20.03.2024

If a question asks for any calculations (means, medians, tables, proportions, etc…) or graphs, make sure they appear in the knitted document The final document should not show any warnings Question 1: Bones Data set See Brightspace for a description of the data. It’s the same data set as the homework for module 3 homework part 1. Part 1a: ...

2122 sym 6 img

STAT 5230: Chapter 6 - One Way MANOVA

19.03.2024

Set Up Your Project and Load Libraries knitr::opts_chunk$set(echo = TRUE) options(digits = 3) ## Load the libraries we will be using pacman::p_load(tidyverse, Rfast, heplots, GGally, MVN, car, rstatix) ## Changing the default theme to black white theme_set(theme_bw()) theme_update( axis.title = element_text(size = 10),...

5684 sym Python (10371 sym/41 pcs) 6 img 3 tbl

DS 1870: Module 4 - Dumbbell Plot for Burlington Election

08.03.2024

Data Description The bton_elec data set has the results of the 2024 election for Burlington mayor and the 8 city councilors by ward (wards 1 - 8). Residents all get to vote for the mayor, but only gets to vote for their respective city councilor. Joan Shannon (D) ended up losing the election despite five of the city councilors being in the same...

2703 sym 2 img

DS 1870 - Module 3 Practice - Solutions

04.03.2024

Setup knitr::opts_chunk$set(echo = T, fig.align = "center") # Load the tidyverse library(tidyverse) The diamonds data We’ll start by using the diamonds data frame, stored in ggplot2. Take a look at it: diamonds <- diamonds tibble(diamonds) ## # A tibble: 53,940 × 10 ## carat cut color clarity depth table ...

3336 sym R (5881 sym/35 pcs) 15 img

STAT 5230 - Homework 3 - Spring 2023

01.03.2024

Question 1: K-means Part a) Determine the number of clusters Use 3 different methods to determine the number of clusters to use in k-means clustering. For each method, describe how many clusters it recommends. Biplot: First 2 PCs wine2 |> prcomp() |> fviz_pca_ind(geom = "point") From the biplot, there appears to be 2 or three groups E...

4479 sym Python (7029 sym/21 pcs) 14 img 2 tbl

DS 1870 - Module 3 Practice: Diamonds and Penguins

01.03.2024

Setup knitr::opts_chunk$set(echo = F, fig.align = "center") # Load the tidyverse library(tidyverse) The diamonds data We’ll start by using the diamonds data frame, stored in ggplot2. Take a look at it: ## # A tibble: 53,940 × 10 ## carat cut color clarity depth table price x y z ## <dbl> <or...

3198 sym R (2719 sym/12 pcs) 15 img

STAT 5230: Homework 2 - Question 3 - Spring 2024

27.02.2024

Question 3a) Covariance Matrix and Correlation Plot Calculate the covariance matrix and correlation plot. Comment on any important characteristics for PCA # Covariance matrix: print("Stars Covariance Matrix:") ## [1] "Stars Covariance Matrix:" round(cov(stars), digits = 1) ## Ascension Declination Mag10 Mag_Earth Log_Dist ## Ascensio...

2839 sym 8 img

DS 2870 - Homework 4 Key - Spring 2024

27.02.2024

Data Description The data set has information about 1538 skeletons kept in different locations across the world. There are 3 categorical variables: sex: The sex of the skeleton (“Male” = known male, “Female” = known female, “uMale” = probably male, “uFemale” = probably female) age: the age group of the skeleton (18-24, 25-29, 3...

4653 sym Python (7107 sym/15 pcs) 3 img

DS 2870 - Module 5 - Adding Text to a Bar Chart

26.02.2024

Setup knitr::opts_chunk$set(echo = TRUE) # Load your package when you want to use it: pacman::p_load(tidyverse, ggfittext) # Changing default theme to theme_test() theme_set(theme_test()) theme_update( plot.title = element_text(hjust = 0.5, size = 14) ) # Reading in the drives2 data set drives <- read.csv(...

1477 sym 5 img

DS 2870: Homework 3 Solutions - Spring 2024

26.02.2024

Data Description: The lbj data set contains information about the 1703 games Lebron James has played in the NBA through the 2023/2024 season, including regular season and playoff games. While there are 29 columns in the data set, we’ll be primarily interested in only a few of them: game_type: The type of game being played: “Reg Season”: ...

3128 sym 7 img