MoR: Multivariate mixture of regression Prior model description...

View source: R/model_mor.R

MoRR 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:

π \sim Dirichlet(α)

Z_i \sim \mathcal{M}(1,π)

V_k \sim \mathcal{W}(\varepsilon^{-1},n_0)

A_k \sim \mathcal{MN}(0,(V_k)^{-1},τ XX^\top)

Y_{i.}|X_{i.}, A_k, Z_{ik}=1 \sim \mathcal{N}(A_k x_{i.},V_{k}^{-1})

with \mathcal{W}(ε^{-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 formula that describe the linear model to use

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

MoRFit-class, MoRPath-class

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)

comeetie/greed documentation built on Oct. 10, 2022, 5:37 p.m.