
Calculate Standardized Mean Difference (SMD) Between RCT and RWE Results
Source:R/smd_agreement.R
smd_agreement.RdThis function calculates the standardized mean difference (SMD) between results from a randomized controlled trial (RCT) and its real-world evidence (RWE) emulation. The SMD provides a measure of agreement between the two results, taking into account both the point estimates and their corresponding uncertainty.
Arguments
- rct_estimate
Numeric. Point estimate from the RCT (typically log hazard ratio or log odds ratio)
- rct_lower
Numeric. Lower bound of the confidence interval from RCT
- rct_upper
Numeric. Upper bound of the confidence interval from RCT
- rwe_estimate
Numeric. Point estimate from the RWE study
- rwe_lower
Numeric. Lower bound of the confidence interval from RWE
- rwe_upper
Numeric. Upper bound of the confidence interval from RWE
Value
Returns a numeric value representing the standardized mean difference. Larger absolute values indicate greater disagreement between RCT and RWE results.
Details
The SMD is calculated as the difference between RCT and RWE estimates, divided by the square root of the sum of their variances. Variances are derived from the confidence intervals assuming normal distribution (using 1.96 for 95
The formula used is: SMD = (theta_RCT - theta_RWE) / sqrt(Var(theta_RCT) + Var(theta_RWE))