Publications by Arvind Sharma
quantile_regression
Table of contents Libraries Load in Dataset Aggregate Data (cross-sectional) Panel Data Multicollinearity Visualization FE model Data Preparation Quantile Regression Identify and Remove Outliers Econometrics Final Author AS - Song Lu Libraries remove(list=ls()) # Load necessary libraries library(dplyr) Attaching package: 'dplyr' The fol...
1890 sym Python (14963 sym/71 pcs) 13 img
fixed_effects
Table of contents Introduction Setup Data Create dependent variable. Summary Statistics Data Dictionary OLS Without FE Omitted Variables Model: OLS with Dummy Variables i.e. With FE Model: Demeaned Regression Model: Fixed Effects FE limitations Two Way FE Implementation Better presentation Unbalanced Panel Creating an unbalanced data C...
10678 sym Python (34355 sym/40 pcs) 5 img
housing_term_paper
Table of contents Set Up Import Data Cleaning EDA Outcome Variable Independent Variable Diff in Diff 2 way table Diff in Diff Regression Parallel trends charts Event Study Step 1: Prepare the Data Explanation Step 2: Estimate the Event Study Model Step 3: Extract Coefficients, create CIs Step 4: Plot the Event Study Chart Preliminary Set Up ...
2087 sym 11 img
convergence_issues_glm
Table of contents Packages Data Model Control the convergence process Common things to check for - No Extreme Outliers No Multicollinearity Fit a Poisson model to generate starting values Use coefficients from Poisson model as starting values Use coefficients from Poisson model as starting values and control convergence Try reducing model co...
2067 sym 3 img
Lasso_Ridge_scaling
Table of contents Set Up Data Scaled Data OLS (Ordinary Least Squares) OLS is Scale Invariant Lasso (Least Absolute Shrinkage and Selection Operator) LASSO is not scale-invariant. Confirm \(\lambda\)=0 is OLS. Implement Lasso Summary Lasso is Scale Variant Set Up # Clear the workspace rm(list = ls()) # Clear environment gc() # ...
4914 sym Python (9395 sym/26 pcs) 1 img 3 tbl
WLS
1 Background: WLS is a specific form of GLS WLS: A method for handling heteroskedasticity by applying weights to the observations. In general, the WLS line should provide a better fit in the presence of significant heteroskedasticity, but how much it differs from the OLS line will depend on the specifics of your data. GLS: A broader method that ca...
3911 sym R (10630 sym/36 pcs) 6 img
Lasso_Ridge
Table of contents Why predictors (p) \> observations (n) is an issue? Theory Empirical Generate fake/simulated data Removing intercept term Overview Comparison of OLS, Lasso and Ridge Data Independent Variables Standardization: Scaling for Zeros and Ones Normalization: Mapping to a Common Range The decision to standardize or normalize de...
15787 sym Python (22048 sym/37 pcs) 2 img
fixed_effects
Table of contents Introduction Setup Data Create dependent variable. Summary Statistics Data Dictionary OLS Without FE Omitted Variables Model: OLS with Dummy Variables i.e. With FE Model: Demeaned Regression Model: Fixed Effects FE limitations Two Way FE Implementation Better presentation Unbalanced Panel Creating an unbalanced data C...
10677 sym Python (30583 sym/40 pcs) 5 img
logit_implementation
Table of contents Data OLS In Sample Fit / Training Data Logistic Regression Interpretation of Output predict.glm Notes on convert probabilities into (binary) outcomes In Sample Fit / Training Data Out of Sample Fit / Testing Data Probit Regression Useful Readings Logit Implementation Author Arvind Sharma remove(list = ls()) library(s...
12197 sym 5 img
HW1_solution
Table of contents Setup Empty environment (data, functions) and graphical (plots) window Load packages Load raw data Data Analysis Summary Statistics Imputation Data Visualization Histogram Box plots Scatter Plots Correlation Plots Data Preparation Models MODEL 1. MODEL 2. Coefficient Interpretation - MODEL 3. Coefficient Interpretati...
15650 sym Python (43830 sym/105 pcs) 23 img