I hereby claim:
- I am wjakethompson on github.
- I am wjakethompson (https://keybase.io/wjakethompson) on keybase.
- I have a public key ASBxeGlM70OLyoJrv3_ucnr5ldTrOClVZHbjqe9HMMBglQo
To claim this, I am signing this object:
library(tidyverse) # For ggplot, dplyr, and friends | |
library(historydata) # Historical population data | |
library(USAboundaries) # Historical geographic data | |
# remotes::install_github("ropensci/USAboundariesData") # Actual data | |
library(rvest) # Scrape websites | |
library(sf) # Plot geographic data | |
library(tigris) # Shift AK, HI, and PR around with shift_geometry() | |
library(patchwork) # For combining plots | |
### Define functions ----------------------------------------------------------- | |
logit <- function(x) { | |
exp(x) / (1 + exp(x)) | |
} | |
comp <- function(x, y, a1 = 1, a2 = 1, d = 0, c = 0) { | |
lin_comb <- (a1 * x) + (a2 * y) | |
c + (1 - c) * logit(lin_comb - d) | |
} | |
noncomp <- function(x, y, a1 = 1, a2 = 1, d1 = 0, d2 = 0, c = 0) { | |
c + (1 - c) * prod(logit((a1 * x) - d1), logit((a2 * y) - d2)) |
# Note: Code and graphic have been updated since original submission | |
### User input ----------------------------------------------------------------- | |
num_stu <- 20000 | |
num_testlet <- 6 | |
num_item <- 10 | |
set.seed(3567) | |
library(tidyverse) | |
library(ggimage) | |
logo <- "https://www.rstudio.com/wp-content/uploads/2014/06/RStudio-Ball.png" | |
minutes <- data_frame(x = 0:60, y = 1) | |
hours <- filter(minutes, x %% 5 == 0) | |
ggplot() + | |
geom_point(data = minutes, aes(x = x, y = y), size = 10) + |
library(tidyverse) | |
library(viridis) | |
set.seed(92414) | |
### Draw samples from prior distributions -------------------------------------- | |
# Non-Information: N(-2, 10) | |
# Weakly Informative: N(-2, 2) | |
# Informative: N(-2, 1) |
# inspired by https://twitter.com/mbostock/status/1036391604100055040 | |
library(tidyverse) | |
plot_data <- crossing(x = seq(-20, 20, 0.01), y = seq(-20, 20, 0.01)) %>% | |
mutate( | |
depth = sin(sin(x * (sin(y) - cos(x)))) - cos(cos(y * (cos(x) - sin(y)))) | |
) | |
ggplot(plot_data, aes(x = x, y = y)) + |
library(tidyverse) | |
library(R.utils) | |
library(glue) | |
library(magrittr) | |
library(weathermetrics) | |
library(padr) | |
library(ggExtra) | |
library(lubridate) | |
library(scales) | |
library(hrbrthemes) |
I hereby claim:
To claim this, I am signing this object: