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?
Arcsine squareroot transformation for data ranging from -$1$ to $1$
1
$\begingroup$
statistics
transformation
-
0Mmm, I have read a lot of references to its use with proportional data, but the mention in the BioStats handbook of the $[-1,1]$ use gave me hope there'd be a simple solution. – 2012-07-23
1 Answers
2
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)