Publications by Swaty
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
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","gganimate","wbstats","gtrendsR","ggforce","spData","tmap") ## Now load or install&load all package.check <- lapply( packages, FUN = function(x) { if (!requi...
2951 sym R (6276 sym/11 pcs) 8 img
NRE-HW3
Load necessary packages rm(list = ls()) ## First specify the packages of interest packages = c("rootSolve","ggplot2","kableExtra") ## Now load or install&load all package.check <- lapply( packages, FUN = function(x) { if (!require(x, character.only = TRUE)) { install.packages(x, dependencies = TRUE) library(x, chara...
3866 sym R (4151 sym/21 pcs) 4 img
Web Scrapping
Load the necessary packages and set plotting default rm(list = ls()) options(scipen=10000) ## First specify the packages of interest packages = c("tidyverse", "rvest","RSelenium","huxtable","leaflet","mapview","tmap","sf") ## Now load or install&load all package.check <- lapply( packages, FUN = function(x) { if (!require(x, chara...
2845 sym R (6327 sym/15 pcs) 3 img 1 tbl
ML & Kaggle
Load the necessary packages and set plotting default The data is from Housing Prices Competition in Kaggle. Download the data from here train_raw <- read.csv2("./data/train.csv", sep = ",",stringsAsFactors = TRUE) test_raw <- read.csv2("./data/test.csv", sep = ",",stringsAsFactors = TRUE) Basic data exploring & cleaning sum(is.na(train_raw)) ##...
1252 sym R (2291 sym/15 pcs) 6 img