help batplot
-------------------------------------------------------------------------------

Title Produces a Bland-Altman plot when there is a relationship between paired differences and their average

Syntax

batplot varname1 varname2 [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main info specifies that the percentage of points outside the limits of agreement are displayed as a subtitle. valabel(varname) specifies that the points outside the limits of agreement be labelled using the variable varname. shading(min max) specifies the extent of shading beyond the range of the data. dp(#) specifies the precision of the numbers in the title of the graph. notrend specifies that the original Bland-Altman plot (without a trend) be plotted. moptions specifies options for the markers that lie outside the limits of agreement. scatter specifies options for the scatter part of the final plot, see scatter. twoway_options specifies options for example titles and labels. -------------------------------------------------------------------------

Description

batplot produces a Bland-Altman plot adjusted for trend.

The standard Bland-Altman plot is between the difference of paired variables versus the average, this is produced using the notrend option. The main addition that this command handles is when there is a linear relationship between the the paired difference and the paired average. A regression model is used to adjust the limits of agreement accordingly. This is particularly useful when the two variables might be measured on different scales and hence a straight conversion factor would recalibrate the two variables.

Options

+------+ ----+ Main +-------------------------------------------------------------

info specifies that the percentage of points outside the limits of agreement are displayed as a subtitle. Additionally when using the notrend option the limits of agreement and mean difference are included in the subtitle.

valabel(varname) specifies that the points outside the limits of agreement be labelled using the variable varname.

shading(min max) specifies the extent of shading beyond the range of the data. The default is that the limits of shading is determined by the values in the xlabel option.

dp(#) specifies the precision of the numbers in the title of the graph. The default is 2 decimal places.

notrend specifies that the original Bland-Altman plot (without a trend) be plotted.

moptions specifies options for the markers that lie outside the limits of agreement, the options can be anything from the scatter marker options scatter##marker_options.

scatter specifies options for the scatter part of the final plot.

Examples

Using the auto.dta dataset supplied with STATA 8 this command can check whether there is agreement between turning circle (ft) and miles per gallon, click the highlighted text in order,

sysuse auto, clear

batplot mpg turn

This is the most basic graphic and using twoway options the look can be improved by clicking below,

batplot mpg turn, title(Agreement between mpg and turn) xlab(26(4)38)

By specifying extra options the outlying points can be labelled and identified by the car make,

batplot mpg turn, title(Agreement between mpg and turn) info valabel(make) xlab(26(4)38)

To obtain the original Bland Altman plot use the notrend option,

batplot mpg turn, title(Agreement between mpg and turn) info valabel(make) notrend xlab(26(4)38)

To improve the labelling of the point VW it may be preferable to change the clock position of the label i.e. labels could appear to the left of the point. This is handled below with moptions().

batplot mpg turn, title(Agreement between mpg and turn) info valabel(make) notrend xlab(26(4)38) moptions(mlabp(9))

Additionally in the case of multiple scatter points by using the scatter() option the user can specify to "jitter" datapoints

batplot mpg turn, notrend xlab(26(4)38) moptions(mlabp(9)) sc(jitter(4))

Author

Adrian Mander, MRC Biostatistics Unit, Cambridge, UK.

Email adrian.mander@mrc-bsu.cam.ac.uk

Also see

Related commands

HELP FILES baplot (if installed)