expert_covar | R Documentation |
In the presence of expert network covariates, this helper function modifies the component-specific covariance matrices of a "MoEClust"
object, in order to account for the extra variability due to the component means, usually resulting in bigger shapes & sizes for the MVN ellipses in MoE_gpairs
plots. The function also works for univariate response data.
expert_covar(x,
weighted = TRUE,
...)
x |
An object of class |
weighted |
A logical indicating whether the estimated cluster membership probabilities should be used to provide a weighted estimate of the variability due to the component means. Defaults to |
... |
Catches unused arguments. |
This function is used internally by MoE_gpairs
, plot.MoEClust(x, what="gpairs")
, and as.Mclust
, for visualisation purposes.
The variance
component only from the parameters
list from the output of a call to MoE_clust
, modified accordingly.
The modelName
of the resulting variance
object may not correspond to the model name of the "MoEClust"
object, in particular scale
, shape
, &/or orientation
may no longer be constrained across clusters, and cholsigma
, if it was in the input, will be discarded from the output. Usually, the modelName
of the transformed variance
object will be "VVV"
for multivariate data and "V"
for univariate data, but not always. Furthermore, the output will drop certain row and column names from the output.
Keefe Murphy - <keefe.murphy@mu.ie>
Murphy, K. and Murphy, T. B. (2020). Gaussian parsimonious clustering models with covariates and a noise component. Advances in Data Analysis and Classification, 14(2): 293-325. <\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11634-019-00373-8")}>.
MoE_clust
, MoE_gpairs
, plot.MoEClust
, as.Mclust
data(ais)
res <- MoE_clust(ais[,3:7], G=2, gating= ~ 1, expert= ~ sex,
network.data=ais, modelNames="EEE", equalPro=TRUE)
# Extract the variance object
res$parameters$variance
# Modify the variance object
expert_covar(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.