guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

metacont when sd.e or sd.c is 0 #17

Closed reminjp closed 4 years ago

reminjp commented 4 years ago

Hello. I have a question on the metacont function.

When I use metacont with data that sd.e or sd.c is 0, it provides the following warning:

Studies with non-positive values for sd.e or sd.c get no weight in meta-analysis.

I referred some books on meta-analysis (written in Japanese) and I thought that sd.e or sd.c was 0 was not a problem. Is this a wrong understanding? Unfortunately, I'm not very familiar with meta-analysis...

Example

example_plot.pdf image

example_a.csv (The first line is a header.)

1,2,3
0,1,0
1,1,1
2,1,2

example_b.csv

1,2,3
1,1,2
2,2,2
3,3,2

example.R

require(meta)

summarize <- function(d) {
  result <- data.frame(
    apply(d, 2, function(x) {
      x <- x[is.finite(x)]
      l <- length(x)
      return(c(
        n = length(x),
        min = ifelse(l, min(x), NA),
        max = ifelse(l, max(x), NA),
        median = ifelse(l, median(x), NA),
        mean = ifelse(l, mean(x), NA),
        sd = ifelse(l, sd(x), NA)
      ))
    }),
    check.names = FALSE
  )
  return(data.frame(t(result), check.names = FALSE))
}

data_a <- read.csv("example_a.csv", check.names = FALSE)
data_b <- read.csv("example_b.csv", check.names = FALSE)

summary_a <- summarize(data_a)
summary_b <- summarize(data_b)

meta <- metacont(
  summary_a[1:3, "n"],
  summary_a[1:3, "mean"],
  summary_a[1:3, "sd"],
  summary_b[1:3, "n"],
  summary_b[1:3, "mean"],
  summary_b[1:3, "sd"],
  rownames(summary_a)[1:3],
  sm = "SMD"
)

pdf(file = "example_plot.pdf", width = 12, height = 3)
forest(meta)
dev.off()
guido-s commented 4 years ago

Hi, a standard deviation (SD) of 0 is not a problem, however, such a study does not get any weight in the meta-analysis. The idea of this warning is to inform the user about such studies which could result from a typo. Negative SDs are handled in a similar way.

You could use argument warn = FALSE in order to suppress the warning.

reminjp commented 4 years ago

Thanks! I now noticed you are the author of "Meta-Analysis with R" and bought it. I appreciate your great book and tool.

May I ask one more question related to this issue ...? How should I treat such a study which has no weight. Should I remove such a study when collecting studies? Or just include it as an empty space and explain that?

guido-s commented 4 years ago

I would include a study that reports the mean values but has a standard deviation of 0 in the forest plot as this study provides all relevant information.

One may discuss whether to include a study in the forest plot which only provides partial information, e.g., mean values, however, no standard deviations. I would probably do this if there are not too many studies with partially missing data.

Typically, I would not include studies in the forest plot that do not provide any data on the outcome of interest.