MstepRJMCMCupdate {bpgmm} | R Documentation |
MstepRJMCMCupdate
Description
MstepRJMCMCupdate
Usage
MstepRJMCMCupdate(X, muBar, p, thetaYList, ZOneDim, hparam, hparamInit,
qVec, qnew, dVec, sVec, constraint, clusInd, mVec, Mind)
Arguments
X |
X in MstepRJMCMCupdate |
muBar |
muBar |
p |
p |
thetaYList |
thetaYList |
ZOneDim |
ZOneDim |
hparam |
hparam |
hparamInit |
hparamInit |
qVec |
qVec |
qnew |
qnew |
dVec |
dVec |
sVec |
sVec |
constraint |
constraint |
clusInd |
clusInd |
mVec |
mVec |
Mind |
Mind |
Examples
set.seed(100)
n <- 10
p <- 2
q <- 1
K <- 2
m <- 2
muBar <- c(0, 0)
qVec <- c(1, 1)
constraint <- c(0, 0, 0)
X <- t(
fabMix::simData(
sameLambda = TRUE,
sameSigma = TRUE,
K.true = K,
n = n,
q = q,
p = p,
sINV_values = 1 / ((1:p))
)$data
)
hparam <- new(
"Hparam",
alpha1 = 0.567755037123148,
alpha2 = 1.1870201935945,
delta = 2,
ggamma = 2,
bbeta = 3.39466184520673
)
ZOneDim <- sample(seq_len(m), n, replace = TRUE)
thetaYList <-
new(
"ThetaYList",
tao = 0.366618687752634,
psy = list(structure(
c(
4.18375613018654,
0, 0, 5.46215996830771
),
.Dim = c(2L, 2L)
)),
M = list(structure(
c(
3.27412045866392,
-2.40544145363349
),
.Dim = 1:2
)),
lambda = list(structure(
c(
2.51015961514781,
-0.0741189919182549
),
.Dim = 2:1
)),
Y = list(structure(
c(
-0.244239011725104,
-0.26876172736886,
0.193431511203083,
0.41624466812811,
-0.54581548068437,
-0.0479517628308146,
-0.633383997203325,
0.856855296613208,
0.792850576988512,
0.268208848994559
),
.Dim = c(1L, 10L)
))
)
qnew <- 1
dVec <- c(1, 1, 1)
sVec <- c(1, 1, 1)
constraint <- c(0, 0, 0)
clusInd <- rep(1, m)
Mind <- "BD"
mVec <- c(1, m)
MstepRJMCMCupdate(
X,
muBar,
p,
thetaYList,
ZOneDim,
hparam,
hparamInit,
qVec,
qnew,
dVec,
sVec,
constraint,
clusInd,
mVec,
Mind
)
[Package bpgmm version 1.0.9 Index]