Install
$ agentstack add skill-choxos-biostatagent-meta-analysis ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Meta-Analysis Methods in R
Overview
Comprehensive pairwise meta-analysis methods covering effect size calculation, fixed and random effects models, heterogeneity assessment, publication bias detection, subgroup analysis, meta-regression, and sensitivity analyses for synthesizing evidence across studies.
Effect Size Calculation
Continuous Outcomes
library(metafor)
# Standardized mean difference (SMD/Cohen's d/Hedges' g)
dat
mutate(
log_hr = log(hr),
se_log_hr = (log(hr_upper) - log(hr_lower)) / (2 * 1.96)
)
Fixed and Random Effects Models
Using meta Package
library(meta)
# Continuous outcomes
m_cont 75%: Considerable heterogeneity
# Create heterogeneity summary
het_summary
spread_draws(b_Intercept, r_study[study,]) |>
mutate(study_effect = b_Intercept + r_study) |>
ggplot(aes(y = study, x = study_effect)) +
stat_halfeye()
Diagnostic Meta-Analysis
library(mada)
# Bivariate random-effects model for diagnostic accuracy
fit_diag <- reitsma(
data = diag_data,
formula = cbind(TP, FN, FP, TN) ~ 1
)
summary(fit_diag)
# SROC curve
plot(fit_diag, sroclwd = 2)
# Summary sensitivity and specificity
summary_sens <- fit_diag$coefficients["tsens..Intercept."]
summary_spec <- fit_diag$coefficients["tfpr..Intercept."]
Reporting Meta-Analysis Results
Summary Table
library(meta)
# Create summary table
summary_table <- data.frame(
Model = c("Fixed Effect", "Random Effects"),
Estimate = c(m_cont$TE.fixed, m_cont$TE.random),
CI_Lower = c(m_cont$lower.fixed, m_cont$lower.random),
CI_Upper = c(m_cont$upper.fixed, m_cont$upper.random),
p_value = c(m_cont$pval.fixed, m_cont$pval.random)
)
# Heterogeneity
het_table <- data.frame(
Q = m_cont$Q,
df = m_cont$df.Q,
p_value = m_cont$pval.Q,
I2 = m_cont$I2,
tau2 = m_cont$tau2
)
PRISMA Flow Diagram
library(PRISMAstatement)
prisma_flow <- prisma(
found = 1000,
found_other = 50,
no_dupes = 800,
screened = 800,
screen_exclusions = 600,
full_text = 200,
full_text_exclusions = 150,
qualitative = 50,
quantitative = 45
)
prisma_flow
Key Packages Summary
| Package | Purpose | |---------|---------| | meta | User-friendly meta-analysis with forest plots | | metafor | Comprehensive meta-analysis and meta-regression | | dmetar | Meta-analysis helpers and additional functions | | metasens | Sensitivity analysis and bias assessment | | robumeta | Robust variance estimation for dependent effects | | clubSandwich | Cluster-robust standard errors | | mada | Diagnostic test accuracy meta-analysis | | brms | Bayesian meta-analysis | | PRISMAstatement | PRISMA flow diagrams |
Best Practices
- Pre-register protocol: Define inclusion criteria and analysis plan a priori
- Use appropriate effect measure: Match to outcome type and clinical meaning
- Assess heterogeneity: Report Q, I², tau² and interpret in context
- Investigate sources: Use subgroup analysis and meta-regression
- Evaluate bias: Use multiple methods (funnel, Egger, trim-fill)
- Sensitivity analysis: Leave-one-out, influence diagnostics, different estimators
- Report transparently: Follow PRISMA guidelines
- Consider prediction intervals: More relevant for clinical application than CI
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: choxos
- Source: choxos/BiostatAgent
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.