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.
check_equivalence(typey, adseq, tbioq, k)
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.
An integer vector specifying the hierarchy of each endpoint, where 1
denotes a primary endpoint and 2
denotes a secondary endpoint.
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.
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.
An integer specifying the minimum number of endpoints required for overall equivalence.
Thomas Debray tdebray@fromdatatowisdom.com
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
.