## bivariate example
mus <- rbind(c(0,0), c(-1,1))
Sigma <- matrix(c(1, 0.7, 0.7, 1), nr=2, nc=2)
Sigmas <- rbind(Sigma, Sigma)
props <- c(1/2, 1/2)
plotmixt(mus, Sigmas, props, ncont=6, drawlabels=FALSE)
plotmixt(mus, Sigmas, props, ncont=6, dfs=c(3,8), dist="t", drawlabels=FALSE)
## trivariate example
mus <- rbind(c(0,0,0), c(-1,1,1))
Sigma <- matrix(c(1, 0.7, 0.7, 0.7, 1, 0.7, 0.7, 0.7, 1), nr=3, nc=3)
Sigmas <- rbind(Sigma, Sigma)
props <- c(1/2, 1/2)
plotmixt(mus, Sigmas, props, origin=c(-3,-3,-3))
plotmixt(mus, Sigmas, props, origin=c(-3,-3,-3), dfs=c(3,8), dist="t")Run the code above in your browser using DataLab