This function loops over the posterior distribution of the means and covariances matrices of two specified groups.
bayesianOverlap(
ellipse1,
ellipse2,
ellipses.posterior,
draws = 10,
p.interval = 0.95,
n = 100,
do.plot = FALSE
)
A data.frame 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
.
character code of the form "x.y"
where x
is an
integer indexing the community, and y
an integer indexing the group
within that community. This specifies the first of two ellipses whose
overlap will be compared.
same as ellipse1
specifying a second ellipse.
a list of posterior means and covariances fitted
using siberEllipses()
.
an integer specifying how many of the posterior draws are to be
used to estimate the posterior overlap. Defaults to 10
which uses
the first 10 draws. In all cases, the selection will be 1:draws
so
independence of the posterior draws is assumed. Setting to NULL
will
use all the draws (WARNING - like to be very slow).
the prediction interval used to scale the ellipse as per
addEllipse()
.
the number of points on the edge of the ellipse used to define it.
Defaults to 100
as per addEllipse()
.
logical switch to determine whether the corresponding ellipses
should be plotted or not. A use-case would be in conjunction with a low
numbered draws
so as to visualise a relatively small number of the
posterior ellipses. Defaults to FALSE
.