alscl_speed_info()
View source ↗On this page
Report how many cores the standard errors of a fit use in this R session, how the work is shared out and why, and which automatic-differentiation library TMB uses.
Usage
alscl_speed_info()
Arguments
This function takes no arguments.
Value
A data frame of class alscl_speed_info with the columns item (a setting or information item) and value. It reports the sd_cores setting, the number of cores for standard errors, how they are computed and why, how the refinement Hessian is computed, the automatic-differentiation library, the TMB version, and a note that estimates can differ at numerical precision between package versions.
Details
Call it before fitting to check that a session gets the expected speed-up, and record its output with results. After a fit, fit$sd_info records what was actually done (method, cores, seconds).
When the refinement of a fit (polish = TRUE) needs a Hessian, it shares the sd_cores limit, with at most one process per free scalar parameter. It runs in parallel only with forked processes and a checked TMB version; fits with one free parameter, socket sessions and unchecked TMB versions compute it sequentially. If forking fails, a warning is given and the Hessian is computed sequentially. fit$refinement$hessian_calculations records the method, the cores and any fallback for each Hessian computed. An empty table means that no Hessian was returned; fit$refinement$status tells whether refinement was skipped or an evaluation failed.
Examples
Run the setup before the example. Fitting examples require an R-compatible C++ toolchain; simulation and export examples may write files.
Example setup
library(ALSCL)
# Use objects defined above
alscl_speed_info()