Publications by Swaty
R Basics
Reference and Disclaimer: To create this cheatsheet, I have referred online resources extensively. It is a compilation of available resources for beginners in Spatial Analytics with R. This article is for R Begineer’s and it includes very basic R operations. Many important links are included for further practicing. I learnt R by Doing and a...
2573 sym 18 img
Basic R tour
Reference and Disclaimer: To create this cheatsheet, I have referred online resources extensively. It is a compilation of available resources for beginners in Spatial Analytics with R. This article is for R Begineer’s and it includes very basic R operations. Many important links are included for further practicing. I learnt R by Doing and a...
3689 sym 18 img
RMarkdown-intro
HW2 Record times for Northern Ireland mountain running events First thing first - install necessary packages if not already installed rm(list = ls()) ## First specify the packages of interest packages = c("tidyverse", "dplyr","ggplot2","devtools") ## Now load or install&load all package.check <- lapply( packages, FUN = function(x) { ...
503 sym R (1844 sym/8 pcs) 1 img
ggplot replication
Reference and disclaimer: This homework 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 lifted directly from that article. Figures are compiled using data that was found at this address. This is purely an exercise in reproduction....
5146 sym R (2533 sym/3 pcs) 3 img
NRE-HW4
Open Access Fisheries Q1.Open access fishery with c (y) = 5y, p = 10-20y, Logistic growth with γ = 0.04 and K=100. (a) In the case of stock independent costs : \(p_t=MC_t\) Harvest rule is: \(min(x, [a - MC_t]/b)\) \[ 10-2y=\frac{dC(y)}{dy}=5\] \[y=min(x,1/4)\] Logistic Growth equation is given by : \(F(x)= \gamma * x_t(1-x_t/100)\) (b) Th...
2056 sym R (1850 sym/8 pcs) 2 img
RDD
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...
1766 sym R (5412 sym/14 pcs) 5 img 5 tbl
DID
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 impac...
2750 sym R (2228 sym/6 pcs) 5 tbl
RCT
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 causal...
4379 sym R (3968 sym/7 pcs) 3 tbl
NRE-HW1
Question 3: Solve the intertemporal allocation problem in Q2 assuming p(y) = 200 – y, x0 = 100, and ρ = 0.85. Calculate the present value of profits at the optimal allocation and verify that a deviation away from this allocation will reduce profits. Declare global variables: Total available resource (x) = 100 & Discount factor (rho) = 0.85 x <...
626 sym R (1019 sym/9 pcs) 1 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" ...
1303 sym R (7310 sym/20 pcs) 2 img