Description Usage Arguments Value See Also Examples
View source: R/functions_ellipse.r
Add ellipses for each level in a factor to a plot made from a soc.ca object.
1 2 3 4 5 6 7 8 9 10 | 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"
)
|
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. |
a plot with a concentration ellipse containing 80% of the individuals for each modality.
map.ind, map.ctr
1 2 3 | example(soc.ca)
map <- map.ind(result)
map.ellipse(result, map, active[,2])
|
Loading required package: ggplot2
soc.ca> data(taste)
soc.ca> # Create a data frame of factors containing all the active variables
soc.ca> taste <- taste[which(taste$Isup == 'Active'), ]
soc.ca> attach(taste)
soc.ca> active <- data.frame(TV, Film, Art, Eat)
soc.ca> sup <- data.frame(Gender, Age, Income)
soc.ca> detach(taste)
soc.ca> # Runs the analysis
soc.ca> result <- soc.mca(active, sup)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.