search for: mytan

Displaying 1 result from an estimated 1 matches for "mytan".

Did you mean: mytag
2010 Feb 16
1
OT: computing percentage changes with negative and zero values?
...et to astronomical levels. > x[, "exp"] <- c(NA, diff(exp(x$var)) / exp(x[1:19,"var"])) - atan transformation: this is an in-house bred solution, which insures that values from -Inf to +Inf are stacked between 0 and pi. Again, not sure what bias this might introduce. > mytan <- function(x) .5*pi + atan(x) > x[, "mytan"] <- c(NA, diff(mytan(x$var)) / mytan(x[1:19,"var"])) The resulting data frame: > round(x, 3) var raw raw abs raw +cst log sqrt box cox exp mytan 1 0.43 NA NA NA NA NA NA...