bemmix: Fit a Normal Mixture Model to binned data

Description Usage Arguments Details Author(s) References Examples

Description

Fit a finite normal mixture model for pre-binned data

Usage

1
  fit.mixnorm(x,k,mu,s,p, x.range,lognormal=FALSE)

Arguments

x

Ungrouped or grouped data

k

number of components

mu,s,p

Initial parameters of the Normal components.

x.range

The range of x.

lognormal

An indicator shows whether or not to fit a normal mixture for log-normal data.

Details

If the data are top-headed (or truncated), nl, nu will used to store the frequencies of the lower and uper bins. If the data are not truncated, the two variables will be used to return the predicted frequencies in these two bins instead.

Author(s)

B. Wang [email protected]

References

AS 254, ...

Examples

1
2
3
4
5
6
7
 y <- c(10, 21, 56,79,114,122,110,85,85,61,47,49,47,44,31,20,11,4,4)
 x <- 14.5 + c(0:length(y))
 x.hist <- binning(counts=y, breaks=x)
 mu <- c(20.0, 26.0)
 p <- c(0.5, 0.5)
 sig <- c(2.0, 2.8)
 out <- fit.mixnorm(x.hist,mu=mu, p=p, s=sig)

bda documentation built on Jan. 5, 2018, 9:04 a.m.

Related to bemmix in bda...