On this page

List each scalar parameter of a fit with its estimate, standard error and approximate interval on the natural or the optimizer scale, and whether it was estimated, fixed or not used.

Usage

extract_parameters(fit, scale = c("natural", "internal"), conf_level = 0.95)

Arguments

ArgumentDefaultDescription
fitrequired

An ACL or ALSCL fit, or a saved fit read with read_assessment().

scalec("natural", "internal")

"natural" (default) for the natural scale, or "internal" for the internal scale of the optimizer. Letter case does not matter.

conf_level0.95

Nominal confidence level of the approximate intervals, strictly between zero and one.

Value

A data frame with the columns parameter, scale, status ("estimated", "fixed" or "inactive"), estimate, std_error, conf_low, conf_high and numerical_ok (the verdict of the numerical checks of the fit, the same that summary() reports). Process deviations are not included.

Details

When the fit holds its inputs and settings (fit$recipe), fixed parameters are listed as well, with NA standard errors and intervals; otherwise only the estimated parameters are listed. On the natural scale, standard errors use the delta method, and the interval bounds are the bounds of the internal-scale Wald interval, transformed. Natural values of correlations follow the correlation_range of the fit, and the natural value of the ALSCL parameter log_t0 is t0 in years, including the t0_lower of the fit. exp(mean_log_F) and exp(mean_log_R) are baseline levels of the processes, not averages over time. Check numerical_ok before interpreting the intervals. When the stored inputs do not pass the current input checks, the table lists the estimated parameters only, a warning gives the reason, and the reason is stored in the "inspection_error" attribute.

conf_level is the nominal confidence level of the approximate intervals. summarize_simulations() reports the proportion of simulation intervals that contain the true value.

Additional details from R help

Natural-scale estimates use exp for log and mean_log parameters, plogis for logit parameters (2 * plogis - 1 with correlation_range = "symmetric"), identity for ACL t0 and t0_lower + exp for ALSCL log_t0. The natural-scale SE uses the delta method; interval endpoints transform an internal-scale Wald interval. exp(mean_log_F) and exp(mean_log_R) are the medians of the F and recruitment processes, not arithmetic means over time. Parameter names keep their spelling in the code, which shows the transformation. Unavailable or invalid covariance entries give NA uncertainty, never zero. numerical_ok is the verdict of the numerical checks of the fit, the same that summary() reports; do not read the intervals of a fit that fails these checks as valid uncertainty.

Fixed and inactive parameters are listed by inspecting the stored recipe with inspect_parameters(). A saved fit can hold inputs that the current input checks reject. The table then contains the estimated parameters only, a warning gives the reason, and the reason is stored in the "inspection_error" attribute.

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)
library(ggplot2)
library(patchwork)
data("YTF_example")
x <- YTF_example
inputs <- x[c("data.CatL", "data.wgt", "data.mat")]
dat <- x$data.CatL
a <- run_acl(x, silent = TRUE)
b <- run_alscl(x, silent = TRUE)
extract_parameters(a)
extract_parameters(b, scale = "internal")

See also

Search documentation