```help centcalc                                                   Patrick Royston
-------------------------------------------------------------------------------

Centile calculation

Syntax

centcalc mvar svar [, options ]

options               Description
-------------------------------------------------------------------------
centiles(numlist)   defines the required centiles of yvar|xvar
dist(dist_name)     specifies the distribution of the response variable
gamma(# | gvar)     G
delta(# | dvar)     D
cv                  produces estimated parameters and centiles at all
non-missing values of xvar
prefix(stub)        defines a censoring variable
-------------------------------------------------------------------------

Description

centcalc calculates distribution-based centiles from user-supplied
parameter values for location (mvar), scale (svar) and shape (gamma() and
delta()). The distributions (dist()) are all transformations of the
Normal (Gaussian) distribution.

Options

centiles(numlist) is the list of estimated centiles (e.g. 50 for the
median) to be calculated.

cv is an option relating to the parameterisation of the S-curve for the

delta(# | dvar) defines the (second) shape parameter as a variable (dvar)
or as a number (#).  If delta() is not specified, it is taken from
the macro \$S_delta.

dist(dist_name) determines the distributional model (see xriml and
Remarks below for further details). dist_name must be one of n, en,
men, pn, mpn, or sl.  If dist() is not specified, dist_name is taken
from the macro \$S_dist.

gamma(# | gvar) defines the (first) shape parameter as a variable (gvar)
or as a number (#).  If gamma() is not specified, it is taken from
the macro \$S_gamma.

prefix(stub) is the prefix of the names of new variables created to hold
the estimated centiles, each labelled appropriately.  Default stub is
C.

Remarks

Further details of the distributions:

--------------------------------------------------------------------------
Code     Name of distribution   Location   Scale           Shape param(s)
--------------------------------------------------------------------------
n        Normal (Gaussian)      mean       std. dev.       (not applic.)
en       Exponential-Normal     median     std. dev.-like  skewness-like
men      Modulus exp-Normal     median     std. dev.-like  (see below)
pn       Power-Normal           median     std. dev.-like  power transf.
mpn      Modulus pow-Normal     median     std. dev.-like  (see below)
sl       Shifted lognormal      median     std. dev.-like  skewness-like
--------------------------------------------------------------------------

The mpn and men distributions each have two shape parameters, the first
(denoted by G) related to skewness and the second (denoted by D) related
to kurtosis.

Examples

. centcalc M_ml S_ml, dist(n) centiles(10 90)

. centcalc M_ml S_ml, dist(en) centiles(10 90) gamma(G_ml)

. centcalc median cv, dist(pn) centiles(3 25 75 97) gamma(lambda) cv

. centcalc M S, dist(men) centiles(1 3 50 97 99) gamma(g) delta(d)

Author

Patrick Royston, MRC Clinical Trials Unit, London.
patrick.royston@ctu.mrc.ac.uk

Eileen Wright, Macclesfield

Also see

Manual:  [R] fracpoly

Online:  xriml, xrigls (if installed), fracpoly
```