Skip to content

Final Project of Effective Programming Practices for Economists

License

Notifications You must be signed in to change notification settings

nivali3/EPP_final_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Structural Behavioral Economics (Della Vigna, Pope 2018) using Estimagic

EPP for Economists Final Project, University of Bonn WS 21/22

Authors

  • Edoardo Falchi
  • Nigar Valiyeva

Abstract

This project replicates part of the main results from DellaVigna and Pope, 2018, specifically focusing on structural estimates using non linear least squares (NLS). The starting point from which we build upon our codes is the replication of the mentioned paper by Nunnari and Pozzi, 2021 from Bocconi University. Our goal is to improve on that by putting emphasis on programming best-practices and applying concepts learned in the course "Effective Programming Practices for Economists", such as Pytask, Pytest, Estimagic (Gabler, 2021), Sphinx, functional programming and docstrings.

Getting started

For a local machine to run this project, it needs to have a Python and LaTex distribution. The project was tested on Windows 10 operating system.

The project environment includes all the dependencies needed to run the project.

To run this project in a local machine:

  • after cloning the repo, open a terminal in the root directory of the project and create and activate the environment typing $ conda env create -f environment.yml and $ conda activate epp-final-project-team_behavioral commands, respectively.
  • For imports to work, the following command should be typed to the terminal in the root directory of the terminal: $ conda develop .
  • To generate the output files that will be stored in bld folder, type $ pytask in the root directory of your terminal.

Project structure

This project has been build based on a template by von Gaudecker, 2019.

src directory includes all the necessary code used in the analysis. To navigate through the folders, the workflow is decomposed as follows:

  • original_data contains the original data files used by the original authors, Della Vigna and Pope.
  • data_management contains the code to clean and for mat the data for the analysis.
  • model_code contains code for criterion functions used by different optimizers.
  • analysis includes the code for structural behavioral economics estimation.
  • final includes code to generate final tables and figures.
  • paper contains the LaTex files and task to generate the final project paper.
  • documentation generates pdf and html files for the documentaion of the project code.
  • The file test_funcs.py tests the functions in model_code.
  • The file test_nls_data.py tests the generated data against the data generated by Pozzi and Nunnari.

About

Final Project of Effective Programming Practices for Economists

Resources

License

Stars

Watchers

Forks

Packages

No packages published