| MoR {greed} | R Documentation |
Multivariate mixture of regression Prior model description class
Description
An S4 class to represent a multivariate mixture of regression model. The model follows [minka-linear](https://tminka.github.io/papers/minka-linear.pdf) . The model corresponds to the following generative model:
\pi \sim Dirichlet(\alpha)
Z_i \sim \mathcal{M}(1,\pi)
V_k \sim \mathcal{W}(\varepsilon^{-1},n_0)
A_k \sim \mathcal{MN}(0,(V_k)^{-1},\tau XX^\top)
Y_{i.}|X_{i.}, A_k, Z_{ik}=1 \sim \mathcal{N}(A_k x_{i.},V_{k}^{-1})
with \mathcal{W}(\epsilon^{-1},n_0) the Wishart distribution and \mathcal{MN} the matrix-normal distribution.
The MoR-class must be used when fitting a simple Mixture of Regression whereas the MoRPrior-class must be used when fitting a CombinedModels-class.
Usage
MoRPrior(formula, tau = 0.001, N0 = NaN, epsilon = as.matrix(NaN))
MoR(formula, alpha = 1, tau = 0.1, N0 = NaN, epsilon = as.matrix(NaN))
Arguments
formula |
a |
tau |
Prior parameter (inverse variance) default 0.001 |
N0 |
Prior parameter (default to NaN, in this case N0 will be fixed equal to the number of columns of Y.) |
epsilon |
Covariance matrix prior parameter (default to NaN, in this case epsilon will be fixed to a diagonal variance matrix equal to 0.1 time the variance of the regression residuals with only one cluster.) |
alpha |
Dirichlet prior parameter over the cluster proportions (default to 1) |
Value
a MoRPrior-class object
a MoR-class object
See Also
Other DlvmModels:
CombinedModels,
DcLbm,
DcSbm,
DiagGmm,
DlvmPrior-class,
Gmm,
Lca,
MoM,
MultSbm,
Sbm,
greed()
Examples
MoRPrior(y ~ x1 + x2)
MoRPrior(y ~ x1 + x2, N0 = 100)
MoRPrior(cbind(y1, y2) ~ x1 + x2, N0 = 100)
MoR(y ~ x1 + x2)
MoR(y ~ x1 + x2, N0 = 100)
MoR(cbind(y1, y2) ~ x1 + x2, N0 = 100)