Description Usage Arguments Value Details Author(s) Examples
View source: R/step.ds.mixture.R
Uses AIC to select the number of mixture components.
1 | step.ds.mixture(ds.object, max.terms = 4)
|
ds.object |
|
max.terms |
Maximum number of mixture components to attempt to fit. Default 4. |
a ds.mixture
model object of the best
(AIC-wise) model.
This routine is most useful during model building. Setting up a basic 1-point mixture model and then running this on the object returns a model with the lowest AIC.
Progress will be printed to the screen.
David L. Miller
1 2 3 4 5 6 7 8 | library(mmds)
set.seed(0)
## simulate some line transect data from a 2 point mixture
sim.dat<-sim.mix(c(-0.223,-1.897,inv.reparam.pi(0.3)),2,100,1)
## fit the model
fit.sim.dat.1<-fitmix(sim.dat,1,1)
## find best AIC model
step.ds.mixture(fit.sim.dat.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.