Quiz 2
Schaefer model with index of abundance Constant: index assumed linearly proportional to biomass Unfished biomass = K Observed index value Predicted index value Schaefer MB (1954) Some aspects of the dynamics of the population important to the management of the commercial marine fisheries. Inter-American Tropical Tuna Commission Bulletin 1(2):25-56
Simulated lobster CPUE data a one-way trip 5 Lobster simulation.xlsx, sheet “Simulate”
r = 0.05, K = 40271, lnSSQ = 0.902 r = 0.6, K = 9993, lnSSQ = 0.326 r = 1.0, K = 6355, SSQ = 0.359 5 Lobster simulation.xlsx, sheet “Simulate”
r = 0.05, K = 40271, lnSSQ = 0.902 r = 0.6, K = 9993, lnSSQ = 0.326 r = 0.20, K = 22550, lnSSQ = 0.611 r = 1.0, K = 6355, SSQ = 0.359
“Lobster” model fits All the models fit the index data very well But terminal harvest rates (u2005) range from 0.18 to >1 We need auxiliary information about harvest rates Expert knowledge: from length data it is clear than almost all lobster are caught, thus harvest rates are around 0.7 in recent years. Solution: add a term (u2005 – 0.7)2 to the SSQ
Unequal weighting How to weight multiple data sources How to make probabilistic statements about the results
Lobster lessons learned A one-way trip is not very informative Harvest and growth are confounded We can add outside information by including new terms in the SSQ
Summary of SSQ fitting Make the predicted close to the observed! A simple approach that can be applied to simple or very complex models Find the hypothesis that comes closest to the data Also find competing hypotheses that fit data nearly as well We always want to understand the fit of competing hypotheses
Next steps Models often have many sources of data Move to likelihood that provides a logical method of weighting alternative data sources Likelihood also lets us make more probabilistic statements about competing fits
Nonlinear function minimization
Readings Hilborn and Mangel, Ecological detective, chapter 11 Numerical Recipes 3rd Edition: The Art of Scientific Computing, chapter 11 mostly online: http://apps.nrbook.com/empanel/index.html#
Warning Some of the material in this lecture looks complex and very scary But implementing the equations is intuitive and good practice The algebra is presented for completeness, and we won’t deal with it outside the lecture You can master this subject!
The general problem To find a maximum or minimum in a multi-dimensional surface
Hill climbing in reverse Conceptually we want to walk down hill until every direction is up, to minimize the objective function (e.g. sum of squares)
How to avoid false summits Make sure you are on a true summit Look in all directions In Solver restart from solution to make sure it has converged See if other starting points end up at the same place Start Solver from a number of places, and see if they all go to the same place
Multiple starting points
Basic approach: gradient method Start with a guess about x See which direction is down (calculate the slope dy/dx) Look at the slope and the change in slope (1st and 2nd derivatives) to guess about how far we have to go until we reach the bottom Move that direction Start over again
Newton’s minimization method Ecological detective p. 267 We want to find the minimum value of f(x) Isaac Newton
Newton’s Method: 6 Newtons method.xlxs, sheet Newton derivatives
Lambda = 1.9 Lambda = 0.2 6 Newtons method.xlxs, sheet Newton derivatives
6 Newtons method.xlxs, sheet Newton derivatives
Intuition Function minimum implies first derivative is zero The second derivative is the rate of change of first derivative Divide first derivative by second derivative to get number of units of x to jump to find where first derivative is zero Set lambda < 1 to prevent overshooting
Basic theory If the curve is quadratic (as it is in linear models), then the second derivative is uniform over the entire range of x and you can jump right to the minimum If the curve is not quadratic, then the derivatives change with x and you have to iterate 6 Newtons method.xlxs, sheet Newton derivatives
Numerical derivatives 6 Newtons method.xlxs, sheet Newton numerical
6 Newtons method.xlxs, sheet Newton numerical
Why numerical derivatives? Many real-life functions and models do not have easy formulae from which derivatives can be directly calculated. But it is always easy to change the parameters by a small number (Δ) and rerun the function to get a close approximation to the numerical derivative.
Golden section search Numerical recipes; Ecological detective p. 271-3 One parameter only, no derivatives or differentiation required Minimum must be within bounds; much faster than bisection search Algorithm: Select lower bound L and upper bound U containing the answer Select two new points x1 and x2: Calculate the function at those points Replace U or L with one of the new points as appropriate to narrow the bounds containing the minimum Select another new point to replace the one chosen as a new bound, and repeat Choice of x1 and x2 based on “golden” ratio
Golden section search Step 1 L = 0 x1 x2 U = 1 Step 2 L = x1 x2 x3
Golden section search 6 Golden search.xlxs