lhs.to.stats: Computes statistics on the centroid distances for...

Description Usage Arguments Details Value See Also

View source: R/lhs.to.stats.R

Description

Computes statistics on the hull-to-hull centroid distance for time-overlapped hulls, with an option to plot and overlay the distribution of centroid distances for random pairs of hulls

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lhs.to.stats(lhs, id1 = "all", id2 = "all", n = "all", iso.lower = NULL,
  iso.upper = NULL, iso.oz = TRUE, iso.sort.metric = "auto",
  to.comp.hist = TRUE, breaks = 20, to.mcd.outline.only = FALSE,
  lwd.outline = 3, hist.type = c("density", "counts")[1],
  col.to.mcd = "blue", col.h2h.cd = "red", title = NULL,
  title.show = TRUE, title.id.only = FALSE, title.sub.iso.enc = TRUE,
  mar = c(3, 3, if (title.show) 1.5 + (if (title.sub.iso.enc) 1.3 else 0) else
  0.5, 0.5), mgp = c(1.8, 0.5, 0), figs.per.page = 1, panel.num = NULL,
  panel.num.inside.plot = !title.show, png.dir = NULL,
  png.dir.make = TRUE, png.width = 800, png.height = png.width,
  png.overwrite = TRUE, png.pointsize = 12 + (png.width - 480)/80,
  status = TRUE, ...)

Arguments

lhs

A LoCoH-hullset object

id1

Hullset 1 id value(s). Can also be 'all'.

id2

Hullset 2 id value(s). Can also be 'all'.

n

The number of randomly selected paired hulls to use as the NULL model of no association. Can also be "all"

iso.lower

The lower level isopleth for the isopleth filter

iso.upper

The upper level isopleth for the isopleth filter

iso.oz

Apply isopleth filter to hs1 using the isopleths from hs2. T/F.

iso.sort.metric

The name of a hull metric that was used to sort hulls in the construction of the isopleths to be used as filters. If auto (default) it will pick the default sort metric used for density isopleths (i.e., area for the k-method, and number of enclosed points for the a and r methods)

to.comp.hist

Draw a histogram of the centroid distances of temporally overlapping hulls

breaks

The number of breaks in the histgram (or another valid value for breaks, see hist).

to.mcd.outline.only

Show the outline only of the histogram of the mean centroid distance for temporally overlapping hulls. T/F.

lwd.outline

The line width of the histogram outline (ignored if to.mcd.outline.only=F).

hist.type

The type of histogram to plot: 'density' or 'counts'.

col.to.mcd

The color of the outline of the histogram of the distribution of the centroid distances of temporally overlapping hulls.

col.h2h.cd

The color of the outline of the histogram of the distribution of the centroid distances for randomly paired hulls.

title

The title to be displayed. Character. If NULL a title will be constructed.

title.show

Whether to show the title. T/F.

title.id.only

Whether to construct the title from the id values only. T/F. Ignored if title is passed or title.show=FALSE

title.sub.iso.enc

Whether to include the isopleth filter information as the second line of the title, T/F.

mar

The plot margins. A four item numeric vector

mgp

The distance away from the edge of the plot for the 1) label, 2) tick marks, and 3) axis line. A three-item numeric vector

figs.per.page

The number of plots per page.

panel.num

A number or letter to display in the upper left hand corner of the plot when the plot will be used as part of a multi-frame graphic (as in publications). Character

panel.num.inside.plot

Whether to display panel.num inside the plot area itself, as opposed to the title area. T/F

png.dir

The directory for a PNG file (filename will be constructed automatically). Ignored if png.fn is passed

png.dir.make

Whether to create png.dir if it doesn't exist. T/F

png.width

The width of the PNG image

png.height

The height of the PNG image

png.overwrite

Whether to overwrite an existing PNG file if it exists. T/F

png.pointsize

The pointsize (in pixels) for the PNG image, equivalent to the height or width of a character in pixels (increase to make labels appear larger)

status

Display status messages. T/F

...

Additional parameters that will be passed to the plot function

Details

This returns a list object containing the centroid-to-centroid distances of a random selection of hulls from two individuals, which serves as a NULL model of no interaction. It can also plot the histogram of mean-centroid-distance of time-overlapped hulls with the outline of the centroid distance of random-pairs of hulls overlain on top, to visually see how close the distributions match.

It will also compute the Welch Two Sample t-test to see if the distribution for time-overlapped and randomly paired hulls have statistically significant means, and the Two-sample Kolmogorov-Smirnov test which tells you how likely the two distributions are the same.

Note that before you can use this function, the mean-centroid-distance for time-overlapped hulls must be computed using lhs.to.add

You can apply an isopleth filter by passing values for iso.lower and iso.upper. These should be the isopleth level (normally between 0 and 1) that the hull parent point must fall in to be included in the analysis. If, for example, you wanted to see whether association in the core area is significantly different from nuetral interaction, you would pass iso.upper=0.5 and leave iso.lower NULL. Note that the isopleths with matching isopleth levels must already be present.

Value

A list object

See Also

lhs.to.add, lhs.iso.add


tlocoh.dev documentation built on May 2, 2019, 5:20 p.m.