ordY {CorrToolBox} | R Documentation |
This functions creates an ordinalized form of a continuous variable.
ordY(mp, cat, y)
mp |
A vector of marginal probabilities defining the ordinalized variable. |
cat |
A numeric vector containing the categories for each respective marginal probability in |
y |
A continuous variable to be ordinalized into categories in |
A data frame containing the given continuous variable and the ordinalized variable with names y and x, respectively.
y<-rnorm(100000)
dat<-ordY(mp=c(0.25, 0.5, 0.25), cat=c(1,2,3), y=y)