A PyPI package to model risky choice
Project description
A python package for binary risky choice modeling for 4 models: 1. Expected Utility Theory: U = p * A^alpha 2. Risk-Return: U = EV - b * Var 3. Coefficient of Variation: U = EV - b CV where CV = = sqrt(Var)/EV1 4. Hyperbolic: U = A/(1+htheta) where theta = (1-p)/p where A is the payoff, p is the probability of winning that outcome, EV is Expected value (Ap), and Var is variance (P(A-EV)**2 + (1 - P)*(-EV) ** 2)
The package takes risky choice data (probability, payoffs, and decisions) of 2 options as inputs and returns a util-rc object that stores the estimated parameters, inverse temperature, fit metrics, model type, and number of observations in an instance variable named params.
To use the package,copy the following code into your terminal: pip install util-rc==0.1.4 python3 from src.util_rc.main import util_rc example = util_rc("E",[0,0,1],[10,10,10],[1,1,1],[20,30,40],[.6,.5,.4]) example.params
Dependencies: numpy version >= 1.26.4, scipy version >= 1.12.0
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
File details
Details for the file util_rc-0.1.4.tar.gz
.
File metadata
- Download URL: util_rc-0.1.4.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09cab00c71611944b89678d32c3cd62f6768185c3b890d330235d40d7b9edf8 |
|
MD5 | d26237bc92f355c642e2cc4f7cdb6dcc |
|
BLAKE2b-256 | 668569f3f9eac0247afd7201d865a93d6b597b9797495120000b1b2c486afc6c |
Provenance
File details
Details for the file util_rc-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: util_rc-0.1.4-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16393c8c888a345fe7cd40c9915c8ab0a3e81d7fbbc66621fb6d3e1bb0afc058 |
|
MD5 | 98e9c1b11df0cd0311a685a41a116876 |
|
BLAKE2b-256 | 97d900b30871aa01741e77a91d07d07dee49212b8a6eefe6b8148d25a5fe2c5b |