The function reinstate
creates a numeric vector by generating \(n_i\)
random data from the Uniform distribution \(U(a_i, b_i)\) for \(i = 1, \dots, r\)
and then combine all random data together. \(a_i, b_i, n_i\)
are the first, second and the third column of the matrix data
and \(r\) is the number of bins.
It is used for enabling parameter initialization for EM algorithm when we fit mixture
models for binned data.