99_plotem: Plot Two Dimensional Data with clusters

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The functions plot two dimensional data for clusters.

Usage

1
2
3
4
plotem(emobj, x, main = NULL, xlab = NULL, ylab = NULL,
       ...)
plot2d(x, emobj = NULL, k = NULL, color.pch = 1,
       append.BN = TRUE, ...)

Arguments

emobj

the desired model which is a list mainly contains pi, Mu, and LTSigma, usually a returned object from init.EM.

x

the data matrix, dimension n * p.

main

title of plot.

xlab

label of x-axis.

ylab

label of y-axis.

...

other parameters to the plot.

k

index for symbols.

color.pch

color and style for symbols.

append.BN

if appending bivariate normal ellipsoid.

Details

This a simple x-y lot.

Value

A plot is returned.

Author(s)

Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.

References

https://www.stat.iastate.edu/people/ranjan-maitra

See Also

init.EM, emcluster.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(EMCluster, quietly = TRUE)
x1 <- da1$da

ret.1 <- starts.via.svd(x1, nclass = 10, method = "em")
summary(ret.1)

plotem(ret.1, x1)

## End(Not run)

Example output

Loading required package: MASS
Loading required package: Matrix
Method: em
 n = 500, p = 2, nclass = 10, flag = 0, total parameters = 59.
nc: 
 [1]  40  29  37  44  25  56 169  29  55  16
pi: 
 [1] 0.084 0.198 0.070 0.076 0.098 0.080 0.114 0.102 0.088 0.090
mean: 
       [,1]  [,2]   [,3]   [,4]  [,5]   [,6]   [,7]    [,8]  [,9] [,10]
[1,] -27.70 403.1 -45.57  187.8  63.3  19.39 180.91   52.82 96.65 122.0
[2,] -96.17 398.9  62.66 -118.6 -11.3 189.64  19.08 -148.39 91.05 159.8

EMCluster documentation built on March 16, 2021, 5:11 p.m.