| anamorph | R Documentation |
Creates functions that transform arbitrary distributions into Gaussian distributions, and vice versa.
anamorph(x, k, plot = FALSE)
x |
vector of data to transform |
k |
number of Hermite polynomials to use |
plot |
logical; plot the transformation? |
Increasing k can give a better fit.
Returns two function in a list
xtog |
Function to transform arbitrary variable x into a Gaussian distribution |
gtox |
The back transformation |
Richard Telford Richard.Telford@bio.uib.no
Wackernagel, H. (2003) Multivariate Geostatistics. 3rd edition, Springer-Verlag, Berlin. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-662-05294-5")}
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.