Skip to main content

Implements the model presented in Shelegia and Motta (2021)

Project description

This package implements the models of Shelegia and Motta (2021).

GitHub PyPI - Python Version GitHub repo size GitHub last commit CI CodeQL OSSAR GitHub Release Date PyPi PyPI PyPI - Status GitHub deployments

Installation

Installation over PyPI:

pip install Shelegia-Motta-2021

Or clone the repository via GitHub:

git clone https://github.com/manuelbieri/shelegia_motta_2021.git

Introduction

Since all models implement the Shelegia_Motta_2021.IModel.IModel - Interface, therefore all models provide the same functionality (public methods), even though the results may change substantially.

For all models add the following import statement:

import Shelegia_Motta_2021.Models

Models

Base Model

base_model = Shelegia_Motta_2021.Models.BaseModel()

Bargaining Power Model

bargaining_power_model = Shelegia_Motta_2021.Models.BargainingPowerModel()

Unobservable Choices Model

unobservable_model = Shelegia_Motta_2021.Models.UnobservableModel()

Acquisition Model

acquisition_model = Shelegia_Motta_2021.Models.AcquisitionModel()

Basic usage

# every model type can be plugged in without changing the following code.
model: Shelegia_Motta_2021.IModel.IModel = Shelegia_Motta_2021.Models.BaseModel()

# print string representation of the model
print(model)

# plot the best answers of the incumbent to the choice of the entrant
model.plot_incumbent_best_answers()

# plot the equilibrium path
model.plot_equilibrium()

Dependencies

Package   Version   Annotation  
matplotlib 3.4.3 Always needed (includes numpy)
jupyter 1.0.0 Just for the demonstration in demo.ipynb
pdoc 8.0.1 Only to generate the documentation from scratch

These packages include all the needed imports for the functionality of this package.

Documentation

For the latest version of the documentation open manuelbieri.github.io/shelegia_motta_2021 in your browser or call:

import Shelegia_Motta_2021

Shelegia_Motta_2021.docs()

Build Documentation

Install the pdoc package:

pip install pdoc

Generate api-documentation with the following command:

pdoc -o ./docs Shelegia_Motta_2021 --docformat "numpy" --math

Additional Notes

For further information about the coordinates used in the code, see resources/dev_notes.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Shelegia_Motta_2021-0.1.0.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

Shelegia_Motta_2021-0.1.0-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page