bnma
Bayesian random-effects network meta-analysis using the gemtc R package with JAGS (normal likelihood, identity link, 4 chains, 100,000 iterations after 5,000 adaptation steps, thinning of 10).
Parameters
df: Data frame with columnsstudy(chr),treatment(chr),mean(num),std.dev(num),sampleSize(int).greater_is_better: Logical. IfTRUE, higher values rank better (e.g. accuracy). IfFALSE, lower values rank better (e.g. error rate).
Return value
A named list with:
ranking: Named numeric vector of SUCRA scores (0–1, higher = better rank).league: Named list with matricesmd,lower,upper(posterior median and 95% credible interval bounds). Each is a treatment × treatment matrix.heterogeneity: Named list withsd,sd_lower,sd_upper(posterior median and 2.5th–97.5th percentile of the between-study standard deviation).convergence: Named list withrhat_max,ess_bulk_min,ess_tail_minacross all model parameters.