rsimmix_mix {admix}R Documentation

Simulation of a two-component gaussian mixture with one component following a two-component gaussian mixture

Description

Simulate a two-component gaussian admixture model, where the first component is a gaussian mixture itself

Usage

rsimmix_mix(n, m, s, p, a)

Arguments

n

is the number of observations to be drawn

m

the mean (up to the shift a) of the unknown components

s

the standard deviation of the unknown components

p

the weight of the unknown component (itself a mixture).

a

the shift of the mean for the two distributions that are embedded in the unknown component

Value

a list containing the data generated from a mixture of mixture distribution, the data where the known component density has been made uniform(0,1), and the known data (corresponding to the part of data generated from the known component density).

Author(s)

Xavier Milhaud xavier.milhaud.research@gmail.com

Examples

sample1 <- rsimmix_mix(n = 3000, m = 5, s = 0.5, p = 0.3, a = 2)[['mixt.data']]
plot(stats::density(sample1))


[Package admix version 2.1-3 Index]