[R-meta] clubSandwich: Computing covariance matrix for autoregressive effects

James Pustejovsky jepu@to @end|ng |rom gm@||@com
Sat May 1 15:37:44 CEST 2021


Hi Fred,

The matrices are NPD because you have studies where the same time-point is repeated across multiple rows. With the AR1 structure, this leads to perfect correlation between effect sizes that have the same time-point.

Currently, the AR1 structure implemented in impute_covariance_matrix() is designed only for data structures where the dependence arises from multiple time points, but not also from multiple outcomes. If you (or others on the listserv) have ideas for other structures that can accommodate multiple time points and multiple outcomes, I am open to implementing them in clubSandwich.

James


> On Apr 30, 2021, at 8:22 PM, Farzad Keyhan <f.keyhaniha using gmail.com> wrote:
> 
> Dear List Members,
> 
> I'm trying to form an autoregressive variance-covariance matrix for my
> studies using the clubSandwich package. But for most of my studies, the
> resultant matrices seem to be non-positive definite as suggested by the
> warning message. My reproducible R code is below.
> 
> Am I missing something?
> 
> Thank you all, Fred
> -------------
> library(clubSandwich)
> 
> dat = read.csv("https://raw.githubusercontent.com/ilzl/i/master/z.csv")
> 
> impute_covariance_matrix(vi = dat$vi, cluster = dat$studyID,
>                              ti = dat$time, ar1 = .7)
> 
> Warning message:
> In check_PD(vcov_list) :
>  The following clusters have non-positive definite covariance matrices:
> A1
> B1
> B2
> B3
> B4
> B6
> D1
> D2
> D3
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis



More information about the R-sig-meta-analysis mailing list