brkpts: Calculate the breakpoints of a vector of values

Description Usage Arguments Details Value Author(s) References Examples

View source: R/brkpts.R

Description

Calculate the breakpoints that partition a vector of values into bins that are probabilistically equivalent.

Usage

1
brkpts(x, n)

Arguments

x

A numeric vector of values to find bin breakpoints for.

n

A numeric value representing the number of bins. x into.

Details

Calculate the breakpoints that partition a vector of values into bins that are probabilistically equivalent. That is find b breakpoints (upper limits) such that the proportion of values in each bin is equivalent. Let k be the number of values in set X and n be the number of bins. Then each bin has k/n values. Further, the breakpoints separating bins {b_i, b_i+1, …, b_n} are distributed such that the probability p of drawing a value from a bin b_i is equivalent across all bins. That is:

p(b_i) = p(b_i+1) = … = p(b_n)

Value

Returns a vector of values representing the breakpoints that divide input vector x into bins, which have an equivalent likelihood of being drawn.

Author(s)

Bjorn J. Brooks, Lars Y. Pomara, Danny C. Lee

References

PAPER TITLE.

Examples

1
2
x <- rnorm(10^3)  # Make random values
b <- brkpts(x,10) # Find 10 probabilistically equivalent breakpoints

bjornbrooks/landat documentation built on May 17, 2019, 7:32 p.m.