Computes the mean and variance of marginal treatment effects for aggregate-level trial data.
Arguments
- strategy
A list containing the strategy details, including the family distribution.
- analysis_params
A list containing:
aldAggregate-level trial dataref_trtTreatment labels reference (common; e.g. placebo)ald_compTreatment labels comparatorscaleA scaling parameter for the calculation. From "log_odds", "risk_difference", "log_relative_risk".
Value
A list containing:
meanThe marginal treatment effect mean.
varThe marginal treatment effect variance.
Examples
strategy <- list(family = list(family = "binomial")) # basic version
ald <- data.frame(trt = c("B","C","B","C"),
variable = c(NA, NA, "y", "y"),
statistic = c("N", "N", "sum", "sum"),
value = c(100, 100, 50, 60))
calc_ALD_stats(strategy = strategy,
list(ald = ald,
ref_trt = "C",
ald_comp = "B",
scale = "log_odds"))
#> $mean
#> [1] -0.4054651
#>
#> $var
#> [1] 0.08166667
#>
