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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Shelegia_Motta_2021-0.0.5.tar.gz.
File metadata
- Download URL: Shelegia_Motta_2021-0.0.5.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae3faff0ff2be0497e9eb8cd32edc109604a9de9c5bce316409dc9fad4859b9
|
|
| MD5 |
ce835d9a8d0890e750bdb4730791e38f
|
|
| BLAKE2b-256 |
f49d6d4e1b6816b390cdb703c91c3d3ad184ff11379bba6dcc7e3b6f1b5dbe6f
|
File details
Details for the file Shelegia_Motta_2021-0.0.5-py3-none-any.whl.
File metadata
- Download URL: Shelegia_Motta_2021-0.0.5-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ccfd8a92f8e2bba1b236dd9cbce8fd2aeda0f8f355537f1655a90745ed03e27
|
|
| MD5 |
9fff2873b1e56c96fdcd7baafe2c7f29
|
|
| BLAKE2b-256 |
f5b2c8b24639900da5ee3d70e487e94238224a8419359e6a7053e22402cb310f
|