Skip to contents

Compute summaries from network meta-analysis resampling replications

Usage

compute_network_alt_stats(
  object,
  type = NULL,
  quantiles = c(0.025, 0.5, 0.975),
  level = 0.95,
  original_fit = NULL
)

# S3 method for class 'nma_resamples'
summary(
  object,
  type = NULL,
  quantiles = c(0.025, 0.5, 0.975),
  level = 0.95,
  digits = 4,
  ...
)

# S3 method for class 'nma_boot'
summary(object, digits = 4, ...)

# S3 method for class 'nma_boot'
print(
  x,
  ...,
  digits = if (is.null(attr(x, "display_digits"))) 4 else attr(x, "display_digits")
)

Arguments

object

A list of fitted "nma_mars" objects from network bootstrap, jackknife, or permutation replications.

type

Type of alternative estimation summary to compute.

quantiles

Quantiles for distribution summaries.

level

Coverage for bootstrap percentile CIs, jackknife model-fit CIs, and descriptive jackknife ranges.

original_fit

Optional original full-data network fit.

digits

Decimal places for network resampling output, from 1 to 22.

...

Additional arguments passed to compute_network_alt_stats().

x

A computed network resampling summary.

Value

An "nma_boot" object containing replicate estimates, quantiles, bootstrap uncertainty or jackknife sensitivity summaries, and a separate moderator_summary table when moderators are fitted.

Details

Summaries retain treatment, outcome, and time identities. Full-data reference selection is retained by replicate wrappers. Fits losing treatments are recorded as failed rather than changing the estimand. Moderator coefficients retain their treatment, moderator, outcome, and time coordinates across fits. Bootstrap boot_repl contains the empirical draws; quantiles gives their percentiles and bootstrap_se is their sample standard deviation. Bootstrap SEs and CIs require at least two finite draws and an 80 percent per-quantity success rate. Jackknife summaries describe changes from the original fit, omission minima/maxima, and maximum absolute changes. jackknife_comparisons retains each omitted fit's estimates, SEs, CIs, and signed changes from full-data inference. jackknife_uncertainty summarizes SE ranges and maximum changes in SEs and confidence limits. These use the inference from each fitted model, including its degrees of freedom, without computing another SE from the omission distribution. omission_changes retains signed changes indexed by omitted study. Inspect complete and n_valid for incomplete omissions; the reported ranges describe available fits only.

Examples

# \donttest{
nma_dat <- data.frame(
  study = c("S1", "S2", "S3", "S4"),
  treatment_1 = c("A", "A", "B", "A"),
  treatment_2 = c("B", "C", "C", "B"),
  effect = c(0.20, 0.35, 0.10, 0.15),
  variance = c(0.04, 0.05, 0.04, 0.06)
)

nma_reps <- replicate_network_bootstrap(
  number_bootstraps = 2,
  data = nma_dat,
  study_id = "study",
  treatment_1 = "treatment_1",
  treatment_2 = "treatment_2",
  effect = "effect",
  variance = "variance",
  model_type = "wls"
)
compute_network_alt_stats(nma_reps)
#> Network meta-analysis alternative estimation
#> 
#> Robust Method:
#> Bootstrap 
#> 
#> Replications:
#> Successful: 2 
#> Failed: 0 
#> 
#> Comparison Effects:
#>  effect_type treatment_1 treatment_2 outcome time point_estimate ci_lower
#>       direct           A           B    <NA> <NA>         0.1800   0.1507
#>     indirect           A           B    <NA> <NA>         0.2500   0.2500
#>        total           A           B    <NA> <NA>         0.1947   0.1755
#>       direct           A           C    <NA> <NA>         0.3500   0.3500
#>     indirect           A           C    <NA> <NA>         0.2800   0.2507
#>        total           A           C    <NA> <NA>         0.3193   0.3086
#>       direct           B           C    <NA> <NA>         0.1000   0.1000
#>     indirect           B           C    <NA> <NA>         0.1700   0.1707
#>        total           B           C    <NA> <NA>         0.1246   0.1248
#>  ci_upper bootstrap_se resample_median n_valid sufficient
#>    0.1792       0.0212          0.1650  2.0000       TRUE
#>    0.2500       0.0000          0.2500  2.0000       TRUE
#>    0.1942       0.0140          0.1849  2.0000       TRUE
#>    0.3500       0.0000          0.3500  2.0000       TRUE
#>    0.2793       0.0212          0.2650  2.0000       TRUE
#>    0.3190       0.0078          0.3138  2.0000       TRUE
#>    0.1000       0.0000          0.1000  2.0000       TRUE
#>    0.1992       0.0212          0.1850  2.0000       TRUE
#>    0.1331       0.0062          0.1289  2.0000       TRUE
# }