test.equality {mixtools} | R Documentation |
Performs Chi-Square Test 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. This test is asymptotically chi-square with degrees of freedom equal to k such that 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 can be 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)
test.equality(y = waiting, arbmean = FALSE, arbvar = TRUE)
[Package
mixtools version 0.3.3
Index]