rnormalmix: Simulate from a normal mixture distribution

Description Usage Arguments Value

Description

Simulate from a normal mixture distribution

Usage

1
rnormalmix(n, g, return.Z = FALSE)

Arguments

n

Number of points to simulate

g

Object of class normalmix (from ashr package). g has elements pi, mean and sd each of which has class K.

return.Z

if TRUE, also return a vector of indicators indicating which of the K classes each sample belongs to

Value

If return.Z=TRUE, returns a list with elements beta (samples) and Z (indicators). Otherwise returns a length n vector of samples.


jean997/sherlockAsh documentation built on May 18, 2019, 11:45 p.m.