CRWmodeling.r (10.02 kB)View fileThis item contains files with download restrictions
Next page
Previous page
1/1
Switch ViewSwitch between different file views
Thumbnail viewList viewFile view
2 filesFullscreen
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.
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.