UCD-SERG / serocalculator

Estimating Infection Rates from Serological Data
https://ucd-serg.github.io/serocalculator/
3 stars 2 forks source link

consider switching from `nlm()` to `optimize()` #205

Open d-morrison opened 1 month ago

d-morrison commented 1 month ago

optimize() performs one-dimensional minimization, and deriv() can be used to get the Hessian at the maximum. Might be faster.

d-morrison commented 1 month ago

I tested out optimize() in https://github.com/UCD-SERG/serocalculator/blob/optimize/data-raw/optimize.R; initial results were not promising. nlm() seems to be computing the gradient and hessian in C; if we could access its internal functions, that might help.