I've transformed some values from my dataset with the logit
transformation from the car-package. The variable "var" represent these values and consists of percentage values.
However, if I transform them back via inv.logit
from the boot-package, the values dont match the original ones.
data$var
46.4, 69.5, 82.7, 61.7, 76.4, 84.8, 69.1
data["var_logit"] <- logit(data$var, percents=TRUE)
data$var_logit
-0.137013943, 0.778005062, 1.454239241, 0.452148763, 1.102883518, 1.589885549, 0.760443432
data$var_logback <- inv.logit(data$var_logit)
0.46580 0.68525 0.81065 0.61115 0.75080 0.83060 0.68145
It looks like I have to multiply the result with 100 to get the previous values (or at least some very similar values), but I feel like I'm missing something.
Thanks for the help!
You set the
percents=TRUE
flag, which divides your values by 100, and the inverse command does not know about it.