From 13fe66cd17179b320ebcdbaca5ff351ade45cd80 Mon Sep 17 00:00:00 2001 From: shajoezhu Date: Tue, 26 Nov 2024 14:30:17 +0000 Subject: [PATCH] [actions skip] Built site for tern.rbmi@aebccd8bf2c70db1ada14effd3f971a3de31a8ef --- main/404.html | 15 ++- main/CODE_OF_CONDUCT.html | 102 ++++++++++++++----- main/CONTRIBUTING.html | 130 +++++++++++++++++------- main/LICENSE-text.html | 57 ++++++++--- main/SECURITY.html | 69 ++++++++++--- main/articles/index.html | 64 +++++++++--- main/articles/tern-rbmi.html | 15 ++- main/authors.html | 63 +++++++++--- main/index.html | 15 ++- main/news/index.html | 103 ++++++++++++++----- main/reference/a_rbmi_lsmeans.html | 81 +++++++++++---- main/reference/h_tidy_pool.html | 78 +++++++++++---- main/reference/index.html | 137 +++++++++++++++++++------- main/reference/rbmi_test_data.html | 68 ++++++++++--- main/reference/s_rbmi_lsmeans.html | 84 ++++++++++++---- main/reference/summarize_rbmi.html | 96 +++++++++++++----- main/reference/tern.rbmi-package.html | 85 ++++++++++++---- main/reference/tidy.pool.html | 78 +++++++++++---- main/search.json | 2 +- 19 files changed, 1016 insertions(+), 326 deletions(-) diff --git a/main/404.html b/main/404.html index ebc936e..2e747bb 100644 --- a/main/404.html +++ b/main/404.html @@ -1,5 +1,4 @@ - - + @@ -42,7 +41,17 @@
  • Non-CRAN unit test report
  • - +
    + + @@ -42,65 +73,80 @@

    Contributor Covenant Code of Conduct

    -

    Our Pledge

    +

    Our Pledge +

    We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

    We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

    -

    Our Standards

    +

    Our Standards +

    Examples of behavior that contributes to a positive environment for our community include:

    -
    • Demonstrating empathy and kindness toward other people
    • +
        +
      • Demonstrating empathy and kindness toward other people
      • Being respectful of differing opinions, viewpoints, and experiences
      • Giving and gracefully accepting constructive feedback
      • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
      • Focusing on what is best not just for us as individuals, but for the overall community
      • -

      Examples of unacceptable behavior include:

      -
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • +
      +

      Examples of unacceptable behavior include:

      +
        +
      • The use of sexualized language or imagery, and sexual attention or advances of any kind
      • Trolling, insulting or derogatory comments, and personal or political attacks
      • Public or private harassment
      • Publishing others’ private information, such as a physical or email address, without their explicit permission
      • Other conduct which could reasonably be considered inappropriate in a professional setting
      • -
    + +
    -

    Enforcement Responsibilities

    +

    Enforcement Responsibilities +

    Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

    Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

    -

    Scope

    +

    Scope +

    This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

    -

    Enforcement

    +

    Enforcement +

    Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.

    All community leaders are obligated to respect the privacy and security of the reporter of any incident.

    -

    Enforcement Guidelines

    +

    Enforcement Guidelines +

    Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

    -

    1. Correction

    +

    1. Correction +

    Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

    Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

    -

    2. Warning

    +

    2. Warning +

    Community Impact: A violation through a single incident or series of actions.

    Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

    -

    3. Temporary Ban

    +

    3. Temporary Ban +

    Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

    Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

    -

    4. Permanent Ban

    +

    4. Permanent Ban +

    Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

    Consequence: A permanent ban from any sort of public interaction within the community.

    -

    Attribution

    +

    Attribution +

    This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

    Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.

    For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

    @@ -108,17 +154,19 @@

    Attribution

    + + - + + - + + diff --git a/main/CONTRIBUTING.html b/main/CONTRIBUTING.html index 769e8c1..da4b950 100644 --- a/main/CONTRIBUTING.html +++ b/main/CONTRIBUTING.html @@ -1,5 +1,19 @@ - -Contribution Guidelines • tern.rbmi + + + + + + +Contribution Guidelines • tern.rbmi + + + + + + + + + Skip to contents @@ -15,19 +29,36 @@ + + @@ -44,7 +75,8 @@

    Contribution Guidelines

    🙏 Thank you for taking the time to contribute!

    Your input is deeply valued, whether an issue, a pull request, or even feedback, regardless of size, content or scope.

    -

    Table of contents

    +

    Table of contents +

    👶 Getting started

    📔 Code of Conduct

    🗃 License

    @@ -55,38 +87,47 @@

    Table of contents❓ Questions

    -

    Getting started

    +

    Getting started +

    Please refer the project documentation for a brief introduction. Please also see other articles within the project documentation for additional information.

    -

    Code of Conduct

    +

    Code of Conduct +

    A Code of Conduct governs this project. Participants and contributors are expected to follow the rules outlined therein.

    -

    License

    +

    License +

    All your contributions will be covered by this project’s license.

    -

    Issues

    +

    Issues +

    We use GitHub to track issues, feature requests, and bugs. Before submitting a new issue, please check if the issue has already been reported. If the issue already exists, please upvote the existing issue 👍.

    For new feature requests, please elaborate on the context and the benefit the feature will have for users, developers, or other relevant personas.

    -

    Pull requests

    +

    Pull requests +

    -

    GitHub Flow

    +

    GitHub Flow +

    This repository uses the GitHub Flow model for collaboration. To submit a pull request:

    -
    1. +
        +
      1. Create a branch

        Please see the branch naming convention below. If you don’t have write access to this repository, please fork it.

      2. Make changes

        Make sure your code

        -
        • passes all checks imposed by GitHub Actions
        • +
            +
          • passes all checks imposed by GitHub Actions
          • is well documented
          • is well tested with unit tests sufficiently covering the changes introduced
          • -
          +
        +
      3. Create a pull request (PR)

        In the pull request description, please link the relevant issue (if any), provide a detailed description of the change, and include any assumptions.

        @@ -100,76 +141,93 @@

        GitHub Flow -

        Branch naming convention

        +

        Branch naming convention +

        Suppose your changes are related to a current issue in the current project; please name your branch as follows: <issue_id>_<short_description>. Please use underscore (_) as a delimiter for word separation. For example, 420_fix_ui_bug would be a suitable branch name if your change is resolving and UI-related bug reported in issue number 420 in the current project.

        If your change affects multiple repositories, please name your branches as follows: <issue_id>_<issue_repo>_<short description>. For example, 69_awesomeproject_fix_spelling_error would reference issue 69 reported in project awesomeproject and aims to resolve one or more spelling errors in multiple (likely related) repositories.

    monorepo and staged.dependencies -

    + +

    Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using staged.dependencies functionality to simulate a monorepo behavior. The dependency configuration is already specified in this project’s staged_dependencies.yaml file. You need to name the feature branches appropriately. This is the only exception from the branch naming convention described above.

    Please refer to the staged.dependencies package documentation for more details.

    -

    Coding guidelines

    +

    Coding guidelines +

    This repository follows some unified processes and standards adopted by its maintainers to ensure software development is carried out consistently within teams and cohesively across other repositories.

    -

    Style guide

    +

    Style guide +

    This repository follows the standard tidyverse style guide and uses lintr for lint checks. Customized lint configurations are available in this repository’s .lintr file.

    -

    Dependency management

    +

    Dependency management +

    Lightweight is the right weight. This repository follows tinyverse recommedations of limiting dependencies to minimum.

    -

    Dependency version management

    +

    Dependency version management +

    If the code is not compatible with all (!) historical versions of a given dependenct package, it is required to specify minimal version in the DESCRIPTION file. In particular: if the development version requires (imports) the development version of another package - it is required to put abc (>= 1.2.3.9000).

    - +
    -

    R & package versions

    +

    R & package versions +

    We continuously test our packages against the newest R version along with the most recent dependencies from CRAN and BioConductor. We recommend that your working environment is also set up in the same way. You can find the details about the R version and packages used in the R CMD check GitHub Action execution log - there is a step that prints out the R sessionInfo().

    If you discover bugs on older R versions or with an older set of dependencies, please create the relevant bug reports.

    -

    pre-commit

    +

    +pre-commit +

    We highly recommend that you use the pre-commit tool combined with R hooks for pre-commit to execute some of the checks before committing and pushing your changes.

    Pre-commit hooks are already available in this repository’s .pre-commit-config.yaml file.

    -

    Recognition model

    +

    Recognition model +

    As mentioned previously, all contributions are deeply valued and appreciated. While all contribution data is available as part of the repository insights, to recognize a significant contribution and hence add the contributor to the package authors list, the following rules are enforced:

    - +

    *Excluding auto-generated code, including but not limited to roxygen comments or renv.lock files.

    The package maintainer also reserves the right to adjust the criteria to recognize contributions.

    -

    Questions

    +

    Questions +

    If you have further questions regarding the contribution guidelines, please contact the package/repository maintainer.

    + + - + + - + + diff --git a/main/LICENSE-text.html b/main/LICENSE-text.html index ef1542c..32d4710 100644 --- a/main/LICENSE-text.html +++ b/main/LICENSE-text.html @@ -1,5 +1,19 @@ - -License • tern.rbmi + + + + + + +License • tern.rbmi + + + + + + + + + Skip to contents @@ -15,19 +29,36 @@ + + @@ -54,17 +85,19 @@

    License

    limitations under the License. - + + - + + - + + diff --git a/main/SECURITY.html b/main/SECURITY.html index 9139bae..64cbf31 100644 --- a/main/SECURITY.html +++ b/main/SECURITY.html @@ -1,5 +1,19 @@ - -Security Policy • tern.rbmi + + + + + + +Security Policy • tern.rbmi + + + + + + + + + Skip to contents @@ -15,19 +29,36 @@ + + @@ -42,38 +73,44 @@

    Security Policy

    -

    Reporting Security Issues

    +

    Reporting Security Issues +

    If you believe you have found a security vulnerability in any of the repositories in this organization, please report it to us through coordinated disclosure.

    Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

    Instead, please send an email to vulnerability.management[@]roche.com.

    Please include as much of the information listed below as you can to help us better understand and resolve the issue:

    -
    • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
    • +
        +
      • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
      • Full paths of source file(s) related to the manifestation of the issue
      • The location of the affected source code (tag/branch/commit or direct URL)
      • Any special configuration required to reproduce the issue
      • Step-by-step instructions to reproduce the issue
      • Proof-of-concept or exploit code (if possible)
      • Impact of the issue, including how an attacker might exploit the issue
      • -

      This information will help us triage your report more quickly.

      +
    +

    This information will help us triage your report more quickly.

    -

    Data Security Standards (DSS)

    +

    Data Security Standards (DSS) +

    Please make sure that while reporting issues in the form a bug, feature, or pull request, all sensitive information such as PII, PHI, and PCI is completely removed from any text and attachments, including pictures and videos.

    + + - + + - + + diff --git a/main/articles/index.html b/main/articles/index.html index 44050d6..9f43efb 100644 --- a/main/articles/index.html +++ b/main/articles/index.html @@ -1,5 +1,19 @@ - -Articles • tern.rbmi + + + + + + +Articles • tern.rbmi + + + + + + + + + Skip to contents @@ -15,19 +29,36 @@ + + @@ -42,20 +73,25 @@

    Articles

    All vignettes

    -
    Introduction to tern.rbmi
    +
    +
    Introduction to tern.rbmi
    -
    - + +
    + + + - + + - + + diff --git a/main/articles/tern-rbmi.html b/main/articles/tern-rbmi.html index 53091d4..56ca4cd 100644 --- a/main/articles/tern-rbmi.html +++ b/main/articles/tern-rbmi.html @@ -1,5 +1,4 @@ - - + @@ -42,7 +41,17 @@
  • Non-CRAN unit test report
  • - +
    + + @@ -41,7 +72,8 @@

    Authors and Citation

    Authors

    -
    + +

    Citation

    @@ -75,17 +108,19 @@

    Citation

    + + - + + - + + diff --git a/main/index.html b/main/index.html index 557d5e8..b880b92 100644 --- a/main/index.html +++ b/main/index.html @@ -1,5 +1,4 @@ - - + @@ -44,7 +43,17 @@
  • Non-CRAN unit test report
  • - +
    + + @@ -41,44 +72,62 @@

    Changelog

    -tern.rbmi 0.1.4

    CRAN release: 2024-11-26

    -
    +tern.rbmi 0.1.4 + +

    CRAN release: 2024-11-26

    + +

    -tern.rbmi 0.1.3

    -
    + +

    -tern.rbmi 0.1.2

    -
    +tern.rbmi 0.1.2 + + +

    -tern.rbmi 0.1.1

    -
    + +

    -tern.rbmi 0.1.0

    -
    +tern.rbmi 0.1.0 + + + + + - + + - + + diff --git a/main/reference/a_rbmi_lsmeans.html b/main/reference/a_rbmi_lsmeans.html index 4de77f5..b146641 100644 --- a/main/reference/a_rbmi_lsmeans.html +++ b/main/reference/a_rbmi_lsmeans.html @@ -1,5 +1,21 @@ - -Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans • tern.rbmi + + + + + + +Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -45,44 +78,54 @@

    Formatted Analysis function which can be further customized by calling
    -

    Usage

    +

    Usage +

    a_rbmi_lsmeans(df, .in_ref_col, show_relative = c("reduction", "increase"))
    -

    Arguments

    +

    Arguments +

    -
    df
    +
    +
    df +

    input dataframe

    -
    .in_ref_col
    +
    .in_ref_col +

    boolean variable, if reference column is specified

    -
    show_relative
    +
    show_relative +

    "reduction" if (control - treatment, default) or "increase" (treatment - control) of relative change from baseline?

    -
    + +
    -

    Value

    +

    Value +

    Formatted Analysis function

    + + - + + - + + diff --git a/main/reference/h_tidy_pool.html b/main/reference/h_tidy_pool.html index 8f07b3a..684d616 100644 --- a/main/reference/h_tidy_pool.html +++ b/main/reference/h_tidy_pool.html @@ -1,5 +1,21 @@ - -Helper function to produce data frame with results of pool for a single visit — h_tidy_pool • tern.rbmi + + + + + + +Helper function to produce data frame with results of pool for a single visit — h_tidy_pool • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -45,26 +78,33 @@

    Helper function to produce data frame with results of pool for a single visi
    -

    Usage

    +

    Usage +

    h_tidy_pool(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (pool) is a list of pooled object from rbmi analysis results. This list includes analysis results, confidence level, hypothesis testing type.

    -
    + +
    -

    Value

    +

    Value +

    Data frame with results of pool for a single visit.

    -

    Examples

    +

    Examples +

    data("rbmi_test_data")
     pool_obj <- rbmi_test_data
     
    @@ -79,17 +119,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/index.html b/main/reference/index.html index de6ebb3..eb475e2 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -1,5 +1,19 @@ - -Package index • tern.rbmi + + + + + + +Package index • tern.rbmi + + + + + + + + + Skip to contents @@ -15,19 +29,36 @@ + + @@ -39,120 +70,152 @@

    Package index

    -

    Statistics Functions

    +

    Statistics Functions +

    Statistics functions should do the computation of the numbers that are tabulated later. In order to separate computation from formatting, they should not take care of rcell type formatting themselves.

    -
    +
    +
    -
    +
    +
    s_rbmi_lsmeans() experimental
    Statistics function which is extracting estimates from a tidied LS means data frame.
    -
    -

    Formatted Analysis functions

    + +
    +
    +

    Formatted Analysis functions +

    These have the same arguments as the corresponding statistics functions, and can be further customized by calling rtables::make_afun() on them. They are used as afun in rtables::analyze().

    -
    +
    +
    -
    +
    +
    a_rbmi_lsmeans() experimental
    Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze().
    -
    -

    Analyze Functions

    + +
    +
    +

    Analyze Functions +

    Analyze Functions are used in combination with the rtables layout functions, in the pipeline which creates the table.

    -
    +
    +
    -
    +
    +
    summarize_rbmi() experimental
    Analyze function for tabulating LS means estimates from tidied rbmi pool results.
    -
    -

    Analysis Helper Functions

    + +
    +
    +

    Analysis Helper Functions +

    these functions are useful to help definining the analysis

    -
    +
    +
    -
    +
    +
    h_tidy_pool() experimental
    Helper function to produce data frame with results of pool for a single visit
    -
    -

    Helper method

    + +
    +
    +

    Helper method +

    Helper method

    -
    +
    +
    -
    +
    +
    tidy(<pool>) experimental
    Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits
    -
    -

    Test data

    + +
    +
    +

    Test data +

    Test data

    -
    +
    +
    -
    +
    +
    rbmi_test_data experimental
    -
    Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = "tern.rbmi")
    -
    +
    Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = "tern.rbmi") +
    + + + + - + + - + + diff --git a/main/reference/rbmi_test_data.html b/main/reference/rbmi_test_data.html index 4737689..cb6fdd1 100644 --- a/main/reference/rbmi_test_data.html +++ b/main/reference/rbmi_test_data.html @@ -1,5 +1,21 @@ - -Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = "tern.rbmi") — rbmi_test_data • tern.rbmi + + + + + + +Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = "tern.rbmi") — rbmi_test_data • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -35,7 +68,8 @@
    @@ -45,27 +79,31 @@

    Example dataset for tern.rbmi package. This is an pool object f

    -

    Usage

    +

    Usage +

    rbmi_test_data
    -

    Format

    +

    Format +

    An object of class pool of length 5.

    + + - + + - + + diff --git a/main/reference/s_rbmi_lsmeans.html b/main/reference/s_rbmi_lsmeans.html index 6c238e8..3d45f3d 100644 --- a/main/reference/s_rbmi_lsmeans.html +++ b/main/reference/s_rbmi_lsmeans.html @@ -1,5 +1,21 @@ - -Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans • tern.rbmi + + + + + + +Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -45,34 +78,43 @@

    Statistics function which is extracting estimates from a tidied LS means dat
    -

    Usage

    +

    Usage +

    s_rbmi_lsmeans(df, .in_ref_col, show_relative = c("reduction", "increase"))
    -

    Arguments

    +

    Arguments +

    -
    df
    +
    +
    df +

    input dataframe

    -
    .in_ref_col
    +
    .in_ref_col +

    boolean variable, if reference column is specified

    -
    show_relative
    +
    show_relative +

    "reduction" if (control - treatment, default) or "increase" (treatment - control) of relative change from baseline?

    -
    + +
    -

    Value

    +

    Value +

    A list of statistics extracted from a tidied LS means data frame.

    -

    Examples

    +

    Examples +

    library(rtables)
     library(dplyr)
     #> 
    @@ -147,17 +189,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/summarize_rbmi.html b/main/reference/summarize_rbmi.html index 40523e4..a265f0e 100644 --- a/main/reference/summarize_rbmi.html +++ b/main/reference/summarize_rbmi.html @@ -1,5 +1,21 @@ - -Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi • tern.rbmi + + + + + + +Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -45,7 +78,8 @@

    Analyze function for tabulating LS means estimates from tidied rbmi
    -

    Usage

    +

    Usage +

    summarize_rbmi(
       lyt,
       ...,
    @@ -58,46 +92,58 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    lyt
    +
    +
    lyt +

    (layout)
    input layout where analyses will be added to.

    -
    ...
    +
    ... +

    additional argument.

    -
    table_names
    +
    table_names +

    (character)
    this can be customized in case that the same vars are analyzed multiple times, to avoid warnings from rtables.

    -
    .stats
    +
    .stats +

    (character)
    statistics to select for the table.

    -
    .formats
    +
    .formats +

    (named character or list)
    formats for the statistics.

    -
    .indent_mods
    +
    .indent_mods +

    (named integer)
    indent modifiers for the labels.

    -
    .labels
    +
    .labels +

    (named character)
    labels for the statistics (without indent).

    -
    + +
    -

    Value

    +

    Value +

    rtables layout for tabulating LS means estimates from tidied rbmi pool results.

    -

    Examples

    +

    Examples +

    library(rtables)
     library(dplyr)
     library(broom)
    @@ -146,17 +192,19 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/tern.rbmi-package.html b/main/reference/tern.rbmi-package.html index 7c69416..04e2dfa 100644 --- a/main/reference/tern.rbmi-package.html +++ b/main/reference/tern.rbmi-package.html @@ -1,5 +1,21 @@ - -tern.rbmi Package — tern.rbmi-package • tern.rbmi + + + + + + +tern.rbmi Package — tern.rbmi-package • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -46,31 +79,45 @@

    tern.rbmi Package

    -

    Author

    +

    Author +

    Maintainer: Joe Zhu joe.zhu@roche.com

    -

    Authors:

    Other contributors:

    • F. Hoffmann-La Roche AG [copyright holder, funder]

    • -
    +

    Authors:

    + +

    Other contributors:

    +
      +
    • F. Hoffmann-La Roche AG [copyright holder, funder]

    • +
    + + + - + + - + + diff --git a/main/reference/tidy.pool.html b/main/reference/tidy.pool.html index bd5eb1a..0dd7cf0 100644 --- a/main/reference/tidy.pool.html +++ b/main/reference/tidy.pool.html @@ -1,5 +1,21 @@ - -Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool • tern.rbmi + + + + + + +Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool • tern.rbmi + + + + + + + + + + + Skip to contents @@ -15,19 +31,36 @@ + + @@ -45,41 +78,50 @@

    Helper method (for -

    Usage

    +

    Usage +

    # S3 method for class 'pool'
     tidy(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (pool) is a list of pooled object from rbmi analysis results. This list includes analysis results, confidence level, hypothesis testing type.

    -
    ...
    +
    ... +

    Additional arguments. Not used. Needed to match generic signature only.

    -
    + +
    -

    Value

    +

    Value +

    A dataframe

    + + - + + - + + diff --git a/main/search.json b/main/search.json index 8b81930..8be65b6 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"introduction-to-tern-rbmi","dir":"Articles","previous_headings":"","what":"Introduction to tern.rbmi","title":"Introduction to tern.rbmi","text":"vignette shows general purpose syntax tern.rbmi R package. tern.rbmi provides interface Reference Based Multiple Imputation (rbmi) within tern framework. details rbmi package, please see Reference Based Multiple Imputation (rbmi). basic usage rbmi core functions described quickstart vignette:","code":"vignette(topic = \"quickstart\", package = \"rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"example-of-using-tern-rbmi","dir":"Articles","previous_headings":"","what":"Example of using tern.rbmi","title":"Introduction to tern.rbmi","text":"rbmi package consists 4 core functions (plus several helper functions) typically called sequence: draws() - fits imputation models stores parameters impute() - creates multiple imputed datasets analyse() - analyses multiple imputed datasets pool() - combines analysis results across imputed datasets single statistic","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"the-data","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"The Data","title":"Introduction to tern.rbmi","text":"use publicly available example dataset antidepressant clinical trial active drug versus placebo. relevant endpoint Hamilton 17-item depression rating scale (HAMD17) assessed baseline weeks 1, 2, 4, 6. Study drug discontinuation occurred 24% subjects active drug 26% subjects placebo. data study drug discontinuation missing single additional intermittent missing observation.","code":"library(tern.rbmi) #> Loading required package: rbmi #> Loading required package: tern #> Loading required package: rtables #> Loading required package: formatters #> #> Attaching package: 'formatters' #> The following object is masked from 'package:base': #> #> %||% #> Loading required package: magrittr #> #> Attaching package: 'rtables' #> The following object is masked from 'package:utils': #> #> str #> Registered S3 method overwritten by 'tern': #> method from #> tidy.glm broom library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union data <- antidepressant_data levels(data$THERAPY) <- c(\"PLACEBO\", \"DRUG\") # This is important! The order defines the computation order later missing_var <- \"CHANGE\" vars <- list( id = \"PATIENT\", visit = \"VISIT\", expand_vars = c(\"BASVAL\", \"THERAPY\"), group = \"THERAPY\" ) covariates <- list( draws = c(\"BASVAL*VISIT\", \"THERAPY*VISIT\"), analyse = c(\"BASVAL\") ) data <- data %>% dplyr::select(PATIENT, THERAPY, VISIT, BASVAL, THERAPY, CHANGE) %>% dplyr::mutate(dplyr::across(.cols = vars$id, ~ as.factor(.x))) %>% dplyr::arrange(dplyr::across(.cols = c(vars$id, vars$visit))) # Use expand_locf to add rows corresponding to visits with missing outcomes to the dataset data_full <- do.call( expand_locf, args = list( data = data, vars = c(vars$expand_vars, vars$group), group = vars$id, order = c(vars$id, vars$visit) ) %>% append(lapply(data[c(vars$id, vars$visit)], levels)) ) data_full <- data_full %>% dplyr::group_by(dplyr::across(vars$id)) %>% dplyr::mutate(!!vars$group := Filter(Negate(is.na), .data[[vars$group]])[1]) # there are duplicates - use first value data_full <- data_full %>% dplyr::group_by(dplyr::across(c(vars$id, vars$group, vars$visit))) %>% dplyr::slice(1) %>% dplyr::ungroup() # need to have a single ID column data_full <- data_full %>% tidyr::unite(\"TMP_ID\", dplyr::all_of(vars$id), sep = \"_#_\", remove = FALSE) %>% dplyr::mutate(TMP_ID = as.factor(TMP_ID))"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"creating-intercurrent-event-data","dir":"Articles","previous_headings":"Example of using tern.rbmi > The Data","what":"Creating intercurrent event data","title":"Introduction to tern.rbmi","text":"Set imputation strategy MAR patient least one missing observation.","code":"data_ice <- data_full %>% dplyr::arrange(dplyr::across(.cols = c(\"TMP_ID\", vars$visit))) %>% dplyr::filter(is.na(.data[[missing_var]])) %>% dplyr::group_by(TMP_ID) %>% dplyr::slice(1) %>% dplyr::ungroup() %>% dplyr::select(all_of(c(\"TMP_ID\", vars$visit))) %>% dplyr::mutate(strategy = \"MAR\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"draws","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Draws","title":"Introduction to tern.rbmi","text":"rbmi::draws() function fits imputation models stores corresponding parameter estimates Bayesian posterior parameter draws. three main inputs rbmi::draws() function : data - primary longitudinal data.frame containing outcome variable covariates. data_ice - data.frame specifies first visit affected intercurrent event (ICE) imputation strategy handling missing outcome data ICE. one ICE imputed non-MAR strategy allowed per subject. method - statistical method used fit imputation models create imputed datasets.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"define-key-variables","dir":"Articles","previous_headings":"Example of using tern.rbmi > Draws","what":"Define key variables","title":"Introduction to tern.rbmi","text":"Define names key variables dataset covariates included imputation model using rbmi::set_vars(). Note covariates argument can also include interaction terms. Define imputation method use, create samples imputation parameters running draws() function.","code":"debug_mode <- FALSE draws_vars <- rbmi::set_vars( outcome = missing_var, visit = vars$visit, group = vars$group, covariates = covariates$draws ) draws_vars$subjid <- \"TMP_ID\" draws_method <- method_bayes() draws_obj <- rbmi::draws( data = data_full, data_ice = data_ice, vars = draws_vars, method = draws_method ) #> #> SAMPLING FOR MODEL 'MMRM' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 0.000361 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.61 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 1200 [ 0%] (Warmup) #> Chain 1: Iteration: 120 / 1200 [ 10%] (Warmup) #> Chain 1: Iteration: 201 / 1200 [ 16%] (Sampling) #> Chain 1: Iteration: 320 / 1200 [ 26%] (Sampling) #> Chain 1: Iteration: 440 / 1200 [ 36%] (Sampling) #> Chain 1: Iteration: 560 / 1200 [ 46%] (Sampling) #> Chain 1: Iteration: 680 / 1200 [ 56%] (Sampling) #> Chain 1: Iteration: 800 / 1200 [ 66%] (Sampling) #> Chain 1: Iteration: 920 / 1200 [ 76%] (Sampling) #> Chain 1: Iteration: 1040 / 1200 [ 86%] (Sampling) #> Chain 1: Iteration: 1160 / 1200 [ 96%] (Sampling) #> Chain 1: Iteration: 1200 / 1200 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.52 seconds (Warm-up) #> Chain 1: 2.218 seconds (Sampling) #> Chain 1: 2.738 seconds (Total) #> Chain 1: #> Warning in fit_mcmc(designmat = model_df_scaled[, -1, drop = FALSE], outcome = model_df_scaled[, : The largest R-hat is 1.16, indicating chains have not mixed. #> Running the chains for more iterations may help. See #> https://mc-stan.org/misc/warnings.html#r-hat"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"impute","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Impute","title":"Introduction to tern.rbmi","text":"next step use parameters imputation model generate imputed datasets. done via rbmi::impute() function. function two key inputs: imputation model output rbmi::draws() reference groups relevant reference-based imputation methods. usage thus:","code":"impute_references <- c(\"DRUG\" = \"PLACEBO\", \"PLACEBO\" = \"PLACEBO\") impute_obj <- rbmi::impute( draws_obj, references = impute_references )"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"analyze","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Analyze","title":"Introduction to tern.rbmi","text":"next step run analysis model imputed dataset. done defining analysis function calling rbmi::analyse() apply function imputed dataset.","code":"# Define analysis model analyse_fun <- ancova ref_levels <- levels(impute_obj$data$group[[1]]) names(ref_levels) <- c(\"ref\", \"alt\") analyse_obj <- rbmi::analyse( imputations = impute_obj, fun = analyse_fun, vars = rbmi::set_vars( subjid = \"TMP_ID\", outcome = missing_var, visit = vars$visit, group = vars$group, covariates = covariates$analyse ) )"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"pool","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Pool","title":"Introduction to tern.rbmi","text":"rbmi::pool() function can used summarize analysis results across multiple imputed datasets provide overall statistic standard error, confidence intervals p-value hypothesis test null hypothesis effect equal 0.","code":"pool_obj <- rbmi::pool( results = analyse_obj, conf.level = 0.95, alternative = c(\"two.sided\", \"less\", \"greater\"), type = c(\"percentile\", \"normal\") )"},{"path":"https://insightsengineering.github.io/tern.rbmi/articles/tern-rbmi.html","id":"create-output","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Create output","title":"Introduction to tern.rbmi","text":"Finally create output rtables tern packages Final product, reshape rbmi final results nicely formatted rtable object.","code":"library(broom) df <- tidy(pool_obj) df #> group est se_est lower_cl_est upper_cl_est est_contr se_contr #> 1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA #> 2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279 #> 3 ref -4.251655 0.6496811 -5.534780 -2.9685296 NA NA #> 4 alt -2.809056 0.6324950 -4.058140 -1.5599722 1.44259881 0.9093545 #> 5 ref -6.440519 0.7279670 -7.880636 -5.0004032 NA NA #> 6 alt -4.194777 0.6890509 -5.556260 -2.8332948 2.24574209 1.0256389 #> 7 ref -7.682997 0.8037188 -9.274081 -6.0919124 NA NA #> 8 alt -4.868448 0.7615558 -6.374030 -3.3628674 2.81454841 1.1248318 #> lower_cl_contr upper_cl_contr p_value relative_reduc visit conf_level #> 1 NA NA NA NA 4 0.95 #> 2 -1.4394968 1.255884 0.89317724 0.05681725 4 0.95 #> 3 NA NA NA NA 5 0.95 #> 4 -0.3532555 3.238453 0.11461872 -0.33930289 5 0.95 #> 5 NA NA NA NA 6 0.95 #> 6 0.2164236 4.275061 0.03035798 -0.34868960 6 0.95 #> 7 NA NA NA NA 7 0.95 #> 8 0.5881156 5.040981 0.01364909 -0.36633471 7 0.95 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) #> Visit ref alt #> ————————————————————————————————————————————————————————————————————————— #> 4 #> Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) #> 95% CI (-2.576, -0.656) (-2.645, -0.770) #> Difference in Adjusted Means (SE) -0.092 (0.683) #> 95% CI (-1.439, 1.256) #> Relative Reduction (%) 5.7% #> p-value (RBMI) 0.8932 #> 5 #> Adjusted Mean (SE) -4.252 (0.650) -2.809 (0.632) #> 95% CI (-5.535, -2.969) (-4.058, -1.560) #> Difference in Adjusted Means (SE) 1.443 (0.909) #> 95% CI (-0.353, 3.238) #> Relative Reduction (%) -33.9% #> p-value (RBMI) 0.1146 #> 6 #> Adjusted Mean (SE) -6.441 (0.728) -4.195 (0.689) #> 95% CI (-7.881, -5.000) (-5.556, -2.833) #> Difference in Adjusted Means (SE) 2.246 (1.026) #> 95% CI (0.216, 4.275) #> Relative Reduction (%) -34.9% #> p-value (RBMI) 0.0304 #> 7 #> Adjusted Mean (SE) -7.683 (0.804) -4.868 (0.762) #> 95% CI (-9.274, -6.092) (-6.374, -3.363) #> Difference in Adjusted Means (SE) 2.815 (1.125) #> 95% CI (0.588, 5.041) #> Relative Reduction (%) -36.6% #> p-value (RBMI) 0.0136"},{"path":"https://insightsengineering.github.io/tern.rbmi/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Zhu. Author, maintainer. Jana Stoilova. Author. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhu J, Stoilova J (2024). tern.rbmi: Create Interface RBMI TERN. R package version 0.1.4, https://insightsengineering.github.io/tern.rbmi/, https://github.com/insightsengineering/tern.rbmi.","code":"@Manual{, title = {tern.rbmi: Create Interface for RBMI and TERN}, author = {Joe Zhu and Jana Stoilova}, year = {2024}, note = {R package version 0.1.4, https://insightsengineering.github.io/tern.rbmi/}, url = {https://github.com/insightsengineering/tern.rbmi}, }"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Create Interface for RBMI and TERN","text":"tern.rbmi provides interface Reference Based Multiple Imputation (rbmi) within tern framework.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/index.html","id":"background","dir":"","previous_headings":"","what":"Background","title":"Create Interface for RBMI and TERN","text":"details rbmi package, please see Reference Based Multiple Imputation (rbmi). basic usage rbmi core functions described quickstart vignette:","code":"vignette(topic = \"quickstart\", package = \"rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Create Interface for RBMI and TERN","text":"Alternatively, might want use development version.","code":"# install.packages(\"pak\") pak::pak(\"insightsengineering/tern.rbmi@*release\") # install.packages(\"pak\") pak::pak(\"insightsengineering/tern.rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Create Interface for RBMI and TERN","text":"understand use package, please refer Introduction tern.rbmi article, provides multiple examples code implementation.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/a_rbmi_lsmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"","code":"a_rbmi_lsmeans(df, .in_ref_col, show_relative = c(\"reduction\", \"increase\"))"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/a_rbmi_lsmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"df input dataframe .in_ref_col boolean variable, reference column specified show_relative \"reduction\" (control - treatment, default) \"increase\" (treatment - control) relative change baseline?","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/a_rbmi_lsmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"Formatted Analysis function","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/h_tidy_pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"","code":"h_tidy_pool(x)"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/h_tidy_pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"x (pool) list pooled object rbmi analysis results. list includes analysis results, confidence level, hypothesis testing type.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/h_tidy_pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"Data frame results pool single visit.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/h_tidy_pool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"","code":"data(\"rbmi_test_data\") pool_obj <- rbmi_test_data h_tidy_pool(pool_obj$pars[1:3]) #> group est se_est lower_cl_est upper_cl_est est_contr se_contr #> 1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA #> 2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279 #> lower_cl_contr upper_cl_contr p_value relative_reduc #> 1 NA NA NA NA #> 2 -1.439497 1.255884 0.8931772 0.05681725"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/rbmi_test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = ","text":"","code":"rbmi_test_data"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/rbmi_test_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = ","text":"object class pool length 5.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/s_rbmi_lsmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"","code":"s_rbmi_lsmeans(df, .in_ref_col, show_relative = c(\"reduction\", \"increase\"))"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/s_rbmi_lsmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"df input dataframe .in_ref_col boolean variable, reference column specified show_relative \"reduction\" (control - treatment, default) \"increase\" (treatment - control) relative change baseline?","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/s_rbmi_lsmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"list statistics extracted tidied LS means data frame.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/s_rbmi_lsmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"","code":"library(rtables) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following object is masked from ‘package:testthat’: #> #> matches #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union library(broom) data(\"rbmi_test_data\") pool_obj <- rbmi_test_data df <- tidy(pool_obj) s_rbmi_lsmeans(df[1, ], .in_ref_col = TRUE) #> $adj_mean_se #> [1] -1.6158200 0.4862316 #> #> $adj_mean_ci #> [1] -2.5757714 -0.6558685 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $diff_mean_se #> character(0) #> #> $diff_mean_ci #> character(0) #> attr(,\"label\") #> [1] \"95% CI\" #> #> $change #> character(0) #> attr(,\"label\") #> [1] \"Relative Reduction (%)\" #> #> $p_value #> character(0) #> s_rbmi_lsmeans(df[2, ], .in_ref_col = FALSE) #> $adj_mean_se #> [1] -1.7076264 0.4749573 #> #> $adj_mean_ci #> [1] -2.6453193 -0.7699335 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $diff_mean_se #> [1] -0.09180645 0.68262791 #> #> $diff_mean_ci #> [1] -1.439497 1.255884 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $change #> [1] 0.05681725 #> attr(,\"label\") #> [1] \"Relative Reduction (%)\" #> #> $p_value #> [1] 0.8931772 #>"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/summarize_rbmi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"","code":"summarize_rbmi( lyt, ..., table_names = \"rbmi_summary\", .stats = NULL, .formats = NULL, .indent_mods = NULL, .labels = NULL )"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/summarize_rbmi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"lyt (layout) input layout analyses added . ... additional argument. table_names (character) can customized case vars analyzed multiple times, avoid warnings rtables. .stats (character) statistics select table. .formats (named character list) formats statistics. .indent_mods (named integer) indent modifiers labels. .labels (named character) labels statistics (without indent).","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/summarize_rbmi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"rtables layout tabulating LS means estimates tidied rbmi pool results.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/summarize_rbmi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"","code":"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) #> Visit ref alt #> ————————————————————————————————————————————————————————————————————————— #> 4 #> Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) #> 95% CI (-2.576, -0.656) (-2.645, -0.770) #> Difference in Adjusted Means (SE) -0.092 (0.683) #> 95% CI (-1.439, 1.256) #> Relative Reduction (%) 5.7% #> p-value (RBMI) 0.8932 #> 5 #> Adjusted Mean (SE) -4.225 (0.656) -2.874 (0.648) #> 95% CI (-5.520, -2.930) (-4.154, -1.593) #> Difference in Adjusted Means (SE) 1.351 (0.922) #> 95% CI (-0.470, 3.172) #> Relative Reduction (%) -32.0% #> p-value (RBMI) 0.1447 #> 6 #> Adjusted Mean (SE) -6.381 (0.703) -4.159 (0.696) #> 95% CI (-7.771, -4.991) (-5.536, -2.782) #> Difference in Adjusted Means (SE) 2.222 (0.975) #> 95% CI (0.296, 4.149) #> Relative Reduction (%) -34.8% #> p-value (RBMI) 0.0241 #> 7 #> Adjusted Mean (SE) -7.580 (0.791) -4.760 (0.756) #> 95% CI (-9.145, -6.016) (-6.254, -3.267) #> Difference in Adjusted Means (SE) 2.820 (1.085) #> 95% CI (0.676, 4.964) #> Relative Reduction (%) -37.2% #> p-value (RBMI) 0.0103"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/tern.rbmi-package.html","id":null,"dir":"Reference","previous_headings":"","what":"tern.rbmi Package — tern.rbmi-package","title":"tern.rbmi Package — tern.rbmi-package","text":"tern.rbmi analysis package create tables, listings graphs analyze clinical trials data.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/tern.rbmi-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"tern.rbmi Package — tern.rbmi-package","text":"Maintainer: Joe Zhu joe.zhu@roche.com Authors: Jana Stoilova jana.stoilova@roche.com contributors: F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/tidy.pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"","code":"# S3 method for class 'pool' tidy(x, ...)"},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/tidy.pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"x (pool) list pooled object rbmi analysis results. list includes analysis results, confidence level, hypothesis testing type. ... Additional arguments. used. Needed match generic signature .","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/reference/tidy.pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"dataframe","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/news/index.html","id":"ternrbmi-014","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.4","title":"tern.rbmi 0.1.4","text":"CRAN release: 2024-11-26 CRAN release.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/news/index.html","id":"ternrbmi-013","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.3","title":"tern.rbmi 0.1.3","text":"Specified minimal version package dependencies. Corrected tidy.pool function signature","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/news/index.html","id":"ternrbmi-012","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.2","title":"tern.rbmi 0.1.2","text":"Add tests examples, coverage 100%!","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/news/index.html","id":"ternrbmi-011","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.1","title":"tern.rbmi 0.1.1","text":"Rephrased installation documentation. Updated contribution guidelines. Added tests tabulate_rbmi functions.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/news/index.html","id":"ternrbmi-010","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.0","title":"tern.rbmi 0.1.0","text":"Initialize package.","code":""}] +[{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"introduction-to-tern-rbmi","dir":"Articles","previous_headings":"","what":"Introduction to tern.rbmi","title":"Introduction to tern.rbmi","text":"vignette shows general purpose syntax tern.rbmi R package. tern.rbmi provides interface Reference Based Multiple Imputation (rbmi) within tern framework. details rbmi package, please see Reference Based Multiple Imputation (rbmi). basic usage rbmi core functions described quickstart vignette:","code":"vignette(topic = \"quickstart\", package = \"rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"example-of-using-tern-rbmi","dir":"Articles","previous_headings":"","what":"Example of using tern.rbmi","title":"Introduction to tern.rbmi","text":"rbmi package consists 4 core functions (plus several helper functions) typically called sequence: draws() - fits imputation models stores parameters impute() - creates multiple imputed datasets analyse() - analyses multiple imputed datasets pool() - combines analysis results across imputed datasets single statistic","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"the-data","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"The Data","title":"Introduction to tern.rbmi","text":"use publicly available example dataset antidepressant clinical trial active drug versus placebo. relevant endpoint Hamilton 17-item depression rating scale (HAMD17) assessed baseline weeks 1, 2, 4, 6. Study drug discontinuation occurred 24% subjects active drug 26% subjects placebo. data study drug discontinuation missing single additional intermittent missing observation.","code":"library(tern.rbmi) #> Loading required package: rbmi #> Loading required package: tern #> Loading required package: rtables #> Loading required package: formatters #> #> Attaching package: 'formatters' #> The following object is masked from 'package:base': #> #> %||% #> Loading required package: magrittr #> #> Attaching package: 'rtables' #> The following object is masked from 'package:utils': #> #> str #> Registered S3 method overwritten by 'tern': #> method from #> tidy.glm broom library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union data <- antidepressant_data levels(data$THERAPY) <- c(\"PLACEBO\", \"DRUG\") # This is important! The order defines the computation order later missing_var <- \"CHANGE\" vars <- list( id = \"PATIENT\", visit = \"VISIT\", expand_vars = c(\"BASVAL\", \"THERAPY\"), group = \"THERAPY\" ) covariates <- list( draws = c(\"BASVAL*VISIT\", \"THERAPY*VISIT\"), analyse = c(\"BASVAL\") ) data <- data %>% dplyr::select(PATIENT, THERAPY, VISIT, BASVAL, THERAPY, CHANGE) %>% dplyr::mutate(dplyr::across(.cols = vars$id, ~ as.factor(.x))) %>% dplyr::arrange(dplyr::across(.cols = c(vars$id, vars$visit))) # Use expand_locf to add rows corresponding to visits with missing outcomes to the dataset data_full <- do.call( expand_locf, args = list( data = data, vars = c(vars$expand_vars, vars$group), group = vars$id, order = c(vars$id, vars$visit) ) %>% append(lapply(data[c(vars$id, vars$visit)], levels)) ) data_full <- data_full %>% dplyr::group_by(dplyr::across(vars$id)) %>% dplyr::mutate(!!vars$group := Filter(Negate(is.na), .data[[vars$group]])[1]) # there are duplicates - use first value data_full <- data_full %>% dplyr::group_by(dplyr::across(c(vars$id, vars$group, vars$visit))) %>% dplyr::slice(1) %>% dplyr::ungroup() # need to have a single ID column data_full <- data_full %>% tidyr::unite(\"TMP_ID\", dplyr::all_of(vars$id), sep = \"_#_\", remove = FALSE) %>% dplyr::mutate(TMP_ID = as.factor(TMP_ID))"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"creating-intercurrent-event-data","dir":"Articles","previous_headings":"Example of using tern.rbmi > The Data","what":"Creating intercurrent event data","title":"Introduction to tern.rbmi","text":"Set imputation strategy MAR patient least one missing observation.","code":"data_ice <- data_full %>% dplyr::arrange(dplyr::across(.cols = c(\"TMP_ID\", vars$visit))) %>% dplyr::filter(is.na(.data[[missing_var]])) %>% dplyr::group_by(TMP_ID) %>% dplyr::slice(1) %>% dplyr::ungroup() %>% dplyr::select(all_of(c(\"TMP_ID\", vars$visit))) %>% dplyr::mutate(strategy = \"MAR\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"draws","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Draws","title":"Introduction to tern.rbmi","text":"rbmi::draws() function fits imputation models stores corresponding parameter estimates Bayesian posterior parameter draws. three main inputs rbmi::draws() function : data - primary longitudinal data.frame containing outcome variable covariates. data_ice - data.frame specifies first visit affected intercurrent event (ICE) imputation strategy handling missing outcome data ICE. one ICE imputed non-MAR strategy allowed per subject. method - statistical method used fit imputation models create imputed datasets.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"define-key-variables","dir":"Articles","previous_headings":"Example of using tern.rbmi > Draws","what":"Define key variables","title":"Introduction to tern.rbmi","text":"Define names key variables dataset covariates included imputation model using rbmi::set_vars(). Note covariates argument can also include interaction terms. Define imputation method use, create samples imputation parameters running draws() function.","code":"debug_mode <- FALSE draws_vars <- rbmi::set_vars( outcome = missing_var, visit = vars$visit, group = vars$group, covariates = covariates$draws ) draws_vars$subjid <- \"TMP_ID\" draws_method <- method_bayes() draws_obj <- rbmi::draws( data = data_full, data_ice = data_ice, vars = draws_vars, method = draws_method ) #> #> SAMPLING FOR MODEL 'MMRM' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 0.000361 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.61 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 1200 [ 0%] (Warmup) #> Chain 1: Iteration: 120 / 1200 [ 10%] (Warmup) #> Chain 1: Iteration: 201 / 1200 [ 16%] (Sampling) #> Chain 1: Iteration: 320 / 1200 [ 26%] (Sampling) #> Chain 1: Iteration: 440 / 1200 [ 36%] (Sampling) #> Chain 1: Iteration: 560 / 1200 [ 46%] (Sampling) #> Chain 1: Iteration: 680 / 1200 [ 56%] (Sampling) #> Chain 1: Iteration: 800 / 1200 [ 66%] (Sampling) #> Chain 1: Iteration: 920 / 1200 [ 76%] (Sampling) #> Chain 1: Iteration: 1040 / 1200 [ 86%] (Sampling) #> Chain 1: Iteration: 1160 / 1200 [ 96%] (Sampling) #> Chain 1: Iteration: 1200 / 1200 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.52 seconds (Warm-up) #> Chain 1: 2.218 seconds (Sampling) #> Chain 1: 2.738 seconds (Total) #> Chain 1: #> Warning in fit_mcmc(designmat = model_df_scaled[, -1, drop = FALSE], outcome = model_df_scaled[, : The largest R-hat is 1.16, indicating chains have not mixed. #> Running the chains for more iterations may help. See #> https://mc-stan.org/misc/warnings.html#r-hat"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"impute","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Impute","title":"Introduction to tern.rbmi","text":"next step use parameters imputation model generate imputed datasets. done via rbmi::impute() function. function two key inputs: imputation model output rbmi::draws() reference groups relevant reference-based imputation methods. usage thus:","code":"impute_references <- c(\"DRUG\" = \"PLACEBO\", \"PLACEBO\" = \"PLACEBO\") impute_obj <- rbmi::impute( draws_obj, references = impute_references )"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"analyze","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Analyze","title":"Introduction to tern.rbmi","text":"next step run analysis model imputed dataset. done defining analysis function calling rbmi::analyse() apply function imputed dataset.","code":"# Define analysis model analyse_fun <- ancova ref_levels <- levels(impute_obj$data$group[[1]]) names(ref_levels) <- c(\"ref\", \"alt\") analyse_obj <- rbmi::analyse( imputations = impute_obj, fun = analyse_fun, vars = rbmi::set_vars( subjid = \"TMP_ID\", outcome = missing_var, visit = vars$visit, group = vars$group, covariates = covariates$analyse ) )"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"pool","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Pool","title":"Introduction to tern.rbmi","text":"rbmi::pool() function can used summarize analysis results across multiple imputed datasets provide overall statistic standard error, confidence intervals p-value hypothesis test null hypothesis effect equal 0.","code":"pool_obj <- rbmi::pool( results = analyse_obj, conf.level = 0.95, alternative = c(\"two.sided\", \"less\", \"greater\"), type = c(\"percentile\", \"normal\") )"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/articles/tern-rbmi.html","id":"create-output","dir":"Articles","previous_headings":"Example of using tern.rbmi","what":"Create output","title":"Introduction to tern.rbmi","text":"Finally create output rtables tern packages Final product, reshape rbmi final results nicely formatted rtable object.","code":"library(broom) df <- tidy(pool_obj) df #> group est se_est lower_cl_est upper_cl_est est_contr se_contr #> 1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA #> 2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279 #> 3 ref -4.251655 0.6496811 -5.534780 -2.9685296 NA NA #> 4 alt -2.809056 0.6324950 -4.058140 -1.5599722 1.44259881 0.9093545 #> 5 ref -6.440519 0.7279670 -7.880636 -5.0004032 NA NA #> 6 alt -4.194777 0.6890509 -5.556260 -2.8332948 2.24574209 1.0256389 #> 7 ref -7.682997 0.8037188 -9.274081 -6.0919124 NA NA #> 8 alt -4.868448 0.7615558 -6.374030 -3.3628674 2.81454841 1.1248318 #> lower_cl_contr upper_cl_contr p_value relative_reduc visit conf_level #> 1 NA NA NA NA 4 0.95 #> 2 -1.4394968 1.255884 0.89317724 0.05681725 4 0.95 #> 3 NA NA NA NA 5 0.95 #> 4 -0.3532555 3.238453 0.11461872 -0.33930289 5 0.95 #> 5 NA NA NA NA 6 0.95 #> 6 0.2164236 4.275061 0.03035798 -0.34868960 6 0.95 #> 7 NA NA NA NA 7 0.95 #> 8 0.5881156 5.040981 0.01364909 -0.36633471 7 0.95 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) #> Visit ref alt #> ————————————————————————————————————————————————————————————————————————— #> 4 #> Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) #> 95% CI (-2.576, -0.656) (-2.645, -0.770) #> Difference in Adjusted Means (SE) -0.092 (0.683) #> 95% CI (-1.439, 1.256) #> Relative Reduction (%) 5.7% #> p-value (RBMI) 0.8932 #> 5 #> Adjusted Mean (SE) -4.252 (0.650) -2.809 (0.632) #> 95% CI (-5.535, -2.969) (-4.058, -1.560) #> Difference in Adjusted Means (SE) 1.443 (0.909) #> 95% CI (-0.353, 3.238) #> Relative Reduction (%) -33.9% #> p-value (RBMI) 0.1146 #> 6 #> Adjusted Mean (SE) -6.441 (0.728) -4.195 (0.689) #> 95% CI (-7.881, -5.000) (-5.556, -2.833) #> Difference in Adjusted Means (SE) 2.246 (1.026) #> 95% CI (0.216, 4.275) #> Relative Reduction (%) -34.9% #> p-value (RBMI) 0.0304 #> 7 #> Adjusted Mean (SE) -7.683 (0.804) -4.868 (0.762) #> 95% CI (-9.274, -6.092) (-6.374, -3.363) #> Difference in Adjusted Means (SE) 2.815 (1.125) #> 95% CI (0.588, 5.041) #> Relative Reduction (%) -36.6% #> p-value (RBMI) 0.0136"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Zhu. Author, maintainer. Jana Stoilova. Author. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhu J, Stoilova J (2024). tern.rbmi: Create Interface RBMI TERN. R package version 0.1.4, https://insightsengineering.github.io/tern.rbmi/main/, https://github.com/insightsengineering/tern.rbmi.","code":"@Manual{, title = {tern.rbmi: Create Interface for RBMI and TERN}, author = {Joe Zhu and Jana Stoilova}, year = {2024}, note = {R package version 0.1.4, https://insightsengineering.github.io/tern.rbmi/main/}, url = {https://github.com/insightsengineering/tern.rbmi}, }"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Create Interface for RBMI and TERN","text":"tern.rbmi provides interface Reference Based Multiple Imputation (rbmi) within tern framework.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/index.html","id":"background","dir":"","previous_headings":"","what":"Background","title":"Create Interface for RBMI and TERN","text":"details rbmi package, please see Reference Based Multiple Imputation (rbmi). basic usage rbmi core functions described quickstart vignette:","code":"vignette(topic = \"quickstart\", package = \"rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Create Interface for RBMI and TERN","text":"Alternatively, might want use development version.","code":"# install.packages(\"pak\") pak::pak(\"insightsengineering/tern.rbmi@*release\") # install.packages(\"pak\") pak::pak(\"insightsengineering/tern.rbmi\")"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Create Interface for RBMI and TERN","text":"understand use package, please refer Introduction tern.rbmi article, provides multiple examples code implementation.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/a_rbmi_lsmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"","code":"a_rbmi_lsmeans(df, .in_ref_col, show_relative = c(\"reduction\", \"increase\"))"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/a_rbmi_lsmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"df input dataframe .in_ref_col boolean variable, reference column specified show_relative \"reduction\" (control - treatment, default) \"increase\" (treatment - control) relative change baseline?","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/a_rbmi_lsmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Formatted Analysis function which can be further customized by calling rtables::make_afun() on it. It is used as afun in rtables::analyze(). — a_rbmi_lsmeans","text":"Formatted Analysis function","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/h_tidy_pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"","code":"h_tidy_pool(x)"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/h_tidy_pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"x (pool) list pooled object rbmi analysis results. list includes analysis results, confidence level, hypothesis testing type.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/h_tidy_pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"Data frame results pool single visit.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/h_tidy_pool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper function to produce data frame with results of pool for a single visit — h_tidy_pool","text":"","code":"data(\"rbmi_test_data\") pool_obj <- rbmi_test_data h_tidy_pool(pool_obj$pars[1:3]) #> group est se_est lower_cl_est upper_cl_est est_contr se_contr #> 1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA #> 2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279 #> lower_cl_contr upper_cl_contr p_value relative_reduc #> 1 NA NA NA NA #> 2 -1.439497 1.255884 0.8931772 0.05681725"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/rbmi_test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = ","text":"","code":"rbmi_test_data"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/rbmi_test_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example dataset for tern.rbmi package. This is an pool object from the rbmi analysis, see browseVignettes(package = ","text":"object class pool length 5.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/s_rbmi_lsmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"","code":"s_rbmi_lsmeans(df, .in_ref_col, show_relative = c(\"reduction\", \"increase\"))"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/s_rbmi_lsmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"df input dataframe .in_ref_col boolean variable, reference column specified show_relative \"reduction\" (control - treatment, default) \"increase\" (treatment - control) relative change baseline?","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/s_rbmi_lsmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"list statistics extracted tidied LS means data frame.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/s_rbmi_lsmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statistics function which is extracting estimates from a tidied LS means data frame. — s_rbmi_lsmeans","text":"","code":"library(rtables) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following object is masked from ‘package:testthat’: #> #> matches #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union library(broom) data(\"rbmi_test_data\") pool_obj <- rbmi_test_data df <- tidy(pool_obj) s_rbmi_lsmeans(df[1, ], .in_ref_col = TRUE) #> $adj_mean_se #> [1] -1.6158200 0.4862316 #> #> $adj_mean_ci #> [1] -2.5757714 -0.6558685 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $diff_mean_se #> character(0) #> #> $diff_mean_ci #> character(0) #> attr(,\"label\") #> [1] \"95% CI\" #> #> $change #> character(0) #> attr(,\"label\") #> [1] \"Relative Reduction (%)\" #> #> $p_value #> character(0) #> s_rbmi_lsmeans(df[2, ], .in_ref_col = FALSE) #> $adj_mean_se #> [1] -1.7076264 0.4749573 #> #> $adj_mean_ci #> [1] -2.6453193 -0.7699335 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $diff_mean_se #> [1] -0.09180645 0.68262791 #> #> $diff_mean_ci #> [1] -1.439497 1.255884 #> attr(,\"label\") #> [1] \"95% CI\" #> #> $change #> [1] 0.05681725 #> attr(,\"label\") #> [1] \"Relative Reduction (%)\" #> #> $p_value #> [1] 0.8931772 #>"},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/summarize_rbmi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"","code":"summarize_rbmi( lyt, ..., table_names = \"rbmi_summary\", .stats = NULL, .formats = NULL, .indent_mods = NULL, .labels = NULL )"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/summarize_rbmi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"lyt (layout) input layout analyses added . ... additional argument. table_names (character) can customized case vars analyzed multiple times, avoid warnings rtables. .stats (character) statistics select table. .formats (named character list) formats statistics. .indent_mods (named integer) indent modifiers labels. .labels (named character) labels statistics (without indent).","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/summarize_rbmi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"rtables layout tabulating LS means estimates tidied rbmi pool results.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/summarize_rbmi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Analyze function for tabulating LS means estimates from tidied rbmi pool results. — summarize_rbmi","text":"","code":"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) #> Visit ref alt #> ————————————————————————————————————————————————————————————————————————— #> 4 #> Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) #> 95% CI (-2.576, -0.656) (-2.645, -0.770) #> Difference in Adjusted Means (SE) -0.092 (0.683) #> 95% CI (-1.439, 1.256) #> Relative Reduction (%) 5.7% #> p-value (RBMI) 0.8932 #> 5 #> Adjusted Mean (SE) -4.225 (0.656) -2.874 (0.648) #> 95% CI (-5.520, -2.930) (-4.154, -1.593) #> Difference in Adjusted Means (SE) 1.351 (0.922) #> 95% CI (-0.470, 3.172) #> Relative Reduction (%) -32.0% #> p-value (RBMI) 0.1447 #> 6 #> Adjusted Mean (SE) -6.381 (0.703) -4.159 (0.696) #> 95% CI (-7.771, -4.991) (-5.536, -2.782) #> Difference in Adjusted Means (SE) 2.222 (0.975) #> 95% CI (0.296, 4.149) #> Relative Reduction (%) -34.8% #> p-value (RBMI) 0.0241 #> 7 #> Adjusted Mean (SE) -7.580 (0.791) -4.760 (0.756) #> 95% CI (-9.145, -6.016) (-6.254, -3.267) #> Difference in Adjusted Means (SE) 2.820 (1.085) #> 95% CI (0.676, 4.964) #> Relative Reduction (%) -37.2% #> p-value (RBMI) 0.0103"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/tern.rbmi-package.html","id":null,"dir":"Reference","previous_headings":"","what":"tern.rbmi Package — tern.rbmi-package","title":"tern.rbmi Package — tern.rbmi-package","text":"tern.rbmi analysis package create tables, listings graphs analyze clinical trials data.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/tern.rbmi-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"tern.rbmi Package — tern.rbmi-package","text":"Maintainer: Joe Zhu joe.zhu@roche.com Authors: Jana Stoilova jana.stoilova@roche.com contributors: F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/tidy.pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"","code":"# S3 method for class 'pool' tidy(x, ...)"},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/tidy.pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"x (pool) list pooled object rbmi analysis results. list includes analysis results, confidence level, hypothesis testing type. ... Additional arguments. used. Needed match generic signature .","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/reference/tidy.pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper method (for broom::tidy()) to prepare a data frame from an pool rbmi object containing the LS means and contrasts and multiple visits — tidy.pool","text":"dataframe","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/news/index.html","id":"ternrbmi-014","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.4","title":"tern.rbmi 0.1.4","text":"CRAN release: 2024-11-26 CRAN release.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/news/index.html","id":"ternrbmi-013","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.3","title":"tern.rbmi 0.1.3","text":"Specified minimal version package dependencies. Corrected tidy.pool function signature","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/news/index.html","id":"ternrbmi-012","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.2","title":"tern.rbmi 0.1.2","text":"Add tests examples, coverage 100%!","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/news/index.html","id":"ternrbmi-011","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.1","title":"tern.rbmi 0.1.1","text":"Rephrased installation documentation. Updated contribution guidelines. Added tests tabulate_rbmi functions.","code":""},{"path":"https://insightsengineering.github.io/tern.rbmi/main/news/index.html","id":"ternrbmi-010","dir":"Changelog","previous_headings":"","what":"tern.rbmi 0.1.0","title":"tern.rbmi 0.1.0","text":"Initialize package.","code":""}]