-
Notifications
You must be signed in to change notification settings - Fork 9
/
mregger.sthlp
267 lines (214 loc) · 10.4 KB
/
mregger.sthlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
{smcl}
{* *! version 0.1.0 04jun2016 Tom Palmer}{...}
{vieweralsosee "mrrobust" "help mrrobust"}{...}
{viewerjumpto "Syntax" "mregger##syntax"}{...}
{viewerjumpto "Description" "mregger##description"}{...}
{viewerjumpto "Options" "mregger##options"}{...}
{viewerjumpto "Examples" "mregger##examples"}{...}
{viewerjumpto "Stored results" "mregger##results"}{...}
{viewerjumpto "References" "mregger##references"}{...}
{viewerjumpto "Author" "mregger##author"}{...}
{title:Title}
{p 5}
{bf:mregger} {hline 2} Mendelian randomization Egger regression
{p_end}
{marker syntax}{...}
{title:Syntax}
{p 8 16 2}
{opt mregger} {var:_gd} {var:_gp} [{it:aweight}] {ifin}
[{cmd:,} {it:options}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt fe:}}Fixed effect standard errors (default is multiplicative)
{p_end}
{synopt:{opt gxse(varname)}}variable of genotype-phenotype (SNP-exposure) SEs{p_end}
{synopt:{opt het:erogi}}Display heterogeneity/pleiotropy
statistics{p_end}
{synopt:{opt ivw:}}Inverse-variance weighted estimator (default is MR-Egger)
{p_end}
{synopt:{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt:{opt noresc:ale}}Do not rescale residual variance to be 1 (if less than 1){p_end}
{synopt:{opt oldnames}}Revert to using longer outcome name in b and V ereturned matrices{p_end}
{synopt:{opt penw:eighted}}Use penalized weights{p_end}
{synopt:{opt rad:ial}}Use radial formulations of the models{p_end}
{synopt:{opt tdist:}}Use t-distribution for Wald test and CI limits{p_end}
{synopt:{opt unwi2gx:}}Additionally report unweighted Q_GX and I^2_GX statistics{p_end}
{marker description}{...}
{title:Description}
{pstd}
{cmd:mregger} performs inverse-variance weighted (IVW; {help mregger##ivw:Burgess et al., 2013}) and Mendelian
randomization Egger (MR-Egger) regression ({help mregger##bowden:Bowden et al., 2015}) using summary level data
(i.e. using genotype-disease [SNP-outcome] and genotype-phenotype [SNP-exposure] association estimates
and their standard errors).
{pstd}
{var:_gd} variable containing the genotype-disease (SNP-outcome) association estimates.
{pstd}
{var:_gp} variable containing the genotype-phenotype (SNP-exposure) association estimates.
{pstd}
For the analytic weights you need to specify the inverse of the
genotype-disease (SNP-outcome) standard errors squared, i.e. aw=1/(gdse^2).
{marker options}{...}
{title:Options}
{phang}
{opt fe} specifies fixed effect standard errors (i.e. variance of residuals
constrained to 1 as in fixed effect meta-analysis models). The default is
to use multiplicative standard errors (i.e. variance of residuals
unconstrained as in standard linear regression), see
{help mregger##thompson:Thompson and Sharp (1999)} for further details.
We recommend specifying this option when using an
allelic score as the instrumental variable.
{phang}
{opt gxse(varname)} specifies the variable containing the genotype-phenotype (SNP-exposure)
association standard errors. These are required for calculating the I^2_GX
statistic ({help mregger##i2gx:Bowden et al., 2016}). An I^2_GX statistic of 90% means that the
likely bias due measurement error in the MR-Egger slope estimate is around
10%. If I^2_GX values are less than 90% estimates should be treated with
caution.
{phang}
{opt het:erogi} displays heterogeneity/pleiotropy
statistics. In the heterogeneity output
the model based Q-statistic is reported by multiplying the variance of the
residuals by the degrees of freedom ({help mregger##delgreco:Del Greco et al., 2015}).
For the IVW model this is the Cochran Q-statistic, and for the MR-Egger model this is the
Ruecker's Q-statistic. The corresponding I-squared statistic and its 95% CI is also reported.
{phang}
{opt ivw} specifies inverse-variance weighted (IVW) model ({help mregger##ivw:Burgess et al., 2013}),
the default is MR-Egger.
{phang}
{opt level(#)}; see {helpb estimation options##level():[R] estimation options}.
{phang}
{opt noresc:ale} specifies that the residual variance is not set to 1 (if
it is found to be less than 1). {help mregger##mrmedian:Bowden et al. (2016)}
rescale the residual variance to be 1 if it is found to be less than 1.
{phang}
{opt oldnames} revert to using the longer outcome variable name in the b and V ereturned matrices.
{phang}
{opt penw:eighted} specifies using penalized weights as described in
{help mregger##robust:Burgess et al. (2016)}.
{phang}
{opt rad:ial} specifies the radial formulation of the IVW and MR-Egger models
({help mregger##radial:Bowden et al., 2017)}.
Note there is only a difference for the MR-Egger model.
{phang}
{opt tdist} specifies using the t-distribution, instead of the normal
distribution, for calculating the Wald test and the confidence interval limits.
{phang}
{opt unwi2gx} specifies the unweighted Q_GX and I^2_GX statistics to be additionally displayed in
the output and in the ereturn scalars.
{marker examples}{...}
{title:Examples}
{pstd}Using the data provided by {help mregger##do:Do et al. (2013)} recreate
{help mregger##mrmedian:Bowden et al. (2016)}, Table 4,
LDL-c "All genetic variants" estimates.{p_end}
{pstd}Setup{p_end}
{phang2}{cmd:.} {stata "use https://raw.github.com/remlapmot/mrrobust/master/dodata, clear"}{p_end}
{pstd}Select observations ({it:p}-value with exposure < 10^-8){p_end}
{phang2}{cmd:.} {stata "gen byte sel1 = (ldlcp2 < 1e-8)"}{p_end}
{pstd}IVW (with fixed effect standard errors){p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1, ivw fe"}{p_end}
{pstd}MR-Egger (with SEs using an unconstrained residual variance){p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1"}{p_end}
{pstd}MR-Egger reporting {it:I^2_GX} statistic and heterogeneity Q-test{p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1, gxse(ldlcse) heterogi"}{p_end}
{pstd}MR-Egger using a t-distribution for inference & CI limits{p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1, tdist"}{p_end}
{pstd}MR-Egger using the radial formulation{p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1, radial"}{p_end}
{pstd}MR-Egger using the radial formulation and reporting heterogeneity Q-test{p_end}
{phang2}{cmd:.} {stata "mregger chdbeta ldlcbeta [aw=1/(chdse^2)] if sel1==1, radial heterogi"}{p_end}
{marker results}{...}
{title:Stored results}
{pstd}
{cmd:mregger} stores the following in {cmd:e()}:
{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Scalars}{p_end}
{synopt:{cmd:e(df_r)}}residual degrees of freedom (with {cmd:tdist}
option){p_end}
{synopt:{cmd:e(k)}}number of instruments{p_end}
{synopt:{cmd:e(I2GX)}}I^2_GX (with {cmd:gxse()} option){p_end}
{synopt:{cmd:e(QGX)}}Q_GX (with {cmd:gxse()} option){p_end}
{synopt:{cmd:e(phi)}}Scale parameter (root mean squared error){p_end}
{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Macros}{p_end}
{synopt:{cmd:e(cmd)}}{cmd:mregger}{p_end}
{synopt:{cmd:e(cmdline)}}command as typed{p_end}
{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Matrices}{p_end}
{synopt:{cmd:e(b)}}coefficient vector{p_end}
{synopt:{cmd:e(V)}}variance-covariance matrix of the estimates{p_end}
{pstd}
If {opt heterogi} is specified {cmd:mregger}
additionally returns the r-class results of {cmd:heterogi} in the e-class
results.
{pstd}
If {opt unwi2gx} is specified {cmd:mregger} additionally returns{p_end}
{synopt:{cmd:e(I2GXunw)}}Unweighted I^2_GX statistic{p_end}
{synopt:{cmd:e(QGXunw)}}Unweighted Q_GX statistic{p_end}
{pstd}
{cmd:mregger} stores the following in {cmd:r()}:
{synoptset 20 tabbed}{...}
{p2col 5 20 24 2: Matrices}{p_end}
{synopt:{cmd:r(table)}}Coefficient table with rownames: b, se, z, pvalue, ll, ul, df, crit, eform{p_end}
{marker references}{...}
{title:References}
{marker bowden}{...}
{phang}
Bowden J, Davey Smith G, Burgess S.
Mendelian randomization with invalid instruments: effect estimation and bias
detection through Egger regression. International Journal of Epidemiology,
2015, 44, 2, 512-525.
{browse "https://dx.doi.org/10.1093/ije/dyv080":DOI}
{p_end}
{marker mrmedian}{...}
{phang}
Bowden J, Davey Smith G, Haycock PC, Burgess S. Consistent estimation
in Mendelian randomization with some invalid instruments using a weighted
median estimator. Genetic Epidemiology, 2016, 40, 4, 304-314.
{browse "https://dx.doi.org/10.1002/gepi.21965":DOI}
{marker i2gx}{...}
{phang}
Bowden J, Del Greco F, Minelli C, Davey Smith G, Sheehan NA, Thompson JR.
Assessing the suitability of summary data for two-sample Mendelian
randomization analyses using MR-Egger regression: the role of the I-squared
statistic. International Journal of Epidemiology, 2016, 45, 6, 1961-1974.
{browse "https://dx.doi.org/10.1093/ije/dyw220":DOI}
{marker radial}{...}
{phang}
Bowden J, Spiller W, Del-Greco F, Sheehan NA, Thompson JR, Minelli C, Davey Smith G.
Improving the visualisation, interpretation and analysis of two-sample summary
data Mendelian randomization via the radial plot and radial regression.
International Journal of Epidemiology, 2018, 47, 4, 1264-1278. {browse "https://doi.org/10.1093/ije/dyy101":DOI}
{marker robust}{...}
{phang}
Burgess S, Bowden J, Dudbridge F, Thompson SG. Robust instrumental
variable methods using candidate instruments with application to Mendelian
randomization. arXiv:1606.03729v1, 2016.
{browse "https://arxiv.org/abs/1606.03729":Link}
{marker ivw}{...}
{phang}
Burgess S, Butterworth A, Thompson S. Mendelian randomization analysis with
multiple genetic variants using summarized data. Genetic Epidemiology, 2013, 37, 7, 658-665.
{browse "https://dx.doi.org/10.1002%2Fgepi.21758": DOI}
{marker delgreco}{...}
{phang}
Del Greco F M, Minelli C, Sheehan NA, Thompson JR. Detecting pleiotropy in
Mendelian randomization studies with summary data and a continuous outcome.
Statistics in Medicine, 2015, 34, 21, 2926-2940.
{browse "https://onlinelibrary.wiley.com/doi/full/10.1002/sim.6522":DOI}
{p_end}
{marker do}{...}
{phang}
Do R et al. Common variants associated with plasma triglycerides and risk
for coronary artery disease. Nature Genetics, 2013, 45, 1345-1352. DOI:
{browse "https://dx.doi.org/10.1038/ng.2795":DOI}
{p_end}
{marker thompson}{...}
{phang}
Thompson SG, Sharp SJ. Explaining heterogeneity in meta-analysis: a
comparison of methods. Statistics in Medicine, 1999, 18, 20, 2693-2708.
{browse "https://dx.doi.org/10.1002/(SICI)1097-0258(19991030)18:20<2693::AID-SIM235>3.0.CO;2-V":DOI}
{p_end}
{marker author}{...}
{title:Author}
INCLUDE help mrrobust-author