ssm_control selects the numerical minimizer, method, associated
control parameters, and parameter bounds used by fit_ssm.
the numerical optimizer used in the fit
if optim = "optim" then the optimization method to be used
can be one of "BFGS", "L-BFGS-B", "Nelder-Mead", "CG", "SANN", or "Brent"
see optim for details
a list named parameter lower bounds, if NULL then built in
defaults are used when method = "L-BFGS-B". Possible parameter names are:
l_sigma a vector of length 2, log scale; l_rho_p a scalar, logit scale;
l_D a scalar, log scale; l_psi a scalar, log scale;
l_tau a vector of length 2, log scale; l_rho_o a scalar, logit scale
a list of named parameter upper bounds, if NULL then built in
defaults are used when method = "L-BFGS-B". Possible parameter names are same as lower
integer; report progress during minimization: 0 = silent; 1 = parameter trace (default); 2 = optimizer trace
logical; should standard errors for speed estimates be calculated (default = FALSE). Turning this on will slow down computation time but provide SE's for speed-along-track calculations
gap threshold in hours; transitions where dt > gap.thresh have velocity innovation reset to marginal (suppresses looping). Inf = no gap flagging (default).
haulout process variance scale factor (0, 1]; 0.01 = nearly stationary; 1 = no constraint
control parameters for the chosen optimizer
Returns a list with components
optimthe name of the numerical optimizer as a string, "nlminb" or "optim"
methodoptimization method to be used
lowernamed list of lower parameter bounds
uppernamed list of upper parameter bounds
verboselevel of tracing information to be reported
controllist of control parameters for the optimizer
The optimizer used to minimize the objective function is
selected by the optim argument. Additional control
parameters specific to the chosen optimizer are specified via the
dots argument. See nlminb and optim
for available options. Adapted from S. Wotherspoon
https://github.com/SWotherspoon/RWalc/blob/master/R/RWalc.R
fit <- fit_ssm(ellie,
vmax = 4,
model = "crw",
time.step = 72,
control = ssm_control(
optim = "nlminb",
eval.max = 2000)
)
#> fitting crw SSM to 1 tracks...
#>
pars: 1 1 0 -3.35398
pars: 0.39011 0.36995 -0.01715 -3.83437
pars: -1.43958 -1.5202 -0.06862 -5.27553
pars: -2.32555 -2.54729 -0.19371 -4.12371
pars: -0.8182 -0.89535 -0.06643 -4.50381
pars: -1.32519 -1.50336 -0.13293 -2.80663
pars: -3.81139 -3.52862 -0.34792 -0.87863
pars: -1.51253 -5.47288 -1.30472 -0.80788
pars: -3.56306 -3.42149 -0.36507 -0.7161
pars: -3.61181 -2.9318 -0.72005 -0.53937
pars: -3.39586 -3.32216 -0.39527 -0.57711
pars: -3.37045 -3.27625 -0.58861 -0.44326
pars: -3.3622 -3.35641 -0.78714 -0.33305
pars: -3.40515 -3.26117 -1.00386 -0.31998
pars: -3.35787 -3.28832 -1.23731 -0.34408
pars: -3.34955 -3.21862 -1.90879 -0.28844
pars: -3.47591 -3.24158 -5.51865 0.09773
pars: -3.40948 -3.22951 -3.62074 -0.1053
pars: -3.24252 -3.2088 -4.51921 -0.46913
pars: -3.24252 -3.2088 -4.51921 -0.46913