View source: R/extra-optimization.R
run_extra_optimization | R Documentation |
run_extra_optimization(object, nlminb_loops = 0, newton_loops = 1)
object |
An object from |
nlminb_loops |
How many extra times to run |
newton_loops |
How many extra Newton optimization loops to try with
|
An updated model fit of class sdmTMB
.
# Run extra optimization steps to help convergence:
# (Not typically needed)
fit <- sdmTMB(density ~ 0 + poly(depth, 2) + as.factor(year),
data = pcod_2011, mesh = pcod_mesh_2011, family = tweedie())
fit_1 <- run_extra_optimization(fit, newton_loops = 1)
max(fit$gradients)
max(fit_1$gradients)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.