This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # for details see | |
| # http://bayesball.blogspot.ca/2013/06/annotating-select-points-on-x-y-plot.html | |
| # | |
| # load the ggplot2 and grid packages | |
| library(ggplot2) | |
| library(grid) | |
| # read data (note csv files are renamed) | |
| tbl1 = read.csv("FanGraphs_Leaderboard_h.csv") | |
| tbl2 = read.csv("FanGraphs_Leaderboard_d.csv") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(reticulate) | |
| library(palmerpenguins) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(extrafont) | |
| df_pgs <- palmerpenguins::penguins | |
| dplyr::glimpse(df_pgs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Let's make some data to play with | |
| set.seed(1234) | |
| v1 <- rexp(500) | |
| v2 <- rnorm(500) + log(2) | |
| v3 <- -rgamma(500, 2.5, 3) | |
| v4 <- runif(500, -2,4) | |
| # Look at the data | |
| layout(matrix(c(1:4), nrow = 2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Title: Model Diagnostics - Generalized Linear Model (GLM) | |
| # Description: Demonstrating how we can explore model diagnostics | |
| # using simulated data. For this specific use case, we are going | |
| # to explore diagnostics for a generalized linear model (glm). | |
| # Setup ---- | |
| #... Libraries ---- |