StandardMetaAnalysis: Standard meta-analysis

Description Usage Arguments Value References Examples

View source: R/StandardMetaAnalysis.R

Description

This function performs maximum likelihood estimation (MLE) of (θ, τ) for the standard random effects meta-analysis model,

y_i = θ + τ u_i + s_i ε_i,

where y_i is the reported treatment effect for the ith study, s_i is the reported standard error for the ith study, θ is the population treatment effect of interest, τ > 0 is a heterogeneity parameter, and u_i and ε_i are independent and distributed as N(0,1).

Usage

1
StandardMetaAnalysis(y, s, init = NULL, tol=1e-10, maxit=1000)

Arguments

y

An n \times 1 vector of reported treatment effects.

s

An n \times 1 vector of reported within-study standard errors.

init

Optional initialization values for (θ, τ). If specified, they must be provided in this order. If they are not provided, the program estimates initial values from the data.

tol

Convergence criterion for the optimization algorithm for finding the MLE. Default is tol=1e-10.

maxit

Maximum number of iterations for the optimization algorithm for finding the MLE. Default is maxit=1000.

Value

The function returns a list containing the following components:

theta.hat

MLE of θ.

tau.hat

MLE of τ.

H

2 \times 2 Hessian matrix for the estimates of (θ, τ). The square root of the diagonal entries of H can be used to estimate the standard errors for (θ, τ).

conv

"1" if the optimization algorithm converged, "0" if algorithm did not converge. If conv=0, then using H to estimate the standard errors may not be reliable.

References

Bai, R., Lin, L., Boland, M. R., and Chen, Y. (2020). "A robust Bayesian Copas selection model for quantifying and correcting publication bias." arXiv preprint arXiv:2005.02930.

Ning, J., Chen, Y., and Piao, J. (2017). "Maximum likelihood estimation and EM algorithm of Copas-like selection model for publication bias correction." Biostatistics, 18(3):495-504.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
############################################
# Example on the antidepressants data set. #
# This is from Section 6.2 of the paper by #
# Bai et al. (2020).                       #
############################################
# Load the full data
data(antidepressants)
attach(antidepressants)

# Extract the 50 published studies
published.data = antidepressants[which(antidepressants$Published==1),]
# Observed treatment effect
y.obs = published.data$Standardized_effect_size
# Observed standard error
s.obs = published.data$Standardized_SE

#################################
# Fit a standard meta-analysis  #
# that ignores publication bias #
#################################

# Set seed
set.seed(123)

SMA.mod = StandardMetaAnalysis(y=y.obs, s=s.obs)

# Point estimate for theta
SMA.theta.hat = SMA.mod$theta.hat
# Use Hessian to estimate standard error for theta
SMA.Hessian = SMA.mod$H
# Standard error estimate for theta
SMA.theta.se = sqrt(SMA.Hessian[1,1]) 
# 95 percent confidence interval 
SMA.interval = c(SMA.theta.hat-1.96*SMA.theta.se, SMA.theta.hat+1.96*SMA.theta.se)

# Display results
SMA.theta.hat
SMA.theta.se
SMA.interval

RobustBayesianCopas documentation built on Jan. 13, 2021, 12:50 p.m.