📄 epitab.hlp
字号:
{opt ird} ({cmd:ir}) may be used only with {opt estandard}, {opt istandard}, or
{opt standard()}. It requests that {cmd:ir} calculate the standardized
incidence-rate difference rather than the default incidence-rate ratio.
{phang}
{opt rd} ({cmd:cs}) may be used only with {opt estandard}, {opt istandard}, or
{opt standard()}. It requests that {opt cs} calculate the standardized risk
difference rather than the default risk ratio.
{phang}
{opt bd} ({cmd:cc}) specifies that Breslow and Day's chi-squared test of
homogeneity be included in the output of a stratified analysis. This tests
whether the exposure effect is the same across strata. {opt bd} is relevant
only if {opt by()} is also specified.
{phang}
{opt binomial(varname)} ({cmd:cs}, {cmd:cc}, {cmd:tabodds}, and {cmd:mhodds}) supplies the
number of subjects (cases plus controls) for binomial frequency records. For
individual and simple frequency records, this option is not used.
{phang}
{opt or} ({cmd:cs}, {cmd:csi}, and {cmd:tabodds}), for {cmd:cs} and {cmd:csi},
reports the calculation of the odds ratio in addition to the risk ratio if
{opt by()} is not specified. With {opt by()}, {opt or} specifies that a
Mantel-Haenszel estimate of the combined odds ratio be made rather than the
Mantel-Haenszel estimate of the risk ratio. In either case, this is the same
calculation as would be made by {opt cc} and {opt cci}. Typically, {cmd:cc},
{cmd:cci}, or {cmd:tabodds} is preferred for calculating odds ratios. For
{cmd:tabodds}, {opt or} specifies that odds ratios be produced; see {opt base()}
for details about selecting a reference category. By default, {cmd:tabodds}
will calculate odds.
{phang}
{opth adjust(varlist)} ({cmd:tabodds}) specifies that odds ratios adjusted for
the variables in {it:varlist} be calculated.
{phang}
{opt base(#)} ({cmd:tabodds}) specifies that the {it:#}th category of
{it:expvar} be used as the reference group for calculating odds ratios. If
{opt base()} is not specified, the first category, corresponding to the
minimum value of {it:expvar}, is used as the reference group.
{phang}
{opt cornfield} ({cmd:cc}, {cmd:cci}, and {cmd:tabodds}) requests that the
Cornfield approximation be used to calculate the standard error of the odds
ratio. Otherwise, standard errors are obtained as the square root of the
variance of the score statistic or exactly in the case of {cmd:cc} and
{cmd:cci}.
{phang}
{opt woolf} ({cmd:cs}, {cmd:csi}, {cmd:cc}, {cmd:cci}, and {cmd:tabodds})
requests that the Woolf approximation, also known as the Taylor expansion, be
used for calculating the standard error of the odds ratio. Otherwise, with the
exception of {cmd:tabodds} and {cmd:mhodds}, the Cornfield approximation is
used. The Cornfield approximation takes substantially longer (a few seconds) to
calculate than the Woolf approximation. In the case of {cmd:tabodds} and
{cmd:mhodds}, standard errors of the odds ratios are obtained as the square root
of the variance of the score statistic. This standard error is used in
calculating a confidence interval for the odds ratio. (For matched case-control
data, exact confidence intervals are always calculated.)
{phang}
{opt tb} ({cmd:ir}, {cmd:iri}, {cmd:cs}, {cmd:csi}, {cmd:cc}, {cmd:cci},
{cmd:tabodds}, {cmd:mcc}, and {cmd:mcci}) requests that test-based confidence
intervals be calculated wherever appropriate in place of confidence intervals
based on other approximations or exact confidence intervals. We recommend that
test-based confidence intervals be used only for pedagogical purposes and never
for research work.
{phang}
{opt exact} ({cmd:cs}, {cmd:csi}, {cmd:cc}, {cmd:cci}) requests Fisher's exact
p be calculated rather than the chi-squared and its significance level. We
recommend specifying {opt exact} whenever samples are small. A conservative
rule of thumb for 2x2 tables is to specify {opt exact} when the least-frequent
cell contains fewer than 1,000 cases. When the least-frequent cell contains
1,000 cases or more, there will be no appreciable difference between the exact
significance level and the significance level based on the chi-squared, but the
exact significance level will take considerably longer to calculate. Note that
{opt exact} does not affect whether exact confidence intervals are calculated.
Commands always calculate exact confidence intervals where they can unless,
{opt tb} or {opt woolf} is specified.
{phang}
{opt compare(v_1,v_2)} ({cmd:mhodds}) indicates the categories of {it:expvar} to
be compared; {it:v_1} defines the numerator and {it:v_2} the denominator.
When {opt compare} is absent and there are only two categories, the second is
compared to the first; when there are more than two categories, an approximate
estimate of the odds ratio for a unit increase in {it:expvar}, controlled for
specified confounding variables, is given.
{phang}
{opt level(#)} ({cmd:ir}, {cmd:iri}, {cmd:cs}, {cmd:cc}, {cmd:tabodds}, {cmd:mhodds}, {cmd:mcc}, and {cmd:mcci}) specifies the confidence level, as a
percentage, for confidence intervals. The default is {cmd:level(95)} or as
set by {cmd:set level}; see {help level}.
{pstd}
The following options are for use only with {cmd:tabodds}.
{dlgtab:Main}
{phang}
{opt graph} ({cmd:tabodds}) produces a graph of
the odds against the numerical code used for the categories of {it:expvar}.
All graph options except {opt connect() are allowed. This option is not
allowed with either the {opt or} option or the {opt adjust()} option.
{phang}
{opt ciplot} ({cmd:tabodds}) produces the same
plot as the {opt graph} option, except that it also includes the confidence
intervals. This option may not be used with either the {opt or} option or the
{opt adjust()} option.
{dlgtab:Plot}
{phang}
{it:marker_options} ({cmd:tabodds}) affect the rendition of the markers drawn at
the plotted points, including their shape, size, color, and outline; see
{it:{help marker_options}}.
{phang}
{it:marker_label_options} ({cmd:tabodds}) specify if and how the markers are
to be labeled; see {it:{help marker_label_options}}.
{phang}
{it:cline_options} ({cmd:tabodds}) affect whether lines connect the
plotted points and the rendition of those lines; see {it:{help cline_options}}.
{dlgtab:CI plot}
{phang}
{opt ciopts(rcap_options)} ({cmd:tabodds}) is allowed only with the
{opt ciplot} option. It affects the rendition of the confidence bands;
see {helpb twoway rcap}.
{dlgtab:Add plot}
{phang}
{opt addplot(plot)} ({cmd:tabodds}) provides a way to add other plots to the
generated graph; see {it:{help addplot_option}}.
{dlgtab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{phang}
{it:twoway_options} ({cmd:tabodds}) and are any of the options documented in
{it:{help twoway_options}} excluding {opt by()}. These include options for
titling the graph (see {it:{help title_options}}) and options for saving the
graph to disk (see {it:{help saving_option}}).
{title:Examples: incidence rate data}
{pstd}The table for incidence rate data is
{center:{space 12}{char |} Exposed Unexposed}
{center:{hline 12}{char +}{hline 21}}
{center:Cases {char |} a b }
{center:Person-time {char |} N1 N0 }
{pstd}The basic syntax (ignoring options) for {cmd:iri} is
"{cmd:iri} {it:#a #b #N1 #N2}". For example:
{phang2}{cmd:. iri 41 15 28010 19017}{p_end}
{phang2}{cmd:. iri 41 15 28010 19017, level(90)}{p_end}
{phang2}{cmd:. iri 41 15 28010 19017, level(90) tb}
{pstd}
The basic syntax (ignoring options) for {cmd:ir} is "{cmd:ir} {it:case_var}
{it:ex_var} {it:time_var}". {it:case_var} contains the number of cases
represented by an observation. {it:ex_var} contains 0 if the observation
represents unexposed and nonzero (e.g., 1) if the observation represents
exposed. {it:time_var} contains the exposure time (e.g., person-years)
represented by the observation. {cmd:ir} obtains the table by summing across
observations. Observations with missing values are not used.
{cmd:. list}
{txt} cases exposed time
1. {res} 20 1 14000
{txt} 2. {res} 21 1 14010
{txt} 3. {res} 15 0 19017
{txt}
{cmd:. ir cases exposed time, level(90)}
(output omitted)
{pstd}To obtain Mantel-Haenszel combined IRR:
{cmd:. list}
{txt} agegrp deaths exposed pyears
1. {res} 1 14 1 1516
{txt} 2. {res} 1 10 0 1701
{txt} 3. {res} 2 76 1 949
{txt} 4. {res} 2 121 0 2245
{txt}
{phang2}{cmd:. ir deaths exposed pyears, by(agegrp)}
{pstd}To obtain internally standardized IRR:
{phang2}{cmd:. irr deaths exposed pyears, by(agegrp) istandard}
{pstd}To weight each group equally:
{phang2}{cmd:. gen wgt=1}{p_end}
{phang2}{cmd:. irr deaths exposed pyears, by(agegrp) standard(wgt)}
{title:Examples: cohort-study data}
{pstd}The table for cohort-study data is
{center:{space 12}{char |} Exposed Unexposed}
{center:{hline 12}{char +}{hline 21}}
{center:Cases {char |} a b }
{center:Noncases {char |} c d }
{pstd}
The basic syntax (ignoring options) for {cmd:csi} is "{cmd:csi} {it:#a}
{it:#b} {it:#c} {it:#d}". For example:
{phang2}{cmd:. csi 7 12 9 2}{p_end}
{phang2}{cmd:. csi 7 12 9 2, exact}{p_end}
{phang2}{cmd:. csi 7 12 9 2, exact level(90) tb}
{pstd}
The basic syntax (ignoring options) for {cmd:cs} is "{cmd:cs} {it:case_var}
{it:ex_var}". {it:case_var} contains nonzero (e.g., 1) if the observation
represents a case and a zero if it represents a noncase. {it:ex_var} contains
0 if the observation represents unexposed and nonzero (e.g., 1) if it
represents exposed. Frequency weights are allowed.
{cmd:. list}
{txt} case exp pop
1. {res} 0 0 2
{txt} 2. {res} 0 1 9
{txt} 3. {res} 1 0 12
{txt} 4. {res} 1 1 2
{txt} 5. {res} 1 1 5
{txt}
{cmd:. cs case exp [freq=pop]}
(output omitted)
{pstd}
If "{cmd:[freq=pop]}" is not specified, each observation contributes 1.
{pstd}
Stratified tables work as with {cmd:ir}. To obtain the Mantel-Haenszel
combined risk ratio:
{phang2}{cmd:. cs case exposed [freq=pop], by(age)}
{pstd}To obtain internally standardized risk ratio:
{phang2}{cmd:. cs case exposed [freq=pop], by(age) istandard}
{pstd}To obtain externally standardized risk ratio:
{phang2}{cmd:. cs case exposed [freq=pop], by(age) estandard}
{pstd}To weight each age group equally:
{phang2}{cmd:. gen wgt=1}{p_end}
{phang2}{cmd:. cs case exposed [freq=pop], by(age) standard(wgt)}
{title:Examples: case-control data}
{pstd}
{cmd:cc} and {cmd:cci} work just like {cmd:cs} and {cmd:csi}. They differ
in that they report the odds ratio rather than the risk ratio.
{title:Examples: case-control data with multiple levels of exposure}
{pstd}
{cmd:tabodds} and {cmd:mhodds} allow for exposure at more than two levels
and produce odds or odds ratios for each level of exposure along with score
tests for trend and homogeneity. Odds ratios adjusted for possible confounders
can be produced using {cmd:tabodds}'s {cmd:adjust()} option or by specifying 3
or more variables with {cmd:mhodds}.
{phang2}{cmd:. tabodds cases, binomial(N)}{p_end}
{phang2}{cmd:. tabodds cases exposure}{p_end}
{phang2}{cmd:. tabodds cases exposure, or}{p_end}
{phang2}{cmd:. tabodds cases exposure, or woolf}{p_end}
{phang2}{cmd:. tabodds cases exposure, adjust(age)}{p_end}
{phang2}{cmd:. mhodds cases exposure age, binomial(N)}
{title:Examples: matched case-control data}
{pstd}
{cmd:mcc} and {cmd:mcci} work just like {cmd:cc} and {cmd:cci} except that
they report different statistics. Stratified tables are not allowed with
{cmd:mcc}.
{title:Also see}
Manual: {bf:[ST] epitab}
{psee}
Online: {helpb bitest}, {helpb ci}, {helpb clogit},
{helpb dstdize}, {help immed}, {helpb logistic}, {helpb nbreg},
{helpb poisson}, {help st}, {helpb stcox}, {helpb symmetry}, {helpb tabulate}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -