34 research outputs found

    Supplement 1. R code used for simulation.

    No full text
    <h2>File List</h2><blockquote> <p><a href="Simulation code.r">Simulation code.r</a> – Source code to run simulation analysis</p> </blockquote><h2>Description</h2><blockquote> <p>This is the complete code for simulating usage under different environmental scenarios of food/cover availability and fitting GFR models to the synthetic data. The end of the listing contains the following three functions:</p> <p>environ(d,x): Creates a square dxd arena containing a total of x units of resource. The function introduces spatial autocorrelation via kernel smoothing of the resource units. Kernel smoothed map is re-normalized to ensure that x is conserved.</p> <p>movement(d, env1, env2) : This function contains the movement simulation. The parameters pertaining to animal behavior are locally defined, so the function operates as a wrapper. Its input is the dimensionality d of the square arena and the two environmental layers (env1 and env2). Its output is a map of usage.</p> <p>predict.lmer(mod, newdat) : Generates predictions from the fixed effects of mixed model.</p> <p>The main body of the code has the following parts:</p> <p>1. Initialization</p> <p> Parameters regulating the arena size, number of environmental scenarios and overall availabilities of each resource in the arena for each scenario.</p> <p>2. Simulation</p> <p>The functions environ() and movement() are used to generate resource distributions and resulting usage for each environmental scenario.</p> <p>3. Model fitting</p> <p>Here, the data frame is extended with columns for expectations of the two resources in each scenario and four GFR models are fit to the augmented data frame.</p> <p>4. Model validation</p> <p> This part first inspects the goodness-of-fit of the models. It then generates data for a new environmental scenario with unobserved availabilities. The model fitted in part 3 is then used to make predictions about the new scenario. Then follow several different outputs that aim to visualize and quantify the quality of the resulting predictions.</p> </blockquote

    Capture histories for lions Panthera leo

    No full text
    Gender, DOB, Pride membership and location by conservancy of lions within community conservancies north of the Masai Mara, Kenya. Presence/absence (1/0) and age category also given for 6 month periods to generate capture history (column AB) for mark-recapture analysis with MARK

    Supplement 1. Source code and example data for implementing the Markov chain Monte Carlo algorithm.

    No full text
    <h2>File List</h2><div> <p><a href="MCMCalgorithm.r">MCMCalgorithm.r</a> -- (md5: 66b96318b9d549b5abd7a98178ccc6c8)</p> <p><a href="MCMCalgorithm.c">MCMCalgorithm.c</a> -- (md5: c637bb779c8f04eaf247974a6409ef1b)</p> <p><a href="MCMCalgorithm.dll">MCMCalgorithm.dll</a> -- (md5: 479e438af5b72bb05d8a413b487f8d2e)</p> <p><a href="data.RData">data.RData</a> -- (md5: 25eccac47d5082a651ec6d1040daf939)</p> <p><a href="Initial_values.RData">Initial_values.RData</a> -- (md5: 8da04b2b834f00fe2f7d8669d34e7550)</p> </div><h2>Description</h2><div> <p>MCMCalgorithm.r contains R code for loading the data (data.RData and Initial_values.RData), data pre- and post-processing, loading the dynamic link library file (MCMCalgorithm.dll), and calling the .C function for interfacing the compiled C code (MCMCalgorithm.c) with R (on a machine running Windows). </p> <p>MCMCalgorithm.c contains C code for implementing the MCMC algorithm.</p> <p>MCMCalgorithm.dll is a dynamic link library file containing the compiled C code.</p> <p>data.RData contains the data for 17 harbor seals.</p> <p>Initial_values.RData contains starting values for initialization of the MCMC chain.</p> </div
    corecore