[R-meta] Handling dependencies among multiple independent and dependent variables

Viechtbauer Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed Apr 4 00:03:11 CEST 2018


If you are trying to estimate an 'unstructured' var-cov matrix for 8 or 9 variables, then you are looking at 36 or 45 parameters. That is not a trivial optimization problem and could take a long time.

Depending on the model you are fitting, the V matrix itself does not have to be PD, as long as the marginal var-cov matrix is. But you are more likely to run into problems if V is not PD.

With respect to that error: In the 'devel' version, I did turn that error into a warning a while ago, so it will run, but the warning should be taken serious -- the results might not be trustworthy.

Best,
Wolfgang

-----Original Message-----
From: Jens Schüler [mailto:jens.schueler at wiwi.uni-kl.de] 
Sent: Tuesday, 03 April, 2018 23:42
To: Viechtbauer Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: AW: Handling dependencies among multiple independent and dependent variables

Hi Wolfgang,

I drew 9 variables of interest from 422 samples and 8 of these variables
will make it into the MASEM.
Some of these samples report "multiple measurements" on one or more of these
variables e.g. return on investment and return on assets for financial
performance - hence the question about the dependency handling.
However, the correlations are reported very inconsistently across these
samples, I have 2063 observations drawn from these samples and the V matrix
produced by rmat turned out to be non-positive definite.
For fun (self educational reasons) I used the nearPD function on it just to
test how things go but then the rma.mv function threw an error: Ratio of
largest to smallest sampling variance extremely large. Cannot obtain stable
results.

I guess the data I have is too thin/imperfect to properly account for
dependencies in such an advanced way.

Best
Jens

-----Ursprüngliche Nachricht-----
Von: Viechtbauer Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> 
Gesendet: Dienstag, 3. April 2018 23:04
An: Jens Schüler <jens.schueler at wiwi.uni-kl.de>;
r-sig-meta-analysis at r-project.org
Betreff: RE: Handling dependencies among multiple independent and dependent
variables

Glad you found that page -- I would have direct you there anyway.

How many parameters are you actually trying to estimate?

Best,
Wolfgang

-----Original Message-----
From: Jens Schüler [mailto:jens.schueler at wiwi.uni-kl.de]
Sent: Tuesday, 03 April, 2018 3:45
To: Viechtbauer Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: AW: Handling dependencies among multiple independent and dependent
variables

Nevermind, I just went through your info on speeding up model fitting: 
http://www.metafor-project.org/doku.php/tips:speeding_up_model_fitting

Even though I am using an AMD R5 processor with 6 physical cores, I decided
to give the MKL avenue a shot and well, it cranked the CPU usage up from
about 7% to 55% - hopefully this speeds things up.

Best
Jens

-----Ursprüngliche Nachricht-----
Von: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> Im
Auftrag von Jens Schüler
Gesendet: Montag, 2. April 2018 22:17
An: Viechtbauer Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl>;
r-sig-meta-analysis at r-project.org
Betreff: Re: [R-meta] Handling dependencies among multiple independent and
dependent variables

Hi Wolfgang,

after rearranging my coding sheet, the rmat function worked like a charm (of
course I screwed up here and there before I got it right).
However, currently I am wondering about the computational performance of
matrix calculations in R.

My data consists of ~ 1700 observations drawn from 422 samples and the
rma.mv function is currently up and running for over 5 hours.
I use the latest base version of R, together with R Studio, and have a
potent CPU in my desktop - of which R only uses about 7%.
Thus, are the calculations really that lengthy/tedious or is it more likely
that I still screwed something up?

Best
Jens



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