Title: | Create Interface for 'RBMI' and 'tern' |
Version: | 0.1.6 |
Date: | 2025-07-18 |
Description: | 'RBMI' implements standard and reference based multiple imputation methods for continuous longitudinal endpoints (Gower-Page et al. (2022) <doi:10.21105/joss.04251>). This package provides an interface for 'RBMI' uses the 'tern' https://cran.r-project.org/package=tern framework by Zhu et al. (2023) and tabulate results easily using 'rtables' https://cran.r-project.org/package=rtables by Becker et al. (2023). |
License: | Apache License 2.0 |
URL: | https://github.com/insightsengineering/tern.rbmi, https://insightsengineering.github.io/tern.rbmi/ |
BugReports: | https://github.com/insightsengineering/tern.rbmi/issues |
Depends: | R (≥ 3.6), rbmi (≥ 1.2.5), tern (≥ 0.9.7) |
Imports: | broom (≥ 0.5.4), checkmate (≥ 2.1.0), formatters (≥ 0.5.10), lifecycle (≥ 0.2.0), magrittr (≥ 1.5), rtables (≥ 0.6.11) |
Suggests: | BH, dplyr (≥ 1.0.3), knitr (≥ 1.42), Matrix, RcppEigen, rmarkdown (≥ 2.23), rstan, testthat (≥ 3.0.4), tidyr (≥ 0.8.3), V8 |
VignetteBuilder: | knitr, rmarkdown |
Config/Needs/verdepcheck: | insightsengineering/rbmi, insightsengineering/tern, tidymodels/broom, mllg/checkmate, insightsengineering/formatters, r-lib/lifecycle, tidyverse/magrittr, insightsengineering/rtables, tidyverse/dplyr, yihui/knitr, rstudio/rmarkdown, r-lib/testthat, tidyverse/tidyr |
Config/Needs/website: | insightsengineering/nesttemplate |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
Language: | en-US |
LazyData: | true |
RoxygenNote: | 7.3.2 |
Collate: | 'tabulate_rbmi.R' 'tern.rbmi-package.R' |
NeedsCompilation: | no |
Packaged: | 2025-07-18 09:50:26 UTC; rstudio |
Author: | Joe Zhu |
Maintainer: | Joe Zhu <joe.zhu@roche.com> |
Repository: | CRAN |
Date/Publication: | 2025-07-21 09:01:46 UTC |
tern.rbmi Package
Description
tern.rbmi
is an analysis package to create tables, listings and graphs to analyze clinical trials data.
Author(s)
Maintainer: Joe Zhu joe.zhu@roche.com (ORCID)
Authors:
Jana Stoilova jana.stoilova@roche.com
Other contributors:
F. Hoffmann-La Roche AG [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/insightsengineering/tern.rbmi/issues
Formatted Analysis function which can be further customized by calling
rtables::make_afun()
on it. It is used as afun
in rtables::analyze()
.
Description
Usage
a_rbmi_lsmeans(df, .in_ref_col, show_relative = c("reduction", "increase"))
Arguments
df |
input dataframe |
.in_ref_col |
boolean variable, if reference column is specified |
show_relative |
"reduction" if ( |
Value
Formatted Analysis function
Helper function to produce data frame with results of pool for a single visit
Description
Usage
h_tidy_pool(x)
Arguments
x |
( |
Value
Data frame with results of pool for a single visit.
Examples
data("rbmi_test_data")
pool_obj <- rbmi_test_data
h_tidy_pool(pool_obj$pars[1:3])
Example dataset for tern.rbmi
package. This is an pool object from the rbmi analysis, see
browseVignettes(package = "tern.rbmi")
Description
Usage
rbmi_test_data
Format
An object of class pool
of length 5.
Statistics function which is extracting estimates from a tidied LS means data frame.
Description
Usage
s_rbmi_lsmeans(df, .in_ref_col, show_relative = c("reduction", "increase"))
Arguments
df |
input dataframe |
.in_ref_col |
boolean variable, if reference column is specified |
show_relative |
"reduction" if ( |
Value
A list of statistics extracted from a tidied LS means data frame.
Examples
library(rtables)
library(dplyr)
library(broom)
data("rbmi_test_data")
pool_obj <- rbmi_test_data
df <- tidy(pool_obj)
s_rbmi_lsmeans(df[1, ], .in_ref_col = TRUE)
s_rbmi_lsmeans(df[2, ], .in_ref_col = FALSE)
Analyze function for tabulating LS means estimates from tidied
rbmi
pool
results.
Description
Usage
summarize_rbmi(
lyt,
...,
table_names = "rbmi_summary",
.stats = NULL,
.formats = NULL,
.indent_mods = NULL,
.labels = NULL
)
Arguments
lyt |
( |
... |
additional argument. |
table_names |
( |
.stats |
( |
.formats |
(named |
.indent_mods |
(named |
.labels |
(named |
Value
rtables
layout for tabulating LS means estimates from tidied
rbmi
pool
results.
Examples
library(rtables)
library(dplyr)
library(broom)
data("rbmi_test_data")
pool_obj <- rbmi_test_data
df <- tidy(pool_obj)
basic_table() %>%
split_cols_by("group", ref_group = levels(df$group)[1]) %>%
split_rows_by("visit", split_label = "Visit", label_pos = "topleft") %>%
summarize_rbmi() %>%
build_table(df)
Helper method (for broom::tidy()
) to prepare a data frame from an
pool
rbmi
object containing the LS means and contrasts and multiple visits
Description
Usage
## S3 method for class 'pool'
tidy(x, ...)
Arguments
x |
( |
... |
Additional arguments. Not used. Needed to match generic signature only. |
Value
A dataframe