View source: R/maxLikOverlap.R
| maxLikOverlap | R Documentation | 
This function uses the ML estimated means and covariances matrices of two specified groups to calculate the area of overlap.
maxLikOverlap(
  ellipse1,
  ellipse2,
  siber.object,
  p.interval = 0.95,
  n = 100,
  do.plot = FALSE
)
| ellipse1 | character code of the form  | 
| ellipse2 | same as  | 
| siber.object | an object created by   | 
| p.interval | the prediction interval used to scale the ellipse as per
 | 
| n | the number of points on the edge of the ellipse used to define it.
Defaults to  | 
| do.plot | logical switch to determine whether the corresponding ellipses
should be plotted or not. A use-case would be in conjunction with a low
numbered  | 
A vector comprising three columns: the area of overlap, the area of
the first ellipse and the area of the second ellipse and as many rows as
specified by draws.
# load in the included demonstration dataset data("demo.siber.data")
siber.example <- createSiberObject(demo.siber.data) 
# The first ellipse is referenced using a character string representation 
# where in "x.y", "x" is the community, and "y" is the group within that 
# community.
ellipse1 <- "1.2" 
# Ellipse two is similarly defined: community 1, group3 
ellipse2 <- "1.3"
# the overlap betweeen the corresponding 95% prediction ellipses is given by: 
ellipse95.overlap <- maxLikOverlap(ellipse1, ellipse2, siber.example,
p.interval = 0.95, n = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.