norm2ordinal {InteractionPoweR} | R Documentation |
Transforms a vector with a normal distribution to a binomial distribution with two values.
norm2ordinal(x, k)
x |
Input vector |
k |
Number of discrete values (e.g., 2=binary, 5=likert scale) |
A ordinal or binary variable
norm2ordinal(x = rnorm(n = 100,mean = 0,sd = 1),k=2)