random_shuffle: Generate individual or sample-based random shuffle...

View source: R/vario.R

random_shuffleR Documentation

Generate individual or sample-based random shuffle statistical null expectations for variograms.

Description

Generate individual or sample-based random shuffle statistical null expectations for variograms.

Usage

random_shuffle(x, vobject, swap, nperm, npar, coords = NULL, breaks = NA)

Arguments

x

is either an output of class 'sim' that is the output of 'sim.neut.uni' OR an site x species matrix

vobject

is the output of 'vario', this informs the function of what parameterization of vario to use specifically it indiates if the pos.neg components and median should be calculated

swap

two options: 'indiv' or 'quad' for individual or quadrat-based shuffling repsectively.

nperm

is the number of permutations

npar

is the number of processors to run the analysis over

coords

the spatial coordinates of the sites, not needed if x is of class 'sim'

breaks

what spatial breaks to use

Note

The sample-based shuffling the mean of the null distribution is the same as the average variance across all distance classes. So shuffling is only useful in deriving the variance around that expectation.

if x is a presence-absence matrix then the individual and sample-based approaches will generate identical within-species variograms

this function requires snowfall and rlecuyer packages are loaded


mcglinnlab/vario documentation built on Feb. 22, 2023, 1:49 p.m.