| Title: | Almost-Exact Inference for the DerSimonian-Laird Test Statistic |
|---|---|
| Description: | Implements almost-exact inference for the DerSimonian-Laird test statistic in the normal-normal random-effects meta-analysis model, as described in Hanada and Sugimoto (2023) <doi:10.1007/s10463-022-00844-4>. The method approximates the distribution of the DerSimonian-Laird test statistic by combining the distribution of the untruncated DerSimonian-Laird estimator of the between-study variance with a conditional normal approximation. Methods based on a plug-in between-study variance and a corrected heterogeneity measure are provided. |
| Authors: | Keisuke Hanada [aut, cre] (ORCID: <https://orcid.org/0000-0002-1444-0280>) |
| Maintainer: | Keisuke Hanada <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-28 11:43:29 UTC |
| Source: | https://github.com/cran/aedl |
aedl() computes a DerSimonian-Laird point estimate and performs
almost-exact inference for the DerSimonian-Laird test statistic in the
normal-normal random-effects meta-analysis model.
aedl( yi, vi, alpha = 0.05, method = c("plugin", "i2c"), side = 2, a = 0, b = 1, t_grid = seq(-20, 20, by = 0.01), nsim = 10000, nsim_chi = 1e+05, n_tau = 1000, I2_grid = seq(0, 0.99, by = 0.01), normalize_cdf = TRUE, seed = NULL, ... )aedl( yi, vi, alpha = 0.05, method = c("plugin", "i2c"), side = 2, a = 0, b = 1, t_grid = seq(-20, 20, by = 0.01), nsim = 10000, nsim_chi = 1e+05, n_tau = 1000, I2_grid = seq(0, 0.99, by = 0.01), normalize_cdf = TRUE, seed = NULL, ... )
yi |
Numeric vector of study-level effect estimates. |
vi |
Numeric vector of known within-study variances. |
alpha |
Significance level. The confidence level is |
method |
Method used to choose the heterogeneity value for constructing
the almost-exact distribution. |
side |
Test side, either |
a, b
|
Lower and upper bounds of the uniform prior on |
t_grid |
Grid for the DerSimonian-Laird test statistic. |
nsim |
Number of Monte Carlo samples for conditional quantities. |
nsim_chi |
Number of Monte Carlo samples for the chi-square mixture. |
n_tau |
Number of grid intervals for the untruncated DL estimator. |
I2_grid |
Grid for |
normalize_cdf |
Logical; if |
seed |
Optional random seed. If supplied, it is set for this call. |
... |
Reserved for future extensions. |
For method = "plugin", the distribution of the DL test statistic is
constructed using as the value of .
For method = "i2c", the implementation evaluates
on I2_grid by taking the row of
the simulated conditional distribution corresponding to the observed
. It then computes under a uniform prior on
[a, b] and uses the corresponding to construct the
almost-exact distribution.
The numerical implementation is a streamlined version of the computational procedure shown in the supplemental material of Hanada and Sugimoto (2023). It has been checked against the original supplemental program in development scripts.
An object of class "aedl" with elements estimate, se,
ci.lb, ci.ub, pval, tau2, tau2_for_dist, I2hat, I2c,
tau2c, crit, method, and call.
yi <- c(0.10, 0.25, 0.05, 0.30) vi <- c(0.04, 0.05, 0.03, 0.06) res <- aedl( yi, vi, t_grid = seq(-6, 6, by = 0.2), nsim = 100, nsim_chi = 500, n_tau = 50, seed = 1 ) res confint(res)yi <- c(0.10, 0.25, 0.05, 0.30) vi <- c(0.04, 0.05, 0.03, 0.06) res <- aedl( yi, vi, t_grid = seq(-6, 6, by = 0.2), nsim = 100, nsim_chi = 500, n_tau = 50, seed = 1 ) res confint(res)
aedl_stat_density() evaluates the almost-exact density approximation of
the DerSimonian-Laird test statistic on a user-supplied grid.
aedl_stat_density( t_grid, vi, tau2, theta = 0, nsim = 10000, nsim_chi = 1e+05, n_tau = 1000 )aedl_stat_density( t_grid, vi, tau2, theta = 0, nsim = 10000, nsim_chi = 1e+05, n_tau = 1000 )
t_grid |
Numeric grid for the DerSimonian-Laird test statistic. |
vi |
Numeric vector of known within-study variances. |
tau2 |
Non-negative value of the between-study variance. |
theta |
Mean parameter used in the conditional normal approximation. |
nsim |
Number of Monte Carlo samples for conditional quantities. |
nsim_chi |
Number of Monte Carlo samples for the chi-square mixture. |
n_tau |
Number of grid intervals for the untruncated DL estimator. |
A list with grid values x, density values y, and auxiliary
quantities used in the approximation.
vi <- c(0.04, 0.05, 0.03, 0.06) d_stat <- aedl_stat_density( t_grid = seq(-4, 4, by = 0.5), vi = vi, tau2 = 0.01, nsim = 100, nsim_chi = 500, n_tau = 50 ) str(d_stat[c("x", "y")])vi <- c(0.04, 0.05, 0.03, 0.06) d_stat <- aedl_stat_density( t_grid = seq(-4, 4, by = 0.5), vi = vi, tau2 = 0.01, nsim = 100, nsim_chi = 500, n_tau = 50 ) str(d_stat[c("x", "y")])
aedl_tau2_density() evaluates the chi-square-mixture approximation used
internally for the untruncated DerSimonian-Laird estimator of the
between-study variance.
aedl_tau2_density(vi, tau2, nsim_chi = 1e+05, n_tau = 1000)aedl_tau2_density(vi, tau2, nsim_chi = 1e+05, n_tau = 1000)
vi |
Numeric vector of known within-study variances. |
tau2 |
Non-negative value of the between-study variance. |
nsim_chi |
Number of Monte Carlo samples for the chi-square mixture. |
n_tau |
Number of grid intervals for the untruncated DL estimator. |
A list with grid values x, density values y, and auxiliary
quantities used in the approximation.
vi <- c(0.04, 0.05, 0.03, 0.06) d_tau <- aedl_tau2_density( vi = vi, tau2 = 0.01, nsim_chi = 500, n_tau = 50 ) str(d_tau[c("x", "y")])vi <- c(0.04, 0.05, 0.03, 0.06) d_tau <- aedl_tau2_density( vi = vi, tau2 = 0.01, nsim_chi = 500, n_tau = 50 ) str(d_tau[c("x", "y")])
Confidence interval for an aedl object
## S3 method for class 'aedl' confint(object, parm = NULL, level = NULL, ...)## S3 method for class 'aedl' confint(object, parm = NULL, level = NULL, ...)
object |
An object of class |
parm |
Unused; included for S3 compatibility. |
level |
Confidence level. Currently must match the level used when
fitting |
... |
Unused. |
A two-column matrix with confidence limits.
Print an aedl object
## S3 method for class 'aedl' print(x, digits = max(3, getOption("digits") - 3), ...)## S3 method for class 'aedl' print(x, digits = max(3, getOption("digits") - 3), ...)
x |
An object of class |
digits |
Number of significant digits to print. |
... |
Unused. |
Invisibly returns x, the input object of class "aedl".