Giter Club home page Giter Club logo

experiment_model_persuasion's Introduction

An Experiment on Model Persuasion | Final project for Effective Programming Practices for Economists

by Carolina Alvarez and Philipp Schirmer

Abstract

We develop and implement a novel experimental design to test a theory of model-based persuasion using the experimental platform oTree. To achieve this, we make use Python and JavaScript code and employ HTML and CSS for the experiment’s visuals. In a game between a sender and possibly multiple receivers, the sender can access an interactive toolbox of different model choices that can be used to persuade a receiver. The model messages contain no new ‘hard’ information, and should hence not move the beliefs of a fully Bayesian receiver. In a setting that mimics real-life financial chart analysis, we can test several hypotheses concerned with ‘sense-making’ persuasion by a potentially biased sender.

Getting started

We have chosen to use the oTree local test server for testing our application. Please follow these steps to set up all app's inputs and run the server:

  1. Clone the GitHub repository of the current project in your local machine via:

.. code-block:: console

git clone https://github.com/philippschirmer/experiment_model_persuasion.git
  1. Create and activate the environment via:

.. code-block:: console

conda env create -f environment.yml

conda activate experiment_model_persuasion

conda develop .
  1. In the terminal, run: pytask. This will generate all the necessary plots for the experiment, as well as the related documentation. A detailed description of the different tasks can be found in the documentation file.

  2. To start the server, navigate to the exp folder of the repository and run otree devserver in the terminal. Then open the browser to http://localhost:8000, which will direct you to the persuasion game demo.

  3. Once in the server, you can test the application by playing the full game for both players.

Overall structure

  • src/data_generation: contains a task_get_simulated_data, which generates simulated datasets of stock prices.

  • src/data_management: contains task_get_plots, which produces a set of financial charts with model messages used in the game by the persuader. It also contains task_get_neutral_plots, which generates charts without a model message. Finally, the folder also has a file called functions_plotting.py, which contains functions that will be used in a later stage of the game.

  • exp: contains the main file of the project, namely the oTree app persuasion.

    • persuasion folder: contains an eponymous oTree app.

      • __init__.py: contains the core python code of the experiment.
      • test.py: contains tests (“bots”) for the experiment.
    • _static folder: contains static pictures to be used in the experiment.

    • settings contains the overarching properties of the experiment.

  • src/documentation/task_documentation.py: generates documentation in the form of pdf and html files.

  • src/paper/task_paper: creates a pdf file with the full research paper.

Note: The Experiment on Model Persuasion was created on oTree version 5.7.2 and pytask version 0.1.9.

experiment_model_persuasion's People

Contributors

carolinalvarez avatar philippschirmer avatar

Stargazers

 avatar  avatar

Watchers

Janos Gabler avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.