StatsToDo : Numerical Transformation
Explanations Javascript Programs R Codes
Introduction Linear Transformations Curvilinear Transformation Poisson Transformation Cox-Box Transformation
This page presents a number of algorithms for numerical transformation, in Javascript programs and in R codes.

Transformations are often carried out in data analysis, either to rescale the values, or to change the data to normal distribution so that the powerful tools of parametric statistics can be used for analysis. The following transformations are available on this page

• Linear transformation, which are essentially rescaling algorithms. These include rescaling to new maximin/minimum, to new mean and Standard Deviation, and to ranks
• Curvilinear transformation, which changes the distribution patterns. These include log and antilog to change skewness, arcsine and its reverse, and logit and logistic to handle probabilities and proportions
• Two algorithm that specifically transform counting data, which have the Poisson distribution, to normal distribution. These are the Anscombe, and the Freeman-Tukey transformation
• The Box-Cox transformation, a general purpose algorithm for converting all typoes of exponential distributions (including Poisson, Negative Binomial, and Inverse Gaussian) to normal distribution
Javascript programs Data entry uses a single column of numbers to be transformed

Results are presented in 3 forms

• A table listing, mean, Standard Deviations, skewness, kurtosis, chisq test and its Type I Error (p) for deviation from normal distribution, for both input and transformed data
• A complete listing of values, for both input and transformed data
• Three plots
• Distribution plots and the relationship between data and normal distribution,for both input and transformed data
• X/Y scatterplot showing the relationship between the input and transformed data

### R codes

All algorithm in R codes are presented. In most cases, the native R codes are used, as the primary purpose of the R codes are for checking for errors in the Javascript codes. Users are reminded that powerful packages that automatically perform transformation are availble in R resource centers, but they are not presented on this page, as most transformation algorithms are quite simple.

Users are also remided that there are functions that are used repeately. These are placed ahead of codes that call these functions. Should users wish to extract the codes for their own use, care must be exercised to include these supportive functions.