# NOT RUN {
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")
# }
Run the code above in your browser using DataLab