This file contains 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
Category | Issue | Policy | |
---|---|---|---|
Economic | Drug Costs | allowing imported drugs from Canada | |
Economic | Drug Costs | eliminate drug advertisements | |
Economic | Drug Costs | requiring to pay higher share in drugs | |
Economic | Education | free state college tuition | |
Economic | Energy | adding monthly charge to utility bill to combat climate change | |
Economic | Energy | carbon dioxide emission limits | |
Economic | Energy | coal | |
Economic | Energy | drilling | |
Economic | Energy | energy efficiency |
This file contains 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(tidyverse) | |
library(DeclareDesign) | |
# Original parameters | |
tau <- 1 # treatment effect | |
se <- tau / (qnorm(0.95) + qnorm(0.80)) # standard error for 80% power | |
n_planned <- 500 # sample size per condition in planned full study | |
# calculate required standard deviation to yield 80% power given the above | |
sigma <- se * sqrt(2 * n_planned / 2) |
This file contains 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
# load packages | |
library(modelsummary) | |
# get latest version of {crdata} package, if updated | |
remotes::install_github("carlislerainey/crdata") | |
# load (and slightly wrangle) data from Barrilleaux and Rainey (2014) | |
br <- crdata::br2014 %>% | |
# recode from centered GOP gov. indicator to 0/1 Dem. gov. indicator | |
# (explanatory variables are centered about mean) |
This file contains 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
# load packages | |
library(tidyverse) | |
# update {crdata} if necessary | |
remotes::install_github("carlislerainey/crdata") | |
# load data | |
weis <- crdata::weisiger2014 | |
# rescale weisiger2014 explanatory variables using arm::rescale() |
This file contains 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
# load packages | |
library(tidyverse) | |
# create data frame of the potential outcomes | |
po <- tribble( | |
~Name, ~Y1, ~Y0, | |
"Alex Smith", 7, 5, | |
"Jamie Doe", 2, 3, | |
"Pat Johnson", 7, 7, |
This file contains 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
# load packages | |
library(tidyverse) | |
# create data frame of the potential outcomes | |
po <- tribble( | |
~Name, ~Y1, ~Y0, | |
"Alex Smith", 7, 5, | |
"Jamie Doe", 2, 3, | |
"Pat Johnson", 7, 7, |
This file contains 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
# load packages | |
library(tidyverse) | |
# create data frame of the potential outcomes | |
po <- tribble( | |
~Name, ~Y1, ~Y0, | |
"Alex Smith", 7, 5, | |
"Jamie Doe", 2, 3, | |
"Pat Johnson", 7, 7, |
This file contains 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
# load packages | |
library(rstan) | |
library(bayesplot) | |
# make a stan model | |
fancy_stan_model <- " | |
generated quantities { | |
int<lower=0, upper=1> y_sim = bernoulli_rng(0.5); | |
} | |
" |
This file contains 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
# load packages | |
library(tidyverse) | |
library(marginaleffects) | |
library(rstanarm); options(mc.cores = parallel::detectCores()) | |
# load data | |
data <- read_rds("https://www.dropbox.com/s/9grn8kkb5yzwagx/data.rds?raw=1") %>% | |
filter(passed_mvc1) %>% | |
glimpse() |
This file contains 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
# load packages | |
library(tidyverse) | |
library(ggrepel) | |
library(gganimate) | |
# set ggplot options | |
theme_set(theme_bw(base_family = "Gill Sans")) | |
update_geom_defaults("label", list(family = theme_get()$text$family)) | |
update_geom_defaults("text", list(family = theme_get()$text$family)) |
NewerOlder