check_equivalence: Check Equivalence for Multiple Endpoints

View source: R/RcppExports.R

check_equivalenceR Documentation

Check Equivalence for Multiple Endpoints

Description

This function evaluates whether equivalence criteria are met based on a predefined set of endpoints. It first checks whether all primary endpoints satisfy equivalence (if sequential testing is enabled). Then, it determines whether the required number of endpoints (k) meet the equivalence threshold. The function returns a binary decision indicating whether overall equivalence is established.

Usage

check_equivalence(typey, adseq, tbioq, k)

Arguments

typey

An integer vector specifying the hierarchy of each endpoint, where 1 denotes a primary endpoint and 2 denotes a secondary endpoint.

adseq

A boolean flag indicating whether sequential testing is enabled. If set to TRUE, all primary endpoints must pass equivalence before secondary endpoints are evaluated. If set to FALSE, primary and secondary endpoints are assessed independently.

tbioq

A matrix containing the equivalence test results for each endpoint, where 1 indicates that equivalence is met and 0 indicates that equivalence is not met.

k

An integer specifying the minimum number of endpoints required for overall equivalence.

Details

When sequential testing is enabled (adseq = TRUE), all primary endpoints must meet equivalence before secondary endpoints are considered. If sequential testing is disabled (adseq = FALSE), all endpoints are evaluated simultaneously without hierarchical constraints. The function then determines whether at least k endpoints meet the equivalence criteria. If the conditions are satisfied, the final equivalence decision (totaly) is 1; otherwise, it is 0.

Value

Returns a (1 × 1 matrix) containing a binary equivalence decision. A value of 1 indicates that equivalence is established, while 0 indicates that equivalence is not established.

Author(s)

Thomas Debray tdebray@fromdatatowisdom.com


SimTOST documentation built on April 3, 2025, 9:05 p.m.