[R-meta] convert rma.mv() output to data.frame

Michael Dewey ||@t@ @end|ng |rom dewey@myzen@co@uk
Thu Oct 7 15:33:56 CEST 2021


I too am a bit hazy about what exactly is needed here but I usually do

cires <- confint(res.mvmodel)

and then play around with the resulting list. After all I usually want 
the confidence intervals anyway.

Michael

On 07/10/2021 11:22, Viechtbauer, Wolfgang (SP) wrote:
> Nice to see that the package supports 'rma' objects, but the output doesn't include the variance/correlation components.
> 
> @Simon: Going back to my earlier post, what exactly do you want to see in the data frame and how is it supposed to be structured? It is not clear to me how exactly you want something like:
> 
> Variance Components:
>                            
> outer factor: district       (nlvls = 11)
> inner factor: factor(school) (nlvls = 11)
> 
>              estim    sqrt  fixed
> tau^2      0.0978  0.3127     no
> rho        0.6653             no
> 
> Test for Heterogeneity:
> Q(df = 55) = 578.8640, p-val < .0001
> 
> put into a data frame. There are rows with just text, empty rows, and rows with different numbers of elements. This is not 'tidy data'. So what would you envision such a data frame to look like? How is that supposed to work if the model contains multiple tau^2 values, sigma^2 components, maybe an entire correlation matrix when struct="UN", etc. Without a specification of what you really want, it's hard to help.
> 
> Best,
> Wolfgang
> 
>> -----Original Message-----
>> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>> Behalf Of Milani Chaloupka
>> Sent: Thursday, 07 October, 2021 5:29
>> To: Simon Harmel
>> Cc: r-sig-meta-analysis using r-project.org
>> Subject: Re: [R-meta] convert rma.mv() output to data.frame
>>
>> Hi Simon
>>
>> It works well for our meta-analysis models fit using Bayesian inference (Stan).
>>
>> And it also specifically handles rma model.objects amongst many model objects (I
>> assume rma.mv objects too).
>>
>> But contact the author on: d.luedecke using uke.de
>>
>> Milani
>>
>>> On 7 Oct 2021, at 1:20 pm, Simon Harmel <sim.harmel using gmail.com> wrote:
>>>
>>> Hi Milani,
>>>
>>> Much appreciated. Have you made or possibly worked with this package
>>> before? Do you know if it works with rma.mv()?  I think this might be
>>> of interest to a lot of us on this list.
>>>
>>> Thanks,
>>> Simon
>>>
>>> On Wed, Oct 6, 2021 at 10:14 PM Milani Chaloupka <m.chaloupka using uq.edu.au> wrote:
>>>>
>>>> Simon
>>>>
>>>> Maybe try:
>>>>
>>>> ## also on CRAN
>>>> remotes::install_github(“easystats/parameters”)
>>>> parameters::model_parameters(“your rma.object”)
>>>>
>>>> Milani
>>>>
>>>>> Message: 2
>>>>> Date: Wed, 6 Oct 2021 16:43:26 -0500
>>>>> From: Simon Harmel <sim.harmel using gmail.com>
>>>>> To: "Viechtbauer, Wolfgang (SP)"
>>>>>       <wolfgang.viechtbauer using maastrichtuniversity.nl>
>>>>> Cc: R meta <r-sig-meta-analysis using r-project.org>
>>>>> Subject: Re: [R-meta] convert rma.mv() output to data.frame
>>>>>
>>>>> Dear Wolfgang,
>>>>>
>>>>> Many thanks for your reply. The linked post in your email provides a method
>>>>> using 'capture.output()' in basr R but it only works with intercept-only
>>>>> models no matter how large the random term is, it creates an appropriate
>>>>> datafram to fit it in.
>>>>>
>>>>> I just wonder how to extend that to correlated random effects models?
>>>>>
>>>>> Why l want this? Because each time it takes me a lot of time to prepare
>>>>> presentable tables out of rma.mv() models esp. after spending days figuring
>>>>> out what model works well. At lease when it is a dataframe I can clean it
>>>>> up. But right now, I should literally copy-paste for a good chunk of time.
>>>>>
>>>>> Many thanks,
>>>>> Simon
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
> 
> 

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



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