*! version 1.0.0 24aug2017
help irax Wim van Putten, Patrick Royston

Title

irax -- Isotonic regression analysis (extended)

Syntax

irax
yvar
xvar
[if] [in]
[, options twoway_options]

options

ci pointwise confidence interval for fitted step function

combine combine the "forward" and "reverse" step functions

generate(varname) store fitted function in varname, and other quantities (see Options)

nograph suppress graph

nopts suppress scatter plot of yvar against xvar

reverse impose non-increasing association between yvar and xvar

twoway_options options for graph twoway

Description

irax performs isotonic regression analysis of yvar on xvar.
Isotonic regression means regression under order restriction. Whereas linear
regression fits a straight line, isotonic regression analysis fits a
step function, constrained to be either monotonically non-decreasing in xvar
(the default) or monotonically non-increasing (with the reverse option).

irax uses the PAVA (pool adjacent violators algorithm) to fit the step
function. See Barlow et al (1972) for further information.

Options

ci estimates a pointwise, partition-wise confidence interval for
the fitted step function. To do so, irax fits an auxiliary
regression on the partition groups. In sparse partitions, the
CI may be unavailable due to a too-small sample size. Note that the CI
is likely to be quite wide, due to the potentially large number of
parameters that are fitted.

combine computes the sum of the forward (positive association)
and reverse (negative association) step functions, and subtracts the mean
of yvar. This option relaxes the monotonicity constraints, and
represents an heuristic extension of isotonic regression analysis.
WORK IN PROGRESS.

generate(varname [, replace]) stores the fitted step
function in varname and the partition variable in varname_p.
If replace is specified, existing variables are replaced. If the
ci option is specified, the lower and upper confidence limits are
stored in varname_lci and varname_uci, respectively.

nograph suppresses the plot of the fitted step function and possible
other adornments.

nopts supppresses the scatter of yvar against xvar that is
produced as part of the graphical output in the linear regression case.
nopts has no effect in the binary case.

reverse imposes a monotonically non-increasing association between
yvar and xvar. The default is to impose a monotonically
non-decreasing association.

twoway_options are any options appropriate to graph, twoway.

Examples

. sysuse auto, clear

. irax price weight

. irax mpg weight, reverse ci

. irax foreign mpg, generate(p_ira)

. websuse brcancer, clear

. stset rectime, fail(censrec)

. predict mg, mgale

. irax mg x1, combine ci nopts

Authors

Wim van Putten, Erasmus MC, Rotterdam.

w.vanputten@erasmusmc.nl

Patrick Royston, MRC Clinical Trials Unit at UCL, London.

j.royston@ucl.ac.uk

Reference

R. E. Barlow, D. J. Bartholomew, J. M. Bremner and H. D. Brunk.
1972. Statistical inference under order restrictions;
the theory and application of isotonic regression.
New York: Wiley. ISBN 0-471-04970-0.

Also see

Online: graph_twoway, running (if installed)