CopasLikeSelection {RobustBayesianCopas} | R Documentation |
Copas-like selection model
Description
This function performs maximum likelihood estimation (MLE) of using the EM algorithm of Ning et al. (2017) for the Copas selection model,
where is the reported treatment effect for the
th study,
is the reported standard error for the
th study,
is the population treatment effect of interest,
is a heterogeneity parameter, and
,
, and
are marginally distributed as
, and
and
are independent.
In the Copas selection model, is published (selected) if and only if the corresponding propensity score
(or the propensity to publish) is greater than zero. The propensity score
contains two parameters:
controls the overall probability of publication, and
controls how the chance of publication depends on study sample size. The reported treatment effects and propensity scores are correlated through
. If
, then there is no publication bias and the Copas selection model reduces to the standard random effects meta-analysis model.
This is called the "Copas-like selection model" because to find the MLE, the EM algorithm utilizes a latent variable that is treated as missing data. See Ning et al. (2017) for more details. An alternative funtion for implementing the Copas selection model using a grid search for
is available in the
R
package metasens
.
Usage
CopasLikeSelection(y, s, init = NULL, tol=1e-20, maxit=1000)
Arguments
y |
An |
s |
An |
init |
Optional initialization values for |
tol |
Convergence criterion for the Copas-like EM algorithm for finding the MLE. Default is |
maxit |
Maximum number of iterations for the Copas-like EM algorithm for finding the MLE. Default is |
Value
The function returns a list containing the following components:
theta.hat |
MLE of |
tau.hat |
MLE of |
rho.hat |
MLE of |
gamma0.hat |
MLE of |
gamma1.hat |
MLE of |
H |
|
conv |
"1" if the optimization algorithm converged, "0" if algorithm did not converge. If |
References
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
####################################
# Example on the Hackshaw data set #
####################################
data(Hackshaw1997)
attach(Hackshaw1997)
# Extract the log OR
y.obs = Hackshaw1997[,2]
# Extract the observed standard error
s.obs = Hackshaw1997[,3]
##################################
# Fit Copas-like selection model #
##################################
# First fit RBC model with normal errors
RBC.mod = RobustBayesianCopas(y=y.obs, s=s.obs, re.dist="normal", seed=123, burn=500, nmc=500)
# Fit CLS model with initial values given from RBC model fit.
# Initialization is not necessary but the algorithm will converge faster with initialization.
CLS.mod = CopasLikeSelection(y=y.obs, s=s.obs, init=c(RBC.mod$theta.hat, RBC.mod$tau.hat,
RBC.mod$rho.hat, RBC.mod$gamma0.hat,
RBC.mod$gamma1.hat))
# Point estimate for theta
CLS.theta.hat = CLS.mod$theta.hat
# Use Hessian to estimate standard error for theta
CLS.Hessian = CLS.mod$H
# Standard error estimate for theta
CLS.theta.se = sqrt(CLS.Hessian[1,1]) #
# 95 percent confidence interval
CLS.interval = c(CLS.theta.hat-1.96*CLS.theta.se, CLS.theta.hat+1.96*CLS.theta.se)
# Display results
CLS.theta.hat
CLS.theta.se
CLS.interval
# Other parameters controlling the publication bias
CLS.mod$rho.hat
CLS.mod$gamma0.hat
CLS.mod$gamma1.hat