** Ectotherms in Changing Environments. A State Variable Approach **

The writing of this book is supported by an OPUS (Opportunities for Understanding through Synthesis) grant from the Division of Environmental Biology of the National Science Foundation. The purpose of such grants is to allow time and resources for senior people to synthesize a body of research done over many years. My objective is to develop a kind of "lessons learned" from my work on salmonids, southern ocean krill, and insect parasitoids and tephritid flies for understanding how we can predict the responses of ectotherms to changing environments (temperature, precipitation, competitors, predators, etc). My goal is to show how State Dependent Behavioral and Life History Theory (SDLHT), as implemented by Stochastic Dynamic Programming, can be used with other tools used to study the response of organisms to changing environments. On this page, I will provide updates on progress. (Most recent update: Jan 2017.)

* Chapter 1 (Second Draft): Evolutionary Ecology and Environmental Change*. I begin with an explanation of why a third book on stochastic dynamic programming in biology (simply put: to further expands its use) and a discussion of what is means to do science (motivated in part by my experiences in the Whaling Case in the International Court of Justice) and my understanding of synthesis, emphaszing the importance of a plurality of approaches and showing where the approach used in this book can complement others.

I then turn to the role of State Dependent Life History Theory (SDLHT), as implemented by Stochastic Dynamic Programming (SDP), where I emphasize the importance of the intercollation of models and empirical studies, evolutionary endpoints (which is what SDLHT provides), and multiple time scales.

I discuss the roles of theory and basic, derived, and applied science and explain what it means to work in Pasteur's Quadrant (see D. Stokes *Pasteur's Quadrant. Basic Science and Technological Innovation *, Brookings Institution Press 1997). Since I believe that we make the most progress in mathematical biology by considering case studies -- actual biological systems -- from which general principles and techniques emerge, I discuss the importance of case studies. Although there is an entire chapter (Chapter 9) on potential case studies, in this chapter, I discuss salmonids, krill, and parasitoids as examples .

Ectotherms are linked by the Thermal Performance Curve (TPC), I introduce it here, along with Jensen's inequality for fluctuating temperatures. I then provide examples of TPCs for a wide variety of species (a figure with 26 panels).

I then turn to what is in this book, what is not, and why. I explain why I use the simplest models possible in this book. First, when connecting SDP models to other modeling tools, the situation becomes complicated quite quickly, so a simple SDP model has advantages. Second, there are now (as opposed to 1988, when Mangel and Clark [* Dynamic Modeling in Behavioral Ecology *, Princeton University Press] was published, or even 2000, when Clark and Mangel [* Dynamic State Variable Models in Ecology. Methods and Applications *, Cambridge University Press] was published) many papers with detailed and specific SDP mo dels are available. I explain why I do not spend much time on connecting SDP models and data, since once again there is a now a rich ecological literature of that subject (Hilborn and Mangel. 1997. * The Ecological Detective *, Princeton University Press, is still a nice introduction to such ideas). Finally, I explain why I do not consider dynamic games in this book (once again because of the complexity of dynamic games, but point readers to the literature.)

* Chapter 2 (Second Draft): The Canonical Equations of State Dependent Life History Theory*. In a 2015 paper in the Bulletin of Mathematical Biology, on the general subject of 'what has mathematics done for biology?', I introduced two canonical equations for SDLHT.
This chapter begins with a motivation for the canonical equations via the Euler-Lotka equation (perhaps ** the ** canonical equation of population biollogy). I derive equations for expected individual lifetime reproduction and the growth rate of a population following a given schedule of survival and fecundity. This raises the question of how we unpack those schedules by linking envrionment, physiology, and natural selection.

I derive two canonical equations of activity choice (one of which Colin Clark and I called the patch selection model in our 1988 book)and the canonical equation of resource allocation (which in its simplest case corresponds to oviposition by a solitary parasitoid). I discuss some aspects of analytical solution and interpretation of a simple version of the canonical equation for allocation

By allowing for errors in decisions, an idea that is crucial when dynamic state variable games are modeled, we can then develop probability distributions for the selection of different behaviors. I show how this can be done for the canonical equation for activity choice.

After this, I turn to the numerical solution of the canonical equations. I explain why I am not giving pseudocode in this book (as I have done in some of my previous books) but rather actual code (as I have also done in other books). I provide R code for one of the canonical equations of activity choice and for the canonical equation of allocation.

I then explain how we use forward simulation of optimally derived behaviors of life history decisions to compare model predictions with empirical observations, and this requires numerical solution (which has changed greatly in the 30 years since Colin and I published, nearly simultaneous with the paper of Alasdair Houston and John McNamara, our first paper on this topic). In this case, I also give actual R code for simulation.

I then turn to bioenergetically based models of growth and describe the von Bertalanffy (vB) growth model for a semelparous organism and Ray Beverton's theory of Growth, Maturity, and Longevity (GML), from which the notion of life history invariants arose. I show how the canonical equations are modified when the vB growth model is used for the dynamics of state and then turn to the Kleiber-Brody model of growth for an iteroparous organism and show how the canonical equations are modified. I discuss mechanism in more detail and the the role of sensitivity analysis.

I close this chapter with a comparison of State Dependent Life History Theory implemented by Stochastic Dynamic Programming, Dynamic Energy Budget theory, and Physiologically Structured Population Models, showing that they have much in common and suggesting ways to integrate them in the future.

There is a small Appendix, in which I show how to solve the Euler-Lotka equation using Newton's method and another when I explain one and two dimensional interpolation.

* Chapter 3 (Second Draft): Incorporating Basic Thermal Physiology into the Canonical Equations *. I begin with the simple metabolic theory of ecology, in which temperature dependent rates have the Arrhenius form k(T)=k_0 exp(-E_a/k_B T) where k(T) is the rate at temperature T, k_0 is a pre-exponential factor, E_a activation energy, and k_B is Boltzmann's constant. This function clearly cannot account for peaked TPCs and I discuss some of the controversies around the MTE, but it is a useful starting point.

I then develop a temperature dependent canonical equation for activity choice and show particularly how changing temperature will affect both activity and reproductive success.

I then use the canonical equation for allocation for model a parasitoid in a doubling changing world -- one in which temperature is rising and natural host densities are replaced by agricultural hosts densities. This work is motivated by models of Damien Denis et al for changing pupal allocations with temperature and empirical studies of Michal Segoli and Jay Rosenheimn on leaf hopper parasitoids in vineyards or natural settings. Using SDLHT allows us to capture the general properties of time versus egg limitation in parasitoids, how increasing temperature will affect overall reproductive success (because of a reduced lifetime) of parasitoids, and implications of the transition to an environment in which host densities are higher.

This chapter also contains bits of history, such as the crisis of the common currency (which readers with long knowledge of behavioral ecology may recall, and which SDLHT resolved)and the Lack clutch size and its extensions. An appendix includes a description of linear interpolation for the dynamic programming equation and forward iteration.

I conclude with a temperature dependent version of von Bertalanffy growt and show that if the von Bertlanaffy rate parameter has the MTE form of temperature dependence then the widely observed phenomenon of organisms being larger at colder temperatures (Bergmann's rule) immediately emerges.

* Chapter 4 (Second Draft): Population Dynamics: Stage- And Age-Structured Models *. Because they focus on the vital rates that are directly relevant to population dynamics, SDP models can naturally be synthesized with those of population dynamics. One reason for doing this is that environmentally induced changes in survival and/or reproduction do not necessarily lead to a straightforward change in population size.

Behavior is often implicitly included in population dynamics models by stabilizing predator-prey or host-parasitoid models with nonlinear functions and temperature effects on population dynamics are often incorporated by making many of the parameters in classical equations of population dynamics functions of temperature. I point out some leads to the recent literature for the latter topic.

The goal in this chapter is somewhat different: to take advantage of the two time scale for behavior (within season) and population dynamics (between seasons). I illustrate this idea by summarizing work that Bernie Roitberg and I did on behavioral stabilization of the Nicholson-Bailey dynamics for hosts and parasitoids by treating the within season dynamics of host explicitly. One consequence is that the dynamics are not only stabilized, but can sometimes be much stranger than simple limit cycles.

We begin with density-independent stage-structured (matrix) models. For example, a simple stage structured model has three stages (birth, juvenile, reproductive/mature) An introduction to these models suitable for somebody who has never worked with them, includes discussion of classic properties such as the eigenvalues and stable state distribution of the stage-structured model. I then show how the canonical equations can be used to compute the entries (survival within a stage, survival and transition between stages, and fecundity) for a stage-structured matrix model, so that we are able to predict how those entries will change with temperature (assuming that the MTE applies), and thus predict how the dominant eigenvalue of the matrix will change with temperature. I show that these predictions differ than what we would obtain by simply measuring the entries at one temperature and then applying the MTE to scale them; this is due to the facultative nature of SDLHT.

We then turn to density-dependent age-structured models, where the density dependence acts on the number of offspring produced by mature individuals (sucgh models are commonly used in quantitative fisheries science). I introduce the models and discuss the possible forms of density dependence (due to Beverton and Holt, Ricker, Cushing, and Shepherd/Maynard Smith and Slaktin)

After discussing some general properties of the such models, I turn to the puzze of size dependent mass specific fecundity in the rockfish (* Sebastes * spp.) and show how the canonical equation for allocation was used by my student EJ Dick in his PhD thesis [Modeling The Reproductive Potential of Rockfishes (Sebastes spp.) ] to illuminate the way in age or size dependent mass specific fecundity emerges from SDLHT.

* Chapter 5 (Second Draft): Population Genetics: The Norm of Reaction and Fitness in the Price Equation * In Chapter 4, I show how to link SDLHT to population dynamics -- i.e. the changes in numbers of individuals with no focus on the genetic structure of the population or how it changes. That is, the focus is the role of behavior in population dynamics. In this chapter, the focus is the role of behavior in evolution, with the goal of showing how SDLHT links to two tools of population genetics: the norm of reaction and one or more descendants of the Price equation. These are powerful tools from quantitative genetics that are used to study how organism respond to changing environments using simple modifications of the canonical equations to make these points.

I begin with a brief review of the norm of reaction and the Price equation. The norm of reaction summarizes how the phenotype associated with a particular genetic architecture varies as the environment changes It is an environmentally contingent aspects of phenotypic expression; similar ideas arose in previous chapters with discussions of salmonid life history events (smolt metamorphosis, maturation and return to fresh water) consisting of a genetic program responding to environmental cues The norm of reaction is a means of formalizing the Gene by Environment interaction (GxE).

The Price equation is a purely mathematical result that is foundational to evolutionary genetics -- which allows us how to predict the way that the genetic composition of a population changes across generations. Because the Price equation is a mathematical result, there is no question that it is true. I willprovide a derivation of the Price equation using the terminology and notation that is standard in evolutionary genetics and briefly discuss some of its descendants such as the Breeder's equation.

The basic idea of how to use SDLHT for computation of the norm of reaction is simple: we solve the backward equation to determine the rules of behavior and life history and then use forward Monte Carlo simulation to obtain the phenotype over a range of environments. We then plot the resulting phenotype as a function of environment to obtain the norm of reaction. I illustrate this idea using a modification of the canonical equation for activity choice, and show how to compute norms of reaction with respect to food and temperature.

To link SDLHT and the Price equation, we first identify the components of a SDLHT model with the components of the Price equation. Second, we solve the canonical equations numerous times -- since we have a distribution of phenotypes we must solve the canonical equation conditioned on a range of phenotypes. Since the mathematical structure in the Price equation has representation as summation over individuals, it is perfectly suited for the forward Monte Carlo simulation of SDLHT. I illustrate these ideas with a focus on the distribution of metabolic rate in Crucian carp.

I conclude with a brief discussion of the evolution of the norm of reaction, which will become important in the chapter on transgenerational effects.

* Chapter 6 (Second Draft): Information as a State Variable *

I then turn to a variety of examples to illustrate the power of Bayes's theorem alone and in concert with SDLHT. These include nesting male wrasse determing whether to accept potential satellites or not, laboratory experiments in which animals are offered sweet or sour fruit, the canonical equation for allocation with an uncertain end time, and two models for information and development (one focussed on the path of development to one phenotype or another, and the second focussed on the lifetime consequences of early experience.

I then describe the various ways of thinking about information, emphasizing that the simpler the tool the more likely it is to deliver the goods. I begin with a sliding memory model for information, motivated by work that Bernie Roitberg and I did on rose hip flies * Rhagoletis basiola *. I then discuss classical Bayesian approaches (the conjugate prior) fully developing the Poisson-Gamma and Beta-Binomial models; after that I briefly discuss the normal-normal model and how Tachiki and Koizumi (Am Nat 2016) used it to model the norm of reaction in threshold traits in Masu salmon. I briefly mention modern Bayesian methods and point readers towards them.

I then turn to ways that we can characterize posteriors in changing worlds, either by weighting posterior parameters or mixing entire distributions.

Another way to think about information -- that is relevant for population processes particular -- is entropy. I discuss the ideas of entropy and classical information theory, illustrating the ideas with the entropy of an age structured population as discussed in Chapter 4 and show that entropy allows us to characterize with a single number the age structured population. This is particularly useful when there is anthropogenic mortality, since entropy allows us to characterize an effective rate of mortality, which is what the natural mortality would have to be for an undisturbed population to have the same entropy as the one experiencing anthropogenic mortality. This actually gives us ways of designing the anthropogenic intervention. I close this section with a discussion of John Thompson's wonderful work on a greya moth that lays its eggs in seeds and the egg parasitoid of the moth. John showed that the distribution of eggs maximizes the entropy -- the uncertainty -- that the parasitoid faces.

I conclude the chapter with a brief discussion of what is coming up in Chapter 8: using modern Bayesian methods to learn about thermal performance curves and point readers to other links between information, Bayesian anaysis, and SDLHT.

* Chapter 7 (Second Draft): More About Plasticity *

In this Chapter, I discuss some more aspects of plasticity in the context of SDLHT implemented by SDP. In particular, I focus on this issue: since SDLHT generates optimal behavior and allocations and evolutionary endpoints, how can one expect plasticity from SDLHT. I show that part of the answer is that SDLHT is environmentally contingent, so the same genotype (i.e. model parameters) will produce different characteristics in different environments (this is, after all, what the norm of reaction is about). Another part of the answer is that physiological state induces condition dependent plasticity. Finally, it's a fact of life that near the peak of a function, the function is flat, allowing long-term persistence of nearly optimal strategies. I approach this issue with three case studies.

I begin with a study of plasticity in offspring size and number, exploring extensions of the canonical equation for allocation when individuals have the ability to adjust both offspring number and size, only one of them, neither of them. I use the offspring size model of Smith and Fretwell for fixed offspring size and compare first period fitness of the different strategies, with a goal of determining when we would see within generation plasticity.

Second, I develop models for the plasticity in movement by the rose hip fly. To do so, I also introduce a way of characterizing spatial structure (the structure function) that is particularly relevant to behavioral modeling -- it characterizes the probability of encountering resource (here a rose hip) as a function of movement distance conditioned on whether the current spatial point has a rose hip or not. Bernie Roitberg and I measured the structure function at six different rose bush habitats in British Columbia, and I describe a version of the canonical equation for allocation that incorporates spatial structure and movement as a decision. I show that although there is no plasticity in movement from spots with rose hips, there is considerable plasticity in movement from spots without them. I also show how fitness surfaces can be used to assess the strength of selection on movement.

Third, I summarize the classic work of Colin Clark and Drew Harvel on constitutive and inducible morphological defenses (many of the same ideas apply induced chemical defenses, of course). Inducible defenses are in some sense the poster child for plasticity and their model provide much insight into them. I show how their model can be extended to include learning about the rate at which potential predators arrive.

These examples show that although SDLHT leads to evolutionary endpoints, plasticity is completely consistent with SDLHT. I conclude the chapter with a discussion about other things that we should keep in mind about phenotypic plasticity and fitness surfaces.

* Chapter 8 (Second Draft): Unpacking Thermal Performance Curves *

To begin, I give an example about why the choice of the TPC matters by describing a stylized version of our work with steelhead in three river systems in California. I compare the preditions of growth using three phenomenological TPCs that are explained later in the chapter and show that even if they make the same prediction under a base case scenario, the predictions can diverge considerably when the environment changes.

I then provide a survey of phenomenological models of TPCs. This is literally A-Z, beginning with Arrhenius and ending with Zweiterling; I discuss about 20 models in all. This survey also involes a review of the Gompertz growth function and the Q_10 for reaction rates.

After that, I discuss mechanistic models for the TPC, all of which build on the kinetic theory of reaction rates due to Henry Eyring. In this discussion, I review fundamental concepts of thermodynamics such as entropy, enthalpy, free energy, and heat capacity; this allows the discussion to be self-contained.

Given a set of data concerning the thermal performance of an organism, we can consider the different TPCs to be different hypotheses. For that reason, I next discuss a number of cases in which authors have compared different TPCs using either residual sum of squares (early papers) or various information criteria (more recent papers).

Another approach to the TPC is to let the animals themselves tell us the form of the TPC, for which we need non-parametric methods. In this section, I first explain how Fourier series involving mixtures of sines and cosines can be used to describe functions, illustrating the fit of Fourier series to four different TPCS. I then turn to the case in which we only have data and do not want to specify the TPC but let the data tell us what it looks like. I show how the Fourier series approach can be applied in this case, with either least squares or Bayesian methods used to estimate the coefficients in the Fourier series. I illustrate the results with data on Atlantic salmon and Carmel River steelhead respectively.

I close the chapter with a discussion of what remains to be explained. This includes how TPCs depend upon ration, density dependence, and exposure to predators, and how TPCs will evolve. Much has been accomplished, but much remains to be done

* Chapter 9 (First Draft): Potential Case Studies*.
In my previous books on state dependent behavioral and life history theory (both with Colin Clark), we did a variety of case studies in great detail. In this book, I am taking a different tack for two reasons. First, the power, generality, and applicability of the methods are now well understood. That is, in the first book (Mangel and Clark 1988) we were aiming to convince biologists that they could in fact use the methods themselves (rather than having somebody else do the computations for them) and in the second book(Clark and Mangel 2000) we were showing the wide applicability of the methods beyond behavioral ecology. The purpose of this new book is to show how state dependent behavioral and life history theory intercolates with other tools for studying organismal responses to environmental change, so I am keeping the models particularly simple (the canonical equations of Chapter 2 or modest extensions of them) but including in this chapter a variety of potential case studies.

Some of these case studies are developed in great detail while others are really germs of ideas that I think are worth investigating; I hope that this variation will help people see how their own ideas can be developed.

The topics that are in the current draft are: after life contributions of trees and salmon; barnacles flies in the intertidal; the cellquota (Droop) model, storage, and population dynamics; clownfish and their host anemones; complex life histories in ephemeral habitats; foraminifera behavior and the interpreting the paleorecord; a halibut life history model for the management of Pacific halibut fisheries; insect parasitoids, biological control, and Darwin's finches; krill in winter in a changing environment; four questions about salmonids; and snook in the Gulf of Mexico. As we go through the book, discussing methods, I will refer back to the potential case study as a system in which a particular method could be applied with great success.

I have a long list of other potential case studies, but wanted to get on with revision (January 2018) so held off on including them now. They may appear at a later date.

* Chapter 10 (Second Draft): A Career In Pasteur's Quadrant *

I close the book with career advice.

I begin with a variety of examples fo state dependent behavioral or life history theory being used to solve an important applied problem. I then discuss the nature of interdisciplinary (or transdisciplinary) work , and summarize a number of case studies and their lessons learned. In its simplest form, to me indisciplinary work means mastering the skills of one's primary discipline broadly and deeply and the core skils of the disciplines with which one is interacting.

I then turn to professional preparation. Although one can begin a career in Pasteur's Quadrant at any age, I begin with undergraduate school, where I recommend that one master one's disciplinary subject, get out into the field, choose electives to build interdisciplinary skills, participate in research, and master quantiative methods. I agree with E.O. Wilson that being a good scientist does not equal being ``good at math", but then ask what does it mean to be good at math, and explain the role of quantitative thinking and why being skilled at it is important. I have similar recommendations concerning graduate school, and add the importance of reading widely (i.e. beyond one's disciplinary subject). I also explain that one does not need to work 70 hours a week to become a successful scientist -- in fact such work habits may hinder rather than promote success. Hans Krebs considered that the postdoctoral period was generally the most important and formative for one’s career. I emphasize the importance of finding and solving problems, because as Richard Feynman noted ``No problem is too small or too trivial if we can really do something about it'' I recommend looking for a post-doctoral position that will give you time to develop your own ideas, rather than just working on those of your supervisors, and will allow you to continue to develop your skill set (e.g. auditing one course a semester or quarter).

I then turn to communicating science. Clearly, writing is an essential part of communicating science (and publish or perish happens pretty much everywhere, not just in academia), and I discuss a number of favorite books and articles on reading and writing and writing science. I take special note of Strunk and White's "The Elements of Style" (1979), which one should buy, read and re-read regularly.

However, in my career, I have equally emphasized the importance of verbal communication to my research group (pretty much almost everyone getting a PhD understands the importance of written communication).

I have two goals. The first is to emphasize that that no matter how good one is technically, if you cannot tell your story in a compelling manner, it will be lost. And perhaps we need short and pithy ad- vice columns on how to do this; for example in the 22 Nov 2016 issue of Forbes magazine, Marshall Shepherd, who wrote a column "9 Tips For Communicating Science to People Who Are Not Scientists". His tips are consistent with much of this chapter. The second answer comes from former Mangel Lab member Kristen Honey (who is now doing wonderful things about Lyme disease -- visit her site at Honey2Healing.org ), with whom I had lunch about a week before I started writing the first draft of this chapter. Kristen reminded me that for our group meetings the tradition was everyone -- even brand new students -- talked about their research (ideas, results, problems) and that my mantra to the group was "Practice, practice, practice".

Rather than beginning with the department seminar,I begin with strategy for communicating with the non-expert and tactical details for making such a talk a success. I work towards deliberate practice for communicating with the non-expert. The rubric some of us learned in high school speech class -- "Tell them what you are going to tell them, tell them, and tell them what you told them" is a good start, but insufficient. Hemingway once wrote to Maxwell Perkins that "It wasn't by accident that the Gettysburg address was so short. The laws of prose writing are as immutable as those of flight, of mathematics, or physics", but how do we identify those laws, and modify them for communicating with non-experts? The premise of this chapter is that speaking to the non-expert is a skill. This means that each one of us is born with a different level of ability to give such talks, but without deliberate practice one does not hone the skill

What is relevant for the short talk to non-experts holds for the 12-15 minute talk and the department seminar. This includes 1) remember that you are telling a story, 2) know your subject, 3) know your audience, 4) and learn more and use less (selecting your knowledge to match your audience). I discuss aspects of techniqe (because that is what skills are about) including speaking clearly and slowly, how to move while speaking, engaging the audience, using Power Point effectively, using chalk or white board, using notes, and thinking about how you relate to the audience. I also emphasize that one should think about different ways of presenting the same information and how one can use practice to improve with NW (Needs Work) to SE (Skilled and Effective) assessment.

For the 12-15 minute talk, one also needs to think about detail of flow and clairty, short term memory (of the audience) and the aural/visual focus, dealing with technical questions, learning how to say that you don't know something, and making mathematical equations interesting (that can be done, really). The 50 minute seminar is the longest talk that most of us will give. More time does not release one from considering time, but does allow one to do into detail.

My final is PRACTICE, PRACTICE, PRACTICE and I hope that the discussion of techniques and approaches will help make all talks better.

Beyond the post-doctoral position, I discuss the impostor sydrome (and the importance of stupidity in science), and post-decision regret. I also discuss the difference between academic and non-academic positions (my bottom line is that if one feels one HAS to teach to be fulfilled, then academia is where to look first, but even then not always the best). I discuss what is needed to leave academia (to get some `real world ' experience) and then return to it (esssentially keep publishing) and becoming a member of a group, but not too big of one. I also discuss ethical issues in funding.

I leave the last words to Pasteur, who said `There is no such thing as a special category of science called applied science; there is science and there are its applications, which are related to one another as the fruit is related to the tree that has borne it'. In 1894, the 72 year old Pasteur told 28 year old Charles Nicolle `We must work'. Debre ́ (1994) noted that Nicolle followed the advice, did work, and received the Nobel Prize in Physiology or Medicine in 1928 for his work on typhus.