| Type: | Package |
| Title: | Multivariate Pseudo-Voigt Mixture Models |
| Version: | 0.1.0 |
| Description: | Fits multivariate pseudo-Voigt mixture models for model-based clustering and outlier detection. The model combines multivariate Gaussian and Cauchy distributions within each cluster to accommodate heavy-tailed observations and decompose the data into a high-density region and a low-density remainder, with outliers more likely to arise from the latter. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | MASS, tclust |
| Config/roxygen2/version: | 8.1.0 |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-08-25 21:47:44 UTC; babakdehkordi |
| Author: | Babak Fathollahi Dehkordi [aut, cre], Jeffery Andrews [aut, ths] |
| Maintainer: | Babak Fathollahi Dehkordi <babak.dehkordi.f@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-08 13:20:15 UTC |
Fit Multivariate Pseudo-Voigt Mixture Models Estimates MPVM models over a range of numbers of components and selects the best-fitting model according to the Bayesian information criterion (BIC).
Description
Fit Multivariate Pseudo-Voigt Mixture Models Estimates MPVM models over a range of numbers of components and selects the best-fitting model according to the Bayesian information criterion (BIC).
Usage
MPVmixt(
x,
G_range,
max_iter = 100,
init_method = c("modified_tkmeans", "manual"),
tol = 1e-08,
alpha_trim = 0.3,
nstart = 1000,
verbose = FALSE,
seed = NULL,
shared_scale = TRUE,
Z_init = NULL,
V_init = NULL
)
Arguments
x |
Numeric matrix or data frame containing the observations. Rows correspond to observations and columns to variables. |
G_range |
Positive integer or vector of positive integers specifying the number of mixture components to fit. |
max_iter |
Maximum number of EM iterations. Default is 100. |
init_method |
Initialization method. Either '"modified_tkmeans"' or '"manual"'. |
tol |
Positive convergence tolerance for the log-likelihood. |
alpha_trim |
Trimming proportion used by the modified trimmed k-means initialization. |
nstart |
Number of random starts used by the modified trimmed k-means initialization. |
verbose |
Logical; if 'TRUE', iteration information is printed. |
seed |
Optional random seed for reproducibility. |
shared_scale |
Logical; if 'TRUE', the Gaussian and Cauchy sub-components share the same scale matrix within each cluster. |
Z_init |
Optional initial cluster-membership matrix used when 'init_method = "manual"'. |
V_init |
Optional initial Gaussian/Cauchy sub-component-membership matrix used when 'init_method = "manual"'. |
Value
A list containing:
- all
Results for each value in 'G_range'.
- best
The model corresponding to the minimum BIC, including clustering and outlier-detection results.
- bic
Numeric vector of BIC values corresponding to 'G_range'.
#' @examples sim <- rmpvm( n = 100, pi = c(0.5, 0.5), alpha = c(0.8, 0.8), mu = list( c(0, 0), c(4, 4) ), Sigma = list( diag(2), diag(2) ), Gamma = list( diag(2), diag(2) ), seed = 123 )
fit <- MPVmixt( x = sim$data, G_range = 2, max_iter = 20, nstart = 20, seed = 123 )
fit$best$G
Generate Data from a Multivariate Pseudo-Voigt Mixture Model
Description
Generate Data from a Multivariate Pseudo-Voigt Mixture Model
Usage
rmpvm(n, pi, alpha, mu, Sigma, Gamma, seed = NULL)
Arguments
n |
Number of observations to generate. |
pi |
Numeric vector of mixing proportions. |
alpha |
Numeric vector of Gaussian subcomponent proportions. |
mu |
List of component location vectors. |
Sigma |
List of Gaussian covariance matrices. |
Gamma |
List of Cauchy scale matrices. |
seed |
Optional random seed for reproducibility. |
Value
A list containing the generated data matrix, latent cluster labels, latent Gaussian/Cauchy indicators, and corresponding factor labels.
#' @examples sim <- rmpvm( n = 100, pi = c(0.5, 0.5), alpha = c(0.8, 0.8), mu = list( c(0, 0), c(4, 4) ), Sigma = list( diag(2), diag(2) ), Gamma = list( diag(2), diag(2) ), seed = 123 )
head(sim$data)