Thanks to Kit Baum, two new modules have been uploaded to SSC: -jnsn-
and -ovbd-.
The module -jnsn- actually comprises four related
commands, -jnsn-, -jnsni-, -jnsnw- and -ajv- These deal with so-called
Johnson curves or distributions, which is a system of transformations that
is known under several different names, and which finds use in a variety of
circumstances (forestry and fisheries management, industrial quality
control, environmental monitoring, mechanical and aerospace engineering,
clinical laboratory testing, and finance to name a few that I've run across
in the literature). The general purpose of Johnson system of
transformations is to transform a variable into another that more follows a
standard normal distribution. -jnsn-/-jnsni- (the latter an
immediate-command version of the former) fits Johnson distributions by a
method of moments (it is essentially an implementation of _Applied
Statistics_ Algorithm 99), while -jnsnw- fits Johnson distributions by
Wheeler's method of quantiles. These commands can optionally generate the
transformed variable, in addition to reporting the Johnson transformation
type and parameters. -ajv- takes a Johnson distribution type and set of
Johnson parameters as input and generates random variables that follow the
Johnson distribution, or optionally transforms a standard normal deviate
already in the dataset in memory (-generate z = invnormal(uniform())-
or -drawnorm-) into a Johnson distribution according to user-specifications.
The module -ovbd- generates correlated random binomial data and is analogous
to the official Stata command -drawnorm- for multivariate normal data. This
command uses Ridders's method of root finding, which is implemented in the
user-written command -ridder- that is called by -ovbd, and so -ridder- needs
to be installed, too (-findit ridders-). (The Ridders method, along with a
couple of other bracketing-type root-finding algorithms, is also available
in Mata in Roger Newson's package -somersd-/-cendif-/-censlope-, but that's
not called by -ovbd-.) The -ovbd- module includes an ancillary do file that
illustrates the command's use, for example, in generating binomial data that
follow an AR(1) covariance structure, which is then analyzed by -xtgee-.
Try seeing how accurately the means and covariance parameters are estimated
and inferences are made by -xtgee- under a variety of deliberate model
misspecifications.
Bug reports and suggestions for improvements for both are welcome.
Joseph Coveney
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/