{"id":23078481,"url":"https://github.com/openpharma/rbmiutils","last_synced_at":"2025-10-06T19:49:30.401Z","repository":{"id":266356477,"uuid":"884257544","full_name":"openpharma/rbmiUtils","owner":"openpharma","description":"Repository for the development of the rbmiUtils package which extends the {rbmi} package for use within clinical trials.","archived":false,"fork":false,"pushed_at":"2024-12-12T08:41:00.000Z","size":943,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-12T09:19:47.100Z","etag":null,"topics":["multiple-imputation","r","rbmi"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openpharma.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-11-06T12:36:10.000Z","updated_at":"2024-12-12T08:31:46.000Z","dependencies_parsed_at":"2024-12-03T21:44:14.616Z","dependency_job_id":null,"html_url":"https://github.com/openpharma/rbmiUtils","commit_stats":null,"previous_names":["openpharma/rbmiutils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2FrbmiUtils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2FrbmiUtils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2FrbmiUtils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpharma%2FrbmiUtils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpharma","download_url":"https://codeload.github.com/openpharma/rbmiUtils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229948920,"owners_count":18149572,"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":["multiple-imputation","r","rbmi"],"created_at":"2024-12-16T10:54:46.540Z","updated_at":"2025-10-06T19:49:25.348Z","avatar_url":"https://github.com/openpharma.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# rbmiUtils \u003ca href=\"https://openpharma.github.io/rbmiUtils/\"\u003e \u003cimg src=\"man/figures/rbmiUtils.png\" align=\"right\" width=\"140px\" alt=\"rbmiUtils website\" /\u003e \u003c/a\u003e\n\n\n\n\u003c!-- badges: start --\u003e\n\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n![CRAN status](https://www.r-pkg.org/badges/version/rbmiUtils)\n[![R-CMD-check](https://github.com/openpharma/rbmiUtils/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openpharma/rbmiUtils/actions/workflows/R-CMD-check.yaml)\n[![test-coverage](https://github.com/openpharma/rbmiUtils/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/openpharma/rbmiUtils/actions/workflows/test-coverage.yaml)\n\u003c!-- badges: end --\u003e\n\n`rbmiUtils` extends the functionality of [`rbmi`](https://github.com/insightsengineering/rbmi) to support more streamlined workflows for multiple imputation in clinical trials. It is designed to simplify key tasks such as analysis execution, pooling, result tidying, and imputed data handling.\n\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Example](#example)\n* [Dataset](#dataset)\n* [Utilities](#utilities)\n* [Development Status](#development-status)\n\n## Installation\n\nYou can install the package from cran or the development version of `rbmiUtils` from GitHub:\n\n\nType | Source | Command\n---|---|---\nRelease | CRAN | `install.packages(\"rbmiUtils\")`\nDevelopment | GitHub | `remotes::install_github(\"openpharma/rbmiUtils\")`\n\n\n## Example\n\nThis example shows how to run a covariate-adjusted ANCOVA on imputed datasets using Bayesian multiple imputation:\n\n```{r example, message = FALSE, warning = FALSE}\nlibrary(dplyr)\nlibrary(rbmi)\nlibrary(rbmiUtils)\n\ndata(\"ADMI\")\n\n# Setup\nN_IMPUTATIONS \u003c- 100\nWARMUP \u003c- 200\nTHIN \u003c- 5\n\n# Preprocessing\nADMI \u003c- ADMI %\u003e%\n  mutate(\n    TRT = factor(TRT, levels = c(\"Placebo\", \"Drug A\")),\n    USUBJID = factor(USUBJID),\n    AVISIT = factor(AVISIT)\n  )\n\n# Define analysis variables\nvars \u003c- set_vars(\n  subjid = \"USUBJID\",\n  visit = \"AVISIT\",\n  group = \"TRT\",\n  outcome = \"CHG\",\n  covariates = c(\"BASE\", \"STRATA\", \"REGION\")\n)\n\n# Specify imputation method\nmethod \u003c- rbmi::method_bayes(\n  n_samples = N_IMPUTATIONS,\n  control = rbmi::control_bayes(\n    warmup = WARMUP,\n    thin = THIN\n  )\n)\n\n# Run analysis\nana_obj \u003c- analyse_mi_data(\n  data = ADMI,\n  vars = vars,\n  method = method,\n  fun = ancova\n)\n\n# Pool results and tidy\npool_obj \u003c- pool(ana_obj)\ntidy_df \u003c- tidy_pool_obj(pool_obj)\n\n# View results\nprint(tidy_df)\n```\n\n## Datasets\n\nThe package includes two example datasets for demonstrating imputation and analysis:\n\n* `ADEFF`: An example efficacy dataset for with missing data.\n* `ADMI`: A large multiple imputation dataset with 100,000 rows and multiple visits, treatment arms, and stratification variables.\n\nUse `?ADEFF` and `?ADMI` to view full dataset documentation.\n\n## Utilities\n\nKey exported functions include:\n\n* `analyse_mi_data()`: Applies an analysis function (e.g., ANCOVA) to all imputed datasets.\n* `tidy_pool_obj()`: Tidies and annotates pooled results for reporting.\n* `get_imputed_data()`: Extracts long-format imputed datasets with original subject IDs mapped.\n\nThese utilities wrap standard `rbmi` workflows for improved reproducibility and interpretability.\n\n## Development Status\n\nThis package is experimental and under active development. Feedback and contributions are welcome via [GitHub issues](https://github.com/openpharma/rbmiUtils/issues) or pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpharma%2Frbmiutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpharma%2Frbmiutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpharma%2Frbmiutils/lists"}