[R-meta] GLMM vs. Inverse variance weighting for proportions (and comparison with stata)

Rachael Burke R@ch@e|@Burke @end|ng |rom |@htm@@c@uk
Fri Dec 6 18:41:39 CET 2024


Dear colleagues,

I�m sorry if this question is partly (or mostly) about an entirely different package from �meta�.  But I am having a meta-analysis problem and I wondering if anyone could point me in the right direction.

I am doing a meta-analysis of a single proportion, pooling studies (no comparisons).  I have used metaprop with a GLMM approach � all good, it makes sense to me.  I get very similar point estimate results to if I code up in lme4 or brms myself � all good.

A colleague has looked in stata, and using defaults in metaprop user written package has got a VERY different answer (as in, 14% pooled estimate compared to 19% pooled estimate for our actual data).  Stata / metaprop uses inverse variance weighting and I can more-or-less recreate this estimate in R using meta by changing �method� to �inverse�.  Reasonably good, so far.

I wanted to recreate the GLMM approach in stata to show the difference.  I used metapreg in stata, which has lovely documentation publication (https://archpublichealth.biomedcentral.com/articles/10.1186/s13690-023-01215-y).  But that gives a very different answer to using a GLMM in meta in R.  I haven�t really used stata in a decade

I think it�s probably not fair to ask this listserv to comment on someone else�s stata package.  And I know I probably just need to figure it out on my own whether GLMM vs. inverse variance approach is preferred.

But I am nervous that I am getting such very different pooled estimates and I was wondering if any could help shed light on what I should be doing (particularly on the R vs. stata differences for a GLMM based approach)?

Thank you for any pointers.

Best wishes,

Rachael

An example:
CODE AND RESULTS IN R
library(tidyverse)
library(meta)

df <- tibble(author=c("alice","bob","chris","dawn","ewan"), npeople=c(400,30,3000,250,50), nevent=c(80,3,267,90,19)) # might need to put quotation marks back around authors, listserv doesn�t allow quotations marks?

metaprop(data=df,
         n=npeople,
         event=nevents,
         random=TRUE,
         common=FALSE,
         method = "GLMM")

This gives: 0.2022 [0.1137; 0.3337]

metaprop(data=df,
         n=npeople,
         event=nevent,
         random=TRUE,
         common=FALSE,
         method = "Inverse",
         sm="PFT")

Gives: 0.2132 [0.1050; 0.3459] # a percentage point different!

CODE AND RESULTS IN STATA

# Need to recreate the toy data for four studies above
# ssc install metaprop
# ssc intall metapreg

metaprop nevent npeople, random dp(3)
Gives: 0.221       0.108        0.334   # similar to R meta with inverse variance method

metapreg nevent npeople, model(random) studyid(name) dp(3) # this should use a GLMM approach
Gives: 0.225     0.114          0.426n # similar to inverse variance AND DIFFERENT TO R META GLMM APPROACH









	[[alternative HTML version deleted]]



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