Supplement 1. The WinBUGS code for analysis of movement paths.

<h2>File List</h2><blockquote> <table> <tbody><tr> <td><a href="single.txt">singlet.txt</a></td> <td> </td> <td>WinBUGS code for model "Single", a single Random Walk. Size 2 KB</td> </tr> <tr> <td><a href="double.txt">double.txt</a></td> <td> </td> <td>WinBUGS code for model "Double", two Random Walks. Size 2 KB</td> </tr> <tr> <td><a href="double_covar.txt">double_covar.txt</a></td> <td> </td> <td>WinBUGS code for model "Double with Covariates". Size 3 KB</td> </tr> <tr> <td><a href="double_switch.txt">double_switch.txt</a></td> <td> </td> <td>WinBUGS code for model "Double Switch". Size 3 KB</td> </tr> <tr> <td><a href="switch_covar.txt">switch_covar.txt</a></td> <td> </td> <td>WinBUGS code for model "Switch with Covariates". Size 3 KB</td> </tr> <tr> <td><a href="switch_constrained.txt">switch_constrained.txt</a></td> <td> </td> <td>WinBUGS code for model "Switch Constrained". Size 3 KB</td> </tr> <tr> <td><a href="triple_switch.txt">triple_switch.txt</a></td> <td> </td> <td>WinBUGS code for model "Triple Switch". Size 2 KB</td> </tr> <tr> <td><a href="HierSwitch.txt">HierSwitch.txt</a></td> <td> </td> <td>WinBUGS code for hierarchical version of Switch model. Size 3 KB</td> </tr> <tr> <td><a href="simulasw.m">simulasw.m</a></td> <td> </td> <td>Matlab code for movement simulation. Size 5 KB</td> </tr> <tr> <td><a href="PPcheck.m">PPcheck.m</a></td> <td> </td> <td>Matlab code for posterior predictive check. Size 7 KB</td> </tr> <tr> <td><a href="elk_data.txt">elk_data.txt</a></td> <td> </td> <td>Movement data for four elk. Size 87 KB</td> </tr> <tr> <td><a href="simulated.txt">simulated.txt</a></td> <td> </td> <td>Movement data simulated with simulasw.m. Size 46 KB</td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><a href="allfiles.zip">allfiles.zip</a></td> <td> </td> <td>All files together. Size 58 KB</td> </tr> </tbody></table> </blockquote><h2>Description</h2><p>WinBUGS code was run on version 1.4 available at <a href="http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/contents.shtml">http://www.mrc-bsu.cam.ac.uk/bugs/winbugs/contents.shtml</a>. We use the following generic script:<br> </p> <p> display('log')<br> check('directory/model_name.txt')<br> data('directory/data_file.txt')<br> compile(4)<br> inits(1, 'directory/filename1_ini.txt')<br> inits(2, 'switch/filename2_ini.txt')<br> inits(3, 'switch/filename3_ini.txt')<br> inits(4, 'switch/filename4_ini.txt')<br> gen.inits()<br> set(parameter_names)<br> over.relax('yes')<br> update(50000)<br> stats(*)<br> quantiles(*)<br> coda(*,switch/output)<br> <br> </p> <p>See the WinBUGS manual for details on how to run the analysis. Matlab code was run on student version 6.5. </p> <p> </p>