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