bfmm(x,m=2,mu,type='gaussian',method='nelder',range.x, ...)
## S3 method for class 'mm':
density(x,x0,gridsize=500,...)
## S3 method for class 'mm':
print(x,...)density and
print functions,
x is
a fitted object of class mm.gridsize
will be used instead.mu is
provided, m will be ignored and m=length(mu).x
at which to compute the estimate.
The default is the minimum and maximum data values, extended by the
bin width.bfmm,
the binned data will be returned as out$data;
the number of components is stored in out$m;
the type of mixing components is stored in out$type;
and the AIC/AICc/BIC are stored in out$llk; and the
parameters (including the mixing coefficients) are stored in
out$para.The density can be computed by using function density.
If x is raw data, one can also specify scale and rounding
method.
mu = 34.5; s = 1.5
y = rnorm(100,mu,s) #raw data
x = round(y) #rounded data
out1 = bfmm(x, m=1, type='normal')Run the code above in your browser using DataLab