Subgroup analysis lets you examine whether pooled prevalence differs across categories of study-level characteristics and whether heterogeneity is reduced within strata compared with the overall model. The pipeline fits a separate random-effects model for each level of five pre-specified variables, using the sameDocumentation 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.
fitMetaprop() configuration as the overall model. All subgroup targets are generated automatically using tarchetypes::tar_map(), so adding or removing a variable requires only a change to the uni_vars vector in _targets.R.
Subgroup variables
The five variables used for subgroup analysis are defined in_targets.R:
| Variable | Categories |
|---|---|
Age | Patient age group (as reported by study) |
Continent | North America, Asia, Europe, Other |
Setting | Hospital Setting vs Other |
JBI_Classification | Methodological quality tier per JBI appraisal |
use_guideline | Followed Guideline(s) vs No Guideline |
How subgroup analysis works
fitSubMetaprop() wraps fitMetaprop() to handle the subgroup-specific data filtering and passes the grouping column as the subgroup argument:
- Removes rows where the grouping variable is
NA, so studies that did not report that characteristic are excluded from the subgroup model (but remain in the overall model). - Passes the non-missing subset to
fitMetaprop(), forwarding the grouping column assubgroup. - Sets
keepdata = TRUEso thatmetaretains the raw study data alongside the fitted object — required for downstream Copas modeling.
Iterating over all subgroup variables with tar_map()
Rather than writing one target per variable, _targets.R uses tar_map() to expand a single template across all entries in uni_vars:
mod_subgroup_Age, mod_subgroup_Continent, mod_subgroup_Setting, mod_subgroup_JBI_Classification, and mod_subgroup_use_guideline, along with paired Copas, forest-plot, and funnel-plot targets for each.
Accessing subgroup results
Load any subgroup model by its generated target name:meta metaprop object with an additional bylevs slot listing the subgroup labels. You can inspect per-stratum estimates through mod_subgroup_Continent$TE.random.w, mod_subgroup_Continent$lower.random.w, and mod_subgroup_Continent$upper.random.w.
Interpreting heterogeneity within subgroups
Each stratum in the subgroup model has its own set of heterogeneity statistics. You should examine:- Within-subgroup I² — the proportion of variability within a stratum attributable to true heterogeneity rather than sampling error.
- Within-subgroup τ² — the between-study variance inside the stratum; a reduction relative to the overall τ² suggests the variable explains some heterogeneity.
- Within-subgroup Q — the Wald statistic for the test of heterogeneity within that stratum.
Q_b in the summary() output) and within-stratum heterogeneity is lower than the overall model.
