[R-meta] stepadj argument ignored in an rma.mv model
dj@gu@rd @end|ng |rom gm@||@com
Fri May 10 14:53:53 CEST 2019
Dear Wolfgang, dear Michael,
thanks a lot for your helpful comments!
I used a script from a different MA that I had at hand as a cheat sheet
when setting up my analysis, while I should have looked at the examples
from the package documentation itself. I will definitely keep this in mind
for future analyses, not just in metafor!
And I also think adding an error message in the output is the best way to
deal with this bad practice!
On Fri, May 10, 2019 at 1:08 PM Viechtbauer, Wolfgang (SP) <
wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
> Fully agree. I've seen things like:
> some_modeling_function(mydata$y ~ mydata$x1 + mydata$x2, data=mydata)
> in other places, which is really bad practice. The 'data' argument is
> there to take care of this for you.
> -----Original Message-----
> From: Michael Dewey [mailto:lists using dewey.myzen.co.uk]
> Sent: Friday, 10 May, 2019 12:35
> To: Viechtbauer, Wolfgang (SP); Danka Puric
> Cc: r-sig-meta-analysis using r-project.org
> Subject: Re: [R-meta] stepadj argument ignored in an rma.mv model
> Dear Wolfgang
> I seem to remember being bitten by this feature in other functions
> outside metafor so I suspect the answer is really that it is not best
> practice to do that anywhere but to always rely on the data= parameter.
> I think telling people not to do it in the documentation and throwing an
> error if they do is a better use of your time.
> On 10/05/2019 11:20, Viechtbauer, Wolfgang (SP) wrote:
> > Just as a follow-up for those who are interested.
> > The problem here stems from using a call such as:
> > res <- rma.mv(yi, V, random = ~ 1 | mydata$study, data=mydata)
> > namely, using 'mydata$' in the 'random' argument. This is actually
> superfluous (rma.mv() will find 'study' inside 'mydata' with no
> problems). While the model fit works, this causes some problems with
> profile(). Making this work is not an easy fix. But the obvious fix is to
> just fit the model with:
> > res <- rma.mv(yi, V, random = ~ 1 | study, data=mydata)
> > and then profile(res) works just fine.
> > I have now actually added a check inside rma.mv() that catches uses of
> $ in the random argument and, if so, issues an error. If I come up with a
> solution for making things work even with $ inside 'random', I'll remove
> this check.
> > Best,
> > Wolfgang
> > -----Original Message-----
> > From: Viechtbauer, Wolfgang (SP)
> > Sent: Tuesday, 07 May, 2019 23:34
> > To: 'Danka Puric'
> > Cc: r-sig-meta-analysis using r-project.org
> > Subject: RE: [R-meta] stepadj argument ignored in an rma.mv model
> > Well, that fails spectacularly. Not a single successful fit across all
> 20 sigma^2 values (all ll values are NA). This is a bit surprising, since
> the actual estimate of sigma^2 is 0 and even for this value the profiling
> fails. I can't tell if this is a problem with the profile() function or due
> to a model that is so overparameterized that all bets are off. Would you be
> willing to send me the data so I can do some more testing to figure out
> what is going on?
> > Best,
> > Wolfgang
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis