.- help for ^xriml^ (STB-36 sbe13.2) .- Reference Interval Estimation by Maximum Likelihood --------------------------------------------------- ^xriml^ yvar [xvar] [^if^ exp] [^in^ range]^,^ ^di^st^(^distribution_code^)^ [major_options minor_options] where distribution_code is one of the following: ^n^|^en^|^men^|^pn^|^mpn^|^sl^. Description ----------- ^xriml^ calculates cross-sectional reference intervals for yvar, which is assumed to follow one of 6 possible distributions. The parameters are estimated by maximum likelihood. If xvar is specified, reference intervals for yvar conditional on xvar are estimated. Typically, xvar is age. The parameters of the distribution are modelled as functions of xvar using fractional polynomials (see @fracpoly@). ^xriml^ without variables or options displays the results of the most recent estimation. Options ------- ^dist(^distribution_code^)^ is NOT optional. Valid distribution_codes are Normal (^n^), exponential-Normal (^en^), modulus-exponential-Normal (^men^), power- Normal (or Box-Cox) (^pn^), modulus power-Normal (^mpn^) and shifted (or three- parameter) lognormal (^sl^). The major_options (most used options) are: ^ce^ntile^(^# [# [#...]]^)^ ^fp(^[^m:^term^,^] [^s:^term^,^] [^g:^term^,^] [^d:^term]^)^ where term is of the form [^powers^] # [# ...] or ^fix^ #. The minor_options (less used options) are: ^cova^rs^(^covar_list^)^ ^cv^ ^in^it^(^[^g:^#^,^] [^d:^#]^)^ ^lt^olerance^(^#^)^ ^nogr^aph no^scal^ing ^sav^ing^(^filename[^, replace^]^)^ ^se^ where covar_list is of the form [^m:^mcovars^,^] [^s:^scovars^,^] [^g:^gcovars^,^] [^d:^dcovars]. Major options ------------- ^centile(^# [# [#...]]^)^ defines the centiles of yvar|xvar required. Default is 3 and 97 (i.e. a 94% reference interval). ^fp(^[^m:^term^,^] [^s:^term^,^] [^g:^term^,^] [^d:^term]^)^ specifies the fractional polynomial power(s) in xvar for the M, S, G and (for the four-parameter distributions only) D regression models. term is of form [^powers^] # [# ...]|^fix^ #. The phrase ^powers^ is optional. The powers should be separated by spaces, for example ^fp(m:powers 0 1, s:powers 2)^, or equivalently ^fp(m:0 1,s:2)^. If ^powers^ or ^fix^ are not specified for any curve, the curve is assumed to be a constant (^_cons^) estimated from the data. ^fix^ # implies that the corresponding curve is NOT to be estimated from the data, but is to be fixed at #. ^fix^ is valid only with ^g:^ and ^d:^. Default: constants for each curve (M, S, G; D if applicable). Minor options ------------- ^covars(^[^m:^mcovars^,^] [^s:^scovars^,^] [^g:^gcovars^,^] [^d:^dcovars]^)^ includes mcovars (scovars, gcovars, dcovars) variables as predictors in the regression model for the M (S, G, D if applicable) curves. ^cv^ parametrizes the S curve to be a coefficient of variation (CV, standard deviation divided by median), rather than a standard deviation. ^init(^[^g:^#^,^] [^d:^#]^)^ specifies initial values for the G (^g:^) and (where applic- able) D (^d:^) parameter curves. Defaults are shown below. Distribution Default # for G Default # for D --------------------------------------------------- ^n^ N/A N/A ^en^ 0.01 N/A ^men^ -0.2 1 ^pn^ 1 N/A ^mpn^ 1 1 ^sl^ 0 N/A --------------------------------------------------- ^ltolerance(^#^)^ is a convergence criterion for the iterative fitting process. For convergence, the difference between the final two values of the log likelihood must be less than ^ltolerance^. Default : 0.001. ^nograph^ suppresses the default plot of yvar against xvar with fitted median and reference limits. ^saving(^filename[^, replace^]^)^ saves the graph to a file (see ^nograph^). ^se^ produces standard errors of the M, S, G (and if applicable, D) curves. If ^coverage()^ > 0 standard errors of the estimated reference limits are also calculated. (Warning: this option is computationally intensive when determining SEs of centiles, and may take considerable time on a slow computer and/or with a large dataset.) Remarks ------- All the models fitted by ^xriml^ are defined by transformations of the original data towards a Normal distribution (the `identity transformation' in the case of the Normal model). The shape parameter(s) of the resulting distributions may either be estimated from the data or fixed by the user. Estimation is by maximum likelihood and is iterative. For the three-parameter models, the fit should converge within about 4-8 iterations. For the four- parameter models, about 5-15 iterations are needed in most cases. The ^pn^ and ^mpn^ models may be used only with data which are positive in value. The restriction does not apply to any of the other models. Each of the ^en^, ^pn^ and ^sl^ distributions has 3 parameters known as M (mu, the median), S (sigma, the scale factor) and G (gamma, generic name for the shape parameter). M is modelled as a fractional polynomial (FP) function of xvar. S and G may also be modelled as FP functions of xvar, or may be treated as constants to be estimated from the data. The ^mpn^ (modulus power-Normal) and ^men^ (modulus exponential-Normal) dist- ributions are governed by four parameters, M, S, G and D. There are two shape parameters, G (gamma) and D (delta). Delta = 1 gives the `parent' ^pn^ and ^en^ (power-Normal and exponential-Normal) distributions respectively. If delta < 1 the distribution has longer tails than the corresponding `parent' distribution, and vice versa for delta > 1. The distributions with gamma = 1 for the ^mpn^ and gamma = 0 for the ^men^ are symmetric. The ^en^ (^men^) and ^pn^ (^mpn^) models are essentially identical in that if Y has a ^pn^ (^mpn^) distribution, then log Y has an ^en^ (^men^) distribution. However, the parameter values from the two models will differ, since in the first case the M curve is the median of Y, whereas in the second it is the median of log Y. The S curves from the ^en^ and ^men^ models for log Y have the character of a CV for Y. Examples -------- . ^use foothemi.dta^ . ^generate y = log(foot)^ . ^xriml y gawks, fp(m:-2 -2, s:1) dist(en)^ . ^xriml y gawks, fp(m:-2 -2, s:1, g:fix 0) dist(men) se^ . ^xriml foot gawks, fp(m:powers 2 2, s:powers 2) dist(pn)^ . ^xriml foot gawks, fp(m:2 2) dist(pn) cv^ Saved Results ------------- ^xriml^ saves in the ^$S_^# macros: ^S_1^ deviance (-2 * log likelihood) of the model Authors ------- Eileen Wright Royal Postgraduate Medical School, UK ewright@@rpms.ac.uk Patrick Royston Royal Postgraduate Medical School, UK proyston@@rpms.ac.uk Also see -------- STB: sbe13 (STB-34), sbe13.2 (STB-36) Manual: ^[R] fracpoly^ On-line: help for @fracpoly@, @centcalc@ (if installed)