gmm2: Parameters Estimation of Mixture of Two Normal Distributions...

Description Usage Arguments Value Examples

View source: R/gmm2.R

Description

Estimate the parameters of mixture of two normal distribution by EM algorithms

Usage

1
gmm2(p, mu, sig, data)

Arguments

p

the initial of the weights of two normal distributions

mu

the initial of the population means of two normal distributions

sig

the initial of the population deviations of two normal distributions

data

the data which generated from the mixture of two normal distributions

Value

a list of estimated values of parameters

Examples

1
2
3
4
5
6
7
## Not run: 
n <- 200
u <- runif(n)
x <- ifelse(u<.7,rnorm(n),rnorm(3,9))
gmm2(c(0.65,0.35),c(-0.1,3.21),c(1.59,7.99),x)

## End(Not run)

Chole3/SC19077 documentation built on Jan. 3, 2020, 12:07 a.m.