Skip to main content

Tools for computing general demand systems from primitives.

Project description


================
ConsumerDemands
================

A Python package for computing general consumer demand systems from
preference primitives.

Given preference parameters (alpha, beta, phi) for a Constant Frisch
Elasticity (CFE) demand system, this package computes:

- Frischian demands (given marginal utility of income and prices)
- Marshallian demands (given budget and prices)
- Hicksian demands (given utility level and prices)
- Budget shares, income elasticities, and Engel curves

Installation
============

With pip::

pip install ConsumerDemands

For plotting support (Engel curves)::

pip install ConsumerDemands[plot]

From source::

git clone git@bitbucket.org:ligonresearch/demands.git
cd demands
pip install -e .

Quick start
===========

::

from consumerdemands import marshallian

y = 10.0 # budget
p = [1.0, 2.0] # prices
parms = {'alpha': [1., 1.], # preference weights
'beta': [1., 1.], # Frisch elasticities
'phi': [0., 0.]} # subsistence parameters

x = marshallian.demands(y, p, parms)
w = marshallian.budgetshares(y, p, parms)

License
=======

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
See LICENSE.txt for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

consumerdemands-0.5.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file consumerdemands-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for consumerdemands-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 483ad06e8aefb2e649ff75c6b0bd6e0b0089b5d763dc55d3a3f33f85c061eba6
MD5 2a24d4b217fbf00db9a2ad461c14db8f
BLAKE2b-256 75249cbc1c49c25566fa1e3c04a1d539deff29caff0e37fdc7a5500f2d7585fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page