require(knitr)
require(formatR)
require(dplyr)
options(width=200)
knitr::opts_chunk$set(cache=FALSE,prompt=FALSE,comment=">",message=FALSE,echo=TRUE,warning=FALSE,tidy=TRUE,strip.white=TRUE,size="small", fig.align = "center",fig.show='hold')

Assignment: Time-varying parameters

In this assignment we will build a more sophisticated growth model in Excel and look at its properties. The model will be the growth model by Van Geert (1991 etc.) as discussed in the book chapter you read. If your are experienced in R or Matlab you can try to code the models following the instructions at the end of this assignment.

Before you begin, be sure to check the following settings (same as first asignment):


The growth model by Van Geert (1991)

The growth model by Van Geert has the following form:

$$ L_{t+1} = L_t * (1 + r – r·\frac{L_t}{K}) $$

To build it repeat some of the steps you performed in last week’s assignment on a new worksheet.

Take good notice of what is constant (parameters $r$ and $K$), for which the $ must be used, and what must change on every iterative step (variable $L_t$). Take about $100$ steps.


Conditional growth: Jumps and Stages

Auto-conditional jumps

Suppose we want to model that the growth rate $r$ increases after a certain amount has been learned. In general, this is a very common phenomenon, for instance: when becoming proficient at a skill, growth (in proficiency) is at first slow, but then all of a sudden there can be a jump to the appropriate (and sustained) level of proficiency.

Auto-conditional stages

Another conditional change we might want to explore is that when a certain growth level is reached the carrying capacity K increases, reflecting that new resources have become available to support further growth.

Connected growers

You can now easly model coupled growth processes, in which the values in one series serve as the trigger for for parameter changes in the other process. Try to recreate the Figure of the connected growers printed in the chapter by Van Geert.

Demonstrations of dynamic modeling using spreadsheets

See the website by Paul Van Geert, scroll down to see models of:


Assignments: Iterating 2D Maps and Flows

In this assignment we will look at a 2D coupled dynamical system: the Predator-Prey model (aka Lotka-Volterra equations). If your are experienced in R or Matlab you can try to code the models following the instructions at the end of this assignment.

Predator-prey model

The dynamical system is given by the following set of first-order differential equations, one represents changes in a population of predators, (e.g., Foxes: $f_F(R_t,F_t)$ ), the other represents changes in a population of prey, (e.g., Rabbits: $f_R(R_t,F_t)$ ).

$$ \begin{align} \frac{dR}{dt}&=(a-bF)R \ \ \frac{dF}{dt}&=(cR-d)F \end{align} $$

This is not a difference equation but a differential equation, which means building this system is not as straightforward as was the case in the previous assignments. Simulation requires a numerical method to 'solve' this differential equation for time, which means we need a method to approach, or estimate continuous time in discrete time. Below you will receive a speed course in one of the simplest numerical procedures for integrating differential equations, the Euler method.

Euler Method

A general differential equation is given by:

$$\frac{dx}{dt} = f(x)$$

Read it as saying: "a change in $x$ over a change in time is a function of $x$ itself". This can be approximated by considering the change to be over some constant, small time step $\Delta$:

$$\frac{(x_{t+1} – x_t)}{\Delta} = f(x_t)$$

After rearranging the terms a more familiar form reveals itself:

$$ \begin{align} x_{t+1} – x_t &= f(x_t) * \Delta \ x_{t+1} &= f(x_t) * \Delta + x_t \end{align} $$

This looks like an ordinary iterative process, $\Delta$ the time constant determines the size of time step taken at every successive iteration. For a 2D system with variables R and F on would write:

$$ \begin{align} R_{t+1} &= f_R(R_t,Ft) * \Delta + R_t \ F_{t+1} &= f_F(R_t,F_t) * \Delta + F_t \end{align} $$

Simulate the Coupled System

Implement the model in a spreadsheet by substituting $f_R(R_t,Ft)$ and $f_F(R_t,F_t)$ by the differential equations for Foxes and Rabbits given above.

The Competetive Lottka-Volterra Equations

The coupled predator-prey dynamics in the previous assignment are not a very realistic model of an actual ecological system. Both equations are exponential growth functions, but Rabbits for example, also have to eat! One way to increase realism is to consider coupled logistic growth by introducing a carrying capacity.

This is what interaction dynamics refers to, modeling mutual dependiencies using the if ... then conditional rules isn't really about interaction, or coupling between processes.



FredHasselman/nlRtsa documentation built on May 6, 2019, 5:07 p.m.