-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathivxtile.sthlp
110 lines (83 loc) · 4.05 KB
/
ivxtile.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
{smcl}
{* *! version 0.1.0 16sep2021 Tom Palmer}{...}
{vieweralsosee "ivonesamplemr" "help ivonesamplemr"}{...}
{vieweralsosee "xtile" "help xtile"}{...}
{viewerjumpto "Syntax" "ivxtile##syntax"}{...}
{viewerjumpto "Description" "ivxtile##description"}{...}
{viewerjumpto "Options" "ivxtile##options"}{...}
{viewerjumpto "Examples" "ivxtile##examples"}{...}
{viewerjumpto "Stored results" "ivxtile##results"}{...}
{viewerjumpto "References" "ivxtile##references"}{...}
{viewerjumpto "Author" "ivxtile##author"}{...}
{title:Title}
{p 5}
{bf:ivxtile} {hline 2} Perorm estimation within quantiles of the first stage residuals prefix command
{p_end}
{marker syntax}{...}
{title:Syntax}
{p 8 12 2}
{cmd:ivxtile} {cmd:,} {opt par(string)} [{opt sa:ving(filename [, replace])}
{opt xtile_options}]{cmd::} {it:iv_cmd}
{synoptset 30 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt par:(string)}}Parameter from the {it:iv_cmd} (ivreg2, ivmsmm, ivlsmm, ivtsps, ivtsri) to collect{p_end}
{synopt:{opt sa:ving(filename [, replace])}}Save the within quantile estimation results to a dataset.
Specify {cmd:replace} to overwrite an existing dataset{p_end}
{synopt:{opt trace}}View the output from the {cmd:iv_cmd} in each quantile{p_end}
{synopt:{opt xtile_options:}}{help xtile##options}{p_end}
{marker description}{...}
{title:Description}
{pstd}
{cmd:ivxtile} implements the command specified after the prefix within quantiles of the first stage residuals,
as per {help ivxtile##burgess:Burgess et al., 2014}.
{marker options}{...}
{title:Options}
{phang}
Please see {help xtile##options}
{marker examples}{...}
{title:Examples}
{pstd}Simulate data with different outcome-exposure relationships; y# outcome, x exposure, g instrumental variable (genotype).{p_end}
{phang2}{cmd:.} {stata "use https://raw.github.com/remlapmot/ivonesamplemr/main/data/ivmwdata, clear"}{p_end}
{pstd}Plot outcome-exposure relationships{p_end}
{phang2}{cmd:.} {stata "twoway line y1 x, sort(x)"}{p_end}
{phang2}{cmd:.} {stata "twoway line y2 y3 y4 x, sort(x)"}{p_end}
{phang2}{cmd:.} {stata "twoway line y5 x, sort(x)"}{p_end}
{pstd}Use with different iv commands.{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(x): ivregress 2sls y2 (x = g)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(10) par(b1): ivtsps y2 (x = g)"}{p_end}
{pstd}Some binary outcome examples.{p_end}
{phang2}{cmd:.} {stata "use https://raw.github.com/remlapmot/ivonesamplemr/main/data/ivbinoutdata, clear"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsps y (x = z1 z2 z3), link(logadd)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsps y (x = z1 z2 z3), link(logmult)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsps y (x = z1 z2 z3), link(logit)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsri y (x = z1 z2 z3), link(logadd)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsri y (x = z1 z2 z3), link(logmult)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(b1): ivtsri y (x = z1 z2 z3), link(logit)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(x): ivlsmm y (x = z1 z2 z3)"}{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(5) par(x): ivmsmm y (x = z1 z2 z3)"}{p_end}
{pstd}Save the dataset of results.{p_end}
{phang2}{cmd:.} {stata "ivxtile, nq(10) par(x) saving(ivxtileres): ivreg2 y2 (x = g)"}{p_end}
{marker results}{...}
{title:Stored results}
{pstd}
{cmd:ivxtile} does not store results in either e() or r() but does save the results dataset
if the {cmd:saving()} option is specified.{p_end}
{marker references}{...}
{title:References}
{marker burgess}{...}
{phang}
Burgess S, Davies N, Thompson SG, EPIC-InterAct Consortium.
Instrumental variable analysis with a nonlinear exposure-outcome relationship.
Epidemiology, 2014, 25, 6, 877-885.
{browse "https://doi.org/10.1097/ede.0000000000000161":DOI}
{p_end}
{marker manxtile}{...}
{phang}
StataCorp. Stata Base Reference Manual. Release 16.
pctile - Creating variable containing percentiles. 2016.
{browse "https://www.stata.com/manuals/dpctile.pdf":URL}
{p_end}
{marker author}{...}
{title:Author}
INCLUDE help ivonesamplemr-author