histx: Midpoint-Based Data Creation for a Histogram
Description
Given the breaks and the number of observations, a data set is generated with stats::runif(), using
the class mids: \(x_i = class\_mid_j + alpha*class\_width_j/2\). The default alpha=0.99 ensures that
generated observations do not lie on the class borders.
Usage
histx(breaks, n, alpha = 0.99)
gen_mid(breaks, n, alpha = 0.99)
dhistx(breaks, n, alpha = 0.99)
Value
The generated data set.
Arguments
breaks
numeric: class borders
n
numeric: number of observations in each class
alpha
numeric: how far the generated observations can be away from the class mids (default: 0.99)