reinstate: Reinstate the Binned Data to the Raw Data

Description Usage Arguments Details Value See Also Examples

View source: R/reinstate.R

Description

This function creates a numeric vector approximating the raw data from binned data

Usage

1

Arguments

data

a three-column matrix representing the raw data

Details

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, …, 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.

Value

The function returns a numeric vector.

See Also

bin

Examples

1
2
3
x <- rnorm(100)
data <- bin(x, seq(-3, 3, 0.25))
y <- reinstate(data)

mixR documentation built on June 1, 2021, 5:07 p.m.