MDasycov: Asymptotic Variances/Covariance

Description Usage Arguments Details Value Note References See Also Examples

Description

Produce asymptotic variances/covariance with optional correction for attentuation and Fisher's z transformation.

Usage

1
2
3
  MDasycov(cor.mats, n.vect, outcome.var, reals = NULL,
    fishersz = FALSE, mvmeta.out = TRUE,
    biased.cor.mats = NULL, sep = "_x_")

Arguments

cor.mats

A list of correlation matrices. If unattenuated supply the list biased correlations to the biased.cor.mats argument. If biased optionally supply a dataframe of reliabilities to the reals argument.

n.vect

A vector of sample sizes corresponding to the studies in the list of cor.mats.

outcome.var

The name of the outcome variable the other measures correlate with.

reals

A matrix/data.frame of reliabilities. The column names must match the column/rownames of the correlation matrices exactly. (order does not matter).

fishersz

logical. If TRUE uses Fisher's z transformation.

mvmeta.out

logical. If TRUE outputs a list with the correlations and variances/covariances in a format that can be used by the mvmeta package.

biased.cor.mats

A list of biased correlation matrices supplied if unattentuated correlations are passed to the cor.mats argument.

sep

A character string to separate the variable names.

Details

Uses Olkin and Siotani's (1976) formulas:

Var(r_{ist})\approx \frac{(1-ρ_{ist}^{2})^2}{n_i}

Cov(r_{ist}, r_{iuv})= [.5ρ_{ist}ρ_{iuv}(ρ_{isu}^2 + ρ_{isv}^2 + ρ_{itu}^2 + ρ_{itv}^2) + ρ_{isu}ρ_{itv}+ ρ_{isv}ρ_{itu}-

(ρ_{ist}ρ_{isu}ρ_{isv} + ρ_{its}ρ_{itu}ρ_{itv}) + ρ_{ius}ρ_{iut}ρ_{iuv} + ρ_{ivs}ρ_{ivt}ρ_{ivu}]/n_i

Unattenuated Variances Formula (Borenstein, Hedges, Higgins & Rothstein, 2009):

V_{r}^u = \frac{Var(r_{ist})}{ρ/ρ^u}

Where:
ρ is the raw correlation
ρ^u is the unattenuated correlation

Fisher's z approach also requires:

Var(z_{ist})\approx \frac{1}{n_i - 3}

Cov(z_{ist}, z_{iuv})= \frac{σ_{ist,uv}}{(1-ρ_{ist}^2)(1-ρ_{iuv}^2)}

If a realibility is missing (NA) 1 will be used as a conservative estimate.

Value

Returns either a list of matrices of asymptotic covariances/variances of the correlation matrices or (if mvmeta.out is TRUE) a list of a matrix of correlations in the form selected (raw, unattenuated or Fishers z transformed) and matrix of variances/covariances with studies as rownames that can be passed to mvmeta from the mvmeta package.

Note

Reliability column names must match exactly(including case) the row/column names of the correlation matrices. If needed add a column of NAs.

References

Olkin, I., & Siotani, M. (1976) Asymptotic distribution of functions of a correlation matrix. In Essays in Probability and Statistics Chapter 16 (S. Ikeda, ed.) 235-251. Shinko Tsusho, Tokyo.

Borenstein, M., Hedges, L. V., Higgins, J. P. T., & Rothstein, H. R. (2009). Introduction to meta- analysis (1st ed.). West Sussex, UK: Wiley.

Becker, B. J. (2000). Multivariate meta-analysis. In H. A. Tinsley & S. Brown, (Eds.). Handbook of applied multivariate statistics and mathematical modeling. San Diego: Academic Press.

See Also

MDfishersz, MDunatten, mvmeta

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
#generating data sets
set.seed(10)
MAT <- function(n = 5) {
    x <- matrix(round(rnorm(n^2, 0, .3), 2), n)
    dimnames(x) <- list(LETTERS[1:n], LETTERS[1:n])
    diag(x) <-1
    x[upper.tri(x)] <- t(x)[upper.tri(x)]
    x
}
cor.mats1 <- lapply(1:5, function(i) MAT(4))
names(cor.mats1) <- paste0("study_", 1:length(cor.mats1))
cor.mats2 <- lapply(1:3, function(i) MAT())
names(cor.mats2) <- paste0("study_", 1:length(cor.mats2))
n1 <- sample(40:150, length(cor.mats1), TRUE)
n2 <- sample(40:150, length(cor.mats2), TRUE)
reliabilities <- matrix(round(rnorm(20, .7, .1), 2), ncol = 4)
dimnames(reliabilities) <- list(names(cor.mats1), LETTERS[1:4])

#Using MDasycov
MDasycov(cor.mats1, n1, outcome.var = "A", reals = reliabilities)
MDasycov(cor.mats1, n1, outcome.var = "D")
MDasycov(cor.mats1, n1, outcome.var = "C")
MDasycov(cor.mats2, n2, outcome.var = "B")
MDasycov(cor.mats2, n2, outcome.var = "E", mvmeta.out = FALSE)
MDasycov(cor.mats2, n2, outcome.var = "E", fishersz = TRUE)

#With the mvmeta package
## Not run: 
mvmDAT <- MDasycov(cor.mats1, n1, outcome.var = "A", reals = reliabilities)
library(mvmeta)
mvmeta(mvmDAT[[1]], mvmDAT[[2]])

## End(Not run)

trinker/metaDAT documentation built on May 31, 2019, 8:52 p.m.