ssm_control: Control Values for 'fit_ssm'.

Description Usage Arguments Details Value See Also Examples

View source: R/ssm_control.R

Description

ssm_control selects the numerical minimizer, method, associated control parameters, and parameter bounds used by fit_ssm.

Usage

1
2
3
4
5
6
7
8
9
ssm_control(
  optim = c("nlminb", "optim"),
  method = c("L-BFGS-B", "BFGS", "Nelder-Mead", "CG", "SANN", "Brent"),
  lower = NULL,
  upper = NULL,
  verbose = 1,
  se = TRUE,
  ...
)

Arguments

optim

the numerical optimizer used in the fit

method

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

lower

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

upper

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

verbose

integer; report progress during minimization: 0 = silent; 1 = optimizer trace; 2 = parameter trace (default))

se

logical; should standard errors for fixed effects be calculated (default = TRUE). Turning this off will speed up computation time at the expense of reporting uncertainty for fixed effects

...

control parameters for the chosen optimizer

Details

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

Value

Returns a list with components

optim

the name of the numerical optimizer as a string, "nlminb" or "optim"

method

optimization method to be used

lower

named list of lower parameter bounds

upper

named list of upper parameter bounds

verbose

level of tracing information to be reported

control

list of control parameters for the optimizer

See Also

nlminb, optim.

Examples

1
2
3
4
5
6
7
8
fit <- fit_ssm(ellie,
vmax = 4,
model = "crw",
time.step = 72,
control = ssm_control(
    optim = "nlminb",
    eval.max = 2000)
    )

foieGras documentation built on April 27, 2021, 1:05 a.m.