Implements the model presented in Shelegia and Motta (2021)
Project description
This package implements the models of Shelegia and Motta (2021).
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.
# initialize model with custom parameters
model: Shelegia_Motta_2021.IModel.IModel = Shelegia_Motta_2021.Models.BaseModel()
# print string representation of the model
print(model)
# plot the payoffs for different market configurations for all stakeholders
model.plot_payoffs()
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Shelegia_Motta_2021-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0836cc3c675ee8ee278d6e9d96278ae2484566063cdb2bad505cae33d0996da7 |
|
MD5 | 281ac3cc2b18b5ecda4f7f7a882ea69a |
|
BLAKE2b-256 | 8752083c5f652c7a68c8a4b94bbd8204502e1b33c774014c6eb4515006e5c0cf |
Hashes for Shelegia_Motta_2021-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d126650753f200fbf1dd5638137459f9bfd27a651c6a98c807b9fedf11c1a4fc |
|
MD5 | 586a1de8dee36c9c567fe7c3fa04a82c |
|
BLAKE2b-256 | 45b49f11618cb2f4a88667ea18daed38be3573b41ec0978d093ee9423f2e5b75 |