
Bootstrap network meta-analysis
bootstrap_network_meta.RdPerforms one study-level bootstrap resample and refits network_meta.
All rows from sampled studies are retained together. When a study is sampled
more than once, copied study IDs are relabeled so the replicated blocks are
treated as independent bootstrap studies.
Usage
bootstrap_network_meta(
data,
study_id,
treatment_1,
treatment_2,
effect,
variance,
on_error = c("warn", "stop", "keep"),
...
)Arguments
- data
A contrast-level network meta-analysis data frame.
- study_id
Character string naming the study ID column.
- treatment_1
Character string naming the first treatment column.
- treatment_2
Character string naming the second treatment column.
- effect
Character string naming the effect-size column.
- variance
Character string naming the sampling-variance column.
- on_error
How fitting errors should be handled.
"warn"returns an error object with a warning,"keep"returns the error object silently, and"stop"throws the fitting error.- ...
Additional arguments passed to
network_meta.
Value
A fitted "nma_mars" object, or an "nma_resample_error"
object when on_error is "warn" or "keep" and fitting
fails.
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)
)
boot_fit <- bootstrap_network_meta(
data = nma_dat,
study_id = "study",
treatment_1 = "treatment_1",
treatment_2 = "treatment_2",
effect = "effect",
variance = "variance",
model_type = "wls"
)
# }