mixalg.boot: bootstrap replication / validation of finite mixture models

View source: R/CAMAN.R

mixalg.bootR Documentation

bootstrap replication / validation of finite mixture models


This function may be used to estimate the number of components based on a nonparametric bootstrap approach.A bootstrap sample is obtained from the original sample with replacement. Corresponding to the bootstrap data set we obtain an estimate of the number of components k applying a combination of the VEM- and EM algorithm. The bootstrap algorithm involves drawing B independent bootstrap samples and estimating k using the hybrid mixture algorithm. The result is the bootstrap distribution of the number of components k. The mode of this distribution is taken as an estimate of the number of components.


mixalg.boot(mix, nboot=500, limit=0.01, acc=10^(-5), numiter=5000, 
            startk=50, returnBootstrapRep=FALSE)    


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


A CAMAN-object which quantifies a finite mixture model.


number of bootstrap replications


parameter to control the limit of union several components. Default is 0.01.


convergence criterion. VEM and EM loops stop when deltaLL<acc. Default is 10^(-7).


parameter to control the maximal number of iterations in the VEM and EM loops. Default is 5000.


starting/maximal number of components for the VEM algorithm in each bootstrap sample. This number will be used to compute the grid in the VEM. Default is 50.


A Boolean that indicates whether the bootstrapped data should be returned or not


The function returns a list, describing the bootstrap replications:


(used) sampled data


Likelihood of the final solutions of each bootstrap replication


vector with LL for each bootstrap replication using a homogeneous model (k=1)


number of components obtained in replications.


mixalg.Boot and mixboot are deprecated names for the mixalg.boot function.


Peter Schlattmann and Johannes Hoehne


### POISSON data with weights: thai_cohort
m.thai <- mixalg(obs="counts", weights="frequency",
                 family="poisson", data=thai_cohort,
                 acc = 0.00003)
## Not run: boot <- mixalg.boot(m.thai, nboot=1000) #may take a few minutes

### POISSON data with observed and expected data: hepab
mix <- mixalg(obs="observations",pop.at.risk="expected",family= "poisson",data=hepab)
## Not run: boot <- mixalg.boot(mix, nboot=250) #may take some time 
## End(Not run)

CAMAN documentation built on April 11, 2023, 6:08 p.m.

Related to mixalg.boot in CAMAN...