| drmeta_bootstrap_gamma | R Documentation |
Tests H0: gamma = 0 against H1: gamma > 0. The null lies on the boundary of the constrained parameter space, so the likelihood-ratio statistic does not have an asymptotic chi-square distribution and a parametric bootstrap is used instead. Data are simulated from the fitted null model, in which between-study heterogeneity is constant in the design-robustness index.
drmeta_bootstrap_gamma(
object,
B = 999,
seed = NULL,
parallel = FALSE,
ncpus = 2L,
tol = 1e-08
)
object |
A constrained drmeta fit. |
B |
Number of bootstrap samples. |
seed |
Optional random seed. |
parallel |
Logical; use mclapply on non-Windows platforms. |
ncpus |
Number of cores when parallel is TRUE. |
tol |
Tolerance below which the observed likelihood-ratio statistic is treated as exactly zero. |
Replicates in which either refit fails to converge are discarded rather than contributing a statistic computed at a non-optimal point. The p-value uses the number of usable replicates as its denominator, and the discarded count is returned so the loss is visible.
When the constrained estimate is already at the boundary, the null and
alternative fits coincide and the observed statistic is zero by
construction. Bootstrapping in that situation would compare zero against
a simulated distribution with a large point mass at zero, and would return
a p-value that looks like evidence but only records the proportion of
replicates that also reached the boundary. The function therefore
short-circuits, returns p.value = 1 with boundary = TRUE,
and runs no replicates. A boundary estimate means the data provide no
support for a positive scale gradient; it is not a measured degree of
evidence. Fit with constrained = FALSE to see whether the
unrestricted gradient is negative, which would contradict the substantive
constraint rather than merely fail to support it.
When parallel = TRUE, reproducibility across cores requires the
L'Ecuyer-CMRG generator, which this function sets and restores when a
seed is supplied.
An object of class drmeta_bootstrap_gamma, a list with components
statistic (observed likelihood-ratio statistic), p.value,
B (requested replicates), B_used (replicates in which both
refits converged), n_failed (replicates discarded),
simulated (the simulated statistics, with NA for failed
replicates), null (the fitted null model), alternative
(the supplied fit), and boundary, a logical flag that is TRUE when
the constrained estimate already lies at gamma = 0 and no bootstrap was
run.
path <- system.file("extdata", "bcg_design_robustness.csv", package = "drmeta")
bcg <- utils::read.csv(path)
fit <- drmeta(yi = bcg[["yi"]], vi = bcg[["vi"]], dr = bcg[["dr"]])
drmeta_bootstrap_gamma(fit, B = 100, seed = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.