[R-meta] escalc error interpretation

Philippe Tadger ph|||ppet@dger @end|ng |rom gm@||@com
Thu Aug 26 18:58:15 CEST 2021


Dear all,

I have an error with the function escalc,

Error in escalc(measure = "PLO", xi = out1, mi = out2, data = ddd, add = 
1/2, : One or more group sizes are < 1.

that I don't know how to interpret what is wrong with my data. As follow 
a reproducible example:

library(metafor)
ddd<-data.frame(
   tn = c(5535L,
          5535L,1222L,1222L,
          1032L,1032L,1392L,
          1392L,990L,990L,
          182L,182L,1406L,
          1406L,21043L,21043L,
          100L,100L,9647L,
          9647L),
   tp = c(15L,15L,
          2L,2L,2L,2L,
          10L,10L,2L,2L,1L,
          1L,9L,9L,28L,28L,
          0L,0L,33L,33L),
   np = c(15L,15L,
          2L,2L,2L,2L,
          10L,10L,2L,2L,1L,
          1L,9L,9L,28L,28L,
          0L,0L,36L,36L),
   nn = c(5802L,
          5802L,1234L,1234L,
          1071L,1071L,1438L,
          1438L,1005L,1005L,
          194L,194L,1416L,
          1416L,21900L,
          21900L,105L,105L,
          10121L,10121L),
   MA_num = c(10L,10L,
              10L,10L,10L,10L,
              10L,10L,10L,10L,
              10L,10L,10L,10L,
              10L,10L,10L,10L,
              10L,10L),
   SUBMA_num = c(45L,45L,
                 45L,45L,45L,45L,
                 45L,45L,45L,45L,
                 45L,45L,45L,45L,
                 45L,45L,45L,45L,
                 45L,45L),
   study = c(735L,
             735L,738L,738L,739L,
             739L,740L,740L,
             744L,744L,745L,
             745L,747L,747L,750L,
             750L,753L,753L,
             755L,755L),
   out1 = c(15L,
            5535L,2L,1222L,2L,
            1032L,10L,1392L,2L,
            990L,1L,182L,9L,
            1406L,28L,21043L,
            0L,100L,33L,
            9647L),
   out2 = c(0L,267L,
            0L,12L,0L,39L,
            0L,46L,0L,15L,0L,
            12L,0L,10L,0L,
            857L,0L,5L,3L,
            474L),
   study = as.factor(c("1","1","2","2",
                       "3","3","4","4",
                       "5","5","6","6",
                       "7","7","8","8",
                       "9","9","10",
                       "10")),
   group = as.factor(c("1","2","1","2",
                       "1","2","1","2",
                       "1","2","1","2",
                       "1","2","1","2",
                       "1","2","1","2"))
)
levels(ddd$group) <- c("sensitivity", "specificity")
ddd <- escalc(measure="PLO", xi=out1, mi=out2, data=ddd, add=1/2, to="all",
               include=group=="sensitivity")

The error is triggered for the following conditional in the escalc function

if (any <https://rdrr.io/r/base/any.html>(ni < 1, na.rm=TRUE 
<https://rdrr.io/r/base/logical.html>)) stop 
<https://rdrr.io/r/base/stop.html>(mstyle$stop 
<https://rdrr.io/r/base/stop.html>("One or more group sizes are < 1."))

Thanks in advance for your time
-- 
Kind regards/Saludos cordiales
*Philippe Tadger*
ORCID <https://orcid.org/0000-0002-1453-4105>, Reseach Gate 
<https://www.researchgate.net/profile/Philippe-Tadger>
Phone/WhatsApp: +32498774742

	[[alternative HTML version deleted]]



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