Publications by Swaty
First time Rpubs
Record times for Northern Ireland mountain running events First thing first - install necessary packages if not already installed rm(list = ls()) library(tidyverse) library(dplyr) library(ggplot2) Now let us set the directory and get going ##Load the data nihills <- read.csv(file = "nihills.csv") str(nihills) ## 'data.frame': 23 obs. of ...
495 sym R (1404 sym/8 pcs) 1 img
Reproducible Research
Reference and disclaimer: This work is attempting to reproduce parts of the New Yorker article by John Cassidy, dated March 26, 2014, and titled Piketty’s Inequality Story in Six Charts. All text was taken directly from that article. Figures are compiled using data that was found at this address. This is purely an exercise in reproduction. N...
5210 sym 3 img
Basics of Identification
Part 1: Paper using randomized data: Impact of Class Size on Learning Assignment from the seminal paper by Alan Krueger. Krueger (1999) Experimental Estimates of Education Production Functions QJE 114 (2) : 497-532 1.1. Briefly answer these questions: a. What is the causal link the paper is trying to reveal? The paper is trying to reveal causa...
4426 sym 3 tbl
Diff-in-Diff
Assignment from the seminal paper by David Card and Alan Krueger. Card and Krueger (1994) Minimum Wages and Employment: A Case Study of the Fast-Food Industry in New Jersey and Pennsylvania AER 84(4): 772-793. Part 1: Briefly answer these questions: a. What is the causal link the paper is trying to reveal? The paper is trying to study the impa...
2761 sym 5 tbl
Regression Discontinuity
a. Download and read the paper: Assignment from the paper by Carpenter and Dobkin(2009) The Effect of Alcohol Consumption on Mortality: Regression Discontinuity Evidence from the Minimum Drinking Age AEJ: Applied Economics 1(1)164-82 b. Get the Carpenter & Dobkin data: df <- read_dta("http://masteringmetrics.com/wp-content/uploads/2015/01/AEJfig...
1776 sym 5 img 5 tbl
Working with maps
Part 1: Map presidential elections results with the maps package Load the necessary packages and set plotting default 1.Download the elections file from Harvard database df <- read.csv("./data/1976-2020-president.csv", 1) colnames(df) ## [1] "year" "state" "state_po" "state_fips" ## [5] "state_cen" ...
1311 sym 2 img
Working with APIs
Load the necessary packages and set plotting default rm(list = ls()) ## First specify the packages of interest packages = c("tidyverse", "dplyr","ggplot2","plotly","viridis","wbstats","gtrendsR","ggforce","spData","tmap","gganimate","urltools") ## Now load or install&load all package.check <- lapply( packages, FUN = function(x) { i...
1870 sym 4 img
PSM and LASSO
Music Credit: Royalty Free Music from Bensound Research Question: Do catholic schools have an effect on student’s performance? The key issue is, of course, that students in catholic schools (“Treated”) might be different from those in non-catholic schools (“Control”). The exercise will show how propensity score matching attempts to r...
5637 sym 10 img 9 tbl
Creating my first webpage!
Step1: Sign up and open Github account and update profile information. The page will be blank with no repository. It will look like this: First look to my Github profile Step 2: Next download and Install git. Step 3: Finally download and Install Github Desktop. While doing so use the Github account name and email address. Configure Githu...
2238 sym 11 img
Spatial Dispersion and Point Data Analysis
Reference and Disclaimer: For this exercise, I have used explanation and major chunk of codes from the book Spatial Ecology and Conservation Modeling by Robert Fletcher & Marie-Josée Fortin. Spatial point pattern analysis Point data provides important information about the spatial patterns of the species. It helps understanding variety of e...
5735 sym Python (3967 sym/16 pcs) 7 img