The R code performs the regression analysis. The methods that are used are Ordinary Least Squares, 2 Stage Least Squares and Generalized method of moments (GMM). The code does not use the built-in function, the models are written manually. Download the zip file and open the Regression_analysis.R file and run it.