Code Monkey home page Code Monkey logo

tests-as-linear's Introduction

Common statistical tests are linear models: Python port

Build Status Binder

A Python port of Jonas Kristoffer Lindeløv's post Common statistical tests are linear models (or: how to teach stats), 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, 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. In the meantime, please refer to the original appendices upstream 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 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 for more details.

tests-as-linear's People

Contributors

eigenfoo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.