SLB_weight: Self-adapting mixture weight for longitudinal borrowing (SLB)

View source: R/SLB_weight.R

SLB_weightR Documentation

Self-adapting mixture weight for longitudinal borrowing (SLB)

Description

Given posterior samples of the concurrent control parameter (under a non-informative prior) and a historical point estimate, compute the SLB weight via a kernel-density posterior probability ratio:

R = \frac{\pi(\theta = \theta_h \mid \mathcal{D}_C)} {\max\{ \pi(\theta = \theta_h + \delta \mid \mathcal{D}_C), \pi(\theta = \theta_h - \delta \mid \mathcal{D}_C) \}}, \quad w = \frac{R}{1 + R}.

Usage

SLB_weight(theta_cc_np_samples, theta_h, delta)

Arguments

theta_cc_np_samples

numeric vector. Posterior draws of the concurrent control parameter under a non-informative prior.

theta_h

numeric scalar. Historical estimate.

delta

positive numeric. Clinically significant difference (CSD).

Value

numeric scalar in [0,1].

Examples

set.seed(1000)
# Suppose these are posterior theta samples from concurrent control (NP fit)
theta_cc_np_samples <- rnorm(2000, mean = -3.2, sd = 0.25)

# Historical estimate of theta and clinical delta
theta_h   <- -3.2
delta  <- 0.5

SLB_weight(theta_cc_np_samples, theta_h = theta_h, delta = delta)

BDIB documentation built on Oct. 18, 2026, 5:08 p.m.

Related to SLB_weight in BDIB...