rbmiutils

Repository for the development of the rbmiUtils package which extends the {rbmi} package for use within clinical trials.

https://github.com/openpharma/rbmiutils

Science Score: 26.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
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.0%) to scientific vocabulary

Keywords

multiple-imputation r rbmi utils
Last synced: 6 months ago · JSON representation

Repository

Repository for the development of the rbmiUtils package which extends the {rbmi} package for use within clinical trials.

Basic Info
Statistics
  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • Open Issues: 0
  • Releases: 2
Topics
multiple-imputation r rbmi utils
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# rbmiUtils  rbmiUtils website 





[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
![CRAN status](https://www.r-pkg.org/badges/version/rbmiUtils)
[![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)
[![test-coverage](https://github.com/openpharma/rbmiUtils/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/openpharma/rbmiUtils/actions/workflows/test-coverage.yaml)


`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.


## Table of Contents

* [Installation](#installation)
* [Example](#example)
* [Dataset](#dataset)
* [Utilities](#utilities)
* [Development Status](#development-status)

## Installation

You can install the package from cran or the development version of `rbmiUtils` from GitHub:


Type | Source | Command
---|---|---
Release | CRAN | `install.packages("rbmiUtils")`
Development | GitHub | `remotes::install_github("openpharma/rbmiUtils")`


## Example

This example shows how to run a covariate-adjusted ANCOVA on imputed datasets using Bayesian multiple imputation:

```{r example, message = FALSE, warning = FALSE}
library(dplyr)
library(rbmi)
library(rbmiUtils)

data("ADMI")

# Setup
N_IMPUTATIONS <- 100
WARMUP <- 200
THIN <- 5

# Preprocessing
ADMI <- ADMI %>%
  mutate(
    TRT = factor(TRT, levels = c("Placebo", "Drug A")),
    USUBJID = factor(USUBJID),
    AVISIT = factor(AVISIT)
  )

# Define analysis variables
vars <- set_vars(
  subjid = "USUBJID",
  visit = "AVISIT",
  group = "TRT",
  outcome = "CHG",
  covariates = c("BASE", "STRATA", "REGION")
)

# Specify imputation method
method <- rbmi::method_bayes(
  n_samples = N_IMPUTATIONS,
  control = rbmi::control_bayes(
    warmup = WARMUP,
    thin = THIN
  )
)

# Run analysis
ana_obj <- analyse_mi_data(
  data = ADMI,
  vars = vars,
  method = method,
  fun = ancova
)

# Pool results and tidy
pool_obj <- pool(ana_obj)
tidy_df <- tidy_pool_obj(pool_obj)

# View results
print(tidy_df)
```

## Datasets

The package includes two example datasets for demonstrating imputation and analysis:

* `ADEFF`: An example efficacy dataset for with missing data.
* `ADMI`: A large multiple imputation dataset with 100,000 rows and multiple visits, treatment arms, and stratification variables.

Use `?ADEFF` and `?ADMI` to view full dataset documentation.

## Utilities

Key exported functions include:

* `analyse_mi_data()`: Applies an analysis function (e.g., ANCOVA) to all imputed datasets.
* `tidy_pool_obj()`: Tidies and annotates pooled results for reporting.
* `get_imputed_data()`: Extracts long-format imputed datasets with original subject IDs mapped.

These utilities wrap standard `rbmi` workflows for improved reproducibility and interpretability.

## Development Status

This package is experimental and under active development. Feedback and contributions are welcome via [GitHub issues](https://github.com/openpharma/rbmiUtils/issues) or pull requests.

Owner

  • Name: openpharma
  • Login: openpharma
  • Kind: organization

Further precompetitive collaboration in life sciences

GitHub Events

Total
  • Create event: 13
  • Release event: 2
  • Issues event: 22
  • Watch event: 2
  • Delete event: 11
  • Member event: 1
  • Push event: 69
  • Pull request event: 22
  • Fork event: 1
Last Year
  • Create event: 13
  • Release event: 2
  • Issues event: 22
  • Watch event: 2
  • Delete event: 11
  • Member event: 1
  • Push event: 69
  • Pull request event: 22
  • Fork event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 64
  • Total Committers: 1
  • Avg Commits per committer: 64.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 64
  • Committers: 1
  • Avg Commits per committer: 64.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
bailliem b****m@g****m 64

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 12
  • Total pull requests: 13
  • Average time to close issues: 17 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.08
  • Average comments per pull request: 0.0
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 12
  • Pull requests: 13
  • Average time to close issues: 17 days
  • Average time to close pull requests: 1 day
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.08
  • Average comments per pull request: 0.0
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bailliem (12)
Pull Request Authors
  • bailliem (14)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 345 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: rbmiUtils

Utility Functions to Support and Extend the 'rbmi' Package

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 345 Last month
Rankings
Dependent packages count: 26.5%
Dependent repos count: 32.6%
Average: 48.6%
Downloads: 86.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • assertthat * imports
  • dplyr * imports
  • purrr * imports
  • rbmi * imports
  • rlang * imports
  • beeca * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • readr * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests
  • tidyr * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/rhub.yaml actions
  • r-hub/actions/checkout v1 composite
  • r-hub/actions/platform-info v1 composite
  • r-hub/actions/run-check v1 composite
  • r-hub/actions/setup v1 composite
  • r-hub/actions/setup-deps v1 composite
  • r-hub/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite