jtrans
fits data to a set of distributions from Johnson family. A
normality test is used to find the best fit by choosing the fit with maximum
p.value under that given test. It returns the transformed data, the
corresponding type of Johnson curve and parameter estimations.Since the default Shapiro-Wilk test can only accept sample size between 3 and
5000, one should specify another normality test in the test parameter,
generally the ad.test
in the nortest package is
recommended.
Sometimes, this algorithm may return poor fits. The most extreme case is that
all the transformed data have smaller p.values than the original data's. In
such cases, the exclude_original
flag should be set to FALSE, so
jtrans
will return the original data as the transformed data.