Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 2.67 KB

README.md

File metadata and controls

37 lines (29 loc) · 2.67 KB

Repository for the research project: The Distribution of Ambiguity Attitudes

This repository contains the replication package for the paper "The Distribution of Ambiguity Attitudes" by Hans-Martin von Gaudecker, Axel Wogrolly, and Christian Zimpelmann.

Data

The data is based on the LISS (Longitudinal Internet Studies for the Social sciences) -- an internet-based household panel administered by CentERdata (Tilburg University, The Netherlands).

In ambig_beliefs/original_data/liss-data, general data cleaning steps (renaming of variables and values, merging of yearly files, etc.) are conducted on the raw data files of the LISS. This step is based on a general LISS data cleaning repository and also run automatically by pytask (see below). See this documentation for more information.

Before running the project, download all LISS raw data files and put them in the directory ambig_beliefs/original_data/liss-data/data. This is quite tedious, but you can contact us and we can give you access to the raw files once you have registered for LISS data access. As of 2024, the data sets that we collected ourselves are not yet publicly available on the website, but we are happy to share them.

Run the replication

The replication of figures and tables proceeds as follows:

  • Install Miniconda on your computer
  • Create a conda environment:
    • The best way is to use conda-lock: conda-lock install -n replication_ambig_beliefs .\conda-lock.yml
    • If you encounter problems, we also attached our environment.yml file, but this does not specify all packages and might be outdated.
  • Activate the environment
  • Add to the system path via:
    • conda develop .
    • conda develop ambig_beliefs/original_data/liss-data
  • Start this environment's R version and run:
    • install.packages("censReg")
    • install.packages("marginaleffects")
    • install.packages("Rcpp") (maybe not necessary)
  • Run pytask, which will perform
    • the general data cleaning
    • project-specific data cleaning
    • analyses
    • creation of figures and tables (which will be saved in the directory out)
  • Runtime:
    • a step of the analysis, the estimation of parameters, takes a couple of days
    • instead of running it on your computer (or a server), we can provide you with the parameter estimates
    • you can copy the files in the out_under_git folder and set ESTIMATE = False in config.py. Then pytask should create everything in a few minutes