Skip to content

The Alpha_in_Optimal branch includes alpha in the variable that will be optimized and will not consider "c", the constant inside the production function. It is arranged to have the two issues in the sobol and in the optimizer. C in optimal branch includes "c" in the optimizer and sobol. Master will be the default.

Notifications You must be signed in to change notification settings

rodazuero/OptimalTaxation

Repository files navigation

OptimalTaxation

Repository replicating results in Azuero, Hernandez & Wills. Optimal Taxation and Informality.

AWS: Mirror of the Amazon Web Services server. Includes the Makefile ant the .cpp file. Makefile includes Instructions to create the AWS Instance from scratch.

Makefile instructions:
1. make optimizerrun. Compiles and executes optimizerrun.cpp. This performs the optimization through the NLOPT library 
                      minimizing the distance between theoretical and empirical moments. It is necessary to check the 
                      upper and lower bounds of the parameters when modifying it, as well as NaN returns. 
                      
2. make parallelrun: Compiles and executes mainTesla.cpp. This code runs the Sobol stored in SobolDim15.csv. 
                      It stores the parameters, the moments, and the distance between theoretical and empirical moments.
                      It is necessary to modify the file depending on the dimensions of the Sobol (number of sobol 
                      generators). It is done in the pragma omp parallel for loop, and in the variable NVAR OBS 
                      specifying how to read the lines in the SobolDimv15.csv file. 
                      
3. make configureall: Configure a Linux machine to run the necessary code. Installs everything from the Boost libraries
                      nlopt, c++ compilers, among others. 
                      
4. Output of c++ execution is stored in nohupPARALLR.out. 
5. OMP_NUM_THREADS: specify number of threads. This is for parallelization, depending on number of cores. 

EmpiricalMoments: File generated by Maryan Porras & Rodrigo Azuero to compute the empirical moments from the Census and the ENAHO.

TheoreticalMoments/Readme.txt file contains updates on fitting the theoretical moment to the data.

TheoreticalMoments/Jacobian.R: Sensitivity analysis of moments with respect to parameter seleciton. Also includes the model fit for various parameter combinations. This file is used to create the folders Modelfit.

TheoreticalMoments/Equilibrium2/Equilibrium2: Family of files to calibrate the model. main.cpp; mainRcpp.cpp; mainTesla.cpp.

AWS: Family of files to calibrate the model in Amazon Web services. It is important to note that changes updated in the previous folder (TheoreticalMoments/Equilibrium2/Equilibrium2) should mimick those in AWS.

a mainSansC_prod: Contains the equilibrium computation and calibration without the variable C that is inside of the production function used to increase the number of entrepreneurs.

TheoreticalMoments/Equilibrium2/Equilibrium2/GenerateSobolNumbers: Generate sobol numbers to compute distance between empirical and theoretical moments.

About

The Alpha_in_Optimal branch includes alpha in the variable that will be optimized and will not consider "c", the constant inside the production function. It is arranged to have the two issues in the sobol and in the optimizer. C in optimal branch includes "c" in the optimizer and sobol. Master will be the default.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •