FRWS 6400 2/17/2016 Lab 6 – Evaluating Demographic and Temporal Stochasticity and Age Structured Density Dependent Population Growth Objectives: The first objective of this lab is to learn to run a Monte Carlo simulation to evaluate the effect of including temporal and demographic variation in a population model. To meet this objective, students will continue from a model built in Lab 4 (provided on the class website), and run simulations using a macro built in Excel. As part of this objective, students will learn how to deal with numerical conversion problems that invariably crop up when incorporating stochasticity in a model. The second objective of this lab is to build a model including both age structure and density dependence. 1. Remember that the model in Lab 4 was discrete time and density independent. Use a macro to do a simulation of 100 runs (1000 if you have a fast computer or patience!) to evaluate differences in outcomes between the model with temporal stochasticity alone, demographic stochasticity alone, and both temporal and demographic stochasticity. a. When the number of trials in the CRITBINOM function exceeds ~1030 the function fails and outputs a #NUM! error message. A similar error occurs with the BETAINV function when the parameter being modeled is close to 0 or 1 (e.g., high survival rate, 0.90 or low disease prevalence 0.10). To deal with these errors, we would like to delete the simulation runs where these errors occur. In the case of the CRTIBIOM error, a slight bias may be introduced into the model if the run is simply deleted, but we will start with this simplest case of dealing with these Excel “program bugs” and discuss other strategies for dealing with these sort of problems. For this example, blank out simulations with a #NUM! error message using the function =IF(TRIM(ISERR(MIN(E14:E43)))="TRUE","",MIN(E14:E43)), which will be explained in lab. b. Create a frequency table using the FREQUENCY function. What is the probability (proportion of the time) that population size falls below 40 for each model? Extra Credit: What is the probability that the population persists (i.e., pop size >=50) more than 15 years? What is the probability it persists more than 20 years? 2. Start with the spreadsheet from Lab 5, which was a density independent age structured model of female mule deer population dynamics in northcentral Colorado’s CWD endemic area. Use a pre-birth census model (provided on the class website). a. Incorporate logistic density dependence into the model, such that the density dependence acts on survival and birth rate/recruitment. b. Graph the population size through time for the 2 age classes plus the total population. c. Repeat steps a and b, but model density dependence based on only the doe (adults??) population size. Does this make sense? When might this make sense? 1 FRWS 6400 2/17/2016 Functions and formulas you will use for this lab: N(t+1) = N(t) + B(t) – D(t) to incorporate demographic stochasticity N(t+1) = N(t)(1 + b – d) to incorporate temporal stochasticity CRITBINOM(trials,probability_s,alpha) – demographic stochasticity BETAINV(probability,alpha,beta,A,B) – temporal stochasticity ( =IF TRIM (ISERR ( MIN(E14:E43) ) ) ="TRUE", "", MIN(E14:E43) ) =COUNTIF(F14:F43,">0")-1 – to calculate years to crash COUNTIF(range,criteria) Range is the range of cells from which you want to count cells. Criteria is the criteria in the form of a number, expression, or text that defines which cells will be counted. For example, criteria can be expressed as 32, "32", ">32", "apples". {=FREQUENCY(B12:B1011,$F$12:$F$18)} FREQUENCY(data_array,bins_array) Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the range A13:A16 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER =IF($B11<=C$9,0,1) – for time to crash calculations =SUM(C11:C1010)/COUNT(C11:C1010) – to calculate probabilities =ROUND(E15*S_doe,0) ROUND (number or function, #digits) 2