Description Usage Arguments Details Value Author(s) References Examples
The function r.vcov
computes variance-covariance matrix for multivariate meta-analysis when the effect size is measured by correlation coefficient.
1 |
n |
A N-dimensional vector containing sample sizes from N studies. |
corflat |
A N x p matrix or data frame storing p correlation coefficients from each of the N studies. |
zscore |
Whether the correlation coefficients in |
name |
A p-dimensional vector containing names for the p correlation coefficients. |
method |
Method |
na.impute |
Missing values can be imputed by a numeric value, such as zero by setting |
How to arrange correlation coefficients of each study from matrix to vector is in Cooper et al book page 385 to 386. Details for average method are in book of Cooper et al page 388. Let r_{ist} denote the sample correlation coefficient that describes the relationship between variables s and t in study i. We can calculate its variance as var({{r}_{ist}})={{(1-ρ_{ist}^{2})}^{2}}/{{n}_{i}}, and the covariance between two correlation coefficients is cov({{r}_{ist}},{{r}_{iuv}})=[.5{{ρ }_{ist}}{{ρ }_{iuv}}({{ρ }}_{isu}^{2}+{{ρ }}_{isv}^{2}+{{ρ }}_{itu}^{2}+{{ρ }}_{itv}^{2})+{{ρ }_{isu}}{{ρ }_{itv}}+{{ρ }_{isv}}{{ρ }_{itu}} \nonumber \\ -({{ρ }_{ist}}{{ρ }_{isu}}{{ρ }_{isv}}+{{ρ }_{its}}{{ρ }_{itu}}{{ρ }_{itv}}+{{ρ }_{ius}}{{ρ }_{iut}}{{ρ }_{iuv}}+{{ρ }_{ivs}}{{ρ }_{ivt}}{{ρ }_{ivu}})]/{{n}_{i}}, where ρ_{i..} represents the population value. In practice, ρ_{i..} can be substituted by the observed sample correlation or sample-size weighted mean correlation coefficients from all studies.
r |
A N x p data frame that contains the input argument |
list.rvcov |
A N-dimensional list of p(p+1)/2 x p(p+1)/2 matrices of computed variance-covariance matrices. |
matrix.rvcov |
A N x p(p+1)/2 matrix whose rows are computed variance-covariance vectors. |
ef |
A N x p data frame that contains Fisher's z transformed correlation coefficients from the input argument |
list.vcov |
A list in the same format of |
matrix.vcov |
A matrix |
Min Lu
Ahn, S., Lu, M., Lefevor, G.T., Fedewa, A. & Celimli, S. (2016). Application of meta-analysis in sport and exercise science. In N. Ntoumanis, & N. Myers (Eds.), An Introduction to Intermediate and Advanced Statistical Analyses for Sport and Exercise Scientists (pp.233-253). Hoboken, NJ: John Wiley and Sons, Ltd.
Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.) (2009). The handbook of research synthesis and meta-analysis. New York: Russell Sage Foundation.
Olkin, I., & Ishii, G. (1976). Asymptotic distribution of functions of a correlation matrix. In S. Ikeda (Ed.), Essays in probability and statistics: A volume in honor of Professor Junjiro Ogawa (pp.5-51). Tokyo, Japan: Shinko Tsusho.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ##############################################################
# A simple example:
# Checking the example in Harris Cooper et al.'s book page 388
##############################################################
r <- matrix(c(-0.074, -0.127, 0.324, 0.523, -0.416, -0.414), 1)
n <- 142
computvcov <- r.vcov(n = n, corflat = r,
name = paste("C", c("st", "su", "sv", "tu", "tv", "uv"), sep = ""),
method = "each")
round(computvcov$list.rvcov[[1]], 4)
round(computvcov$ef, 4)
round(computvcov$list.vcov[[1]], 4)
round(computvcov$matrix.vcov, 4)
######################################################
# Example: Craft2003 data
# Preparing covariances for multivariate meta-analysis
######################################################
data(Craft2003)
# extract correlation from the dataset (craft)
corflat <- subset(Craft2003, select=C1:C6)
# transform correlations to z and compute variance-covariance matrix.
computvcov <- r.vcov(n = Craft2003$N, corflat = corflat, method = "average")
# name transformed z scores as y
y <- computvcov$ef
# name variance-covariance matrix of trnasformed z scores as S
S <- computvcov$matrix.vcov
S[1, ]
## fixed-effect model
MMA_FE <- summary(metafixed(y = y, Slist = computvcov$list.vcov))
#######################################################################
# Running random-effects model using package "mvmeta" or "metaSEM"
#######################################################################
# Restricted maximum likelihood (REML) estimator from the mvmeta package
#library(mvmeta)
#mvmeta_RE <- summary(mvmeta(cbind(C1, C2, C3, C4, C5, C6),
# S = S, data = y, method = "reml"))
#mvmeta_RE
# maximum likelihood estimators from the metaSEM package
# library(metaSEM)
# metaSEM_RE <- summary(meta(y = y, v = S))
# metaSEM_RE
##############################################################
# Plotting the result:
##############################################################
obj <- MMA_FE
# obj <- mvmeta_RE
# obj <- metaSEM_RE
# pdf("CI.pdf", width = 4, height = 7)
plotCI(y = computvcov$ef, v = computvcov$list.vcov,
name.y = NULL, name.study = Craft2003$ID,
y.all = obj$coefficients[,1],
y.all.se = obj$coefficients[,2])
# dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.