'When using a square root transformation on negatively skewed data, how do you return the original value?

I had some data that was negatively skewed in r. The transformation I used was: sqrt(max(x+1)-x) from this website: https://www.datanovia.com/en/lessons/transform-data-to-normal-distribution-in-r/. The transformation worked well and normalised the data. I ran the data through a linear model and the estimated marginal means were produced. My question is how do I return the transformed data to the original data. For example:

x=c(11:20)
z=sqrt(max(x+1)-x)

The 'x' output is: [1] 11 12 13 14 15 16 17 18 19 20

The 'z' output is:[1] 3.162278 3.000000 2.828427 2.645751 2.449490 2.236068 2.000000 1.732051 1.414214 1.000000

What code would return 'z' to 'x'?

Thanks

Oliver



Solution 1:[1]

Jahi Zamy's comment worked :

min(z^2 - 1) + x

Thank you!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OliverAshton1