{"id":32200469,"url":"https://github.com/magosil86/getmstatistic","last_synced_at":"2025-10-22T03:48:55.400Z","repository":{"id":53780363,"uuid":"89304941","full_name":"magosil86/getmstatistic","owner":"magosil86","description":"Quantifying Systematic Heterogeneity in Meta-Analysis","archived":false,"fork":false,"pushed_at":"2021-05-08T22:10:44.000Z","size":2395,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T03:48:45.757Z","etag":null,"topics":["getmstatistic","gwas","heartgenes214","heterogeneity","meta-analysis","mstatistic","outlier-studies","stata","systematic-heterogeneity"],"latest_commit_sha":null,"homepage":"https://magosil86.github.io/getmstatistic/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magosil86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-25T01:46:21.000Z","updated_at":"2021-05-08T22:10:46.000Z","dependencies_parsed_at":"2022-09-11T21:30:51.591Z","dependency_job_id":null,"html_url":"https://github.com/magosil86/getmstatistic","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/magosil86/getmstatistic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magosil86%2Fgetmstatistic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magosil86%2Fgetmstatistic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magosil86%2Fgetmstatistic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magosil86%2Fgetmstatistic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magosil86","download_url":"https://codeload.github.com/magosil86/getmstatistic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magosil86%2Fgetmstatistic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280376536,"owners_count":26320276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"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":["getmstatistic","gwas","heartgenes214","heterogeneity","meta-analysis","mstatistic","outlier-studies","stata","systematic-heterogeneity"],"created_at":"2025-10-22T03:48:53.743Z","updated_at":"2025-10-22T03:48:55.390Z","avatar_url":"https://github.com/magosil86.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis-CI Build Status](https://travis-ci.org/magosil86/getmstatistic.svg?branch=master)](https://travis-ci.org/magosil86/getmstatistic)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/magosil86/getmstatistic/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/magosil86/getmstatistic.svg)](https://github.com/magosil86/getmstatistic/issues)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/getmstatistic)](https://cran.r-project.org/package=getmstatistic)\n[![Coverage status](https://codecov.io/gh/magosil86/getmstatistic/branch/master/graph/badge.svg)](https://codecov.io/github/magosil86/getmstatistic?branch=master)\n[![CRAN_Logs_Rstudio](https://cranlogs.r-pkg.org/badges/grand-total/getmstatistic)](http://cran.rstudio.com/web/packages/getmstatistic/index.html)\n\n\u003c!--- [![CRAN_Logs_Rstudio](http://cranlogs.r-pkg.org/badges/getmstatistic)](http://cran.rstudio.com/web/packages/getmstatistic/index.html) ---\u003e\n\n\n# [getmstatistic]() \u003cimg src=\"getmstatistic-striking-image.png\" align=\"right\" /\u003e\n\n_M_ - An aggregate statistic, to identify systematic heterogeneity patterns and their direction of effect in meta-analysis \n \n## Overview\n \n _M_ quantitatively describes systematic (non-random) heterogeneity patterns acting across multiple variants in a GWAS meta-analysis. It's primary use is to identify outlier studies, which either show \"null\" effects or consistently show stronger or weaker genetic effects than average across, the panel of variants examined in a meta-analysis.\n\n _M_ differs from conventional heterogeneity metrics (Q-statistic, I\u003csup\u003e2\u003c/sup\u003e), in that, it measures heterogeneity across multiple independently associated variants, whilst (Q-statistic, I\u003csup\u003e2\u003c/sup\u003e) measure heterogeneity at individual variants. Essentially, _M_ measures systematic heterogeneity, whilst (Q-statistic, I\u003csup\u003e2\u003c/sup\u003e) measure random variant-specific heterogeneity.\n\n### Sources of systematic heterogeneity\nSystematic heterogeneity can arise in a meta-analysis due to differences in the study characteristics of participating studies. Some of the differences may include: ancestry, allele frequencies, phenotype definition, age-of-disease onset, family-history, gender, linkage disequilibrium and quality control thresholds.\n\n### Practical benefits of exploring systematic heterogeneity\n\n* Reveal studies showing systematically weaker effects than average which could lower the power of a meta-analysis to detect genetic signals. For example, outlier studies that pass typical quality control checks (genotype call rate, Hardy-Weinberg equilibrium cutoffs, genomic control) but might show no association with phenotype of interest due to faulty genotype data (e.g. flipped alleles and/or strands, incorrect minor allele frequencies).\n\n* Reveal studies showing systematically stronger effects than average which can elucidate biologically important differences among the studies e.g. sexual dimorphism or sub-phenotype variability.\n\n\n\n## Installation: Stata\n\n* Install getmstatistic [**Stata** command](https://github.com/magosil86/getmstatistic) from SSC\n\n1. Start stata\n2. To install the getmstatistic stata module: `ssc install getmstatistic`\n3. To get the example dataset in your current working directory: `net get getmstatistic`\n4. You're all set, getmstatistic is installed, try some of the examples in the getmstatistic help file\n\nTip! getmstatistic depends on the following user-written Stata commands which can be installed\n using `ssc install package-name` or findit `package-name`:\n\n* latabstat\n* metareg\n* savesome\n* tabstat\n* qqvalue\n\nA full list of getmstatistic dependencies can be found in the help file.\n\n---\n\n* Install getmstatistic [**Stata** command](https://github.com/magosil86/getmstatistic) manually\n\n* Download the getmstatistic zip file: [getmstatistic_0.1.1_stata_ssc.zip](https://github.com/magosil86/getmstatistic/blob/master/getmstatistic_0.1.1_stata/getmstatistic_0.1.1_stata_ssc.zip)\n\n```\n1. Unzip the folder\n\nTip! the folder should contain the following files: getmstatistic.ado getmstatistic.sthlp heartgenes214.dta\n\n2. Start stata\n\n3. Locate your personal directory where stata stores user generated files by typing: `sysdir`\nsysdir\n\nTip! on mac the ado/personal directory is likely to be at: ~/Library/Application Support/Stata/ado/personal/\nfor linux: ~/ado/personal/ \nfor windows: c:\\ado\\personal\\\n\n4. Copy getmstatistic.ado and getmstatistic.sthlp to the g sub-directory in personal\n\nTip! if the g sub-directory does not exist, that just means you do not have user generated commands\nthat start with the letter g. In that case create a folder named g in the personal directory.\n\n5. Type help getmstatistic in Stata to open the getmstatistic help file.\n\n6. Load the example dataset: heartgenes214.dta\n\n7. You're all set, getmstatistic is installed, try some of the examples in the getmstatistic help file\n\n```\n\n## Installation: getmstatistic [**R** package](https://github.com/magosil86/getmstatistic)\n\n```{r}\n# To install the release version from CRAN:\ninstall.packages(\"getmstatistic\")\n\n# Load libraries\nlibrary(getmstatistic)  # for calculating M statistics\nlibrary(gridExtra)      # for generating tables\n\n\n# To install the development version from GitHub:\n\n# install devtools\ninstall.packages(\"devtools\")\n\n# install getmstatistic\nlibrary(devtools)\ndevtools::install_github(\"magosil86/getmstatistic\")\n\n# Load libraries\nlibrary(getmstatistic)  # for calculating M statistics\nlibrary(gridExtra)      # for generating tables\n\n```\n\n\n## Usage\n\n*  Take a look at an [example workflow](https://github.com/magosil86/getmstatistic/blob/master/vignettes/getmstatistic-tutorial.md)\n\n## Details\n\n* Essentially, _M_ statistics are computed by aggregating standardized predicted random effects (SPREs). To read up about the statistical theory behind the _M_ statistic see:\n\nMagosi LE, Goel A, Hopewell JC, Farrall M, on behalf of the CARDIoGRAMplusC4D Consortium (2017) Identifying systematic heterogeneity patterns in genetic association meta-analysis studies. PLoS Genet 13(5): e1006755. [https://doi.org/10.1371/journal.pgen.1006755](https://doi.org/10.1371/journal.pgen.1006755).\n\n\n## Getting help\n\nTo suggest new features, learn about getmstatistic updates, report bugs, ask questions about the mstatistic, or just interact with other users, sign up to the [getmstatistic](https://groups.google.com/forum/#!forum/getmstatistic) mailing list.\n\n\n## Code of conduct\nContributions are welcome. Please observe the [Contributor Code of Conduct](https://github.com/magosil86/getmstatistic/blob/master/CONDUCT.md) when participating in this project.\n\n## Citation\nMagosi LE, Goel A, Hopewell JC, Farrall M, on behalf of the CARDIoGRAMplusC4D Consortium (2017) Identifying systematic heterogeneity patterns in genetic association meta-analysis studies. PLoS Genet 13(5): e1006755. [https://doi.org/10.1371/journal.pgen.1006755](https://doi.org/10.1371/journal.pgen.1006755).\n\n\n## Acknowledgements.\nRoger M. Harbord’s metareg command for computation of standardized predicted random effects which are then incorporated into calculations for the _M_ statistics. Harbord, R. M., \u0026 Higgins, J. P. T. (2008). Meta-regression in Stata. Stata Journal 8: 493‚Äì519.\n\n\n## Authors.\nLerato E. Magosi, Jemma C. Hopewell and Martin Farrall.\n\n## Maintainer.\nLerato E. Magosi lmagosi@well.ox.ac.uk or magosil86@gmail.com\n\n## License\n\nSee the [LICENSE](https://github.com/magosil86/getmstatistic/blob/master/LICENSE) file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagosil86%2Fgetmstatistic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagosil86%2Fgetmstatistic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagosil86%2Fgetmstatistic/lists"}