This function checks if TAR (treatment allocation rate) is provided. If TAR is missing, it assigns a default equal allocation rate across all arms and ensures the TAR values correspond to the specified arm_names. It then converts TAR to a named list for further use. Informational messages are displayed if verbose is set to TRUE.

derive_allocation_rate(TAR = NULL, arm_names, verbose = FALSE)

Arguments

TAR

Optional numeric vector specifying the allocation rate for each treatment arm. If missing, a default equal allocation rate is assigned.

arm_names

Character vector specifying the names of the treatment arms. Used to name the elements of TAR.

verbose

Logical, if TRUE, displays messages about the status of TAR derivation or assignment.

Value

A list representing the treatment allocation rate for each arm.

Author

Thomas Debray tdebray@fromdatatowisdom.com