bs_lrt: bootstrap likelihood ratio tests for mixR fits

View source: R/bs_lrt.R

bs_lrtR Documentation

bootstrap likelihood ratio tests for mixR fits

Description

The mixR package provides fast implementations for a number of 1-dimensional mixture models, along with the bs.test function for performing bootstrap likelihood ratio tests of component numbers (default is "one lump or two?"). Note that the fitting and bootstrapping of non-normal mixtures can be substantially sped up by binning the data. See mixR::bin for details.

Usage

bs_lrt(x, H0 = 1, H1 = 2, family = "normal", nboot = 100, iter = 1000, ...)

Arguments

x

raw data for a mixR fit (vector or 3-column matrix)

H0

the number of components in the null model (1)

H1

the number of components in the alternative model (2)

family

fit distribution ("normal","weibull","gamma","lnorm")

nboot

number of bootstraps to perform (100)

iter

maximum iterations for EM algorithm (1000)

...

additional arguments, passed to mixR::bs.test()

Value

an object of class "bootEM" with three items (see mixR::bs.test)

See Also

mixR::bin

mixR::mixfit

mixR::bs.test

mixR


VanAndelInstitute/bifurcatoR documentation built on Oct. 13, 2024, 6:29 p.m.