help jnswVersion 1.0 2007-02-26 -------------------------------------------------------------------------------

Title

jnsw-- Fit Johnson's system of transformations by Wheeler's quantile method

Syntax

jnswvarname[if] [in] [,options]

optionsDescription ------------------------------------------------------------------------- Maingenerate(newvar)create variable namednewvarthat is the fitted normal transformation ofvarnamedistribution(type)force fit to a specified Johnson distribution typelntolerance(#)tolerance for discriminating from the log-normal linetboneonlyuse only the upper quantilespercentile(#)use a subset of the datagamma(#)force fit with a specified value forgammadelta(#)force fit with a specified value fordeltalambda(#)force fit with a specified value forlambdaxi(#)force fit with a specified value forxi-------------------------------------------------------------------------bymay be used withjnsw; seeby.

Description

jnswfits Johnson systems of transformations using the quantile method of Wheeler (1980).

Options+------+ ----+ Main +-------------------------------------------------------------

distributionforces the fit to a user-specified Johnson distribution type; acceptable types areSL,SBandSUin upper case, lower case or mixed case. The default is to select the type by reference to the log-normal line.

lntolerancespecifies the tolerance for discriminatingSBandSUdistribution types fromSL, based upon difference from the log-normal line. The default is 0.01, acceptable values are 0.0001 to 0.5, with smaller values resulting in more fits declared asSLtype.

tboneonlyrequests that only the upper tail contribute to the the intermediarytbresult; the default is to use the average of twotbs determined from both tails.

percentile(#)requests that only the values ofvarnameless than or equal to the # percentile contribute to the fit; the default is 100.

gammadeltalambdadeltaforces to fit to use user-specified values of the parameter.

Remarks

jnswfits parameters of Johnson distributions by the method of quantiles (Wheeler, 1980). The method selects and fits the Johnson distribution on the basis of five quantiles, one of which is the median. Flynn (2006) determined that, at least for fitting certainSBdistributions, Wheeler's quantile method performs better than two other popular percentile methods that use only four percentiles.Details of the method for fitting

gammaanddeltaare given in Wheeler (1980). In particular, the default of using both tails to calculate the intermediary statistic,tb, is based upon a suggestion in the article that this is expected to provide for more accurate results in fittingdelta. The article illustrates the method usingtbestimated from only one tail, however, and thetboneonlyoption will force this should the user desire to follow Wheeler's illustrations.

lambdaandxiare fit using ordinary least-squares linear regression, as suggested in the article.The

percentileoption is made available for use with censored data, as suggested in the article.For the

SLJohnson type,jnswdeviates from the article in that (i)gammais explicitly fit (Wheeler combines it intodelta, assuminglambdawill be explicitly fit), (ii)deltais constrained to be positive in accordance with convention (Wheeler allows it to be negative for negatively skewed data, again, assuming thatlambdawill be allowed to vary freely), and (iii)lambdais set to 1 if the data are positively skewed and -1 if the data are negatively skewed. This latter convention of constraininglambdato unity, with its sign reflecting direction of skew, follows Hill, Hill and Holder (1976). That method is implemented in jnsn (if installed). These deviations from Wheeler's article allow results between the two methods to be directly comparable. They also allow the results fromjnsw, which are returned in return scalars and a return macro, to be used in conjunction with ajv (if installed) to generate random variates that follow the Johnson distribution fit forvarnamebyjnsw.

ReferencesM. R. Flynn, Fitting human exposure data with the Johnson SB distribution.

Journal of Exposure Science and Environmental Epidemiology16:56–62, 2006.I. D. Hill, R. Hill and R. L. Holder, Fitting Johnson curves by moments.

Applied Statistics25:180–89, 1976.R. E. Wheeler, Quantile estimators of Johnson curve parameters.

Biometrika67:725–28, 1980.

Examples

. jnsw x

. jnsw x, di(sb) p(75) l(101) x(0)

AuthorJoseph Coveney jcoveney@bigplanet.com

Also seeManual:

[R] summarize,[R] boxcox,[R] lnskew0,[R] ladderOnline:

jnsn,ajv,transint,summarize,boxcox,lnskew0,ladder,xriml