randPat: Random Patterns spatial permutation algorithm

View source: R/vario.R

randPatR Documentation

Random Patterns spatial permutation algorithm

Description

This function evaulates the .C function 'randpatpar' which is the random patterns algo of Roxburgh and Chesson 1998. Returns species index, phi stat, number of actual swaps, and the randomized presences as a single vector of numbers. To be called in serial or parallel by function "randPatPar'

Usage

randPat(
  i,
  psp,
  rpsp,
  n,
  nstrata,
  pl,
  mtrials1 = 1000,
  mtrials2 = 1e+06,
  alpha = 0.01
)

Arguments

i

the ith species index

psp

multidimenstional S x (n+2) x (n+2) array

rpsp

a randomized version of psp

n

the size of the orginal 2-D array along one spatial axis (i.e., without extra rows and columns)

pl

the places in rpsp that can be swaped

mtrials1

the number of times to attempt a swap at the strata level

mtrials2

the number of times to attempt a swap at the pixel level

alpha

the cutoff value for the phi statistic of Roxburgh and Chesson 1998


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