Pymer4

Pymer4: Connecting R and Python for Linear Mixed Modeling - Published in JOSS (2018)

https://github.com/ejolly/pymer4

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    2 of 7 committers (28.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

lme4 mixed-models python

Scientific Fields

Engineering Computer Science - 60% confidence
Last synced: 4 months ago · JSON representation

Repository

All the convenience of lme4 in python

Basic Info
Statistics
  • Stars: 210
  • Watchers: 6
  • Forks: 28
  • Open Issues: 9
  • Releases: 16
Topics
lme4 mixed-models python
Created over 8 years ago · Last pushed 4 months ago
Metadata Files
Readme License

README.md

Pymer4: Generalized Linear & Multi-level Models in Python

image image image
image image image

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 to interface between langauges.

Check out the documentation here

```python from pymer4.models import lm, lmer from pymer4 import load_dataset('sleep')

sleep = load_dataset('sleep')

Linear regression

ols = lm('Reaction ~ Days', data=sleep) ols.fit()

Multi-level model

lmm = lmer('Reaction ~ Days + (Days | Subject)', data=sleep) lmm.fit() ```

Why?

The 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) 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.

At 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 Dataframe library rather than pandas. This keeps code simple, fast, and efficient, while opening the door for enhanced future functionality.

Citing

If you use pymer4 in your own work, please cite:

Jolly, (2018). Pymer4: Connecting R and Python for Linear Mixed Modeling. Journal of Open Source Software, 3(31), 862, https://doi.org/10.21105/joss.00862

Contributing

Contributions are always welcome!
If you are interested in contributing feel free to check out the open issues and check out the contribution guidelines.

Owner

  • Name: Eshin Jolly
  • Login: ejolly
  • Kind: user

JOSS Publication

Pymer4: Connecting R and Python for Linear Mixed Modeling
Published
November 26, 2018
Volume 3, Issue 31, Page 862
Authors
Eshin Jolly
Dartmouth College
Editor
Christopher R. Madan ORCID
Tags
statistics multilevel models R lme4

Papers & Mentions

Total mentions: 1

Assessing criticality in pre-seizure single-neuron activity of human epileptic cortex
Last synced: 2 months ago

GitHub Events

Total
  • Create event: 6
  • Release event: 3
  • Issues event: 30
  • Watch event: 15
  • Delete event: 11
  • Issue comment event: 13
  • Push event: 86
  • Pull request event: 8
  • Fork event: 2
Last Year
  • Create event: 6
  • Release event: 3
  • Issues event: 30
  • Watch event: 15
  • Delete event: 11
  • Issue comment event: 13
  • Push event: 86
  • Pull request event: 9
  • Fork event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 346
  • Total Committers: 7
  • Avg Commits per committer: 49.429
  • Development Distribution Score (DDS): 0.09
Past Year
  • Commits: 31
  • Committers: 3
  • Avg Commits per committer: 10.333
  • Development Distribution Score (DDS): 0.065
Top Committers
Name Email Commits
ejolly e****y@g****m 315
shotgunosine a****e@g****m 16
Tom Urbach t****h@u****u 6
Andrea Manica a****5@c****k 5
Anthony a****2@h****m 2
jcheong0428 j****8@g****m 1
Paul Bogdan p****n@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 80
  • Total pull requests: 36
  • Average time to close issues: 11 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 47
  • Total pull request authors: 10
  • Average comments per issue: 1.99
  • Average comments per pull request: 1.06
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 9
  • Pull requests: 5
  • Average time to close issues: 26 days
  • Average time to close pull requests: 38 minutes
  • Issue authors: 5
  • Pull request authors: 2
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ejolly (23)
  • JohannesWiesner (4)
  • anbai106 (3)
  • shanaadise (3)
  • sbSHA (2)
  • turbach (2)
  • savindi-wijenayaka (2)
  • sandy1729-swish (2)
  • paris007 (1)
  • DaviYokogawa (1)
  • cameron-mccabe (1)
  • noahcreany (1)
  • leichtle (1)
  • ecoronado92 (1)
  • cherepaha (1)
Pull Request Authors
  • ejolly (14)
  • Shotgunosine (6)
  • turbach (6)
  • dramanica (3)
  • dependabot[bot] (2)
  • AndrewRidden-Harper (2)
  • paulcbogdan (1)
  • jcheong0428 (1)
  • gcamargo1 (1)
  • Ben-FCC (1)
Top Labels
Issue Labels
bug (22) enhancement (22) in progress (3) docs (3) help wanted (3) known limitation (2) investigating (2) discussion (2) future fix (2) duplicate (1) deprecated? (1) priority (1) revisit (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 5,269 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 7
  • Total versions: 20
  • Total maintainers: 1
pypi.org: pymer4

pymer4: all the convenience of lme4 in python

  • Versions: 20
  • Dependent Packages: 1
  • Dependent Repositories: 7
  • Downloads: 5,269 Last month
Rankings
Dependent packages count: 4.8%
Downloads: 4.9%
Average: 5.1%
Dependent repos count: 5.5%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • deepdish >=0.3.6
  • joblib >=0.14
  • matplotlib >=3.0
  • numpy >=1.16.0
  • pandas >=1.1.0
  • patsy >=0.5.1
  • rpy2 >=3.4.5,<3.5.0
  • scipy >=1.4.0
  • seaborn >=0.10.0
.github/workflows/Build.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda 059455a698430d8b68fa317268fa2e3da3492a98 composite
  • crazy-max/ghaction-github-pages v2 composite
  • mxschmitt/action-tmate v3 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/Docs.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda 059455a698430d8b68fa317268fa2e3da3492a98 composite
  • crazy-max/ghaction-github-pages v2 composite
.github/workflows/Install.yml actions
  • conda-incubator/setup-miniconda 059455a698430d8b68fa317268fa2e3da3492a98 composite
.github/workflows/Tests.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda 059455a698430d8b68fa317268fa2e3da3492a98 composite
.github/workflows/manual_upload_conda.yml actions
  • actions/checkout v2 composite
.github/workflows/manual_upload_pypi.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda 059455a698430d8b68fa317268fa2e3da3492a98 composite
  • pypa/gh-action-pypi-publish master composite
requirements-dev.txt pypi
  • black ==22.10.0 development
  • ipdb * development
  • pdbr * development
  • pycodestyle * development
  • pytest * development
  • pytest-sugar * development
  • pytest-watch * development
  • sphinx * development
  • sphinx-gallery * development
  • sphinx_bootstrap_theme * development