normalmixMEMtest: normalmixMEMtest

Description Usage Arguments Value Examples

Description

Performs MEM test given the data for y and x on the null hypothesis H_0: m = m_0.

Usage

1
2
3
normalmixMEMtest(y, x = NULL, m = 2, z = NULL, an = NULL,
  tauset = c(0.1, 0.3, 0.5), ninits = 10, crit.method = c("asy", "boot",
  "none"), nbtsp = 199, cl = NULL, parallel = 0)

Arguments

y

n by 1 vector of data

x

n by q matrix of data for x (if exists)

m

The number of components in the mixture defined by a null hypothesis, m_0

z

n by p matrix of regressor associated with gamma

an

a term used for penalty function

tauset

A set of initial tau value candidates

ninits

The number of randomly drawn initial values.

crit.method

Method used to compute the variance-covariance matrix, one of "none", "asy", and "boot". The default option is "asy". When method = "asy", the p-values are computed based on an asymptotic method. When method = "OPG", the p-values are generated by bootstrapping.

nbtsp

The number of bootstrap observations; by default, it is set to be 199

cl

Cluster used for parallelization; if it is NULL, the system will automatically create a new one for computation accordingly.

parallel

Determines whether package doParallel is used for calculation

Value

A list of class normalMix with items:

coefficients

A vector of parameter estimates. Ordered as α_1,…,α_m,μ_1,…,μ_m,σ_1,…,σ_m,\gam.

parlist

The parameter estimates as a list containing alpha, mu, and sigma (and gam if z is included in the model).

vcov

The estimated variance-covariance matrix.

loglik

The maximized value of the log-likelihood.

penloglik

The maximized value of the penalized log-likelihood.

aic

Akaike Information Criterion of the fitted model.

bic

Bayesian Information Criterion of the fitted model.

postprobs

n by m matrix of posterior probabilities for observations

components

n by 1 vector of integers that indicates the indices of components each observation belongs to based on computed posterior probabilities

call

The matched call.

m

The number of components in the mixture.

Examples

1
2
3
4
data(faithful)
attach(faithful)
normalmixMEMtest(y = eruptions, m = 1, crit.method = "asy")
normalmixMEMtest(y = eruptions, m = 2, crit.method = "asy")

hkasahar/normalregMix documentation built on May 17, 2019, 4 p.m.