step.ds.mixture: Stepwise selection of mixture components

Description Usage Arguments Value Details Author(s) Examples

View source: R/step.ds.mixture.R

Description

Uses AIC to select the number of mixture components.

Usage

1
  step.ds.mixture(ds.object, max.terms = 4)

Arguments

ds.object

ds.mixture object.

max.terms

Maximum number of mixture components to attempt to fit. Default 4.

Value

a ds.mixture model object of the best (AIC-wise) model.

Details

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.

Author(s)

David L. Miller

Examples

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)


mmds documentation built on May 19, 2017, 9:53 p.m.
Search within the mmds package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.