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.
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
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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e57da474240e83de7f6e26d0f7e241c9266aef631414e0f10b38d058732831cc |
|
MD5 | b682adc5cd06accd99457f13331fcfa0 |
|
BLAKE2b-256 | 77c79436a398d92fa08fe4acb7d67ffe52c66b61386df94c92e438b619b9859b |
Hashes for Shelegia_Motta_2021-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a5e8493a434583a16d44c3194d11c02729aaab0fd63e5fcf740632fc90f495 |
|
MD5 | 75cdb0ba504a45977ff32c44bb926132 |
|
BLAKE2b-256 | f7e7b93e0d8a98d31b05e802af82a2a41ce85bae544beaf236b7cf5c297d8ce8 |