discretize3d.uniform_width: Discretize three sets of continuous data into 3-dimensional...

View source: R/discretization.plugin.R

discretize3d.uniform_widthR Documentation

Discretize three sets of continuous data into 3-dimensional bins by "uniform width" method

Description

discretize3d.uniform_width assigns the observations of three continuous random variables to bins according to the "uniform width" method, and returns a corresponding 3-dimensional count table.

Usage

discretize3d.uniform_width(x, y, z)

Arguments

x

a numeric vector of the first random variable.

y

a numeric vector of the second random variable.

z

a numeric vector of the third random variable.

Details

The uniform width-based method ("uniform_width") that divides the continuous data into N bins with equal width. The number of bins is initialized into a round-off value according to the square root of the data size.

Value

discretize3d.uniform_width returns a 3-dimensional count table.

Examples

# three numeric vectors corresponding to three continuous random variables
x <- c(0.0, 0.2, 0.2, 0.7, 0.9, 0.9, 0.9, 0.9, 1.0)
y <- c(1.0, 2.0,  12, 8.0, 1.0, 9.0, 0.0, 3.0, 9.0)
z <- c(3.0, 7.0, 2.0,  11,  10,  10,  14, 2.0,  11)

# corresponding joint count table estimated by "uniform width" algorithm
discretize3d.uniform_width(x,y,z)

chupan1218/Informeasure documentation built on Jan. 19, 2024, 5:30 p.m.