findOptimum: Optimization functions.

Description Usage Arguments Details Value

Description

Because the likelihood surfaces for these problems often has a severe bananna shape with a poorly defined maximum finding an optimum is often non-trivial If an optimum is given in the input file I use that as an initial value for nlm otherwise, I found that nlm often gets stuck in a local min. So here I have iterated between a genetic optimization algorithm and nlm. This works more often but still at times misses the optimum. This is adhoc.

The covariates are log-transformed and centered if input$centerMS=TRUE or input$centerFlow=TRUE.

Usage

1
findOptimum(dat, input, silent = FALSE)

Arguments

dat

data from the A & P file

input

a list with the other values needed for a DM run.

silent

(TRUE/FALSE)

Details

In SRFunctions(), bev-holt is defined as S/(S*exp(-p[2])+exp(-p[1]))*exp(p[3]*logMS)*exp(p[4]*logFlow) In DM (writeBUGSmodel.R), R = [S/( (S/exp(logCap)) + (1/prod) )] exp(marineInd*logMS) exp(flowCoef*logFlow) so p[1] = log(prod), constrained to be positive p[2] = log(cap), constrained to be positive p[3] = msCoef, p[4] = flowCoef

Value

A list. $estimate parameters at the minimum sum of squared residuals. The parameters are prod, cap, msCoef, flowCoef. $value is the sum of squared residuals at the minimum.


eeholmes/DM documentation built on May 26, 2019, 3:36 p.m.