rmix: rmix

View source: R/ACutils_export.R

rmixR Documentation

rmix

Description

function to extract a random sample of dimension n from a Gaussian mixture defined by the 3 vectors p, mu, sigma (that must have same length!)

Usage

rmix(n, p, mu, sigma)

Arguments

n

dimension of the random sample that has to be extracted

p

vector of weights for the components of the mixture

mu

vector of means for the components

sigma

vector of standard deviations for the components

Value

random sample derived my the specified mixture


alessandrocolombi/ACutils documentation built on March 3, 2023, 4:06 a.m.