rmixture: Sample from two-Gaussian mixture.

Description Usage Arguments Details Value Examples

View source: R/gaussianMixture.R

Description

Draws a sample from a mixture of a standard normal and a non-standard normal with specified mean and standard deviation.

Usage

1

Arguments

n

Size of sample

pi

Mixing weight for standard normal component

mean

Mean for non-standard normal component

sd

Standard deviation for non-standard normal component

Details

Mixing weights are specified by first element of parameter vector, say pi, as pi and 1-pi.

Value

Sample from mixture process

Examples

1
sam<-rmixture(1e3, 0.1, 2, 3)

twillis209/pidProjCode documentation built on Nov. 7, 2021, 3:01 p.m.