Publications by Joseph Jaiyeola
Causal Inference
library(haven) df <- read_dta("Angrist (2009)MDVE.dta") #create compliance rate df$compliance_rate <- ifelse(df$coddle_assigned == 1 & df$coddle_received == 1, 1, ifelse(df$coddle_assigned == 0 & df$coddle_received == 0, 1, ifelse(df$coddle_assigned == 0 & df$coddle_received == 1, 0...
141 sym R (29310 sym/84 pcs) 10 img
Document
Load Libraries # theme for nice plotting theme_nice <- theme_classic()+ theme( axis.line.y.left = element_line(colour = "black"), axis.line.y.right = element_line(colour = "black"), axis.line.x.bottom = element_line(colour = "black"), axis.line.x.top = element_l...
1204 sym R (39910 sym/120 pcs) 11 img
Event History Analysis
Load Libraries # theme for nice plotting theme_nice <- theme_classic()+ theme( axis.line.y.left = element_line(colour = "black"), axis.line.y.right = element_line(colour = "black"), axis.line.x.bottom = element_line(colour = "black"), axis.line.x.top = element_l...
1004 sym R (35241 sym/103 pcs) 10 img
Document
Load library Load the processed weighted data into R library(readr) data <- read_csv("fifty_ten_2000_20_df.csv") # Making statefp character for easy merging data$STATEFP<-as.character(data$STATEFP) state_and_data <- states(2021) %>% filter(!STATEFP %in% c("02", "11", "15", "60", "66", "69", "72", "78")) %>% # Removed Alaska(02), Hawai(11), DC(15)...
160 sym R (23698 sym/21 pcs) 3 img
Document
Load Libraries Load data into R library(readr) ## ## Attaching package: 'readr' ## The following object is masked from 'package:scales': ## ## col_factor data<- read_csv("2017_2019_Male_Data.csv") ## Warning: One or more parsing issues, call `problems()` on your data frame for details, ## e.g.: ## dat <- vroom(...) ## problems(dat) ## Ro...
377 sym R (3672 sym/22 pcs) 2 img
Introduction to R and Statistics
1. Start RStudio. Go to the console and calculate the following 2. Create a new R Markdown file titled “Lab Week 2 [LASTNAME]”, and at the beginning of the file, type the following message 3. Create a chunk and calculate the following in one chunk: sqrt(16) ## [1] 4 16^0.5 ## [1] 4 43 ## [1] 43 4. In the console, type ?log. See what happens...
1376 sym R (2848 sym/78 pcs)
Poverty in San Antonio- ZIP Code Tabulation Areas(ZCTA)
Load libraries library(tidycensus) library(tidyverse) library(sf) library(tmap) Searching for the poverty variable in the ACS code book Kindly note you have to have connected your R to the census api at some point for this code to work. If you haven’t go to https://api.census.gov/data/key_signup.html . # census_api_key(key = "YOUR API GOES HER...
1475 sym R (7256 sym/34 pcs) 2 img
Document
load library gc() ## used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) ## Ncells 2904526 155.2 5601877 299.2 NA 3999272 213.6 ## Vcells 4873666 37.2 10146329 77.5 16384 6981735 53.3 library(ipumsr) ## ## Attaching package: 'ipumsr' ## The following objects are masked from 'package:sjlabelled': ## ## as_f...
8775 sym R (4642 sym/23 pcs) 3 img
Publish Document
load library gc() ## used (Mb) gc trigger (Mb) limit (Mb) max used (Mb) ## Ncells 2905173 155.2 5599308 299.1 NA 4006350 214.0 ## Vcells 4875103 37.2 10146329 77.5 16384 6992917 53.4 library(ipumsr) ## ## Attaching package: 'ipumsr' ## The following objects are masked from 'package:sjlabelled': ## ## as_f...
9951 sym R (15441 sym/66 pcs) 9 img
Document
#Load required libraries library(foreign) library(survival) library(car) library(survey) library(eha) library(tidyverse) options(survey.lonely.psu = "adjust") Read wave 3, wave 4 and weight w3 <- as_tibble(read.delim("21600-0008-Data.tsv", sep = '\t', header = TRUE )) w4 <- as_tibble(read.delim("21600-0022-Data.tsv", sep = '\t', header = TRUE ))...
1063 sym R (17916 sym/85 pcs) 4 img