library(meta)
library(tidyverse)
library(dmetar)

this is the data used in the analysis and is represented in a tibble.

datatable <- tibble(df)
print(datatable)
# A tibble: 11 × 6
   DOI       Mean    SD     N site      year
   <chr>    <dbl> <dbl> <dbl> <chr>    <dbl>
 1 study 1  0.755 0.16     54 proximal  2011
 2 study 2  0.713 0.118    54 midway    2012
 3 study 3  1.5   0.1      57 proximal  2015
 4 study 4  1.6   0.3     104 average   2015
 5 study 5  1.4   0.2      25 average   1999
 6 study 6  0.5   0.1      50 average   2001
 7 study 7  0.8   0.2      20 average   2003
 8 study 8  0.6   0.2      20 proximal  2007
 9 study 9  0.6   0.2      20 midway    2010
10 study 10 0.5   0.2      20 distal    2012
11 study 11 0.67  0.13     18 distal    2015

This meta-analysis is a summary to compare a specific nerve size measured by ultra-sound in millimeters per health control

#establish a variable "m.gen" to prepare for the forest plot

m.gen <- 
  metamean(
    n = N,
    sd = SD,
    mean = `Mean`,
    studlab = DOI,
    data = df,
    subgroup = site,
    sm = "MRAW",
    fixed = FALSE,
    random = TRUE,
    title = "Nerve Size Per Patient")
forest.meta(
  m.gen,
  weight.study = "common",
  leftcols = c("studlab","effect.ci"),
  leftlabs = c("Studies", "Estimate (95% CI)"),
  rightcols = FALSE,
  xlim = c(.2,1.6),
  col.diamond = "#6b1913",
  col.square = "#0e185c",
  print.Q = F,print.Q.subgroup = F,
  print.tau2 = F,JAMA.pval = T)

Overall Estimate of the Random Effects Model:

The overall estimate of the random effects model is 0.88. The 95% confidence interval (CI) for this estimate is [0.63-1.12]. This interval provides a range within which the true effect size is likely to fall. Interpretation: The point estimate of the effect size is 0.88, but there is uncertainty associated with this estimate. The true effect size is likely to be somewhere between 0.63 and 1.12, based on the 95% confidence interval.

Overall Heterogeneity (I^2):

The overall heterogeneity is represented by I^2, which is given as 100%. The p-value associated with the overall heterogeneity test is < 0.001. Interpretation: The I^2 value of 100% indicates a high degree of variability or heterogeneity among the included studies. This means that there is substantial unexplained variation in the effect sizes among the studies. The p-value of < 0.001 suggests that this level of heterogeneity is statistically significant.

Sub-Group Difference (p-value):

The p-value for the sub-group difference is reported as 0.22. Interpretation: The p-value of 0.22 suggests that there is no statistically significant difference between the sub-groups. In other words, there is no strong evidence to conclude that the effect sizes differ significantly between the sub-groups being compared.

leav1out <- metainf(m.gen)

forest.meta(
  leav1out,
  col.diamond = "#6b1913",
  col.square = "#0e185c",
  leftcols = c("studlab", "effect.ci"),
  leftlabs = c("Studies", "Estimate (95% CI)"),
  rightcols = F,
  xlim = c(.3,1.3) )

is a leave one out meta-analysis which is done to identify statistical outliers, no statistical outliers were identified and no overall mean change (within confidence interval)

we want to examine if the publication year of a study can be used to predict its effect size

m.gen.reg <- metareg(m.gen, ~year)

m.gen.reg

Mixed-Effects Model (k = 11; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0.1853 (SE = 0.0879)
tau (square root of estimated tau^2 value):             0.4304
I^2 (residual heterogeneity / unaccounted variability): 99.64%
H^2 (unaccounted variability / sampling variability):   281.25
R^2 (amount of heterogeneity accounted for):            0.00%

Test for Residual Heterogeneity:
QE(df = 9) = 2429.7226, p-val < .0001

Test of Moderators (coefficient 2):
QM(df = 1) = 0.2011, p-val = 0.6539

Model Results:

         estimate       se     zval    pval      ci.lb    ci.ub    
intrcpt  -20.3710  47.3854  -0.4299  0.6673  -113.2448  72.5028    
year       0.0106   0.0236   0.4484  0.6539    -0.0357   0.0568    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Model Results: The analysis found that the intercept, which is the starting point of the model, had an estimated value of -20.3710, but it comes with a large amount of uncertainty (standard error of 47.3854). The p-value for the intercept is 0.6673, indicating it’s not statistically significant. Additionally, the confidence interval for the intercept is quite wide, suggesting a wide range of possible values.

For the “year” variable, the analysis estimated a coefficient of 0.0106, but like the intercept, it also has a significant amount of uncertainty (standard error of 0.0236). The p-value for the “year” variable is 0.6539, which is not statistically significant. The confidence interval for “year” is also wide, indicating a broad range of potential values.

The “Signif. codes” at the bottom provide a quick way to gauge the significance of p-values, with ’*’ indicating significance. In this analysis, neither the intercept nor the “year” variable is statistically significant, as shown by the high p-values. This means that the model doesn’t provide strong evidence that the intercept or “year” variable has a significant impact on the data.

bubble(m.gen.reg, studlab = TRUE)

this bubble plot was used to simplify the results of meta-regression as it is a data visualization technique used to display three-dimensional data in a two-dimensional space. It is an extension of a scatter plot

Bubble plots are particularly useful for displaying data with multiple dimensions, making it easier to understand the relationships and variations within the dataset. They are commonly used in fields such as economics, social sciences, and data analysis to communicate complex data patterns in a visually accessible format.