Skip to content

[R-meta] Subgroups using metaprop

3 messages · Lindsay Gaudet, Michael Dewey, Dr. Gerta Rücker

#
I am trying to do a meta-analysis of proportions using the inverse
variance method. Attempting subgroup analyses with 3 subgroups,
regardless of the method to estimate tau or to estimate fixed (common)
or random effects, returns an error. The error occurs regardless of
the number of studies in each group, and regardless of the analysis
method chosen (i.e., other transformations, or attempting GLMM or
different methods to estimate tau). It does not occur when there are
only 2 subgroups.

The error that keeps coming up says: "Error in .C("ruben", lambda =
as.double(lambda), h = as.integer(h), delta = as.double(delta),  :
  "ruben" not available for .C() for package "CompQuadForm""

My code is below:

library (meta)
data <- structure(list(Study = c("Study A", "Study B", "Study C",
"Study D", "Study E", "Study F", "Study G", "Study H", "Study I",
"Study J" ), Intensity = c("Low", "Moderate", "Moderate", "Moderate",
"Moderate", "Moderate", "Moderate", "High", "Moderate", "High"),
events = c(4769, 717, 3031, 1950, 857, 4925, 310, 1626, 1292, 221), n
= c(64425, 3908, 23771, 12264, 5729, 16501, 1638, 7635, 4810, 3095)),
class = "data.frame", row.names = c(NA, -10L))
mp <- metaprop(events, n,
     data = data,
     method = "INVERSE",
     sm="PLOGIT",
     studlab = Study,
     subgroup = Intensity)

I would be very grateful if anyone has any insight into what is going on here.

Lindsay
#
Dear Lindsay

When I run your code here it works seamlessly. Do you perhaps have old 
versions of one or other of the packages mentioned? Or are you using an 
incompatible version of R? I would suggest doing update.packages() to 
see if that clears it. If you have an old version of R I would update 
that first.

Michael
On 14/11/2025 23:52, Lindsay Gaudet via R-sig-meta-analysis wrote:

  
    
#
Hi Lindsay,
Just tried the same without noticing Michael's response (he was faster). The code runs smoothly with R version 4.5.1, meta version meta_8.2-1. Below you find the result. I would remove the common effect model in a subgroup analysis.

Best,
Gerta

        proportion           95%-CI %W(common) %W(random) Intensity
Study A     0.0740 [0.0720; 0.0761]       27.3       10.0       Low
Study B     0.1835 [0.1714; 0.1960]        3.6       10.0  Moderate
Study C     0.1275 [0.1233; 0.1318]       16.4       10.0  Moderate
Study D     0.1590 [0.1526; 0.1656]       10.2       10.0  Moderate
Study E     0.1496 [0.1404; 0.1591]        4.5       10.0  Moderate
Study F     0.2985 [0.2915; 0.3055]       21.4       10.0  Moderate
Study G     0.1893 [0.1706; 0.2091]        1.6        9.9  Moderate
Study H     0.2130 [0.2038; 0.2223]        7.9       10.0      High
Study I     0.2686 [0.2561; 0.2814]        5.9       10.0  Moderate
Study J     0.0714 [0.0626; 0.0811]        1.3        9.9      High

Number of studies: k = 10
Number of observations: o = 143776
Number of events: e = 19698

                     proportion           95%-CI
Common effect model      0.1535 [0.1515; 0.1555]
Random effects model     0.1608 [0.1187; 0.2143]

Quantifying heterogeneity (with 95%-CIs):
 tau^2 = 0.3226 [0.1518; 1.0801]; tau = 0.5680 [0.3896; 1.0393]
 I^2 = 99.9% [99.8%; 99.9%]; H = 26.82 [25.28; 28.44]

Test of heterogeneity:
       Q d.f. p-value
 6471.43    9       0

Results for subgroups (common effect model):
                       k proportion           95%-CI       Q   I^2
Intensity = Low        1     0.0740 [0.0720; 0.0761]    0.00    --
Intensity = Moderate   7     0.1998 [0.1967; 0.2029] 2104.62 99.7%
Intensity = High       2     0.1853 [0.1777; 0.1931]  279.96 99.6%

Test for subgroup differences (common effect model):
                     Q d.f. p-value
Between groups 4086.85    2       0
Within groups  2384.58    7       0

Results for subgroups (random effects model):
                       k proportion           95%-CI  tau^2    tau
Intensity = Low        1     0.0740 [0.0720; 0.0761]     --     --
Intensity = Moderate   7     0.1904 [0.1497; 0.2392] 0.1519 0.3897
Intensity = High       2     0.1262 [0.0404; 0.3315] 0.7887 0.8881

Test for subgroup differences (random effects model):
                   Q d.f.  p-value
Between groups 53.53    2 < 0.0001

Details of meta-analysis methods:
- Inverse variance method
- Restricted maximum-likelihood estimator for tau^2
- Q-Profile method for confidence interval of tau^2 and tau
- Calculation of I^2 based on Q
- Logit transformation
- Clopper-Pearson confidence interval for individual studies




UNIVERSIT?TSKLINIKUM FREIBURG
Institute for Medical Biometry and Statistics

Dr. Gerta R?cker
Guest Scientist

Stefan-Meier-Stra?e 26 ? 79104 Freiburg
gerta.ruecker at uniklinik-freiburg.de

https://www.uniklinik-freiburg.de/imbi-en/employees.html?imbiuser=ruecker

-----Urspr?ngliche Nachricht-----
Von: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> Im Auftrag von Michael Dewey via R-sig-meta-analysis
Gesendet: Samstag, 15. November 2025 12:13
An: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-project.org>
Cc: Michael Dewey <lists at dewey.myzen.co.uk>; Lindsay Gaudet <lovstrom at ualberta.ca>
Betreff: Re: [R-meta] Subgroups using metaprop

Dear Lindsay

When I run your code here it works seamlessly. Do you perhaps have old 
versions of one or other of the packages mentioned? Or are you using an 
incompatible version of R? I would suggest doing update.packages() to 
see if that clears it. If you have an old version of R I would update 
that first.

Michael
On 14/11/2025 23:52, Lindsay Gaudet via R-sig-meta-analysis wrote: