Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/namakala/inappropriate-acid-suppressor-agent-use/llms.txt

Use this file to discover all available pages before exploring further.

The pipeline produces four types of visualizations for each meta-analysis model: forest plots, contour-enhanced funnel plots, Doi plots, and Copas model plots. Forest plots are saved as PDF files to docs/figures/ and are generated as named targets; the remaining plots are rendered inline within the Quarto report. Each visualization type serves a distinct diagnostic purpose, from displaying per-study estimates to assessing publication bias.

Forest plots

Forest plots are generated by the vizForest() function in src/R/visualize.R. It wraps meta::forest() with a consistent column layout and sort order.
vizForest <- function(mod, ...) {
  require("meta")
  pdf.options(encoding = "ISOLatin2.enc")

  plt <- meta::forest(
    mod,
    leftcols = c(
      "studlab", "Sample_size", "Inappropriate_indication", "w.random",
      "effect", "ci"
    ),
    leftlabs = c(
      "Study", "Sample Size", "Events", "Weight (%)", "Proportion", "95% CI"
    ),
    sortvar     = TE,
    rightcols   = FALSE,
    xlim        = c(0, 1),
    digits      = 2,
    width       = 9,
    colgap.left = "0.15cm",
    fontsize    = 10,
    prediction  = TRUE,
    backtransf  = TRUE,
    ...
  )

  return(plt)
}
Key settings:
  • Left columns: Study, Sample Size, Events, Weight (%), Proportion, 95% CI
  • Sort order: Studies are sorted by TE (effect size) in ascending order
  • x-axis: Fixed to c(0, 1) on the back-transformed probability scale
  • backtransf = TRUE: Freeman-Tukey double arcsine estimates are back-transformed to proportions before display
  • prediction = TRUE: A 95% prediction interval is shown to communicate expected prevalence in future similar studies
The file argument (passed via ...) controls the PDF output path. The targets pipeline calls vizForest() with explicit file paths:
  • Overall model: docs/figures/meta-analysis-prevalence.pdf
  • Subgroup models: docs/figures/subgroup-meta-analysis-{colname}.pdf
To access a forest plot after running the pipeline:
targets::tar_load(plt_forest_prop)
# Plot is already saved to docs/figures/meta-analysis-prevalence.pdf
Forest plots for subgroups are automatically named by the subgroup variable. For example, the continent subgroup plot is saved to docs/figures/subgroup-meta-analysis-Continent.pdf.

Funnel plots

Funnel plots are generated by the vizFunnel() function, also in src/R/visualize.R. They use meta::funnel() with type = "contour" to produce contour-enhanced plots.
vizFunnel <- function(mod, ...) {
  require("meta")

  plt <- meta::funnel(
    mod,
    type   = "contour",
    common = TRUE,
    random = TRUE
  )

  return(plt)
}
The contour-enhanced design shades regions corresponding to different levels of statistical significance (p < 0.01, p < 0.05, p < 0.10), making it easier to distinguish publication bias from genuine heterogeneity. Both common-effect and random-effects summaries are overlaid. Funnel plots are generated for the overall model (plt_funnel_prop) and for each subgroup (plt_funnel_subgroup_*).

Doi plots

Doi plots are generated using metasens::doiplot() and are rendered inline in the Quarto report rather than saved as standalone files.
metasens::doiplot(mod_prop)
The Doi plot is the preferred diagnostic for small study effects in this pipeline. It avoids the subjective asymmetry judgment inherent in funnel plot inspection by using a symmetric reference shape based on the LFK index. When the funnel plot appeared asymmetrical, the Doi plot was used in preference to avoid spurious interpretation.

Copas model plots

For each model where a Copas selection model was fit, the plot method provides a graphical summary of how the pooled estimate and its confidence interval change under varying assumptions about the degree of selection bias.
# In the Quarto report
tar_read(mod_copas_prop) %T>% plot() |> summary()
The plot shows contours of the adjusted estimate across a grid of selection model parameters, making it possible to assess the robustness of the pooled prevalence to publication bias. Copas models are computed for the overall dataset and within each subgroup via the mod_copas_prop and mod_copas_subgroup_* targets.

Build docs developers (and LLMs) love