powered by
Transforms a vector with a normal distribution to a binomial distribution with two values.
norm2ordinal(x, k)
A ordinal or binary variable
Input vector
Number of discrete values (e.g., 2=binary, 5=likert scale)
norm2ordinal(x = rnorm(n = 100,mean = 0,sd = 1),k=2)
Run the code above in your browser using DataLab