{"id":13752542,"url":"https://github.com/openpharma/mmrm","last_synced_at":"2026-01-12T09:56:20.155Z","repository":{"id":37410861,"uuid":"480787537","full_name":"openpharma/mmrm","owner":"openpharma","description":"Mixed Models for Repeated Measures (MMRM) in R.","archived":false,"fork":false,"pushed_at":"2024-04-22T13:32:17.000Z","size":93241,"stargazers_count":98,"open_issues_count":19,"forks_count":16,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-04-22T13:33:12.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openpharma.github.io/mmrm/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openpharma.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":".github/CONTRIBUTING.Rmd","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-04-12T11:48:37.000Z","updated_at":"2024-04-22T13:33:17.485Z","dependencies_parsed_at":"2024-04-22T13:43:31.620Z","dependency_job_id":null,"html_url":"https://github.com/openpharma/mmrm","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2Fmmrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2Fmmrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2Fmmrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2Fmmrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpharma","download_url":"https://codeload.github.com/openpharma/mmrm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T09:01:07.328Z","updated_at":"2026-01-12T09:56:20.125Z","avatar_url":"https://github.com/openpharma.png","language":"R","funding_links":[],"categories":["Ranked by starred repositories","Clinical Development"],"sub_categories":["Pharmacokinetics (PK) \u0026 Pharmacodynamics (PD)"],"readme":"---\noutput: github_document\n---\n\u003c!-- markdownlint-disable-file --\u003e\n\u003c!-- README.md needs to be generated from README.Rmd. Please edit that file --\u003e\n\n# mmrm  \u003cimg src=\"man/figures/logo.svg\" align=\"right\" width=\"175\" /\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CRAN status](https://www.r-pkg.org/badges/version-last-release/mmrm)](https://www.r-pkg.org/badges/version-last-release/mmrm)\n[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/mmrm)](https://cranlogs.r-pkg.org/badges/mmrm)\n[![CRAN total downloads](https://cranlogs.r-pkg.org/badges/grand-total/mmrm)](https://cranlogs.r-pkg.org/badges/grand-total/mmrm)\n[![Code Coverage](https://raw.githubusercontent.com/openpharma/mmrm/_xml_coverage_reports/data/main/badge.svg)](https://openpharma.github.io/mmrm/latest-tag/coverage-report/)\n\u003c!-- badges: end --\u003e\n\\\n\nMixed models for repeated measures (MMRM) are a popular\nchoice for analyzing longitudinal continuous outcomes in randomized\nclinical trials and beyond; see\n[Cnaan, Laird and Slasor (1997)](https://doi.org/10.1002%2f%28SICI%291097-0258%2819971030%2916%3a20%3c2349%3a%3aAID-SIM667%3e3.0.CO%3b2-E)\nfor a tutorial and\n[Mallinckrodt, Lane and Schnell (2008)](https://doi.org/10.1177/009286150804200402)\nfor a review. This package implements\nMMRM based on the marginal linear model without random effects using\nTemplate Model Builder (`TMB`) which enables fast and robust model\nfitting. Users can specify a variety of covariance matrices, weight\nobservations, fit models with restricted or standard maximum\nlikelihood inference, perform hypothesis testing with Satterthwaite\nor Kenward-Roger adjustment, and extract least\nsquare means estimates by using `emmeans`.\n\n**Scope:**\n\n* Continuous responses with normal (but potentially heteroscedastic) residuals.\n* Marginal linear models (no individual-level random effects).\n\n**Main Features:**\n\n* Flexible covariance specification:\n  * [Structures](https://openpharma.github.io/mmrm/main/articles/covariance.html): unstructured, Toeplitz, AR1, compound symmetry, ante-dependence, and spatial exponential.\n  * Groups: shared covariance structure for all subjects or group-specific\ncovariance estimates.\n  * Variances: homogeneous or heterogeneous across time points.\n* Inference:\n  * Supports REML and ML.\n  * Supports weights.\n* Hypothesis testing:\n  * [Least square means](https://openpharma.github.io/mmrm/main/reference/emmeans_support.html):\n    can be obtained with the `emmeans` package\n  * One- and multi-dimensional linear contrasts of model parameters can be tested.\n  * [Satterthwaite](https://openpharma.github.io/mmrm/main/articles/satterthwaite.html)\n    adjusted degrees of freedom.\n  * [Kenward-Roger](https://openpharma.github.io/mmrm/main/articles/kenward.html)\n    adjusted degrees of freedom and coefficients covariance matrix.\n  * [Coefficient Covariance](https://openpharma.github.io/mmrm/main/articles/coef_vcov.html)\n* `C++` backend:\n  * Fast implementation using `C++` and automatic differentiation to\n    obtain precise gradient information for model fitting.\n  * Model fitting algorithm [details](https://openpharma.github.io/mmrm/main/articles/algorithm.html) used in `mmrm`.\n* Package ecosystems integration:\n  * Integration with [tidymodels](https://www.tidymodels.org/) package ecosystem\n    * Dedicated [parsnip](https://parsnip.tidymodels.org/) engine for linear regression\n    * Integration with [recipes](https://recipes.tidymodels.org/)\n  * Integration with [tern](https://insightsengineering.github.io/tern/) package ecosystems\n    * The [tern.mmrm](https://insightsengineering.github.io/tern.mmrm/) package can be used to run the `mmrm` fit and generate tabulation and plots of least square means per visit and treatment arm, tabulation of model diagnostics, diagnostic graphs, and other standard model outputs.\n\n## Installation\n\n### Release\n\nYou can install the current release version from *CRAN* with:\n\n```{r cran-installation, eval = FALSE}\ninstall.packages(\"mmrm\")\n```\n\n### Development\n\nYou can install the current development version from *R-Universe* with:\n\n```{r ru-installation, eval = FALSE}\ninstall.packages(\n  \"mmrm\",\n  repos = c(\"https://openpharma.r-universe.dev\", \"https://cloud.r-project.org\")\n)\n```\n\nThis is preferred, because for Windows and MacOS systems you can install\npre-compiled binary versions of the packages, avoiding the need for compilation.\n\nAlternatively, you can install the current development version from\n*GitHub* with:\n\n```{r gh-installation, eval = FALSE}\nif (!require(\"remotes\")) {\n  install.packages(\"remotes\")\n}\nremotes::install_github(\"openpharma/mmrm\")\n```\n\nNote that this installation from source can take a substantial amount of time,\nbecause compilation of the `C++` sources is required.\n\n## Getting Started\n\nSee also the [introductory vignette](https://openpharma.github.io/mmrm/main/articles/introduction.html)\nor get started by trying out the example:\n\n```{r, child='vignettes/subsections/_intro-getting_started.Rmd'}\n```\n\n## Citing `mmrm`\n\nTo cite `mmrm` please see [here](https://openpharma.github.io/mmrm/main/authors.html#citation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpharma%2Fmmrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpharma%2Fmmrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpharma%2Fmmrm/lists"}