Arcsine squareroot transformation for data ranging from -$1$ to $1$

17.6k Views Asked by At

According to the Handbook of Biological Statistics, the arcsine squareroot transformation is used for proportional data, constrained at $-1$ and $1$. However, when I use transf.arcsine in R on a dataset ranging from $-1$ to $1$, NaNs are produced because of the square-rooting of a negative number. What is the correct way to transform this data - i.e. how do I use arcsine squareroot transformations on data which include negative numbers?

1

There are 1 best solutions below

0
On BEST ANSWER

I used Arturo Magidin's formula, $\arcsin(\mathrm{sgn}(x)\sqrt{|x|})$ with the following R code:

trans.arcsine <- function(x){
  asin(sign(x) * sqrt(abs(x)))
}
trans.arcsine(x)