R: Performs Chi-Square Tests for Scale and Location Mixtures

test.equality {mixtools} | R Documentation

## Performs Chi-Square Tests for Scale and Location Mixtures

### Description

Performs a likelihood ratio test of a location (or scale) normal or regression mixture versus the more general model. For a normal mixture, the alternative hypothesis is that each component has its own mean and variance, whereas the null is that all means (in the case of a scale mixture) or all variances (in the case of a location mixture) are equal. This test is asymptotically chi-square with degrees of freedom equal to k-1, where k is the number of components.

### Usage

    test.equality(y, x = NULL, arbmean = TRUE, arbvar = FALSE,
                  mu = NULL, sigma = NULL, beta = NULL,
                  lambda = NULL, ...)

### Arguments

`y` | The responses for `regmixEM` or the data for `normalmixEM`.
`x` | The predictors for `regmixEM`.
`arbmean` | If FALSE, then a scale mixture analysis is performed for `normalmixEM` or `regmixEM`.
`arbvar` | If FALSE, then a location mixture analysis is performed for `normalmixEM` or `regmixEM`.
`mu` | An optional vector for starting values (under the null hypothesis) for `mu` in `normalmixEM`.
`sigma` | An optional vector for starting values (under the null hypothesis) for `sigma` in `normalmixEM` or `regmixEM`.
`beta` | An optional matrix for starting values (under the null hypothesis) for `beta` in `regmixEM`.
`lambda` | An otional vector for starting values (under the null hypothesis) for `lambda` in `normalmixEM` or `regmixEM`.
`...` | Additional arguments passed to the various EM algorithms for the mixture of interest.

### Value

`test.equality` returns a list with the following items:

`chi.sq` | The chi-squared test statistic.
`df` | The degrees of freedom for the chi-squared test statistic.
`p.value` | The p-value corresponding to this likelihood ratio test.

### See Also

`test.equality.mixed`

### Examples

    ## Should a location mixture be used for the Old Faithful data?

    data(faithful)
    attach(faithful)
    set.seed(100)
    test.equality(y = waiting, arbmean = FALSE, arbvar = TRUE)

[Package mixtools version 1.2.0 Index]