regmixMEMtest: regmixMEMtest

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. Using this function is equivalent to calling normalmixMEMtest with regressors specified by x as a parameter.

Usage

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

Arguments

y

n by 1 vector of data for y

x

n by q matrix of data for x

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

tauset

A set of initial tau value candidates

an

a term used for penalty function

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 '"none". 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, set as 199.

cl

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

parallel

Determines what percentage of available cores are used, represented by a double in [0,1]. 0.75 is default.

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 gamma 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)
## Not run: regmixMEMtest(y = eruptions, x = waiting, m = 1, crit.method = "asy")
## Not run: regmixMEMtest(y = eruptions, x = waiting, m = 2, parallel = 1, crit.method = "asy")

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