*! version 0.1.0 29may2016

Title

getmstatistic -- Quantifying Systematic Heterogeneity in Meta-Analysis

Syntax

getmstatistic
[varlist]
[if] [in]
[, options]

Main
noprint suppress the display of results

latexout display results as latex output

nograph suppress creation of graphs

savedataset save the dataset of computed M statistics

mm use method-of-moments to estimate tau2

reml use residual maximum likelihood to estimate tau2

eb use empirical Bayes to estimate tau2

by is not allowed; see [D] by.

fweights are not allowed; see weight.

Description

getmstatistic -- computes M statistics to assess the contribution of each
participating study in a 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 GWAS
meta-analysis. In contrast to conventional heterogeneity metrics (Q-statistic,
I-squared and tau-squared) which measure random heterogeneity at individual
variants, the M-statistic measures systematic (non-random) heterogeneity across
multiple independently associated variants.

Options

Main

noprint By default, the results are displayed in three tables(summary,
weaker studies and influential studies). The summary table reports the
number of variants, studies, expected mean, expected standard deviation and
the critical value for M at alpha = 0.05. The weaker and influential
studies tables report M statistics, confidence intervals and bonferroni adjusted
p-values of studies significant at the 5% level. noprint suppresses this
output.

latexout Produces latex tables for the weaker and influential
studies that can be included in a report.

nograph Suppresses the creation of graphs (three) showing: the M statistic values
of studies against the average variant effect-size in each study (with and without
error bars). A histogram of the M statistics.

reml Specifies the usage of residual maximum likelihood to estimate between-study
heterogeneity.

mm Specifies the usage of method-of-moments to estimate
between-study heterogeneity. This is the default.

eb Specifies the usage of empirical Bayes to estimate
between-study heterogeneity.

savedataset Saves the dataset of computed M statistics, which includes the
following variables:

Mstatistic mean aggregate multi-variant heterogeneity statistic

M_se standard error of M

lowerbound lowerbound of M 95% confidence interval

upperbound upperbound of M 95% confidence interval

bonfpvalue 2-sided bonferroni pvalues of M

tau2 tau_squared, REML estimates of between-study heterogeneity

I2 I_squared, proportion of total variation due to between study variance

Q Cochran's Q

xb fitted values excluding random effects

usta standardized predicted random effect (SPRE)

xbu fitted values including random effects

stdxbu standard error of prediction (fitted values) including random effects

hat diagonal elements of the projection hat matrix

study study numbers

snp variant numbers

Remarks

For statistical theory behind the M statistic, see
Magosi 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 and
vignette.

Examples

abbreviations: beta_flipped (study effect-size) gcse (standard error)

Setup

. use heartgenes214

. notes

Compute M statistics; displays influential and weaker studies by default

. getmstatistic beta_flipped gcse variants studies

Compute M statistics; using method-of-moments to estimate tau2

. getmstatistic beta_flipped gcse variants studies, mm

Compute M statistics; save dataset containing computation results

. getmstatistic beta_flipped gcse variants studies, savedataset

Compute M statistics for a subset of the dataset; displays results as latex
tables and suppresses graphs

. getmstatistic beta_flipped gcse variants studies if studies <= "10" in 1/1325, latex nograph

Compute M statistics for a subset of variants and save dataset to extract Q-statistic and I-squared values; suppresses
graphical display and saves dataset

. getmstatistic beta_flipped gcse variants studies if variants > "rs10071096" & variants <= "rs2891168", savedataset noprint

Stored results

getmstatistic stores the following in r():

Scalars

r(number_variants) number of variants

r(number_studies) number of participating studies

r(M_expected_mean) expected mean for M

r(M_expected_sd) expected standard deviation for M

r(M_crit_alpha_0_05) M critical at alpha=0.05

References

Harbord, R. M., & Higgins, J. P. T. (2008). Meta-regression in Stata.
Stata Journal 8: 493–519.

Dependencies

Commands that need to be installed for getmstatistic to work:
cii
duplicates
egen
latabstat
metareg
savesome
summarize
tabstat
qqvalue

Authors

Lerato E. Magosi, Jemma C. Hopewell and Martin Farrall

Wellcome Trust Centre for Human Genetics

University of Oxford, UK

lmagosi@well.ox.ac.uk

magosil86@gmail.com

Acknowledgments

The code employs Roger M. Harbord's metareg command for computation of
standardized predicted random effects which are then incorporated into calculations
for the M statistics.