meta_varcov function

Variance-covariance and GGM meta analysis

Variance-covariance and GGM meta analysis

Meta analysis of correlation matrices to fit a homogenous correlation matrix or Gaussian graphical model. Based on meta-analytic SEM (Jak and Cheung, 2019).

meta_varcov(cors, nobs, Vmats, Vmethod = c("individual", "pooled", "metaSEM_individual", "metaSEM_weighted"), Vestimation = c("averaged", "per_study"), type = c("cor", "ggm"), sigma_y = "full", kappa_y = "full", omega_y = "full", lowertri_y = "full", delta_y = "full", rho_y = "full", SD_y = "full", randomEffects = c("chol", "cov", "prec", "ggm", "cor"), sigma_randomEffects = "full", kappa_randomEffects = "full", omega_randomEffects = "full", lowertri_randomEffects = "full", delta_randomEffects = "full", rho_randomEffects = "full", SD_randomEffects = "full", vars, baseline_saturated = TRUE, optimizer, estimator = c("FIML", "ML"), sampleStats, verbose = FALSE, bootstrap = FALSE, boot_sub, boot_resample) meta_ggm(...)

Arguments

  • cors: A list of correlation matrices. Must contain rows and columns with NAs for variables not included in a study.
  • nobs: A vector with the number of observations per study.
  • Vmats: Optional list with 'V' matrices (sampling error variance approximations).
  • Vmethod: Which method should be used to apprixomate the sampling error variance?
  • Vestimation: How should the sampling error estimates be evaluated?
  • type: What to model? Currently only "cor" and "ggm" are supported.
  • sigma_y: Only used when type = "cov". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • kappa_y: Only used when type = "prec". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • omega_y: Only used when type = "ggm". Either "full" to estimate every element freely, "zero" to set all elements to zero, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • lowertri_y: Only used when type = "chol". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • delta_y: Only used when type = "ggm". Either "diag" or "zero" (not recommended), or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • rho_y: Only used when type = "cor". Either "full" to estimate every element freely, "zero" to set all elements to zero, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • SD_y: Only used when type = "cor". Either "diag" or "zero", or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • randomEffects: What to model for the random effects?
  • sigma_randomEffects: Only used when type = "cov". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • kappa_randomEffects: Only used when randomEffects = "prec". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • omega_randomEffects: Only used when randomEffects = "ggm". Either "full" to estimate every element freely, "zero" to set all elements to zero, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • lowertri_randomEffects: Only used when randomEffects = "chol". Either "full" to estimate every element freely, "diag" to only include diagonal elements, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • delta_randomEffects: Only used when randomEffects = "ggm". Either "diag" or "zero", or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • rho_randomEffects: Only used when randomEffects = "cor". Either "full" to estimate every element freely, "zero" to set all elements to zero, or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • SD_randomEffects: Only used when randomEffects = "cor". Either "diag" or "zero", or a matrix of the dimensions node x node with 0 encoding a fixed to zero element, 1 encoding a free to estimate element, and higher integers encoding equality constrains. For multiple groups, this argument can be a list or array with each element/slice encoding such a matrix.
  • vars: Variables to be included.
  • baseline_saturated: A logical indicating if the baseline and saturated model should be included. Mostly used internally and NOT Recommended to be used manually.
  • optimizer: The optimizer to be used. Can be one of "nlminb" (the default R nlminb function), "ucminf" (from the optimr package), and C++ based optimizers "cpp_L-BFGS-B", "cpp_BFGS", "cpp_CG", "cpp_SANN", and "cpp_Nelder-Mead". The C++ optimizers are faster but slightly less stable. Defaults to "nlminb".
  • estimator: The estimator to be used. Currently implemented are "ML" for maximum likelihood estimation or "FIML" for full-information maximum likelihood estimation.
  • sampleStats: An optional sample statistics object. Mostly used internally.
  • verbose: Logical, should progress be printed to the console?
  • bootstrap: Should the data be bootstrapped? If TRUE the data are resampled and a bootstrap sample is created. These must be aggregated using aggregate_bootstraps! Can be TRUE or FALSE. Can also be "nonparametric" (which sets boot_sub = 1 and boot_resample = TRUE) or "case" (which sets boot_sub = 0.75 and boot_resample = FALSE).
  • boot_sub: Proportion of cases to be subsampled (round(boot_sub * N)).
  • boot_resample: Logical, should the bootstrap be with replacement (TRUE) or without replacement (FALSE)
  • ...: Arguments sent to meta_varcov

Returns

An object of the class psychonetrics (psychonetrics-class )

References

Jak, S., and Cheung, M. W. L. (2019). Meta-analytic structural equation modeling with moderating effects on SEM parameters. Psychological methods.

Author(s)

Sacha Epskamp mail@sachaepskamp.com

  • Maintainer: Sacha Epskamp
  • License: GPL-2
  • Last published: 2024-06-20