Skip to contents

Computes the variance of treatment effects for a trial based on the specified family distribution.

Usage

calculate_trial_variance(ald, tid, effect, family)

Arguments

ald

Aggregate-level data.

tid

Treatment identifier used to extract relevant columns from ald.

effect

A character string specifying the effect scale (e.g., "log_odds", "risk_difference").

family

A character string specifying the model family (e.g., "binomial", "gaussian").

Value

The computed variance of treatment effects.

Examples

if (FALSE) { # \dontrun{
ald <- data.frame(y.B.sum = c(10), N.B = c(100))
calculate_trial_variance(ald, tid = "B", effect = "log_odds", family = "binomial")
} # }