Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metamerge results of metaprop objects giving proportions greater than 1 #65

Open
2 tasks
VanioLjrAntunes opened this issue Dec 29, 2024 · 0 comments
Open
2 tasks

Comments

@VanioLjrAntunes
Copy link

VanioLjrAntunes commented Dec 29, 2024

Please indicate whether you want to submit a

  • feature request
  • [ x] bug report
  • support request (please do not submit support requests here, but use R-sig-meta-analysis)

Summary

Please describe the feature request or bug.

Hi Dr. Schwarzer, I hope this message finds you well.

  1. I'm facing an miss display of treatment effects trying to use the following the metamerge function to show results of arcsine and double arcsine transformations of a same data set.
  2. As I plotted the individual metaprop objects everything was fine, but when plotting the metamerge object the results were greater than 1.
  3. In conclusion, for some reason the values in forest plot effect columns diverges between individual and metamerge. forests.

Rcode to reproduce the bug

# Ensures the package "pacman" is installed
if (!require("pacman")) install.packages("pacman")

#Installing and loading the packages
pacman::p_load(
         "meta",
         "metafor",
         "dplyr",
         "tibble")

#custom metaprop function
custom_metaprop <- function(x) {
  meta::metaprop(x,
                 event=event,
                 n=n,
                 method = "Inverse",
                 method.tau = "DL",
                 sm = "PAS",
                 method.ci="CP",
                 studlab = studlab,
                 subgroup = subgroup, common=F, random=T)
}

#Data used in the analysis
data <- tibble::tribble(
  ~Author,      ~Year,       ~event, ~n,                 ~subgroup,                              ~smlab,
  "Zeng",       "2024",         30,   30,                "AVNRT",             "3-month ablation success in AVNRT",
  "Shen",       "2024 (a)",      7,    7,                "AVNRT",                                  NA,
  "Shen",       "2024 (b)",     40,   40,                "AVNRT",                                  NA,
  "Li",         "2024",         77,   77,                "AVNRT",                                  NA,
  "Shen",       "2024 (a)",      2,    2, "AVRT with concealed APs",                                  NA,
  "Breskovic",  "2024",         NA,   NA, "AVRT with concealed APs",                                  NA,
  "Li",         "2024",         22,   23, "AVRT with concealed APs",                                  NA,
  "Shen",       "2024 (a)",      1,    1,  "AVRT with manifest APs",                                  NA,
  "Breskovic",  "2024",          1,    1,  "AVRT with manifest APs",                                  NA,
  "Li",         "2024",          8,    9,  "AVRT with manifest APs",                                  NA
)

#Creating studlab column
data$studlab <- paste0(data$Author, data$Year)

#PAS object
m.pas <- filter(data, !is.na(event)) |> 
  custom_metaprop()

#Proper > 1 proportions of storage PAS forest object
meta::forest(m.pas)$effect.format


#PFT  object  
m.pft <- meta:::update.meta(m.pas, sm="PFT")


#Proper <= proportions displayed in the PFT forest plot
meta::forest(m.pft)


#Metamerge object of PAS and PFT objects
m.merge <-meta::metamerge(m.pas, m.pft,
                    label1 = "Arcsine", label2 = "Double Arcsine",
                    text.random1 = "Arcsine",
                    text.random2 = "Double Arcsine",
                    keep.w=T)


#Improper > 1 proportions of both PAS and PFT values
meta::forest(m.merge)$effect.format

#Improper > 1 proportions of both PAS and PFT displayed in forest plot
meta::forest(m.merge)

Output

> #Proper > 1 proportions of storage PAS forest object
> meta::forest(m.pas)$effect.format
 [1] ""     "1.00" ""     ""     ""     ""     "1.00" "0.96" "0.92" ""     ""     ""     ""     ""     ""    
[16] ""     ""     ""     ""     ""     ""     "1.00" "1.00" "1.00" "1.00" "1.00" "0.96" "1.00" "1.00" "0.89"

> #Proper proportions > 1 storage in the PFT forest plot
> meta::forest(m.pft)$effect.format
 [1] ""     "1.00" ""     ""     ""     ""     "1.00" "1.00" "0.99" ""     ""     ""     ""     ""     ""    
[16] ""     ""     ""     ""     ""     ""     "1.00" "1.00" "1.00" "1.00" "1.00" "0.96" "1.00" "1.00" "0.89"
> 
> #Improper > 1 proportions of both PAS and PFT values
> meta::forest(m.merge)$effect.format
                                                                      Arcsine 
                                    ""                                 "1.53" 
                        Double Arcsine                                        
                                "1.45"                                     "" 
                                                                              
                                    ""                                     "" 
                                                                Arcsine.AVNRT 
                                    ""                                 "1.57" 
       Arcsine.AVRT with concealed APs         Arcsine.AVRT with manifest APs 
                                "1.38"                                 "1.29" 
                  Double Arcsine.AVNRT Double Arcsine.AVRT with concealed APs 
                                "1.50"                                 "1.32" 
 Double Arcsine.AVRT with manifest APs                                        
                                "1.18"                                     "" 
                                                                              
                                    ""                                     "" 
                                                                              
                                    ""                                     "" 
                                                                              
                                    ""                                     "" 
                                                                              
                                    ""                                     "" 
                                                                              
                                    ""                                     "" 
                                                                              
                                    ""                                 "1.00" 
                                                                              
                                "1.00"                                 "1.00" 
                                                                              
                                "1.00"                                 "1.00" 
                                                                              
                                "0.96"                                 "1.00" 
                                                                              
                                "1.00"                                 "0.89" 
> 
> #Improper > 1 proportions of both PAS and PFT displayed in forest plot
> meta::forest(m.merge)

Environment

For bug reports, please mention your

  • operating system: Windows 11
  • R version 4.4.1
  • Version of R package meta: 7.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant