All Projects → mfarragher → Appelpy

mfarragher / Appelpy

Licence: other
Applied Econometrics Library for Python

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Appelpy

Data Science Toolkit
Collection of stats, modeling, and data science tools in Python and R.
Stars: ✭ 169 (+24.26%)
Mutual labels:  statistics, modeling, regression
data-science-notes
Open-source project hosted at https://makeuseofdata.com to crowdsource a robust collection of notes related to data science (math, visualization, modeling, etc)
Stars: ✭ 52 (-61.76%)
Mutual labels:  statistics, modeling, regression
Glm.jl
Generalized linear models in Julia
Stars: ✭ 358 (+163.24%)
Mutual labels:  statistics, regression
Smile
Statistical Machine Intelligence & Learning Engine
Stars: ✭ 5,412 (+3879.41%)
Mutual labels:  statistics, regression
Stldecompose
A Python implementation of Seasonal and Trend decomposition using Loess (STL) for time series data.
Stars: ✭ 130 (-4.41%)
Mutual labels:  statistics, modeling
hdfe
No description or website provided.
Stars: ✭ 22 (-83.82%)
Mutual labels:  statistics, regression
interactive-simple-linear-regression
A PureScript, browser-based implementation of simple linear regression.
Stars: ✭ 15 (-88.97%)
Mutual labels:  statistics, regression
Tidyreg
🎓 Tidy regression tools for academics
Stars: ✭ 19 (-86.03%)
Mutual labels:  statistics, regression
Microeconometrics.jl
Microeconometric estimation in Julia
Stars: ✭ 30 (-77.94%)
Mutual labels:  regression, economics
Metriculous
Measure and visualize machine learning model performance without the usual boilerplate.
Stars: ✭ 71 (-47.79%)
Mutual labels:  statistics, regression
Mlj.jl
A Julia machine learning framework
Stars: ✭ 982 (+622.06%)
Mutual labels:  statistics, regression
Fecon236
Tools for financial economics. Curated wrapper over Python ecosystem. Source code for fecon235 Jupyter notebooks.
Stars: ✭ 72 (-47.06%)
Mutual labels:  statistics, economics
RegressionTables.jl
Journal-style regression tables
Stars: ✭ 82 (-39.71%)
Mutual labels:  regression, economics
R4Econ
R Code Examples Multi-dimensional/Panel Data
Stars: ✭ 16 (-88.24%)
Mutual labels:  regression, economics
priceR
Economics and Pricing in R
Stars: ✭ 32 (-76.47%)
Mutual labels:  modeling, economics
Fecon235
Notebooks for financial economics. Keywords: Jupyter notebook pandas Federal Reserve FRED Ferbus GDP CPI PCE inflation unemployment wage income debt Case-Shiller housing asset portfolio equities SPX bonds TIPS rates currency FX euro EUR USD JPY yen XAU gold Brent WTI oil Holt-Winters time-series forecasting statistics econometrics
Stars: ✭ 708 (+420.59%)
Mutual labels:  statistics, economics
Mlr
Machine Learning in R
Stars: ✭ 1,542 (+1033.82%)
Mutual labels:  statistics, regression
Mathnet Numerics
Math.NET Numerics
Stars: ✭ 2,688 (+1876.47%)
Mutual labels:  statistics, regression
Simple Statistics
simple statistics for node & browser javascript
Stars: ✭ 2,679 (+1869.85%)
Mutual labels:  statistics, regression
Owl
Owl - OCaml Scientific and Engineering Computing @ http://ocaml.xyz
Stars: ✭ 919 (+575.74%)
Mutual labels:  statistics, regression

.. image:: https://badge.fury.io/py/appelpy.svg :target: https://badge.fury.io/py/appelpy/

.. image:: https://img.shields.io/pypi/pyversions/appelpy.svg :target: https://pypi.org/project/appelpy/

.. image:: https://readthedocs.org/projects/appelpy/badge/?version=latest :target: https://appelpy.readthedocs.io/

.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg :target: https://github.com/mfarragher/appelpy/blob/master/LICENSE.txt

.. image:: https://pepy.tech/badge/appelpy :target: https://pepy.tech/project/appelpy/

.. image:: https://codecov.io/gh/mfarragher/appelpy/branch/master/graph/badge.svg :target: https://codecov.io/gh/mfarragher/appelpy

.. |binder10| image:: https://mybinder.org/badge_logo.svg .. _binder10: https://mybinder.org/v2/gh/mfarragher/appelpy-examples/master?filepath=00_ten-minutes-to-appelpy.ipynb

.. |nbviewer10| image:: https://img.shields.io/badge/render-nbviewer-orange.svg .. _nbviewer10: https://nbviewer.jupyter.org/github/mfarragher/appelpy-examples/blob/master/00_ten-minutes-to-appelpy.ipynb

=================================================== appelpy: Applied Econometrics Library for Python


About 👁️


appelpy is the Applied Econometrics Library for Python. It seeks to bridge the gap between the software options that have a simple syntax (such as Stata) and other powerful options that use Python's object-oriented programming as part of data modelling workflows. ⚗️

Econometric modelling and general regression analysis in Python have never been easier!

The library builds upon the functionality of the 'vanilla' Python data stack (e.g. Pandas, Numpy, etc.) and other libraries such as Statsmodels.

Documentation

See the functionality of the library at https://appelpy.readthedocs.io/

Get started with the 10 Minutes to Appelpy tutorial:

  • |binder10|_: interactive experience of the 10 Minutes to Appelpy tutorial via Binder.
  • |nbviewer10|_: static render of the 10 Minutes to Appelpy notebook.

🥧 Why it's as easy as pie

Here is a flavour of a basic OLS regression done through appelpy, supposing you have data <https://econpapers.repec.org/paper/bocbocins/caschool.htm>_ sitting in a Pandas dataframe df and want to model the dependent variable api00 on three other variables:

.. code-block:: python

    from appelpy.linear_model import OLS
    model1 = OLS(df, ['api00'], ['acs_k3', 'meals', 'full']).fit()
    model1.results_output  # returns summary results

The key information is sitting in the model1 object, but there is much more functionality that can be done with it. These are more things that can be done via one line of code:

  • Diagnostics can be called from the object: e.g. produce a P-P plot via model1.diagnostic_plot('pp_plot')
  • Model selection statistics: e.g. find the root mean square error of the model from model1.model_selection_stats
  • Standardized model estimates: model1.results_output_standardized

🍏 What inspired it?

  1. The simple syntax of software such as Stata. With the data loaded, a regression model summary can be returned by a one-line command:

     regress api00 acs_k3 meals full
    

However with the simplicity comes a few disadvantages: Stata is not open-source software; the workflows are tricky with modern business problems; lacks the benefits of object-oriented programming.

  1. Statsmodels is a powerful Python library that addresses some of those disadvantages, but with that power comes a considerable learning curve and clunkiness. Here is the code for the same regression:

    .. code-block:: python

     import statsmodels.api as sm
     model1 = sm.OLS(df['api00'], sm.add_constant(df['acs_k3', 'meals', 'full'])).fit()
     results1 = model1.summary()  # returns summary results
    

It can get much more unwieldy than that. The model results object is brilliant as it can be printed in different formats (plaintext, Latex, etc.)... but that is only the starting point. How do I diagnose the regression model itself? How do I get standardized estimates? That's where it becomes more complicated.

appelpy simply aims to achieve a sweet spot between both approaches.


Installation ⏲️


pip install appelpy

Supported for Python 3.6 and higher versions.


Dependencies 🖇️


  • pandas>=0.24
  • jinja2
  • scipy
  • numpy>=1.16
  • statsmodels>=0.9
  • patsy
  • seaborn>=0.9
  • matplotlib>=3

Licence ⚖️


Modified BSD (3-clause)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].