{"id":13688808,"url":"https://github.com/ejolly/pymer4","last_synced_at":"2026-01-17T18:43:11.032Z","repository":{"id":20790928,"uuid":"90598701","full_name":"ejolly/pymer4","owner":"ejolly","description":"All the convenience of lme4 in python","archived":false,"fork":false,"pushed_at":"2025-09-04T15:46:37.000Z","size":10144,"stargazers_count":222,"open_issues_count":11,"forks_count":29,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-01-11T18:31:29.719Z","etag":null,"topics":["lme4","mixed-models","python"],"latest_commit_sha":null,"homepage":"http://eshinjolly.com/pymer4","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ejolly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-08T07:27:02.000Z","updated_at":"2026-01-10T10:51:47.000Z","dependencies_parsed_at":"2023-01-14T13:16:02.987Z","dependency_job_id":"41da038a-7727-4ec0-85e0-4fb45e62500b","html_url":"https://github.com/ejolly/pymer4","commit_stats":{"total_commits":313,"total_committers":7,"mean_commits":"44.714285714285715","dds":0.09904153354632583,"last_synced_commit":"4605b460e244621b56ef7786253de7f27e4fe77f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/ejolly/pymer4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejolly%2Fpymer4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejolly%2Fpymer4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejolly%2Fpymer4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejolly%2Fpymer4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejolly","download_url":"https://codeload.github.com/ejolly/pymer4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejolly%2Fpymer4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28394276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lme4","mixed-models","python"],"created_at":"2024-08-02T15:01:23.444Z","updated_at":"2026-01-17T18:43:11.023Z","avatar_url":"https://github.com/ejolly.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Pymer4: Generalized Linear \u0026 Multi-level Models in Python\n\n[![image](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/ejolly/pymer4/issues) [![image](https://anaconda.org/ejolly/pymer4/badges/version.svg)](https://anaconda.org/ejolly/pymer4) ![image](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue)  \n[![image](https://pepy.tech/badge/pymer4)](https://pepy.tech/project/pymer4) [![image](http://joss.theoj.org/papers/10.21105/joss.00862/status.svg)](https://doi.org/10.21105/joss.00862) [![image](https://zenodo.org/badge/90598701.svg)](https://zenodo.org/record/1523205)  \n\n`pymer4` is a statistics library for estimating various regression models, multi-level models, and generalized-linear-mixed models in Python. Jealous of R's lovely model syntax by prefer to work in the scientific Python ecoysystem? This package has got you covered! `pymer4` provides a clean interface that hides the back-and-forth code required when moving between R and Python. This is accomplished using [rpy2](https://rpy2.github.io/doc/latest/html/index.html/) to interface between langauges.\n\nCheck out the [documentation here](https://eshinjolly.com/pymer4)\n\n```python\nfrom pymer4.models import lm, lmer\nfrom pymer4 import load_dataset('sleep')\n\nsleep = load_dataset('sleep')\n\n# Linear regression\nols = lm('Reaction ~ Days', data=sleep)\nols.fit()\n\n# Multi-level model\nlmm = lmer('Reaction ~ Days + (Days | Subject)', data=sleep)\nlmm.fit()\n```\n\n\n## Why?\n\nThe scientific Python ecosystem has tons of fantastic libraries for data-analysis and statistical modeling such as `statsmodels`, `pingouin`, `scikit-learn`, and `bambi` for bayesian models to name a few. However, Python still sorely lacks a *unified formula-based modeling interface* that rivals what's available in R (and the [`tidyverse`](https://www.tidyverse.org/)) for frequentist statistics. This makes it frustrating for beginners and advanced Python analysts-alike to jump between different tools in order to accomplish a single task. So, rather than completely reinvent the wheel, `pymer4` aims to bring the best R's robust modeling capabilities to Python for the most common General(ized)-Linear-(Mixed)-Modeling (GLMMs) needs in the social and behavioral sciences. \n\nAt the same time, `pymer4` includes numerous *quality-of-life features* for common tasks you're likely to do when working with models (e.g. automatically calculated fit statistics, residuals, p-values for mixed-models, bootstrapped confidence-intervals, random-effects deviances, etc). By bringing together functionality spread across several popular R tools, we've aimed for *intuitive-usability*. `pymer4` also notably builds on top of the [`polars`](https://docs.pola.rs/py-polars/html/reference/) Dataframe library rather than `pandas`. This keeps code simple, fast, and efficient, while opening the door for enhanced future functionality.\n\n## Citing\n\nIf you use `pymer4` in your own work, please cite:\n\nJolly, (2018). Pymer4: Connecting R and Python for Linear Mixed\nModeling. *Journal of Open Source Software*, 3(31), 862,\n\u003chttps://doi.org/10.21105/joss.00862\u003e\n\n## Contributing\n\nContributions are *always welcome*!  \nIf you are interested in contributing feel free to check out the [open issues](https://github.com/ejolly/pymer4/issues) and check out the [contribution guidelines](https://eshinjolly.com/pymer4/contributing/contributing.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejolly%2Fpymer4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejolly%2Fpymer4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejolly%2Fpymer4/lists"}