The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
This R-package moewishart provides maximum likelihood
estimation (MLE) and Bayesian estimation for the Wishart mixture
model and the Wishart mixture-of-experts
(MoE-Wishart) model. It implements four different
inference algorithms for the two model:
Install the latest development version from GitHub:
#library("devtools")
devtools::install_github("zhizuio/moewishart")Data simulation from a MoE-Wishart model:
library(moewishart)
n <- 200 # number of subjects
p <- 2 # dimension of covariance matrix
set.seed(123) # fix coefficients of underlying MoE model
Xq <- 3; K = 3
betas <- matrix(runif(Xq * K, -2, 2), nrow = Xq, ncol = K)
betas[, K] <- 0
# simulate data
dat <- simData(n, p,
Xq = 3, K = 3, betas = betas,
pis = c(0.35, 0.40, 0.25),
nus = c(8, 12, 3)
)# fit Bayesian MoE-Wishart model
set.seed(123)
fit <- moewishart(
dat$S, X = cbind(1, dat$X), K = 3,
mh_sigma = c(0.2, 0.1, 0.2), # RW-MH variances (length K)
mh_beta = c(0.3, 0.3), # RW-MH variances (length K-1)
niter = 3000, burnin = 1000
)# fit Bayesian Wishart mixture model
set.seed(123)
fit2 <- mixturewishart(
dat$S, K = 3,
mh_sigma = c(0.2, 0.1, 0.2), # RW-MH variances
niter = 3000, burnin = 1000
)# fit MoE-Wishart model via EM alg.
set.seed(123)
fit3 <- moewishart(
dat$S, X = cbind(1, dat$X), K = 3,
method = "em",
niter = 3000
)# fit Wishart mixture model via EM alg.
set.seed(123)
fit4 <- mixturewishart(
dat$S, K = 3,
method = "em",
niter = 3000
)These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.