mixnormal2: Predict the Density Value at certain pointsPoint From the...

Description Usage Arguments Value Examples

View source: R/mixnormal2.R

Description

Estimate the parameters of mixture of two normal distribution by MLE and then predict the density value at certain points

Usage

1
mixnormal2(x, initial, data)

Arguments

x

the specific point or points from the mixture of two normal distributions

initial

a vector consisting the initial values of weight, means and deviations of two normal distributions

data

the data which generated from the mixture of two normal distributions

Value

an estimated value

Examples

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

## End(Not run)

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