
Monte Carlo Computation of the Parameter \(\theta\) from Carlotti and Parast (2026)
Source:R/compute_theta.R
compute_theta.RdThis function implements a Monte Carlo approach to estimate the parameter \(\theta\) from Carlotti and Parast (2026) . This parameter represents the difference in treatment effects between the primary and surrogate outcomes, both measured using the probability that the treated outcome is larger than the control outcome.
Value
A list containing the true values:
V_Y: The Monte Carlo estimate of \(P(Y_{1i} > Y_{0i})\) computed onP.V_S: The Monte Carlo estimate of \(P(S_{1i} > S_{0i})\) computed onP.theta: The differenceV_Y-V_S.
Details
The function processes data from a chosen data generating process,
computing the sample probabilities for both the primary outcome \(Y\) and
the surrogate \(S\):
$$\hat{V}_Y = \frac{1}{n} \sum\limits^{n}_{i=1} I(Y_{1i} > Y_{0i}),$$
$$\hat{V}_S = \frac{1}{n} \sum\limits^{n}_{i=1} I(S_{1i} > S_{0i}).$$
Then, it calculates
$$\hat{\theta} = \hat{V}_Y - \hat{V}_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.