
Monte Carlo Computation of the Parameter \(\delta\) from Parast et al. (2024)
Source:R/compute_delta.R
compute_delta.RdThis function implements a Monte Carlo approach to estimate the parameter \(\delta\) from Parast et al. (2024) . This parameter represents the difference in treatment effects between the primary and surrogate outcomes, both measured using the Mann-Whitney statistic.
Value
A list containing:
U_Y: Mann-Whitney U statistic for the primary outcome Y computed onP_observed.U_S: Mann-Whitney U statistic for the surrogate S computed onP_observed.delta: The differenceU_Y-U_S.
Details
The function processes data from a chosen data generating process,
computing the Mann-Whitney U statistic for both the primary outcome \(Y\)
and the surrogate \(S\):
$$\hat{U}_Y = \frac{1}{n_1 n_0} \sum\limits_{i:Z_i=1} \sum\limits_{j:Z_j=0} I(Y_i > Y_j),$$
$$\hat{U}_S = \frac{1}{n_1 n_0} \sum\limits_{i:Z_i=1} \sum\limits_{j:Z_j=0} I(S_i > S_j).$$
Then, it calculates
$$\hat{\delta} = \hat{U}_Y - \hat{U}_S.$$
This function is generally not intended to be called directly by the user
and is instead used internally within BSET_no_X and BSET_X.