LAB 4–OPTIMIZATION Goals: The goal of this lab is to familiarize you with some of the commonly used optimization routines and some of the problems you are likely to encounter using these methods. Parameter estimation Recall that in Day 2 of the course, we used PopTools to estimate height-diameter regression equations for a few species. We used the model: Height 1.35 ( Max.Height 1.35 )x( 1 e( 1xBxDBH ) ) where B and MaxHeight are estimated parameters and Height and DBH are the data. There are a number of reasons why the calculation of these parameters may not be straightforward: tree height is often difficult to measure, crowns are often irregularly shaped, or the species of interest may deviate from this relationship. These problems are often more marked in tropical forests because the canopy is highly layered and dense making it difficult to measure height and creating irregular crowns, and palms are often common. In this lab, we will use data from Casearia arborea and the palm Prestoea acuminata from the Luquillo Forest Dynamic plot in Puerto Rico to explore some of these issues. Step 1. Setting up the model Open the worksheet called Lab 4.Optmization.xls. First, you will need to set up the model using the structure we used in Day 2. Note that you will have to use the name Y for the dependent variable (Height) and T for the independent variable (DBH). You will also need to choose adequate upper and lower bounds for parameter estimates. We suggest that you plot the data to come up with reasonable values for these bounds. Use this plot to pick lower and upper bounds for parameters. Now you can use the parameter estimation routines in PopTools to come up with the MLE estimates. Recall that: (1) (2) (3) (4) First, you need to specify your model, initial conditions, and error structure in the spreadsheet (in green). Next you will need to specify the parameter names, initial point estimates and ranges (in blue). Finally, you need to declare both your predictive variable and the observations (in yellow). Choose 1000 for maximum iterations and select an output range. You will see that the parameter estimates are identical to those you obtained with Solver. In addition, Poptools calculates likelihood, AIC and support intervals for the parameters. Finally, you will need to choose an estimation method. Four algorithms are available: MARQ - Marquardt’s method BFGS - Broyden-Fletcher-Goldfarb-Shannon method SIMPLEX – Nelder-Mead Simplex method SIMANNEAL – Simulated annealing Some of these methods are best suited to solve local optimization problems. Derivative-based methods such as Marquardt’s can be messed up when the goodness-of-fit function has sharp Page 1-Lab 2 changes in it. When one of these methods gets to a flat place in the likelihood surface, it gets faked into thinking it's found the answer (since the derivative is zero); when there's a vertical discontinuity in the graph, it gets faked into extrapolating wrong. Simplex is a simple bruteforce option of getting around this problem. Rather than starting with a single point guess at what the parameters are, this method picks a number of points which form a simplex |the simplest shape possible in an n-dimensional space. Simplex, however, will not work if there are multiple local minima. The best way to get around this is to use stochastic optimization algorithms, where you actually pick random numbers to add some “noise" and avoid local minima. The classic stochastic optimization algorithm is the Metropolis algorithm (or simulated Annealing). Step 2. Optimization problems. (1) Go to the spreadsheet for Casearia arborea, use Marquardt’s method, to come up with MLE estimates. What results do you get? Why? Try the second method, BFGS. Does it work? Try the other two methods. Are the results consistent? How do you determine which of the results is “best” in this case? Can you get around this problem by changing bounds for the parameters? (2) Go through the same process with the spreadsheet that contains data for the palm Prestoea acuminata. Try the four methods. Do the parameter values make biological sense? Page 2-Lab 2