plot.theta: Plotting method for "theta" objects

Description Usage Arguments Value Author(s) Examples

View source: R/plot.theta.R

Description

Visualizes the chosen dimensions of the theta object graphically by the GMM density and possibly the individual gaussian components.

Usage

1
2
3
## S3 method for class 'theta'
plot(x, which.dims = c(1L, 2L), n.sd = qnorm(0.99),
  add.means = TRUE, ..., add.ellipses = FALSE)

Arguments

x

An object of class theta.

which.dims

An integer vector of length 2 choosing which two dimensions to plot.

n.sd

An integer choosing the number of standard deviations in each dimension to determine the plotting window.

add.means

logical. If TRUE, dots corresponding to the means are added to the plot.

...

Arguments passed to contour.

add.ellipses

logical. If TRUE, ellipses outlining a 95% confidence regions for each component are added in the bivariate multivariate distribution defined by theta and which.dims.

Value

Plots via the contour function. Invisibly returns a list with x, y, z coordinates that is passed to contour.

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(5)
theta <- rtheta(d = 3, m = 2)
## Not run: 
plot(theta)
plot(theta, col = "blue", asp = 1, add.means = FALSE)
plot(theta, col = "blue", asp = 1, add.means = TRUE)
plot(theta, which.dims = c(3L, 2L), asp = 1)

## End(Not run)
plot(theta, asp = 1, n.sd = 3, add.ellipses = TRUE,
     nlevels = 40, axes = FALSE,
     xlab = "Dimension 1", ylab = "Dimension 2")

GMCM documentation built on Nov. 6, 2019, 1:08 a.m.