140 likes | 526 Views
Nonlinear least squares regression. Numerically intensive: can't be done by handAs number of parameters gets large" say above 10 or so can take substantial time even on modern computers. Not guaranteed to get the right" answerComputer algorithms find local" minima; sometimes there are more
E N D
1. Nonlinear least squares regression Some models cannot be made linear in parameters
E.g., theta-logistic stock-recruitment model
Solution: nonlinear least squares (NLS)
All other assumptions from OLS (normal residuals, etc.) still apply
Conceptually the same: find the values of parameters that minimize the sum of squared residuals
2. Nonlinear least squares regression Numerically intensive: can’t be done by hand
As number of parameters gets “large” – say above 10 or so – can take substantial time even on modern computers
Not guaranteed to get the “right” answer
Computer algorithms find “local” minima; sometimes there are more than one
Need to provide “pretty good” initial guesses for the parameter values
Base guesses on
scientific information
If only a few nonlinear parameters, try fixing them at a few values and using OLS to estimate the rest; choose the best overall combination
3. Example: stock-recruitment relationship for Alewife
6. Force c=0, theta=1
7. Another stock-recruitment model Beverton-Holt model
No “overcompensation”
Competition for space rather than food
Always some recruitment, no matter how large the spawner population
9. A few issues Some heteroskedasticity caused by positivity constraints
Measured on different scale from Ricker model – can’t directly compare
Try a modified model:
11. Calculating AIC Often, AIC is not reported by software – you have to calculate it yourself:
L is log-likelihood
p is number of parameters
If log-likelihood is not reported, and you are doing least-squares regression, then use this formula (n is number of data points):
12. Comparing the models
13. Dangers of nonlinear regression You can get similarly good fits with very different looking functions
Often OK for interpolating Different models will produce very different predictions when extrapolating