*! version 1.2.0 15jul2020
help pciplot Patrick Royston

Title

pciplot -- Plot pointwise confidence intervals

Syntax

pciplot yvar {yvar_lci yvar_uci | se_yvar} xvar [if] [in]
[, options ]

options

"addplot(addplot_option:plot)" add other plots to the generated graph

exponential apply exponential transformation to yvar and its confidence limits

rareaopts(rarea_options) options for graph twoway rarea affecting the confidence band

twoway_options options for graph, twoway

Description

pciplot produces plots of pointwise confidence intervals for yvar
against a continuous variable, xvar. Either the s.e., se_yvar, of
yvar or the confidence limits, yvar_lci and yvar_uci, may be
supplied. The CIs are rendered as a shaded area and the relationship between
yvar and xvar is plotted as a line.

Options

addplot(plot) provides a way to add other plots to the
generated graph. See [G-3] addplot_option.

exponential apples exponential transformation to yvar and its
confidence limits. This is useful when values that have been estimated
on the natural log scale (ln()) are better presented on the "antilog"
(exp()) scale. Note that values of the llim(#) and ulim(#)
options are then assumed to be on the exponential (antilog) scale.

rareaopts(rarea_options) are options
documented in graph twoway rarea that affect the rendition
of the pointwise confidence band.

twoway_options are graph options documented in
[G-3] twoway_options.

Examples

. pciplot y y_se x, addplot(line x x, sort)

. generate y_lci = y - 1.96 * y_se

. generate y_uci = y + 1.96 * y_se

. pciplot y y_lci y_uci x, yline(0) legend(off) saving(graph, replace)

. pciplot y y_se x, exponential yline(1) legend(off)

Author

Patrick Royston

MRC Clinical Trials Unit at UCL

London, UK

j.royston@ucl.ac.uk

Also see

Online: graph_twoway