help kappaetc, loa (SJ18-4: st0544)

Title

kappaetc, loa -- Limits of agreement (Bland-Altman
plot)

Syntax

kappaetc
varname1 varname2
[if] [in] [weight], loa[(#)]
[options]

* loa[(#)] estimate # percent limits of
agreement and create Bland-Altman plot; default is loa()

cformat(%fmt) control format of default
y-axis labels

novarlabel do not use variable labels as axis titles

lineopts(line_options) options for
graph twoway line

scatteropts(scatter_options) options for
graph twoway scatter

twowayopts(twoway_options) options for
graph twoway

keep keep temporary variables used for the plot

return[only] return results in r()[; do not
produce a graph]

* loa is required.

by is allowed; see [D] by.

fweights and iweights are allowed; see weight.

Description

kappaetc with the loa option estimates limits of agreement and
creates a Bland-Altman plot (Bland and Altman 1986), where differences between
paired ratings are plotted against their averages.

Options

loa[(#)] estimates # percent limits of agreement
and creates a Bland-Altman plot. The default is loa().
loa is required.

cformat(%fmt) specifies how to format the default y-axis
labels, that is, the mean and the lower and upper limits of agreement. The
default is cformat(%8.4f). This is a convenience option. The axis
labels and other details in the graph are controlled by the lineopts(),
scatteropts(), and twowayopts() options described below.

novarlabel specifies that variable names are used as axis titles, not
variable labels (the default). This is a convenience option. Axis titles and
other details in the graph are controlled by the lineopts(),
scatteropts(), and twowayopts() options described below.

lineopts(line_options) are options for
graph twoway line and modify the appearance of the plotted lines. The
default is lineopts(sort lstyle(p1 p2 p2)).

scatteropts(scatter_options)
are marker_options, marker_label_options, and
jitter_options for
graph twoway scatter and modify the appearance of the plotted markers.
The default is scatteropts(mstyle(p1)).

twowayopts(twoway_options) are options for twoway
graphs.

keep keeps temporary variables used to create the plot. The variable
names are _pairmean, _pairdiff, _meandiff, _lowerloa,
and _upperloa. All variables are created in double precision.
keep may not be combined with the by prefix.

return[only] stores results in r(). For example, the
following are stored: the mean difference, its standard deviation, and the
lower and upper limits of agreement, among other scalars. If returnonly
is specified, no graph is produced.

Example

. webuse p615b

. kappaetc rater1 rater2, loa

Stored results

kappaetc with the loa option stores nothing in r(). With
the return option, it stores the following in r():

Scalars

r(N) number of subjects

r(mean_diff) mean difference of ratings

r(sd_diff) standard deviation of mean difference

r(loa_ll) lower limit of agreement

r(loa_ul) upper limit of agreement

r(loa_level) level for limits of agreement

Macros

r(cmd) kappaetc

r(cmd2) loa

Reference

Bland, J. M., and D. G. Altman. 1986. Statistical methods for assessing
agreement between two methods of clinical measurement. Lancet 327: 307-310.

Author

Daniel Klein

International Centre for Higher Education Research Kassel

Kassel, Germany

klein@incher.uni-kassel.de

Also see

Article: Stata Journal, volume 18, number 4: st0544

Help: [R] icc, [R] kappa, baplot, batplot,
concord, kappaetc (if installed)