powered by
Creates functions that transform arbitrary distributions into a Gaussian distributions, and vice versa.
anamorph(x, k, plot = FALSE)
Returns two function in a list
Function to transform arbitrary variable x into a Gaussian distribution
The back transformation
data
number of Hermite polynomials
plot
Richard Telford Richard.Telford@bio.uib.no
Increasing k can give a better fit.
Wackernagel, H. (2003) Multivariate Geostatistics. 3rd edition, Springer-Verlag, Berlin.
set.seed(42) x <- c(rnorm(50, 0, 1), rnorm(50, 6, 1)) hist(x) ana.fun <- anamorph(x, 30, plot = TRUE) xg <- ana.fun$xtog(x) qqnorm(xg) qqline(xg) all.equal(x, ana.fun$gtox(xg))
Run the code above in your browser using DataLab