Whether the data is truncted or not. If trunc
is missing, no truncation. Otherwise, trunc can be
left, right, or both.
mu,s,p
Initial parameters of the Normal components.
from,to
The range when the density will be evaluated.
gridsize
The size of grid where the densities will be evaluated.
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.
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))
mu <- c(20.0, 26.0)
p <- c(0.5, 0.5)
sig <- c(2.0, 2.8)
bnmm(x,y,mu=mu, p=p, s=sig)