# mixalg.VEM: VEM algorithm In CAMAN: Finite Mixture Models and Meta-Analysis Tools - Based on C.A.MAN

 mixalg.VEM R Documentation

## VEM algorithm

### Description

When fitting finite mixture models two cases must be distinguished. The flexible support size case, where no assumption about the number of components `k` is made in advance and the fixed support size case. For the flexible support size case the VEM-algorithm can be used.

The algorithm proceeds as follows:
Step 1: Define an approximating grid lambda[1], ..., lambda[L]
Step 2: Use the VEM algorithm to maximize `L(P)` in the simplex `\Omega` and identify grid points with positive support.

### Usage

``````mixalg.VEM(mix = NULL, obs=NULL, weights=NULL, data=NULL, pop.at.risk=NULL,
var.lnOR=NULL, family="gaussian", limit=0.01, acc=10^(-7),
numiter=5000, startk=50)
``````

### Arguments

 `mix` A CAMAN-object which quantifies a finite mixture model and the input data. `obs` observed / dependent variable. Vector or colname of `data`. Must be specified! `weights` weights of the data. Vector or colname of `data`. Default is `NULL`. `family` the underlying type density function as a character ("gaussian", "poisson" or "binomial")! `data` an optional data frame. `obs`, `weights`, `pop.at.risk` and `var.lnOR` can be specified as column name of the data frame. `pop.at.risk` population at risk: These data could be used to determine a mixture model for Poisson data. Vector or colname of `data`. Default is`NULL`. `var.lnOR` variances of the data: These variances might be given when working with meta analyses! Vector or colname of `data`. Default is `NULL`. `limit` parameter to control the limit of union several components. Default is 0.01. `acc` convergence criterion. VEM and EM loops stop when deltaLL

### Value

The function returns a `CAMAN.VEM.object` object.

### Author(s)

Peter Schlattmann and Johannes Hoehne

### Examples

``````data(vitA)
m0<-mixalg.VEM(obs="logrr",var.lnOR="var",family="gaussian", data=vitA,startk=20)