sequential.corr: Sequential correlation

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/sequential.corr.R

Description

This function calculates the correlation between the hotspots obtained from each submatrix and those of the baseline (sub)matrix of the corresponding group.

Usage

1
2
3
sequential.corr(hotspots.list, hotspots.thresholds, 
comp.method = "Phi", baseline.interval = 1, baseline.gap = 0, 
messages = "TRUE")

Arguments

hotspots.list

a list of hotspot tables resulting from the sequential.hotspots function

hotspots.thresholds

a matrix of hotspots thresholds (element 2 of the results of the hotspot.numbers function)

comp.method

characer value indicating the correlation coefficient to use; type binary.comp.methods() for available options

baseline.interval

the sampling interval with which to correlate all the other sampling intervals for each group; defaults to 1 (take every sample)

baseline.gap

the sampling gap with which to correlate all other sampling schemes for each group; defaults to 0 (no gap between samples)

messages

logical, whether to display messages

Value

A matrix of correlations (or whatever index was defined in method) between the hotspots obtained for each group and sampling scheme, and the hotspots obtained from the baseline data for the group under analysis.

Note

This function currently works only for hotspots of submats created with 'sampl.interval', not 'window.size' and 'gap.size'. See submatrix, sequential.submatrix, and check that your names(hotspots.list[[1]]) are something like "group.intv1", not "group.w1.g2.s1".

Author(s)

A. Marcia Barbosa

See Also

binary.comparison

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(roadkills)

submats <- sequential.submatrix(dataset = roadkills,
sampl.columns = 4:ncol(roadkills), sampl.interval = 1:3,
group.column = "taxon", include.all.together = TRUE, 
remove.zeros = TRUE, keep.nonsampl.columns = TRUE, 
n.subsampl.columns = 120)

hsl <- sequential.hotspots(dataset = roadkills, submats = submats,
region.column = "segment", first.subsampl.col = 4, confidence = 0.95)

hsn <- hotspot.numbers(hotspots.list = hsl, sampl.intervals = 1:3,
groups = as.character(unique(roadkills$taxon)), 
include.all.together = TRUE, min.total.events = 0, 
min.hotspot.threshold = 2)

seqcorr <- sequential.corr(hotspots.list = hsl,
hotspots.thresholds = hsn$HS.threshold, comp.method = "Phi",
baseline.gap = 0, messages = "TRUE")

seqcorr

AMBarbosa/DeadCanMove documentation built on Nov. 3, 2021, 10:03 a.m.