DatastreamPermSpat.Rd
Creates randomised movement networks for each network window using datastream permutations with user-defined restrictions (to constrain swaps according to temporal or individual ID-based restrictions)
DatastreamPermSpat( data, intwindow, mindate, maxdate, netwindow, overlap, nextonly = FALSE, same.time, time.restrict, spat.restrict, same.id, n.swaps, n.rand, burnin, n.burnin, warn.thresh, iter )
data | A 5 column dataframe with columns for the ID of the captured individual, the location of its capture (a name or number), the x coordinate of its capture location, the y coordinate of the capture location, and the date of capture |
---|---|
intwindow | The maximum period of time (in days) between two co-captures (i.e. if |
mindate | The start date (format = |
maxdate | The end date (format = |
netwindow | The period of time over which each network is built in months (i.e. |
overlap | The amount of overlap between netwindows in months (i.e. |
nextonly | (TRUE/FALSE). Determines whether a network edge is only created to the next capture of an individual or all captures within the intwindow. Defaults to FALSE |
same.time | (TRUE/FALSE) Whether swaps should be restricted to only occur trapping events on the same date or not |
time.restrict | Provided as a number of months. Imposes time restrictions on when swaps can take place so that locations can only be swapped with those a fixed time before or after being captured |
spat.restrict | Provided on the same scale as the coordinates in the input dataset. Imposes space restrictions on when swaps can take place so that locations can only be swapped with those captued within a fixed distance |
same.id | (TRUE/FALSE) Whether swaps should be restricted to only be between captures of the same individual |
n.swaps | The number of swaps between each random network being extracted (e.g. |
n.rand | The number of randomised networks to be generated |
burnin | (TRUE/FALSE) Whether burnin is required |
n.burnin | The number of swaps to discard as burn-in before the first random network is created. The total number of swaps conducted is thus n.burnin+n.swaps*n.rand |
warn.thresh | The number of times no matches are found (i.e. constraints on randomisations are too restrictive) before the function is stopped and an error message returned |
iter | (TRUE/FALSE) Whether iterative randomisations are being used. If TRUE then D.rand is also returned |
If iter=TRUE
then a list of length 3 is returned with elements corresponding to:
The randomised dataset (for feeding back into the next permutation)
Randomised adjacency matrix list: a list of with the same number of elements at the number of network windows, with each element containing an array of the randomised adjacency matrices
a matrix identifying whether a location was present (i.e. had at least one individual captured there) in each network window
If iter=FALSE
then a list of length 2 is returned with elements corresponding to:
Randomised adjacency matrix list: a list of with the same number of elements at the number of network windows, with each element containing an array of the randomised adjacency matrices
A matrix identifying whether a location was present (i.e. had at least one individual captured there) in each network window. The edge list is not provided due to to the memory that providing this and the list of matrix arrays would require.