ordY: Ordinalization of a Continuous Variable

View source: R/ordY.R

ordYR Documentation

Ordinalization of a Continuous Variable

Description

This functions creates an ordinalized form of a continuous variable.

Usage

ordY(mp, cat, y)

Arguments

mp

A vector of marginal probabilities defining the ordinalized variable.

cat

A numeric vector containing the categories for each respective marginal probability in mp.

y

A continuous variable to be ordinalized into categories in cat as defined by mp.

Value

A data frame containing the given continuous variable and the ordinalized variable with names y and x, respectively.

See Also

mps2cps

Examples

y<-rnorm(100000)
dat<-ordY(mp=c(0.25, 0.5, 0.25), cat=c(1,2,3), y=y)

CorrToolBox documentation built on March 18, 2022, 7:11 p.m.