Learn R Programming

soc.ca (version 0.8.1)

map.ellipse: Concentration ellipses

Description

Add ellipses for each level in a factor to a plot made from a soc.ca object.

Usage

map.ellipse(
  object,
  ca.plot = map.ind(object),
  variable,
  ellipse.label = TRUE,
  ellipse.color = "default",
  label.size = 4,
  draw.levels = 1:nlevels(variable),
  ellipse_line = "solid"
)

Value

a plot with a concentration ellipse containing 80% of the individuals for each modality.

Arguments

object

is a soc.ca class object.

ca.plot

is a plot made from a soc.ca object.

variable

is a factor of the same length and in the same order as the active varibles used for the soc.ca object.

ellipse.label

if TRUE the labels are included in the map.

ellipse.color

defines the color of the ellipses. If "default" the globally defined default colors are used. ellipse.color can be either length of 1 or equal to the number of drawn levels.

label.size

defines the size of the labels.

draw.levels

indicates the levels in the variable for which a ellipse is drawn.

ellipse_line

defines the type of line used for the ellipses.

See Also

map.ind, map.ctr

Examples

Run this code
example(soc.ca)
map <- map.ind(result)
map.ellipse(result, map, active[,2])

Run the code above in your browser using DataLab