{"id":51847151,"url":"https://github.com/mahmood726-cyber/ubcma","last_synced_at":"2026-07-23T14:02:06.931Z","repository":{"id":360309870,"uuid":"1193502609","full_name":"mahmood726-cyber/ubcma","owner":"mahmood726-cyber","description":"UBCMA: Unified Bias-Calibrated Meta-Analysis via Joint Heterogeneity-Selection Modeling","archived":false,"fork":false,"pushed_at":"2026-07-05T10:44:32.000Z","size":45479,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-05T12:14:01.801Z","etag":null,"topics":["bayesian","e156","evidence-synthesis","mcmc","meta-analysis","pymc"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahmood726-cyber.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T09:45:44.000Z","updated_at":"2026-07-01T08:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mahmood726-cyber/ubcma","commit_stats":null,"previous_names":["mahmood726-cyber/ubcma"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mahmood726-cyber/ubcma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmood726-cyber%2Fubcma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmood726-cyber%2Fubcma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmood726-cyber%2Fubcma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmood726-cyber%2Fubcma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmood726-cyber","download_url":"https://codeload.github.com/mahmood726-cyber/ubcma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmood726-cyber%2Fubcma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35804545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-23T02:00:06.683Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","e156","evidence-synthesis","mcmc","meta-analysis","pymc"],"created_at":"2026-07-23T14:02:06.049Z","updated_at":"2026-07-23T14:02:06.893Z","avatar_url":"https://github.com/mahmood726-cyber.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UBCMA: Unified Bias-Calibrated Meta-Analysis\n\n[![ci](https://github.com/mahmood726-cyber/ubcma/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mahmood726-cyber/ubcma/actions/workflows/ci.yml) [![codeql](https://github.com/mahmood726-cyber/ubcma/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/mahmood726-cyber/ubcma/actions/workflows/codeql.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![python: 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)\n\nA Python framework for meta-analysis that jointly models heterogeneity, publication selection bias, and study quality-dependent bias. UBCMA uses a mixture normal likelihood with a smooth selection function, optimized via multi-start L-BFGS-B with optional Bayesian (PyMC) inference.\n\n## Install\n\n```bash\npip install .               # frequentist only\npip install \".[bayes]\"       # adds PyMC for Bayesian inference\n```\n\n## Quick Start\n\n```python\nfrom ubcma import MetaAnalysisDataset, UBCMAFit\n\ndata = MetaAnalysisDataset.from_csv(\"data.csv\", study_id_col=\"study_id\")\nresult = UBCMAFit(n_restarts=20).fit(data)\nprint(f\"mu = {result.mu:.3f}, tau = {result.tau1:.3f}\")\nprint(result.study_table())\n```\n\n## CLI\n\n```bash\n# Fit a model\nubcma fit data.csv --quality rob_selection,rob_measurement --profile-ci\n\n# Run diagnostics (AIC/BIC, LOO influence, residuals)\nubcma diagnose data.csv\n\n# Bayesian fit with prior sensitivity\nubcma fit-bayes data.csv --chains 4 --prior-sensitivity\n\n# Simulation study (pilot tier, ~30 min)\nubcma study --tier pilot --replicates 50\n```\n\n## Key Features\n\n- **Multi-start optimization** with Latin hypercube sampling\n- **Profile likelihood CIs** (exact, no HKSJ correction needed)\n- **BCa bootstrap CIs** with jackknife acceleration\n- **Bayesian backend** via PyMC (NUTS, prior sensitivity analysis)\n- **8 comparator methods**: DerSimonian-Laird, DL-HKSJ, REML, REML-HKSJ, trim-and-fill, PET-PEESE, Copas, quality-effects\n- **HKSJ correction** for DL and REML comparators\n- **Diagnostics**: AIC/BIC for 5 model variants, LOO influence, Cook's D\n- **Three-tier simulation study** framework (pilot/focused/full factorial)\n\n## Model\n\nFor study *i*:\n\n```\ny_i ~ f_selected(y_i | theta_i, s_i, q_i, R_i = 1)\n\ntheta_i = mu + x_i' beta + z_i' delta + h_i\nb_i = q_i' lambda\nh_i ~ w N(0, tau_1^2) + (1 - w) N(0, tau_2^2)\ny_i | theta_i, b_i ~ N(theta_i + b_i, s_i^2)\n\nP(R_i = 1 | y_i, s_i, q_i) = logistic(g0 + g1 sig_i + g2 prec_i + g3 dir_i + g4 qbar_i)\n```\n\nWhere `y_i` is the observed effect, `s_i` the standard error, `q_i` quality/bias indicators (0-1 scale), `x_i` moderators, `z_i` design indicators. The two-component mixture captures heterogeneity. The selection function models publication bias via significance, precision, and direction terms.\n\nThe target estimand `mu` is the expected effect for a future study at the reference design, mean moderator profile, and low quality-shift settings.\n\n## Data Schema\n\nMinimum CSV columns: `yi` (effect), `sei` (standard error).\n\nOptional: `rob_*` / `bias_*` quality columns, `quality_score`, moderators (e.g. `dose`, `followup_months`), `design`, `study_id`.\n\n## Files\n\n- `src/ubcma/model.py` — core likelihood and optimizer\n- `src/ubcma/data.py` — CSV ingestion and design matrix construction\n- `src/ubcma/comparators.py` — REML, trim-and-fill, PET-PEESE, Copas, quality-effects, HKSJ\n- `src/ubcma/inference.py` — bootstrap CIs, profile likelihood\n- `src/ubcma/diagnostics.py` — AIC/BIC, LOO influence, Cook's D, residuals\n- `src/ubcma/simulation.py` — synthetic data generation\n- `src/ubcma/simulation_study.py` — tier-based simulation framework\n- `src/ubcma/bayesian.py` — PyMC NUTS backend\n- `src/ubcma/cli.py` — command-line entry point\n- `examples/` — quickstart script and validation datasets\n\n## Citation\n\n```bibtex\n@software{ubcma2026,\n  title  = {UBCMA: Unified Bias-Calibrated Meta-Analysis},\n  year   = {2026},\n  url    = {https://github.com/TODO/ubcma}\n}\n```\n\n## References\n\n- Bohnning D. Meta-analysis: a unifying meta-likelihood approach. Methods Inf Med. 2005. PMID 15778804.\n- Verde PE. A bias-corrected meta-analysis model. Biom J. 2021. PMID 32996196.\n- Bartos F et al. Robust Bayesian meta-analysis. Psychol Methods. PMID 35588075.\n- McShane BB et al. Adjusting for publication bias in meta-analysis. Perspect Psychol Sci. 2016. PMID 27694467.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmood726-cyber%2Fubcma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmood726-cyber%2Fubcma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmood726-cyber%2Fubcma/lists"}