View source: R/Plotting_Functions.R
plot.MoEClust | R Documentation |
Plot results for fitted MoE_clust mixture models with gating &/or expert network covariates: generalised pairs plots, model selection criteria, the log-likelihood vs. the EM iterations, and the gating network are all currently visualisable.
## S3 method for class 'MoEClust'
plot(x,
what = c("gpairs", "gating", "criterion", "loglik", "similarity", "uncertainty"),
...)
x |
An object of class |
what |
The type of graph requested:
By default, all of the above graphs are produced. |
... |
Optional arguments to be passed to |
For more flexibility in plotting, use MoE_gpairs
, MoE_plotGate
, MoE_plotCrit
, MoE_plotLogLik
, MoE_Similarity
, and MoE_Uncertainty
directly.
The visualisation according to what
of the results of a fitted MoEClust
model.
Caution is advised producing generalised pairs plots when the dimension of the data is large.
Other types of plots are available by first calling as.Mclust
on the fitted object, and then calling plot.Mclust
on the results. These can be especially useful for univariate data.
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_stepwise
, MoE_gpairs
, MoE_plotGate
, MoE_plotCrit
, MoE_plotLogLik
, MoE_Similarity
, MoE_Uncertainty
, as.Mclust
, plot.Mclust
data(ais)
res <- MoE_clust(ais[,3:7], gating= ~ BMI, expert= ~ sex,
G=2, modelNames="EVE", network.data=ais)
# Plot the gating network
plot(res, what="gating", x.axis=ais$BMI, xlab="BMI")
# Plot the log-likelihood
plot(res, what="loglik", col="blue")
# Plot the uncertainty profile
plot(res, what="uncertainty", type="profile")
# Produce a generalised pairs plot
plot(res, what="gpairs")
# Produce a heatmap of the similarity matrix
plot(res, what="similarity")
# Modify the gpairs plot by passing arguments to MoE_gpairs()
plot(res, what="gpairs", response.type="density", varwidth=TRUE,
data.ind=c(5,3,4,1,2), jitter=FALSE, show.counts=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.