# anova.CAMAN.object: ANOVA for finite mixture models In CAMAN: Finite Mixture Models and Meta-Analysis Tools - Based on C.A.MAN

 anova.CAMAN.object R Documentation

## ANOVA for finite mixture models

### Description

A common problem in the estimation of mixture models is to determine the number of components. This may be done using a parametric bootstrap. This function simulates from a mixture model under the null hypothesis with `k0` components. A mixture model with k0 and usually k0 +1 components is fit to the data and then the likelihood ratio statistic (LRS) is computed.

Based on the bootstrap the distribution of the LRS is obtained which allows to obtain an approximation to the achieved level of significance corresponding to the value of -2 \log ΞΎ obtained from the original sample.

### Usage

```## S3 method for class 'CAMAN.object'
anova(object, object1, nboot=2500, limit=0.01, acc=10^(-7),
numiter=5000, giveBootstrapData=FALSE, giveLikelihood=FALSE, ...)
```

### Arguments

 `object` A CAMAN-object which quantifies a finite mixture model under null hypothesis. `object1` A CAMAN-object which quantifies another finite mixture model under the alterative hypothesis. `nboot` Number of bootstrap samples. `limit` parameter to control the limit of union several components. Default is 0.01. `acc` convergence criterion. VEM and EM loops stop when deltaLL

### Details

The parameters `limit, acc` and `numiter` are used for the VEM algorithm in each bootstrap sample.

### Value

The function returns a list with components

• `overview`: comparison of the models, including BIC, LL and LL-ratio

• ``LL ratios in bootstrap-data``: 90, 95, 97.5 and 99 percentiles of LL-ratios

• ``simulated p-value``: p-value, quantifying the null model

### Author(s)

Peter Schlattmann and Johannes Hoehne

### References

McLachlan, G. and Peel, D. (2000). Finite Mixture Models, Chichester: Wiley.

Schlattmann, P. (2009). Medical Applications of Finite Mixture Models. Berlin: Springer.

### Examples

```data(thai_cohort)
mix0 <- mixalg(obs="counts", weights="frequency", family="poisson", data=thai_cohort,
numiter=18000, acc=0.00001,startk=25)
em0<-mixalg.EM(mix0,p=c(1),t=c(1))
em1<-mixalg.EM(mix0,p=c(0.7,0.3),t=c(2,9))
## Not run: ll<-anova(em0,em1,nboot=250) #might take some minutes
```

CAMAN documentation built on Feb. 16, 2023, 5:52 p.m.