Formulas for mixed-effects models in Python
Project description
formulae
formulae is a Python library that implements Wilkinson's formulas for mixed-effects models. The main difference with other implementations like Patsy or formulaic is that formulae can work with formulas describing a model with both common and group specific effects (a.k.a. fixed and random effects, respectively).
This package has been written to make it easier to specify models with group effects in Bambi, a package that makes it easy to work with Bayesian GLMMs in Python, but it could be used independently as a backend for another library. The approach in this library is to extend classical statistical formulas in a similar way than in R package lme4.
Installation
formulae requires a working Python interpreter (3.8+) and the libraries NumPy, SciPy and Pandas with versions specified in the pyproject.toml file.
Assuming a standard Python environment is installed on your machine (including pip), the latest release of formulae can be installed in one line using pip:
pip install formulae
Alternatively, if you want the development version of the package you can install from GitHub:
pip install git+https://github.com/bambinos/formulae.git
Documentation
The official documentation can be found here
Notes
- The
dataargument only accepts objects of classpandas.DataFrame. y ~ .is not implemented and won't be implemented in a first version. However, it is planned to be included in the future.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file formulae-0.6.2.tar.gz.
File metadata
- Download URL: formulae-0.6.2.tar.gz
- Upload date:
- Size: 147.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c256c37bf40b5d61acc56faa174b97bc81b80722bdad97f4692dcc24b360af7f
|
|
| MD5 |
23f1ed6e1e0ec745d89b13bd7eabacff
|
|
| BLAKE2b-256 |
84391d2a5106d11f0372f464b8c60b2186c7c2089cf75401cb08cc3be9a4182a
|
File details
Details for the file formulae-0.6.2-py3-none-any.whl.
File metadata
- Download URL: formulae-0.6.2-py3-none-any.whl
- Upload date:
- Size: 54.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0913daf0ef213c70ce9ea2275604ef103e4d2a7a9edd86dadfd7095bdcfb65
|
|
| MD5 |
544c92358a6c33621c1ff7c8e468895e
|
|
| BLAKE2b-256 |
477bfead2b0c05391ee8c16e37c91d85f1be08885e80bd511234caca90fdb51c
|