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

Description Usage Arguments Value Note Author(s) Examples

View source: R/CAMAN.R

Description

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.

Usage

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

Arguments

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

mix

A CAMAN-object which quantifies a finite mixture model.

nboot

number of bootstrap replications

limit

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

acc

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

numiter

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

startk

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.

returnBootstrapRep

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

Value

The function returns a list, describing the bootstrap replications:

$dat.bootstrap

(used) sampled data

$LL

Likelihood of the final solutions of each bootstrap replication

$LL_k1

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

$numk.boot

number of components obtained in replications.

Note

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

Author(s)

Peter Schlattmann and Johannes Hoehne

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
### POISSON data with weights: thai_cohort
data(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
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 
table(boot$numk.boot)
## End(Not run)

CAMAN documentation built on May 1, 2019, 9:21 p.m.

Related to mixalg.boot in CAMAN...