Dear Wolfgang, In the latest version of metafor, I realized there are a couple of new functions specifically made for correlations (that's awesome!). I understand the use of rclac() which provides the V for rma.mv(). But I'm a bit unclear why we get the vcov() from the rma.mv() fit and then input it to matreg(). My questions are: 1- What role does matreg() play and why not just using rma.mv()? 3- What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()? 3- Is rtoz =TRUE necessary in this workflow? Thank you, Stefanou
[R-meta] metafor::matreg() and its workflow
15 messages · Stefanou Revesz, Wolfgang Viechtbauer
Dear Stefanou, See below for my responses. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Sunday, 05 December, 2021 3:55 To: R meta; Viechtbauer, Wolfgang (SP) Subject: metafor::matreg() and its workflow Dear Wolfgang, In the latest version of metafor, I realized there are a couple of new functions specifically made for correlations (that's awesome!). I understand the use of rclac() which provides the V for rma.mv(). But I'm a bit unclear why we get the vcov() from the rma.mv() fit and then input it to matreg(). My questions are: 1- What role does matreg() play and why not just using rma.mv()?
matreg() is for fitting regression models based on variance-covariance and correlation matrices. Such a matrix can be obtained by conducting a meta-analysis (e.g., using rma.mv()). This all takes us into methodology that is sometimes described as MASEM (meta-analytic structural equation modeling). Maybe start with this chapter: Becker, B. J., & Aloe, A. (2019). Model-based meta-analysis and related approaches. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta-analysis (3rd ed., pp. 339-363). New York: Russell Sage Foundation. to go along with: https://wviechtb.github.io/metafor/reference/matreg.html and https://wviechtb.github.io/meta_analysis_books/cooper2019.html#16)_Model-Based_Meta-Analysis_and_Related_Approaches
3- What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()?
I can't really answer this question without further details. But I would suggest to first read up on the methdology itself.
3- Is rtoz =TRUE necessary in this workflow?
I assume you mean argument 'ztor' in matreg(). Whether to use this depends on whether you have a matrix of r-to-z transformed correlation coefficients or a matrix of raw correlation coefficients. Whether one should or should not use transformed correlations in a meta-analysis that could yield such a matrix is a lengthy and endless debate, so I am not going to touch on "necessary" without a ten-foot pole.
Thank you, Stefanou
Dear Wolfgang, Many thanks. I read all three resources. Regarding: "What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()?" I meant, as a general matter, if our dataset (e.g.,`dat.craft2003`), say, had an additional continuous moderator (Xwb) varying within and between studies (see below), then how could such a moderator affect the result of rcalc() or rma.mv() or matreg()? Apparently, the `dat` object returned by rcalc() doesn't return the full dataset so to use moderators like Xwb from `dat` in the subsequent rma.mv() call. Also, in your Rmarkdown doc (previous email), you use a subgroup analysis to deal with a study-level, categorical moderator (sport) which makes me wonder how we can deal with Xwb or when multiple moderators exist in the data? Thanks, Stefanou set.seed(0) dat <- dat.craft2003 dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2) On Sun, Dec 5, 2021 at 11:12 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Dear Stefanou, See below for my responses. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Sunday, 05 December, 2021 3:55 To: R meta; Viechtbauer, Wolfgang (SP) Subject: metafor::matreg() and its workflow Dear Wolfgang, In the latest version of metafor, I realized there are a couple of new functions specifically made for correlations (that's awesome!). I understand the use of rclac() which provides the V for rma.mv(). But I'm a bit unclear why we get the vcov() from the rma.mv() fit and then input it to matreg(). My questions are: 1- What role does matreg() play and why not just using rma.mv()?
matreg() is for fitting regression models based on variance-covariance and correlation matrices. Such a matrix can be obtained by conducting a meta-analysis (e.g., using rma.mv()). This all takes us into methodology that is sometimes described as MASEM (meta-analytic structural equation modeling). Maybe start with this chapter: Becker, B. J., & Aloe, A. (2019). Model-based meta-analysis and related approaches. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta-analysis (3rd ed., pp. 339-363). New York: Russell Sage Foundation. to go along with: https://wviechtb.github.io/metafor/reference/matreg.html and https://wviechtb.github.io/meta_analysis_books/cooper2019.html#16)_Model-Based_Meta-Analysis_and_Related_Approaches
3- What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()?
I can't really answer this question without further details. But I would suggest to first read up on the methdology itself.
3- Is rtoz =TRUE necessary in this workflow?
I assume you mean argument 'ztor' in matreg(). Whether to use this depends on whether you have a matrix of r-to-z transformed correlation coefficients or a matrix of raw correlation coefficients. Whether one should or should not use transformed correlations in a meta-analysis that could yield such a matrix is a lengthy and endless debate, so I am not going to touch on "necessary" without a ten-foot pole.
Thank you, Stefanou
1 day later
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
On Sun, Dec 5, 2021 at 10:26 PM Stefanou Revesz
<stefanourevesz at gmail.com> wrote:
Dear Wolfgang, Many thanks. I read all three resources. Regarding: "What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()?" I meant, as a general matter, if our dataset (e.g.,`dat.craft2003`), say, had an additional continuous moderator (Xwb) varying within and between studies (see below), then how could such a moderator affect the result of rcalc() or rma.mv() or matreg()? Apparently, the `dat` object returned by rcalc() doesn't return the full dataset so to use moderators like Xwb from `dat` in the subsequent rma.mv() call. Also, in your Rmarkdown doc (previous email), you use a subgroup analysis to deal with a study-level, categorical moderator (sport) which makes me wonder how we can deal with Xwb or when multiple moderators exist in the data? Thanks, Stefanou set.seed(0) dat <- dat.craft2003 dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2) On Sun, Dec 5, 2021 at 11:12 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Dear Stefanou, See below for my responses. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Sunday, 05 December, 2021 3:55 To: R meta; Viechtbauer, Wolfgang (SP) Subject: metafor::matreg() and its workflow Dear Wolfgang, In the latest version of metafor, I realized there are a couple of new functions specifically made for correlations (that's awesome!). I understand the use of rclac() which provides the V for rma.mv(). But I'm a bit unclear why we get the vcov() from the rma.mv() fit and then input it to matreg(). My questions are: 1- What role does matreg() play and why not just using rma.mv()?
matreg() is for fitting regression models based on variance-covariance and correlation matrices. Such a matrix can be obtained by conducting a meta-analysis (e.g., using rma.mv()). This all takes us into methodology that is sometimes described as MASEM (meta-analytic structural equation modeling). Maybe start with this chapter: Becker, B. J., & Aloe, A. (2019). Model-based meta-analysis and related approaches. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta-analysis (3rd ed., pp. 339-363). New York: Russell Sage Foundation. to go along with: https://wviechtb.github.io/metafor/reference/matreg.html and https://wviechtb.github.io/meta_analysis_books/cooper2019.html#16)_Model-Based_Meta-Analysis_and_Related_Approaches
3- What if our rma.mv() fit has multiple (interactive) moderators, what should be passed as R and vcov() to matreg()?
I can't really answer this question without further details. But I would suggest to first read up on the methdology itself.
3- Is rtoz =TRUE necessary in this workflow?
I assume you mean argument 'ztor' in matreg(). Whether to use this depends on whether you have a matrix of r-to-z transformed correlation coefficients or a matrix of raw correlation coefficients. Whether one should or should not use transformed correlations in a meta-analysis that could yield such a matrix is a lengthy and endless debate, so I am not going to touch on "necessary" without a ten-foot pole.
Thank you, Stefanou
1 day later
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport' is I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport' is I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
I don't know what it is you are really trying to accomplish. One can stick moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional estimate given a certain set of values for the moderators. That can be further passed on to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable exists -- to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit? Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport' is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou On Thu, Dec 9, 2021 at 12:24 PM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
I don't know what it is you are really trying to accomplish. One can stick moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional estimate given a certain set of values for the moderators. That can be further passed on to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable exists -- to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit? Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport' is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
3 days later
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou On Thu, Dec 9, 2021 at 12:24 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
I don't know what it is you are really trying to accomplish. One can stick
moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional estimate given a certain set of values for the moderators. That can be further passed on to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable exists - - to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit?
Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport'
is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou On Thu, Dec 9, 2021 at 12:24 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
I don't know what it is you are really trying to accomplish. One can stick
moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional estimate given a certain set of values for the moderators. That can be further passed on to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable exists - - to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit?
Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when 'sport'
is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
Here is an example using G as input to matreg(): https://www.metafor-project.org/doku.php/analyses:vanhouwelingen2002#regression_of_true_log_odds (you will need the devel version of metafor for the cvvc="varcov" part). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 21:20 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou On Thu, Dec 9, 2021 at 12:24 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
I don't know what it is you are really trying to accomplish. One can stick
moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional
estimate
given a certain set of values for the moderators. That can be further passed
on
to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable
exists -
- to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit?
Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when
'sport'
is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
Super helpful! For some reason, the devel version doesn't get installed on my machine (must be an R issue; mine's a version 4.0). At some point, one might say which regression is more useful, the one on the means from the fixed effects or the one on the true effects from the random effects! rma.mv(yi ~ 0 + outcome*group, V, random = ~ 0 + outcome*group | study, struct = "GEN") Thank you so very much! Stefanou On Mon, Dec 13, 2021 at 2:59 PM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Here is an example using G as input to matreg(): https://www.metafor-project.org/doku.php/analyses:vanhouwelingen2002#regression_of_true_log_odds (you will need the devel version of metafor for the cvvc="varcov" part). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 21:20 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou On Thu, Dec 9, 2021 at 12:24 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
I don't know what it is you are really trying to accomplish. One can stick
moderators into the rma.mv() model, sure. So one can 'control' for them, or in other words, the estimated correlation matrix will then be a conditional
estimate
given a certain set of values for the moderators. That can be further passed
on
to matreg(). But I don't know if this is what you want to do, so I cannot say whether this is methodologically reasonable or whether a more reasonable
exists -
- to accomplish what? And what exactly is the problem of moderators in the rma.mv() fit?
Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 18:40 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang, But is what I have done a methodologically reasonable way to do this, or a more reasonable way exists. It's great that vcov() or random effects var-covariance matrix can be obtained from an rma.mv() fit and then used in a secondary SEM framework. But it seems to me that moderators used in rma.mv() get in the way, and I often have several of them. So, is there any literature on this or a strategy to get around the problem of moderators in the rma.mv() fit? Thank you for your guidance, Stefanou On Thu, Dec 9, 2021 at 11:17 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
-----Original Message-----
From: Stefanou Revesz [mailto:stefanourevesz at gmail.com]
Sent: Tuesday, 07 December, 2021 23:41
To: Viechtbauer, Wolfgang (SP)
Cc: R meta
Subject: Re: metafor::matreg() and its workflow
Hi Wolfgang,
Once again, thank you for the chapter and the two useful resources.
For concreteness, are the last two lines OK to use or other solutions
exist?
Many thanks,
Stefanou
set.seed(0)
dat <- dat.craft2003
dat$Xwb <- rnorm(nrow(dat),rnorm(nrow(dat),9,4),2)
tmp <- rcalc(ri ~ var1 + var2| study, ni=ni, data=dat)
V <- tmp$V
dat$var1.var2 <- tmp$dat$var1.var2
dat$var1.var2 <- factor(dat$var1.var2,
levels=c("acog.perf", "asom.perf",
"conf.perf", "acog.asom", "acog.conf", "asom.conf"))
res <- rma.mv(ri~ 0+var1.var2+sport+Xwb, V, random = ~ var1.var2 |
study, struct="UN", data=dat)
R <- vec2mat(coef(res)[1:6]) # Is this OK?
The first 6 coefficients are the estimated pooled correlations when
'sport'
is
I and when Xwb is 0. If this is what you want, then this is ok.
matreg(1, 2:4, R=R, V=vcov(res)[1:6,1:6]) # Is this OK?
If the above is ok, then this is ok. Best, Wolfgang
2 days later
Hi Stefanou, They address very different questions, so I would say neither is more useful than the other. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 22:15 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Super helpful! For some reason, the devel version doesn't get installed on my machine (must be an R issue; mine's a version 4.0). At some point, one might say which regression is more useful, the one on the means from the fixed effects or the one on the true effects from the random effects! rma.mv(yi ~ 0 + outcome*group, V, random = ~ 0 + outcome*group | study, struct = "GEN") Thank you so very much! Stefanou On Mon, Dec 13, 2021 at 2:59 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Here is an example using G as input to matreg(): https://www.metafor-
project.org/doku.php/analyses:vanhouwelingen2002#regression_of_true_log_odds
(you will need the devel version of metafor for the cvvc="varcov" part). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 21:20 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou
Thanks Wolfgang! My understanding is that: 1- res$G would tell us how slopes (for continuous moderators) or categories (assuming having used 0 + cat_mod in the random part) vary and covary with one another. As a further step, we can turn such a var-covar matrix and obtain regression weights out of it by taking one of them as the dependent variable and one or more of them as the independent variable(s). That is, this is equivalent to SEM analysis (i.e., regression with the latent factors). 2- vcov(res) tells us how the means of latent factors vary and covary with one another. As a further step, we can turn such a var-covar matrix and obtain regression weights out of it by taking one of them as the dependent variable and one or more of them as the independent variable(s). That is, this is equivalent to a path analysis (i.e., regression with mean of latent factors). Is this why you noted "They address very different questions"? Many thanks, Stefanou On Thu, Dec 16, 2021 at 9:37 AM Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Hi Stefanou, They address very different questions, so I would say neither is more useful than the other. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 22:15 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Super helpful! For some reason, the devel version doesn't get installed on my machine (must be an R issue; mine's a version 4.0). At some point, one might say which regression is more useful, the one on the means from the fixed effects or the one on the true effects from the random effects! rma.mv(yi ~ 0 + outcome*group, V, random = ~ 0 + outcome*group | study, struct = "GEN") Thank you so very much! Stefanou On Mon, Dec 13, 2021 at 2:59 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Here is an example using G as input to matreg(): https://www.metafor-
project.org/doku.php/analyses:vanhouwelingen2002#regression_of_true_log_odds
(you will need the devel version of metafor for the cvvc="varcov" part). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 21:20 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou
The main input to matreg() is a correlation or covariance matrix via argument 'R'. Where did you see an example where vcov() is used as input to the 'R' argument? The input to 'R' might come from a meta-analysis of correlation coefficients. This is the idea behind MASEM. The input to 'R' might also come from the correlations (or covariances) among a set of random effects. This is discussed in van Houwelingen et al. (2002). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 16 December, 2021 17:37 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thanks Wolfgang! My understanding is that: 1- res$G would tell us how slopes (for continuous moderators) or categories (assuming having used 0 + cat_mod in the random part) vary and covary with one another. As a further step, we can turn such a var-covar matrix and obtain regression weights out of it by taking one of them as the dependent variable and one or more of them as the independent variable(s). That is, this is equivalent to SEM analysis (i.e., regression with the latent factors). 2- vcov(res) tells us how the means of latent factors vary and covary with one another. As a further step, we can turn such a var-covar matrix and obtain regression weights out of it by taking one of them as the dependent variable and one or more of them as the independent variable(s). That is, this is equivalent to a path analysis (i.e., regression with mean of latent factors). Is this why you noted "They address very different questions"? Many thanks, Stefanou On Thu, Dec 16, 2021 at 9:37 AM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Hi Stefanou, They address very different questions, so I would say neither is more useful
than the other.
Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 22:15 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Super helpful! For some reason, the devel version doesn't get installed on my machine (must be an R issue; mine's a version 4.0). At some point, one might say which regression is more useful, the one on the means from the fixed effects or the one on the true effects from the random effects! rma.mv(yi ~ 0 + outcome*group, V, random = ~ 0 + outcome*group | study, struct = "GEN") Thank you so very much! Stefanou On Mon, Dec 13, 2021 at 2:59 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Here is an example using G as input to matreg(): https://www.metafor-
project.org/doku.php/analyses:vanhouwelingen2002#regression_of_true_log_odds
(you will need the devel version of metafor for the cvvc="varcov" part). Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Monday, 13 December, 2021 21:20 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Thank you so much! One clarification question. matreg() is not effect-size specific, correct? I mean you may have meta-analyzed any type effect size (SMD, ROM, OR, ...) and then subject the vcov() or G or H matrices of those meta-analyses to matreg(), correct? Thanks again, Stefanou On Mon, Dec 13, 2021 at 12:53 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
There is an upcoming talk by Suzanne Jak on MASEM at this seminar series: https://www.srmasig.org/seminar/ Might be of interest. Best, Wolfgang
-----Original Message----- From: Stefanou Revesz [mailto:stefanourevesz at gmail.com] Sent: Thursday, 09 December, 2021 23:23 To: Viechtbauer, Wolfgang (SP) Cc: R meta Subject: Re: metafor::matreg() and its workflow Dear Wolfgang, I see, so conditioning (using predict() ) is the way to go even if there is a large set of conditions. Related to the above, if instead of vcov(), one intends to use G and H matrices (latent regression), would that also require conditioning on the levels of fixed effects? The other challenge that I expect to encounter (I'm preparing to do a meta-analysis exploring anxiety and achievement) is that correlations reported in each study may not reflect the same pair of variables across the studies. Thus, this prevents me from having a "var1.var2" like variable in my model which also means I can't proceed to mateg(). I believe, in that case, I can do only an exploratory study of correlations (with rma.mv() ) rather than a model based one (with matreg() ). Thank you, Stefanou