Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eigenfoo/tests-as-linear
Python port of "Common statistical tests are linear models" by Jonas Kristoffer Lindeløv.
https://github.com/eigenfoo/tests-as-linear
linear-models python scipy statistical-tests statsmodels
Last synced: 12 days ago
JSON representation
Python port of "Common statistical tests are linear models" by Jonas Kristoffer Lindeløv.
- Host: GitHub
- URL: https://github.com/eigenfoo/tests-as-linear
- Owner: eigenfoo
- License: cc-by-4.0
- Created: 2019-06-23T08:59:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T00:17:21.000Z (3 months ago)
- Last Synced: 2024-10-15T01:21:33.822Z (28 days ago)
- Topics: linear-models, python, scipy, statistical-tests, statsmodels
- Language: HTML
- Homepage: https://eigenfoo.xyz/tests-as-linear/
- Size: 4.93 MB
- Stars: 88
- Watchers: 6
- Forks: 23
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# _Common statistical tests are linear models_: Python port
[![Build Status](https://travis-ci.com/eigenfoo/tests-as-linear.svg?branch=master)](https://travis-ci.com/eigenfoo/tests-as-linear)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/eigenfoo/tests-as-linear/master?filepath=tests-as-linear.ipynb)A Python port of Jonas Kristoffer Lindeløv's post [_Common statistical tests are
linear models (or: how to teach
stats)_](https://lindeloev.github.io/tests-as-linear/), which originally had
accompanying code in R.## Notes on Python port
The original post used R's built-in functions to verify that the linear models
were indeed equivalent to the statistical tests (by showing that the p-values,
t-values, and other such statistics, were the same in either case). In this
Python port, we instead verify that `scipy.stats` functions and `smf.ols` output
agree.The original R post had [four
appendices](https://github.com/lindeloev/tests-as-linear/tree/master/simulations),
each of which demonstrated (through numerical simulation) that a common
statistical test was well-approximated by a linear model. These simulations have
not been ported to Python (yet!). This is [an outstanding
issue](https://github.com/eigenfoo/tests-as-linear/issues/14). In the meantime,
please refer to the [original appendices
upstream](https://github.com/lindeloev/tests-as-linear/tree/master/simulations)
for the simulations.Finally, certain statistical functions and tests are supported by neither
`statsmodels` or `scipy`, the two statistical Python libraries used in this
port. R code with no simple Python equivalent (mainly in sections 6 and 7,
"Three or more means" and "Proportions: Chi-square is a log-linear model") has
not been ported. Such code has been noted in yellow warning boxes.## Contributing
Please refer to [the contributing
guide](https://github.com/eigenfoo/tests-as-linear/blob/master/CONTRIBUTING.md)
for project structure information and development instructions.## License
This work is licensed under a Creative Commons Attribution 4.0 International
License. Please refer to
[`LICENSE.txt`](https://github.com/eigenfoo/tests-as-linear/blob/master/LICENSE.txt)
for more details.