Computes the generalized overlap as defined by R. Maitra.
overlapGOM(Pi, Mu, S, eps = 1e-06, lim = 1e06)
Returns the value of goMega.
vector of mixing proprtions (length K).
matrix consisting of components' mean vectors (K * p).
set of components' covariance matrices (p * p * K).
error bound for overlap computation.
maximum number of integration terms (Davies, 1980).
Volodymyr Melnykov, Wei-Chen Chen, and Ranjan Maitra.
Maitra, R. (2010) ``A re-defined and generalized percent-overlap-of-activation measure for studies of fMRI reproducibility and its use in identifying outlier activation maps'', NeuroImage, 50, 124-135.
Melnykov, V., Chen, W.-C., and Maitra, R. (2012) ``MixSim: An R Package for Simulating Data to Study Performance of Clustering Algorithms'', Journal of Statistical Software, 51:12, 1-25.
Davies, R. (1980) ``The distribution of a linear combination of chi-square random variables'', Applied Statistics, 29, 323-333.
MixSim
, MixGOM
, and overlap
.
data("iris", package = "datasets")
p <- ncol(iris) - 1
id <- as.integer(iris[, 5])
K <- max(id)
# estimate mixture parameters
Pi <- prop.table(tabulate(id))
Mu <- t(sapply(1:K, function(k){ colMeans(iris[id == k, -5]) }))
S <- sapply(1:K, function(k){ var(iris[id == k, -5]) })
dim(S) <- c(p, p, K)
overlapGOM(Pi = Pi, Mu = Mu, S = S)
Run the code above in your browser using DataLab