Transforming univariate non-normal data to normality using Johnson families of distributions. Johnson family is a comprehensive distribution family that accommodates many kinds of non-normal distributions. A bunch of distributions with various parameters will be fit and the corresponding p-values under a user-specified normality test will be given. The final transformation will be the one with the largest p-value under the given normality test.
This package gives a simple solution for normality transformation based on the newest transformation algorithm by Chou, Youn Min; Polansky, A. M. M. R. L. (1998). The rich options it provides can be used for simulations on the algorithm. It uses standard S3 class and methods, so it's an small but indispensable building block for statistical procedures which have the problem of non-normality.
There are now two packages on CRAN can do Johnson normality transformations, Johnson by Edgar Santos Fernandez and JohnsonDistribution by A.I. McLeod and Leanna King. However, both of them have certain limitations to performing easy and correct normality transformation.
Although Johnson package is also based on the algorithm by Chou, Youn Min; Polansky, A. M. M. R. L. (1998), it's a C style implementation and hasn't been vectorized, so it's hard to debug and it generally takes 10 times longer than jtrans. It implementes the sample quantile function in a non-standard way (different from the quantile function from stats package), which will lead to errors in the following calculations.
JohnsonDistribution package is based on I. D. Hill (1976). It aims to provide Johnson curve distribution and estimation functions, so the design concept is slightly different from Johnson normality transformation.
jtrans is the main function. Import is a numeric vector of non-normal data. Output is the transformed data with Johnson curve and parameters. The Shapiro-Wilk test is used by default, and the p.value of the transformed data will also be returned.