Modeling with Data and Differential Equations in R
by John Zobitz
Welcome
Computational code
Questions? Comments? Issues?
Acknowledgments
Copyright
I Models with Differential Equations
1
Models of rates with data
1.1
Rates of change in the world: a model is born
1.2
Modeling in context: the spread of a disease
1.3
Model solutions
1.4
Which model is best?
1.5
Start here
1.6
Exercises
2
Introduction to R
2.1
R and RStudio
2.2
First steps: getting acquainted with R
2.3
Increasing functionality with packages
2.4
Working with R: variables, data frames, and datasets
2.5
Visualization with R
2.6
Defining functions
2.7
Concluding thoughts
2.8
Exercises
3
Modeling With Rates of Change
3.1
Lynx and Hares
3.2
The Law of Mass Action
3.3
Establishing species
3.4
Other types of functional responses
3.5
Exercises
4
Euler’s Method
4.1
Defining an Algorithm
4.2
Building an iterative method
4.3
Euler’s method applied to systems
4.4
More refined numerical solvers
4.5
Exercises
5
Phase Lines and Equilibrium Solutions
5.1
Equilibrium solutions
5.2
Phase lines for differential equations
5.3
A stability test for equilibrium solutions
5.4
Exercises
6
Coupled Systems of Equations
6.1
Model redux: flu with quarantine
6.2
Determining stability of an equilbrium solution
6.3
Generating a phase plane in
R
6.4
Exercises
7
Exact Solutions to Differential Equations
7.1
Separable Differential Equations
7.2
Integrating factors
7.3
Guess and Check
7.4
Superposition of solutions
7.5
Applying guess and check more broadly
7.6
Exercises
II Parameterizing Models with Data
8
Linear Regression and Curve Fitting
8.1
What is parameter estimation?
8.2
Fitting temperature data
8.3
Moving beyond linear models
8.4
Can you linearize your model?
8.5
Nonlinear models
8.6
Exercises
9
Probability and Likelihood Functions
9.1
Linear regression, part 2
9.2
Probability
9.3
Connecting probabilities to linear regression
9.4
Plotting likelihood surfaces
9.5
Exercises
10
Cost Functions & Bayes’ Rule
10.1
Cost functions: likelihood functions in disguise
10.2
Connection to likelihood functions
10.3
Extending the cost function
10.4
Conditional Probabilities and Bayes’ Rule
10.5
Bayes’ Rule and Linear Regression
10.6
Exercises
11
The Bootstrap Method
11.1
Plotting histograms in R
11.2
Statistical theory: Sampling distributions
11.3
Bootstapping with linear regression
11.4
Exercises
12
The Metropolis-Hastings Algorithm
12.1
Estimating the growth of a dog
12.2
Applying the likelihood to evaluate parameters
12.3
Concluding points
12.4
Exercises
13
Markov Chain Monte Carlo Parameter Estimation
13.1
MCMC Parameter Estimation with an Empirical Model
13.2
MCMC Parameter Estimation with a Differential Equation Model
13.3
Timing your code
13.4
Further extensions to MCMC
13.5
Exercises
14
Information Criteria
14.1
Why bother with more models?
14.2
The Information on Information Criterion
14.3
A few cautionary notes
14.4
Exercises
III Stability Analysis for Differential Equations
15
Systems of linear equations
15.1
Equilibrium solutions
15.2
The phase plane
15.3
Stability of solutions
15.4
Exercises
16
Systems of nonlinear equations
16.1
Determining equilibrium solutions
16.2
Stability of an equilibrium solution
16.3
Exercises
17
Local Linearization and the Jacobian
17.1
A first example
17.2
The lynx hare revisited
17.3
Tangent plane approximations
17.4
The Jacobian matrix
17.5
Predator prey with logistic growth
17.6
Concluding thoughts
17.7
Exercises
18
What are eigenvalues?
18.1
Straight line solutions
18.2
Computing eigenvalues and eigenvectors
18.3
What do eigenvalues tell us?
18.4
Concluding thoughts
18.5
Exercises
19
Qualitative Stability Analysis
19.1
Two dimensional linear systems: the general case
19.2
Sensitivity to parameters with the trace-determinant
19.3
Higher dimensional stability
19.4
Exercises
20
Bifurcation
20.1
A series of equations
20.2
Bifurcations with systems of equations
20.3
Limit Cycles and Bifurcations with systems of equations
20.4
Exercises
IV Stochastic Differential Equations
21
Stochastic Biological Systems
21.1
A discrete system
21.2
Environmental Stochasticity
21.3
Discrete systems of equations
21.4
Exercises
22
Simulating and Visualizing Randomness
22.1
Ensemble Averages
22.2
Computing ensemble averages
22.3
Doing many simulations and visualizing
22.4
Exercises
23
Random Walks
23.1
Random walk on a number line
23.2
More realizatons
23.3
Random walk mathematics
23.4
Continuous random walks (diffusion)
23.5
Exercises
24
Diffusion
24.1
Random walk redux
24.2
Concluding Thoughts
24.3
Exercises
25
Stochastic Differential Equations
25.1
The stochastic logistic model
25.2
The Euler-Maruyama Method
25.3
Adding stochasticity to parameters
25.4
Concluding thoughts
25.5
Exercises
26
Simulating Stochastic Dynamics
26.1
The stochastic logistic model redux
26.2
A stochastic system of equations
26.3
Generalizing the approach.
26.4
Exercises
27
Solving Stochastic Differential Equations
27.1
Meet the Fokker-Planck Equation
27.2
Exercises
References
Built with Bookdown + RStudio
Exploring Modeling with Data and Differential Equations Using R
Questions? Comments? Issues?
Feel free to file an issue report:
LINK