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(tidyverse) | |
library(tidyqwi) | |
# see census.gov/population/estimates/metro-city/0312msa.txt | |
yearz <- 2009:2018 | |
state <- 37 | |
arguments <- data.frame(yearz, state) |
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: "Paper summary" | |
date: "`r Sys.Date()`" | |
bibliography: my_bib.bib | |
--- | |
# Paper: | |
## Author: | |
## Journal: | |
## Keywords: |
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(dplyr) | |
library(glmnet) | |
library(furrr) | |
plan("multisession") | |
run_simulation <- function(n = 100, num_pred = 50, | |
rho = 0, true_beta= -.1, | |
error = 0.01){ |
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(Synth) | |
data(synth.data) | |
synth.data$dummy <- rnorm(168, 0, .00001) | |
# create matrices from panel data that provide inputs for synth() | |
dataprep.out<- | |
dataprep( | |
foo = synth.data, | |
predictors = c("dummy"), |
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
date | approve | n | moe | pollster | ||
---|---|---|---|---|---|---|
2019-09-29 | 47 | 1009 | 3.5 | ssr | ||
2019-05-31 | 41 | 1009 | 3.5 | ssr | ||
2019-04-28 | 37 | 1009 | 3.5 | ssr | ||
2019-03-17 | 36 | 1009 | 3.5 | ssr | ||
2018-12-09 | 43 | 1009 | 3.5 | ssr | ||
2018-09-09 | 47 | 1009 | 3.5 | ssr | ||
2018-06-17 | 42 | 1009 | 3.5 | ssr | ||
2019-09-30 | 45 | 2234 | 2.4 | ipsos | ||
2019-09-30 | 47 | 1115 | 3.6 | Quinnipiac |
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
# Parameters | |
set.seed(42) | |
n <- 100L | |
#true model | |
x <- rnorm(n, 5, 1) | |
treat <- rep(c(0,1), n/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
# Coefficient Plot Implemented in ggplot2 From Faraway's Linear Models with R | |
#'@description Building a Gelman-esque coefplot in ggplot based on the code | |
#' in Julian Faraway's Linear Models with R | |
#'@param fit a lm or glm object | |
#'@param ci the confidence levels to consider | |
#'@export | |
ggcoef_plot <- function(fit, ci = 0.95){ | |
stopifnot(class(fit) %in% c("lm", "glm")) | |
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: "Rmarkdown Exercises" | |
author: "Your Name" | |
date: "`r Sys.Date()`" | |
output: | |
html_document: | |
toc: true | |
toc_float: true | |
number_sections: true | |
df_print: paged |
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(tidyverse) | |
humphries <- tribble( | |
~"Year", ~"G", ~"Rec", ~"Yards", ~"Avg", ~"TD", | |
2011, 14, 15, 130, 8.7, 0, | |
2012, 13, 41, 280, 6.8, 1, | |
2013, 12, 41, 483, 11.8, 2, | |
2014, 13, 30, 204, 6.8, 0) %>% | |
mutate(player = "Humphries") %>% | |
select(Year, Rec, Avg, TD, player) |
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
https://app.powerbi.com/Redirect?action=OpenApp&appId=0ebba6cb-7c99-4e6e-8dbf-a1aae3066680&ctid=3ce4c247-6019-4439-a614-97d7bdab77f3 | |
https://app.powerbi.com/Redirect?action=OpenApp&appId=0ebba6cb-7c99-4e6e-8dbf-a1aae3066680&ctid=3ce4c247-6019-4439-a614-97d7bdab77f3 |