Supplement 1. Detailed description of correlated random walk simulation and how to obtain an ellipse-shaped region covering successful pathway of a random walker, including R code.
CRWmodeling.r (MD5: c2c0605ab632cab4263910d96e2d76f2)
This supplement is designed to assist the reader in understanding and implementing the correlated random walk simulation using R code. The supplement provides source code for simulating a successful random walker that departs from a source area and hits a target area. The R code uses some functions in the spatstat R package (Baddeley and Turner 2005) to record individual steps as line segments and some functions to calculate an ellipse-shaped region covering the successful pathway of a random walker. The results of this process are illustrated in the main manuscript in Fig. 2.
CRWmodelling.r – To run the simulation, ‘spatstat’ R package must be installed.