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.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eed258712cbf4178033b82f9bf86d2c0393a5eccc4cd3f080f6ccc77cdd7ef3 |
|
MD5 | bc28bfb5f05354211c266f53804b7339 |
|
BLAKE2b-256 | e26de28c52c3456e1e362308158a2056f2724a2eded01a583863273d3cc3ed6b |
Hashes for Shelegia_Motta_2021-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31bfb58b83f774535d3b32cf131277a3361437ed75f8c9d99753472ed4b9fb3f |
|
MD5 | e0ecc76b17031b4bcf4c78db4a454c4e |
|
BLAKE2b-256 | 700d35ec7c4f64f7920c53a28a3185a9b3b6eeb9405462e8a9612f2fa3a9c024 |