View source: R/Plotting_Functions.R
MoE_plotGate | R Documentation |
Plots the gating network for fitted MoEClust models, i.e. the observation index against the mixing proportions for that observation, coloured by cluster.
MoE_plotGate(res, x.axis = NULL, type = "b", pch = 1, xlab = "Observation", ylab = expression(widehat(tau)[g]), ylim = c(0, 1), col = NULL, ...)
res |
An object of class |
x.axis |
Optional argument for the x-axis against which the mixing proportions are plotted. Defaults to |
type, pch, xlab, ylab, ylim, col |
These graphical parameters retain their definitions from |
... |
Catches unused arguments, or additional arguments to be passed to |
A plot of the gating network of the fitted MoEClust model. The parameters of the gating network can also be returned invisibly.
plot.MoEClust
is a wrapper to MoE_plotGate
which accepts the default arguments, and also produces other types of plots.
By default, the noise component (if any) will be coloured "darkgrey"
.
Keefe Murphy - <keefe.murphy@mu.ie>
MoE_clust
, plot.MoEClust
, matplot
data(ais) res <- MoE_clust(ais[,3:7], gating= ~ BMI, G=3, modelNames="EEE", network.data=ais, noise.gate=FALSE, tau0=0.1) # Plot against the observation index and examine the gating network coefficients (gate <- MoE_plotGate(res)) # Plot against BMI MoE_plotGate(res, x.axis=ais$BMI, xlab="BMI") # Plot against a categorical covariate res2 <- MoE_clust(ais[,3:7], gating= ~ sex, G=3, modelNames="EVE", network.data=ais) MoE_plotGate(res2, x.axis=ais$sex, xlab="sex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.