
Last chance! 50% off unlimited learning
Sale ends in
Run testYaps()
to check that the core functions of YAPS is working correctly.
Output should be a random simulated (black) and estimated (red) track.
testYaps(
silent = TRUE,
pingType = "sbi",
est_ss = TRUE,
opt_fun = "nlminb",
opt_controls = list(),
return_yaps = FALSE,
tmb_smartsearch = TRUE
)
Logical whether to print output to the console
Type of transmitter to simulate - either stable burst interval ('sbi'), random burst interval ('rbi') or random burst interval but where the random sequence is known a priori
Logical whether to test using ss_data_what = 'est' (est_ss = TRUE) or ss_data_what = 'data' (est_ss = FALSE)
Which optimization function to use. Default is opt_fun = 'nlminb'
- alternative is opt_fun = 'nloptr'
(experimental!). If using nloptr, opt_controls
must be specified.
List of controls passed to optimization function. For instances, tolerances such as x.tol=1E-8
.
If opt_fun = 'nloptr'
, opt_controls
must be a list formatted appropriately. For instance:
opt_controls <- list( algorithm="NLOPT_LD_AUGLAG", xtol_abs=1e-12, maxeval=2E+4, print_level = 1, local_opts= list(algorithm="NLOPT_LD_AUGLAG_EQ", xtol_rel=1e-4) )
.
See ?nloptr
and the NLopt site https://nlopt.readthedocs.io/en/latest/ for more info. Some algorithms in nloptr
require bounded parameters - this is not currently implemented.
Logical whether to return the fitted yaps model. Default=FALSE.
Logical whether to use the TMB smartsearch in the inner optimizer (see ?TMB::MakeADFun
for info). Default and original implementation is TRUE. However, there seems to be an issue with recent versions of Matrix
that requires tmb_smartsearch=FALSE
.
If return_yaps == TRUE
, the fitted yaps
object. See ?runYaps
for further info.
# NOT RUN {
#' # To test basic functionality of yaps using simulated data
testYaps()
# # # Three pingTypes are availabe:
# # # fixed burst interval (testYaps(pingType='sbi')),
# # # random burst interval with UNKNOWN burst interval sequence('testYaps(pingType='rbi')),
# # # random burst interval with KNOWN burst interval sequence (testYaps(pingType='pbi'))
# }
Run the code above in your browser using DataLab