Likelihood Mixture Tests | R Documentation |
This function test two mixture Gaussian models with unstructured covariance matrix and different numbers of clusters.
lmt(emobj.0, emobj.a, x, tau = 0.5, n.mc.E.delta = 1000,
n.mc.E.chi2, verbose = FALSE)
emobj.0 |
a |
emobj.a |
a |
x |
the data matrix, dimension |
tau |
proportion of null and alternative hypotheses. |
n.mc.E.delta |
number of Monte Carlo simulations for expectation of delta (difference of logL). |
n.mc.E.chi2 |
number of Monte Carlo simulations for expectation of chisquare statistics. |
verbose |
if verbose. |
This function calls several subroutines to compute information,
likelihood ratio statistics, degrees of freedom, non-centrality
of chi-squared distributions ... etc. Based on Monte Carlo methods
to estimate parameters of likelihood mixture tests, this function
return a p-value for testing H0: emobj.0
v.s. Ha: emobj.a
.
A list of class lmt
are returned.
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
https://www.stat.iastate.edu/people/ranjan-maitra
init.EM
.
## Not run:
library(EMCluster, quietly = TRUE)
set.seed(1234)
x <- as.matrix(iris[, 1:4])
p <- ncol(x)
min.n <- p * (p + 1) / 2
.EMC$short.iter <- 200
ret.2 <- init.EM(x, nclass = 2, min.n = min.n, method = "Rnd.EM")
ret.3 <- init.EM(x, nclass = 3, min.n = min.n, method = "Rnd.EM")
ret.4 <- init.EM(x, nclass = 4, min.n = min.n, method = "Rnd.EM")
(lmt.23 <- lmt(ret.2, ret.3, x))
(lmt.34 <- lmt(ret.3, ret.4, x))
(lmt.24 <- lmt(ret.2, ret.4, x))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.